On Thursday 20 February 2003 04:54 pm, Michael D. Schleif wrote: > I want to eliminate both floppy and cdrom. So, we will need to boot > directly from the flash . . .
Then your not going to use USB unless the MB BIOS supports it (rare). There's been one or two reports of working USB boot w/Bering, however your going to have to put a 'sleep' command in 'initrd' so the USB device has time to come up during init. Copy of LONG post describing the experience: ################ Le Samedi 1 F�vrier 2003 02:12, Ivica Samija a �crit : >�Hi, >�1. Thank you for great work on LEAF Bering distribution and documentation >�for it. 2. I'm sorry if this subject is old thing but I didn't manage to >�find it anywhere, so I tried to do it by my self. I'm trying to learn but >�still newbee so there is prop. better way to do this >�3. Sorry for my English :) > >�So here we go: > >�I have install Bering 2.4.18 stable and update it to 2.4.20 (1 FDD) and it >�works fine but I needed more space for packages but didn't want to make it >�CD (or 2 FDD, HDD) distribution and it is not easy for me to get DOM or >�DOC. >�I decided to try boot Bering from USB flash drive. > >�USB flash drive �MS 64Mb >�Motherboard Matsonic MS7177CT BIOS 01/10/2002 >�(not latest 05/06/2002 <- doesn't have USB support). > >�First I tryed to boot DOS from USB flash drive and after trying and trying >�found out that my motherboard will boot from it only if boot device in BIOS >�is setup for USB-ZIP and USB flash drive is formated with it's own utility. >�When I boot DOS from it I can acces USB flash drive as drive A. > >�On USB flash drive formated with it's utility partition table on drive >�looks like this: Disk /dev/sda: 3 heads, 42 sectors, 1015 cylinders >�Units = sectors of 1 * 512 bytes > >� � Device Boot � Begin � �Start � � �End � Blocks � Id �System >�/dev/sda1 � * � � � 42 � � � 32 � 127935 � �63952 � �6 �DOS 16-bit >=32M >�Partition 1 has different physical/logical beginnings (non-Linux?): >� � � phys=(0, 1, 1) logical=(0, 0, 33) >�Partition 1 has different physical/logical endings: >� � � phys=(974, 17, 32) logical=(1015, 1, 4) >�Partition 1 does not end on cylinder boundary: >� � � phys=(974, 17, 32) should be (974, 2, 42) > >�-when I was shure that I can boot from USB I backuped my working Bering >�floppy -copyed needed modules in /boot/lib/modules/ (from >�http://leaf-project.org/devel/jnilo/bering/latest/modules/2.4.20/) >�-added needed modules for USB suport in /boot/etc/modules in this order >� � usbcore >� � usb-uhci >� � scsi_mod >� � usb-storage >� � sd_mod >�-backuped initrd.lrp >�-rebooted (still on floppy boot) with USB flash drive pluged in > >�It worked. After that I could mount /dev/sda1, so I: >�-created /usb directory and mounted /dev/sda1 on it >� (mounted it with '-t msdos' not with '-t vfat' like some people posted) >�-mounted Bering floppy on /mnt >�-copyed files from /mnt to /usb >�-changed boot=/dev/fd0u1680:msdos to boot=/dev/sda1:msdos, changed >� PKGPATH=/dev/fd0u1680 to PKGPATH=/dev/sda1 in /usb/syslinux.cfg >�-added fdisk.lrp (like in >�http://leaf-project.org/devel/jnilo/budiskonchip.html#AEN1275) -maked USB >�flash drive bootable with syslinux -s /dev/sda1 >�-unmounted everything and reboted with (USB-ZIP boot in BIOS) > >�Then disaster:) here is a part of messages: > >�Jan 31 21:47:43 lrp kernel: Freeing unused kernel memory: 64k freed >�Jan 31 21:47:43 lrp kernel: usb.c: registered new driver usbdevfs >�Jan 31 21:47:43 lrp kernel: usb.c: registered new driver hub >�Jan 31 21:47:43 lrp kernel: usb-uhci.c: $Revision: 1.275 $ time 12:12:08 >�Dec 15 2002 Jan 31 21:47:43 lrp kernel: usb-uhci.c: High bandwidth mode >�enabled Jan 31 21:47:43 lrp kernel: PCI: Found IRQ 5 for device 00:07.2 >�Jan 31 21:47:43 lrp kernel: PCI: Sharing IRQ 5 with 00:07.3 >�Jan 31 21:47:43 lrp kernel: usb-uhci.c: USB UHCI at I/O 0xd400, IRQ 5 >�Jan 31 21:47:43 lrp kernel: usb-uhci.c: Detected 2 ports >�Jan 31 21:47:43 lrp kernel: usb.c: new USB bus registered, assigned bus >�number 1 Jan 31 21:47:43 lrp kernel: hub.c: USB hub found >�Jan 31 21:47:43 lrp kernel: hub.c: 2 ports detected >�Jan 31 21:47:43 lrp kernel: PCI: Found IRQ 5 for device 00:07.3 >�Jan 31 21:47:43 lrp kernel: PCI: Sharing IRQ 5 with 00:07.2 >�Jan 31 21:47:43 lrp kernel: usb-uhci.c: USB UHCI at I/O 0xd800, IRQ 5 >�Jan 31 21:47:43 lrp kernel: usb-uhci.c: Detected 2 ports >�Jan 31 21:47:43 lrp kernel: usb.c: new USB bus registered, assigned bus >�number 2 Jan 31 21:47:43 lrp kernel: hub.c: USB hub found >�Jan 31 21:47:43 lrp kernel: hub.c: 2 ports detected >�Jan 31 21:47:43 lrp kernel: usb-uhci.c: v1.275:USB Universal Host >�Controller Jan 31 21:47:43 lrp kernel: end_request: I/O error, dev 02:00 >�(floppy), sector 0 Jan 31 21:47:43 lrp kernel: end_request: I/O error, dev >�02:00 (floppy), sector 0 Jan 31 21:47:43 lrp kernel: end_request: I/O >�error, dev 02:00 (floppy), sector 0 Jan 31 21:47:43 lrp kernel: LINUXRC: >�Could not mount the boot device. Can't install packages. Jan 31 21:47:43 >�lrp kernel: Kernel panic: Attemped to kill init! > >�I went back to floppy boot with USB flash drive still connected and it >�worked again, then I: -uncomented VERBOSE and DEBUG in linuxrc >�(/var/lib/lrpkg/root.linuxrc) (floppy boot) -mounted /dev/fd0u1680 on /mnt >�-changed boot=/dev/fd0u1680:msdos to boot=/dev/sda1:msdos, changed >�PKGPATH=/dev/fd0u1680 to PKGPATH=/dev/sda1 in /mnt/syslinux.cfg >�-umounted /mnt >�-backuped initrd.lrp (still floppy) >�-rebooted (floppy boot) and watched. > >�It seams that sd_mod.o have a delay in bringing up sda and kernel can't >�mount boot=/dev/sda1:msdos so it trys other devices and finaly mounts >�floppy as boot (of course if there is Bering floppy in drive, if not it >�ends up with Kernel panic as above) and continue booting. > >�So I: >�-made directory /usb and mounted /dev/sda1 there >�-edited /var/lib/lrpkg/root.linuxrc like this > >�-------<snip>-------- >� # Uncomment for more verbose execution. >� VERBOSE=1 > >� #Uncomment for debug mode (don't suppress STDOUT and STDERR) >� DEBUG=1 > >� # �**** Adjust if needed **** >� # �1/ Max size of unpacked LRP files >� SYSTSIZE=6M >� # �2/ Max size of /var/log directory >� LOGSIZE=2M >�# �3/Wait time for USB drive >�################################### >�WAIT_FOR_USB=3 >�################################### > >� if [ $DEBUG ] ; then >� �qt () { "$@" ; } >� else >� �qt () { "$@" >>/linuxrc.err 2>&1 ; } >� fi > >� source () { . $@; } >� PFX=/var/lib/lrpkg >� BB=/bin/busybox >� SYM="-s" > >� $BB mkdir /proc >� $BB mount -t proc /proc /proc >� /bin/busybox --install -s > >� VERSION="`cat /var/lib/lrpkg/root.version`" > >� echo "LINUXRC: Bering - Initrd - $VERSION" > >� # >� # Load any modules required to boot >� # >� BOOTDIR=/boot >� if [ -r $BOOTDIR/etc/modules ] ; then >� �# Loop over every line in modules >� �[ "$VERBOSE" ] && echo "Loading modules..." > >� �# make sure there is a LF at the end >� �($BB cat $BOOTDIR/etc/modules; echo) | >� �while read module args; do >� � case "$module" in >� � �\#*|"") continue;; >� � esac >� � /sbin/insmod $BOOTDIR/lib/modules/"$module".o $args >� �done >� fi > >�# Wait some time to bring up USB drive >�################################### >�echo "Waiting $WAIT_FOR_USB sec for USB drive..." � � � � � � � >�################################### $BB sleep $WAIT_FOR_USB >�################################### >�-------<snip>-------- >�-(just paused for 3 sec after loading ds_mod.o giving enough time to bring >�up sda) -backuped initrd.lrp (floppy) >�-mounted /dev/sda1 to /usb >�-copyed /mnt/initrd.lrp to /usb/initrd.lrp >�-unmounted everything >�-rebooted (with USB-ZIP in BIOS) >�-watched > >�Bering booted from USB flash drive with no complaints :) > >�-mounted /dev/sda1 to /mnt >�-comented VERBOSE and DEBUG in /var/lib/lrpkg/root.linuxrc >�-backuped initrd.lrp (USB drive) > >�Rebooted and it is working OK. > >�Sorry for LONG mail but I just wanted to ask is there a beter way and is >�this OK? > >�Regards >�Ivica Samija ###############################################3 -- ~Lynn Avants Linux Embedded Firewall Project developer http://leaf.sourceforge.net ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel
