[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[debian-knoppix] delay in ash-knoppix?

Hi *,

I managed to get a 128MB usb memory stick bootable with a stripped down
version (82MB) of Knoppix. I had to include the necessary usb kernel modules
(usb-uhci, usb-ohci, usb-storage) in the initial ramdisk (miniroot.gz)
and I modified /linuxrc.

However, the linuxrc script does not find the Knoppix filesystem on
/dev/sda1 right after loading the usb modules. There has to be a delay
of about one or two seconds (which is needed by the kernel to initialize the
usb host controller or recognize the memory stick). Unfortunately, no
sleep command is available in miniroot.gz and the statically linked ash
is also very limited.

So how can I delay the execution of the script for a short time?
No "for ... ; do ... done" please, because it would be cpu-dependent.
I experimented with /proc/uptime, but it is not very reliable:

IFS="." read begin x < /proc/uptime
while read end x < /proc/uptime
  [ "$begin" != "$end" ] && break

Christian Perle                                   perle@itm.tu-clausthal.de
Grunaer Str. 31                      http://www.itm.tu-clausthal.de/~perle/
01069 Dresden                   LinuxGuitarKitesBicyclesBeerPizzaRaytracing
debian-knoppix mailing list

Reply to: