grml2usb 0.9.22

Boot grml from usb-stick/firewire-device
grml2usb is a small utility that allows you to boot grml from an USB stick or a Firewire device.

grml officially supports booting from usb-stick with all grml flavours. First of all make sure your system supports booting via usb/firewire. Some hardware claims to be able to boot via usb/firewire but does not really support it the way it should work.

Note: if your external scsi/firewire/usb device is large, you might consider using grml2hd instead. It will work on external drives. It provides a stock Debian system with hardware autodetection.

Prepare system

 * Get the grml iso
 * Mount the iso loopback (e.g. mount -o loop grml_small_0.4.iso /mnt/grml-iso)
 * Make FAT16 filesystem on the usbstick (e.g. mkfs.vfat -F 16 -v /dev/sda1)
 * Mount the usbstick (e.g. mount /dev/sda1 /mnt/external1)
 * Copy everything to the usbstick (e.g. cp -r /mnt/grml-iso/* /mnt/external1).
 * Move all files from /mnt/external1/boot/isolinux/ (mv /mnt/external1/boot/isolinux/* /mnt/external1) and the files linux26 and the minirt.gz (since grml1.1: initrd.gz!) from the directory named like the grml-flavour (/boot/grml, /boot/grmlmedium, /boot/grml64,...) to root of usb-stick
 * Umount the usbstick and the grml-iso
 * Run syslinux on the usbstick (e.g. syslinux /dev/sda1)
 * Check if the usbstick has an valid mbr, else dd if=mbr.bin of=/dev/sda (mbr.bin is in the syslinux package, usually installed in /usr/lib/syslinux/mbr.bin)
 * may need to set the bootable flag using parted (or fdisk)

grml2usb

grml2usb will perform these procedures automatically without user intervention. You need

 * root privileges
 * a mountpoint set up for your USB device in /etc/fstab (edit: anywhere as long its not /mnt/test, since the script uses that dir to mount the iso-file)
 * For Debian: Packages syslinux and mtools installed. Then call

 grml2usb < path-to-the-iso-file > < path-to-the-mountpoint >

without the USB device actually being mounted.

Problems?

 * Check out Booting from USB pen: troubleshooting and pitfalls
 * Try to boot with ‘grml noapic noacpi pci=noacpi’ - some laptops seem to have problems with ACPI and the usb/firewire-modules.
 * Maybe syslinux was not properly installed on the USB device. Some BIOS/systems require the “safe, slow and stupid” version of syslinux so you have to install syslinux using the -s option (’syslinux -s /dev/...’). Or if you are installing it on a 2 GB USB stick it may complain about blocksizes >512 bytes. Using GRUB instead should solve the problem.
 * The boot menu appears, but when booting grml, it fails with: “Could not find kernel image: /boot/gr.ml/”. Your syslinux version may be too old. This could be solved by upgrading from syslinux-3.31 to version 3.52.
 * On an IBM Thinkpad T60 the initrd.img gets loaded half through, then booting just stops. Upgrade to a newer syslinux package. I got it working with 3.63

Does not boot at all?

Unfortunately, booting from a USB stick is not pretty well supported by most BIOSses. Some BIOSses offer different modes for USB booting. The proper mode to boot a USB stick is “USB-HDD”. If that doesn’t work or is not supported by your system, you need to format your USB-Stick as USB-ZIP.

To do this, the syslinux source distribution contains an utility called mkdiskimage, which you can use to re-format your USB stick in USB-ZIP format. This procedure will erase all data on your stick, and leave you with the stick not being used to its full capacity due to rounding requirements.

Additionally, the syslinux package in Debian sarge does not include mkdiskimage.

 * mkdiskimage -4 /dev/< your-usb-stick-device > 1 64 32
 * mkfs.vfat -F 16 -v /dev/< your-usb-stick-device >


Then continue installing as usual.

This is not going to work for any device larger than 8 GB, since mkdiskimage only supports 1024c 256h 63s. For a more detailed explanation, refer to /usr/share/doc/syslinux/README.usbkey on Debian.

Notice: your USB device is accessed after running the BIOS routine and you get “No operating system found”? Make sure the grml-iso is on the first partition of the USB device and that the partition really starts at the first sector of the USB device. Verify this via running ‘cfdisk /dev/sda’ (adjust /dev/sda to your usb device). If ‘cfdisk’ doesn’t work, use fdisk. Also, make sure that the disk is bootable. There should be a * (star) below column ‘boot’.
grml2hd on usb/firewire devices

If you installed grml on an external harddisk (usb/firewire) through grml2hd please make sure the root= option on the kernelcommand line (in lilo/grub) is correct, otherwise booting will fail as the root filesystem can not be found. To work around the issue at all you could use labels/UUIDs as well.

Please report feedback.

last updated on:
March 18th, 2010, 19:51 GMT
price:
FREE!
homepage:
wiki.grml.org
license type:
GPL (GNU General Public License) 
developed by:
grml-Team
category:
ROOT \ Utilities
grml2usb
Download Button

In a hurry? Add it to your Download Basket!

user rating 1

5.0/5
 

0/5

Rate it!

Add your review!

SUBMIT