GRML2USB – grml to usb

Download this sh file.
Login as root: su –

edit /etc/fstab for  your USB device ( edit /etc/fstab ex. /dev/sdb1 /mnt/external1 vfat user,noauto,exec 0 0)
execute this command:# mount /dev/sdb1 /mnt/external
execute this command :# sh grml2usb (path to the iso file) (path to the mount point</mnt/external>)

Error with syslinux ? : just do it manually  :
# syslinux /dev/sdb1

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) if larger than 4gb ( e.g. mkvfs.vfat /dev/sdb1)

  • 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 (fdisk or cfdisk)