UsbMorphix

From MorphixWiki

Jump to: navigation, search

SubProjects

Contents

Booting Morphix from USB drives

For details on using usb drives/sticks from Morphix, see MorphixFaq or the faq/forum on morphix.org

Booting Morphix from CD should work most of the time, however, some people insist it boot from their usb-drives too (stick, harddisk, any other storage device). Anyway, I personally don't have one to fiddle with, but here is a short summary on it from Kano's experiences (from what i understood). Note that this is not a tutorial, it doesn't tell you each step. It will probably still have errors, but I hope I'll get Kano so far that he'll 'debug' this page :)

See also how to use Debian Installer to boot usb keys: http://wiki.debian.net/index.cgi?Keydrive


links:


Installing driver for Linux Kernel 2.4 or +

You have to:

  1. Create a directory for the keydrive: mkdir /mnt/auto/key1
  2. Mount the drive: mount -t auto /dev/sda1 /mnt/auto/key1

Requeriments:

  1. Use at least 32/64 MB USB flash drive. You'll need more for adding larger modules
  2. Utilize a bootable drive and a BIOS that can boot USB-ZIP / USB-HD.

Morphix 0.4-1c

This release has usb-booting included. Please note that this is for experimentation only.

MountUsb and copy the files in the cdrom image over to your usb stick:

mount /dev/sda1 /mnt/auto/key1
cp -a /cdrom /mnt/auto/key1/

For installing grub onto your usbkey: grub-install /dev/sda1


Morphix 0.5-pre5

As with Morphix 0.4-1c

MountUsb and copy the files in the cdrom image over to your usb stick:

mount /dev/sda1 /mnt/sda1
cp -a /cdrom/* /mnt/sda1/

Additional steps are necessary.

  1. you may need to mount the miniroot on a loopback device
    • edit linuxrc to increase the sleep time for loading the usb devices
    • put new compressed miniroot on usb stick
  2. edit /boot/grub/menu.lst on usbstick
    • replacing (cd) with =
    • replace usbboot with bootusb
  3. Install GRUB boot loader:
grub-install --root-directory=/mnt/sda1 /dev/sda1

Changes below are necessary for Morphix <0.4-1c

All changes necessary for booting Morphix from usb have to be done in the miniroot.gz located in the boot.img in the /base directory of the iso.

(for now, as all miniroot.gz's are too small to fit all the modules in, Kano's miniroot.gz is online: http://am.xs4all.nl/morphix/usb/miniroot.gz. This will be removed after the next release, as then the standard miniroot.gz should be big enough for all modules)

First, you need to copy the usb kernel modules from morphix into the miniroot. These can be obtained from the /lib/modules/`uname -r`/kernel/driver/usb directory of a running morphix system. Make a new directory in the miniroot: /modules/usb. Copy the usbcore, ehci-hcd, usb-uhci, uhci, usb-ohci and usb-storage modules into the new directory.

Second, you need to have a static compiled 'sleep' in the miniroot in the /static directory. Because I hate extra work, you can download it from: http://am.xs4all.nl/morphix/usb.

Third, apply this patch: http://am.xs4all.nl/morphix/usb/linuxrc.patch.morphix on linuxrc in the root directory of the miniroot. patch < linuxrc.patch.morphix, you know the drill.

(You might need to experiment, and comment out one of the uhci/ohci/ehci drivers in linuxrc. Kano's pc worked fine using only the usbcore, ehci and usb-storage modules)

The problem with USB 1.1 drivers is, that USB devices like Mouse will stop working. By only using the USB 2.0 driver there is no problem with that.

(this last part has been copied directly from http://rz-obrian.rz.uni-karlsruhe.de/knoppix-usb/)

If you're lucky your computer will boot out of the box when you select USB-HD as a bootdevice. Otherwise read on...

As the patch is for a partitioned stick - that is for the PC like a HD you have to choose it. You can modify the patch to search for /dev/sda instead of /dev/sda1 in order to use a "superfloppy". This is an unpartitioned stick with only FAT+SYSLINUX on it. First example on the German site above.

   * You can try the other USB Boot Options (Floppy, CD-ROM, Harddisk), if still nothing happens you might have to enable USB Keyboard Support in your BIOS (needed on some motherboards with AMI BIOS and a Via chipset, including Epia-m and Shuttle mv42n).
   * On some broken boards (like my Epia-M...) you need to plug the memory stick in without any power (remove your power plug), otherwise the BIOS might not recognize the memory stick.
   * If your BIOS boots from the Memory Stick, but you can see only sequences of ones and zeroes, you can try an alternative bootsector from [[ http://rz-obrian.rz.uni-karlsruhe.de/knoppix-usb/spb2mbr.sec| spblinux || http://www.8ung.at/spblinux/]] . As the site is sometimes down you can download the bootsector [[ here |]] (Version 1.01). Just put this one on /dev/sda and try it out (dd ifspb2mbr.sec of/dev/sda). Many thanks to Christian Ostheimer for his great work (I didn't believe anymore in booting from USB, but his spblinux made it possible ;-)

Q:This page is very good a saying how to prepare the file, but no instructions are here for installing the bootsector.

Solution: You can follow sections 4.4, and 4.5 of http://www.freewebs.com/tsj/bootingUSBldpv0.1.htm to write to the bootsector.

The GRUB setup command will write the stage1 to the bootsector and embed place of the stage2 to the bootsector.

A rawrite ( in windows ) or dd command ( in Linux ) should be able to raw write the stage files to the usb media.

Q: Would it be possible to use a memory stick for additional modules?

Solution: that's for sure. Some distros ( like http://flonix.tuxfamily.org ) saves the home directory and configuration in the USB keydrive.

Personal tools