USB booting :: How to reconfigure the minirt image



You're welcome :) I'll go add waitusb to the wiki..
I'm afraid the "waitusb" command just didn't work for me and gave exactly the same "error" as before.
So, then I tried to insert a "sleep" command into the linuxrc part of minirt. My procedure was:
1) copy minirt.gz to a /tmp folder on my Desktop (actually on another partition where I run Ubuntu -- only because I'm more comfortable in Ubuntu right now)
2) gunzip this file to minirt
3) mount this (using -o loop) to another folder on the Desktop
4) edit linuxrc to include "sleep 30" at line 247 which is just after the usb_storage module has been loaded
5) unmount the folder where minirt was mounted
6) gzip the "new" minirt
7) copy the .gz image to the /boot folder on the DSL partition

However, this also did not make any difference and I get the same error.

Now, I'm beginning to think that my primary problem is not the lack of time needed for the usb drive to swing into action. This is because in every case the "error" is: (Note that this is transcribed rather than copy/pasted):

Quote
Scanning for USB devices.....done
Looking for CDROM on /dev/hda2
Can't find Knoppix filesystem
Dropping you to a (very limited) shell)

Nevertheless, to get the boot going again is extremely easy and just requires typing "exit" or Ctrl-d
It therefore seems that linuxrc is looking for the filesystem on a CDROM (whereas it's on the HD) and gives up when it doesn't find it.
On this basis, perhaps some more drastic surgery is needed on the linuxrc.

I'd welcome more experienced comments before applying my newbie scalpel.

Thanks
Paul

Maybe you put the sleep in the wrong place..

I think it is the fact your drive is slow, since boot works after exiting the limited shell.. Linuxrc is set to look on any hd???/sd???/sr???/scd?? it can find in the system..

Badly need some help here with this "sleep" command.
I have already tried it in FOUR (4) different locations in the linuxrc file (with times actually up to 300 seonds which is 5 minutes). But, there does not seem to be any delay/wait/sleep whatsoever no matter where I put the command and no matter how long it is..
Here is the part of the file showing where I put the sleep command (sleep 20). It's around about line 340. I realize I put it in a loop which means the total delay/sleep should have been about a minute -- but as far as I could see there was no delay at all.
Could you please cast an eye over it and see if anything looks strange.
Thanks
Paul
Code Sample
# New: also check HD partitions for a KNOPPIX/KNOPPIX image
test -n "$FOUND_SCSI" -a -z "$NOSCSI" && DEVICES="$DEVICES /dev/sd?[1-9] /dev/sd?[1-9][0-9]"
DEVICES="$DEVICES /dev/hd?[1-9] /dev/hd?[1-9][0-9]"
case "$CMDLINE" in *fromhd=/dev/*) DEVICES="$fromhd";;; esac
for i in $DEVICES
do
echo -n "${CRE}${BLUE}Looking for CDROM in: ${MAGENTA}$i${NORMAL}   "
sleep 20
if mountit $i /cdrom "-o ro" >/dev/null 2>&1
then
if test -f /cdrom/$KNOPPIX_DIR/$KNOPPIX_NAME
then
echo -n "${CRE} ${GREEN}Accessing DSL image at ${MAGENTA}$i${GREEN}...${NORMAL}"
FOUND_KNOPPIX="$i"
break
fi
umount /cdrom
fi
done

D'oh! There isn't a sleep command included in ash, I guess..

The sleep command is fine in your quote though..
Solution: compile busybox with only sleep statically, name it "sleep", copy it to /sbin in the initrd, and modify that command to say /sbin/sleep 20

Next Page...
original here.