Booting from USB, no HD, fixed
May 09, 2011 —
BarryK
Booting a computer from USB drive, no internal hard drive installed, was failing to boot. This was reported for Wary 5.1.1 and earlier. Just before releasing Wary 5.1.1.53, I announced that I had fixed this bug, as a side-effect of redesigning some code in the 'init' script to boot faster.
At the time though, I determined the bug was fixed theoretically, didn't confirm it. Now there is a report the bug is still in Wary 5.1.1.53.
So, I whipped the hard drive out of one of my netbooks and booted from a USB Flash drive. Yep, the bug is still there. Or was, now fixed.
The problem was a line like this in 'init':
echo "$PCPARTS0" | grep -v -f /tmp/ATADRIVES0
...where the ATADRIVES0 is a list of the internal hard drives, the effect will be to output only the USB drives. However, when there were no hard drives, the file ATADRIVES0 had only a LF character in it, which had the effect of letting nothing through -- it should really have been an empty (0 bytes) file.
Comments
No HDD presentUsername: GCMartin
Barry understanding this blog post. Does/Could this have anything to do with my laptops where I have problems with save-session back to LiveCD/DVD? Here's 3 scenarios 1. No HDD, no USB 2. No HDD, USB for SWAP ONLY via a Primary partition 3. No HDD, USB with a data Primary partition, AND the SWAP in the extended Primary partition (thus 2 partitions) These 3 machines cannot save-sessions in latest PUPs If this provides useful information about my specifics, then it potentially helps everyone. Hoep this helps
PET updates?
Username: dawg
"It'd be very useful and user-friendly if you had updates (or announcements of their existence and how to get them) on a page alongside the release files, so they'd be easy to find (or even find out about to begin with)...IMHO
Re update PETs
Username: BarryK
"dawg, This is my blog, where I report stuff almost immediately I do it. It is a real-time developer's commentary. Besides, the 'init' script cannot be provided as a PET. An updated 'initrd.gz' needs to be provided, which will be done soon when I build another Wary for release.
Re no HDD
Username: BarryK
"GCMartin, Yes, my latest bugfix has probably solved your problem also. Note, I will probably be releasing another Wary quite soon, and an xdelta file to upgrade the .iso file. Plus another upload of Woof.
Re: No HDD
Username: laurentius77
"I subscribe to PaulBx post, maybe there is a way to modify initrd.gz I wait for Barry's release of Woof. I have a 2.6.33.2 kernel .pet without SATA/IDE modules and I want a Puppy 525 distribution built on this kernel version. Until now I had no success in booting from USB or DVD using a distribution built with this kernel .pet. I hope the reason is this bug and the my kernel is ok and I hope that I will finally have a distribution that cannot touch any computer HDD.
Fix details
Username: ICPUG
"Follow up to PaulBx1 So far we are told the problem is a single line like: echo "$PCPARTS0" | grep -v -f /tmp/ATADRIVES0 We don't know what the fix is. If we did then I think we could: - unpack lupu's initrd.gz - make the fix according to lupu - repack the revised initrd.gz - create a new iso/CD (unless you have a frugal install - in which case just replace the initrd.gz) I think the original edit initrd.gz utility provided a little help to the first 3 steps. Might well work with lupu. We can always do it manually if not.
Tried and failed
Username: PaulBx1
"I found a recipe for editing init here: http://www.murga-linux.com/puppy/viewtopic.php?search_id=492178382&t=53019 With my meager coding skills I looked in there and found a line something like this (working from memory): [ ATADRIVES = " " ] && ATADRIVES = "" I made another copy of that except changing " " to "\n" Well, it didn't work. Don't know if the code is wrong, or if I interpreted Barry wrong, or what.
re tried and failed
Username: BarryK
"PaulBx1, I announced the next upload of Woof is only a day away. Patience. 'init' requires more than one line to be edited.
Tags: woof