Booting from USB, no HD, fixed

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.


Posted on 9 May 2011, 21:21


Comments:

Posted on 9 May 2011, 24:15 by GCMartin
No HDD present
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


Posted on 10 May 2011, 2:55 by dawg
PET updates?
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



Posted on 10 May 2011, 8:17 by BarryK
Re update PETs
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.



Posted on 10 May 2011, 8:21 by BarryK
Re no HDD
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.



Posted on 10 May 2011, 11:54 by PaulBx1
Lupu?
If we are given the details of this fix, we can also modify the initrd.gz used in Lupu525, which also has this problem. Of course we will need to figure out how to edit it; I take it the old utility for modifying initrd.gz no longer works. But one of those lupu guys must know how to do it...


Posted on 10 May 2011, 15:48 by laurentius77
Re: No HDD
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.


Posted on 10 May 2011, 19:38 by ICPUG
Fix details
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.


Posted on 12 May 2011, 23:04 by PaulBx1
Tried and failed
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.


Posted on 13 May 2011, 8:11 by BarryK
re tried and failed
PaulBx1,
I announced the next upload of Woof is only a day away. Patience.

'init' requires more than one line to be edited.