====== Boot Grml from usb-stick/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. :-/ **Please consider using grml2usb for installing grml on your usb device!** It does all the single steps automatically for you with just one single command line! (See below.) You have three main options how to install a Grml ISO to your usb device: - install using grml2usb (flexible, easy to use) - install using dd - install using a manual approach ===== grml2usb ===== [[http://git.grml.org/?p=grml2usb.git]] will perform all the annoying procedures automatically with one single command line for you (except for the device partitioning of course)! Make sure you have a recent version of the grml2usb Debian package installed. Check out [[http://grml.org/grml2usb/|grml.org/grml2usb/]] or the grml2usb manpage for details. Note: starting with grml2usb version 0.9.2 it's not a shellscript anymore, instead grml2usb is completely rewritten from scratch in Python. It provides a much more powerful interface, featuring multi-ISO support, providing support for additional bootoptions, grub as bootmanager and automatic installation of a known-to-work MBR (master boot record). ===== Install using dd ===== Starting with release 2009.10 the grml ISOs are capable of being dd-ed to a device. This means that you can install a given grml ISO to your USB device using dd(1) like: dd if=grml.iso of=/dev/sdX where /dev/sdX corresponds with your USB device (e.g. /dev/sdb). Please note that executing this command will destroy any existing data on your USB device. This method is not as flexible as using grml2usb (lacks support for multi-ISO, specifying additional default bootoptions,...) but might be useful if grml2usb isn't an option for you. Note: if you are using Windows you might want to use [[https://launchpad.net/win32-image-writer|win32-image-writer]] (just rename the Grml-ISO to grml*.img) or [[http://www.chrysocome.net/dd|RawWrite dd]]. ===== Manual approach ===== * Make sure syslinux and mkfs.vfat are available on your system ('aptitude install syslinux dosfstools') * 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) * Create a disklabel (e.g. dosfslabel /dev/sda1 GRML) * 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/) to root of usb-stick * //recent grml versions (>= grml 2008.11):// the files linux26 and initrd.gz must remain in boot/$FLAVOUR (/boot/grml, /boot/grmlmedium,...), but it is necessary to copy both to /mnt/external1, while using syslinux v3.63 (ubuntu 8.10) * //old grml versions (older than grml 2008.11):// move the files linux26 and minirt.gz (for grml 1.1: initrd.gz!) from the directory named like the grml-flavour (/boot/grml, /boot/grmlmedium, /boot/grml64,...) to the root of the 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) * You may need to set the bootable flag using parted (or fdisk) ===== Building an EFI USB Key on a Mac ===== * Plug in a 512MB+ **blank** USB key * Start Disk Utility * Select the USB Key * Choose the "Partition" tab * Select Partition Layout: "1 Partition" * Options: tick "GUID Partition Table" * For the partition format, choose "MS-DOS (FAT)" * Apply * Mount the grml64 ISO in Finder (must be 2011.12 or newer) * Using Finder, copy all files from the ISO to the USB key partition (should be labeled "UNTITLED 1" by now) * Done! To boot this on a Mac, hold down the Option (alt) key while rebooting and select "EFI Boot" from the Disk Chooser. (If you have nVidia graphics, you must select "Disable Kernel-Mode-Setting" due to bugs in the drivers.) ===== Problems? ===== * Check out [[http://michael-prokop.at/blog/2007/04/22/booting-from-usb-pen-troubleshooting-and-pitfalls/|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. * If your usbstick is too large for FAT16 you can try using FAT32 (e.g. mkfs.vfat -F 32 -v /dev/sda1 -n grml). Or you repartition it with a smallish first partition. Be aware that Windows XP "sees" only the first partition on an usbstick! So you can try a largeish first partition for windows and a second small one (around 700MB for full grml) right at the end of the stick. ===== System-specific workarounds ===== * 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 * On an Intel Desktop board with PhoenixBIOS, I needed to set "USB Mass Storage Emulation Type" to "Fixed Disk", the default of "Auto" resulted in an "Boot Error" message. ===== Does not boot at all? ===== Unfortunately, booting from a USB stick is not pretty well supported by all 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: # mkdiskimage -4 /dev/ 0 64 32 Then continue installing as usual. Note that 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 [[http://syslinux.zytor.com/wiki/index.php/Doc/usbkey|/usr/share/doc/syslinux-common/usbkey.txt]]. 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 or [g]parted. 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. ===== Grml on usb devices and DVDs via WinBuilder ===== Based on the tool [[http://winbuilder.net/|WinBuilder]] you can build Boot-CDs and USB-Boot-Devices. ====== Making a bootable grml32/grml64/ubuntu usb-stick ====== This is surprisingly easy to accomplish in just 4 steps: * use ubuntu's ''usb-creator-gtk'' to make a usb-boot-stick using a ubuntu iso of your choice * on the usb-boot-stick, rename ''/boot/grub/loopback.cfg'' to ''/boot/grub/ubuntu_default.cfg'' * you can delete the pics directory if you want * use ''grml2usb --grub --grub-mbr'' to install the grml iso's of your choice on the same usb-boot-stick * boot from the stick, grub will prompt you with the ubuntu menu entries right after your grml boot entries