Update documentation regarding syslinux and FAT32
[grml2usb.git] / grml2usb.8.txt
index bc044a9..32436fc 100644 (file)
@@ -26,11 +26,12 @@ just pressing enter on the bootprompt or wait until the boot timeout matches).
 
 [IMPORTANT]
 By default a compatible master boot record (MBR) is installed on the device
-(being for example /dev/sdx when executing 'grml2usb grml.iso /dev/sdx1')
-and grub is being used as default bootloader. Avoid installation of the
-default MBR using the --skip-mbr option or if you encounter any problems
-with the default MBR consider using --syslinux-mbr instead. If bootloader
-grub doesn't work for you check out the --syslinux option.
+(being for example /dev/sdX when executing 'grml2usb grml.iso /dev/sdX1') and
+grub is being used as default bootloader. Avoid installation of the default MBR
+using the '--skip-mbr' option or if you encounter any problems with the default
+MBR consider using '--syslinux-mbr' instead. If bootloader grub doesn't work for
+you check out <<faq,the FAQ section of this document>> or consider using the
+'--syslinux' option.
 
 [[options]]
 Options
@@ -39,7 +40,7 @@ Options
 The ISO[s] should be the path to one or multiple grml-ISOs and/or the path to
 the currently running live-system (being /live/image).
 
-The device either might be a device name like /dev/sdx1 or a directory. When
+The device either might be a device name like /dev/sdX1 or a directory. When
 specifying a device name the device is mounted automatically. When specifying a
 directory grml2usb is assuming that you did set up a bootloader on your own (or
 don't need one) and a bootloader won't be installed automatically.
@@ -75,6 +76,13 @@ Format specified partition with FAT16.
 
 Force any (possible dangerous) actions requiring manual interaction (like --fat16).
 
+  *\--grub-mbr*::
+
+Install grub into MBR (Master Boot Record) instead of PBR (Partition Boot
+Record).  This option sadly had to be introduced because grub2 can not be
+installed to partitions (PBR) instead of MBR anymore. Check out <<mbr-vs-pbr,the
+'mbr-vs-pbr' section in the FAQ of this document>> for further details.
+
   *\--help*::
 
 Display usage information and exit.
@@ -139,7 +147,7 @@ file no matter whether you're using grub or syslinux as bootloader.
 
   *\--syslinux*::
 
-Install syslinux bootloader instead of the default (being grub).
+Install syslinux bootloader instead of the default one (being grub).
 
   *\--syslinux-mbr*::
 
@@ -147,7 +155,7 @@ Install syslinux' master boot record (MBR, which is booting from the partition
 with the "active" flag set) instead of the default one.  If you encounter any
 problems with the default MBR you can try using the syslinux MBR instead. If
 that works for you please <<author,let us know>> so we can adjust our default
-MBR accordingly.  Note: When using the --syslinux-mbr option lilo is executed
+MBR accordingly. Note: When using the --syslinux-mbr option lilo is executed
 before the MBR is installed so the according partitions are set active.
 
 //////////////////////////////////////////////////////////////////////////
@@ -286,8 +294,8 @@ Finally create a filesystem and execute grml2usb as needed:
 Performance tracing
 ~~~~~~~~~~~~~~~~~~~
 
-  # blktrace -d /dev/sdx -o - | blkparse -i -
-  # grml2usb grml_2009.05.iso /dev/sdx1
+  # blktrace -d /dev/sdX -o - | blkparse -i -
+  # grml2usb grml_2009.05.iso /dev/sdX1
 
 [[troubleshooting]]
 Troubleshooting and Pitfalls when booting
@@ -340,16 +348,26 @@ Where can I get grml2usb?
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 grml2usb is available as Debian package via link:http://deb.grml.org/[the
-grml-testing Debian repository]. Please make sure you really have the Debian
-package installed as having just the grml2usb script available is definitely
-*NOT* enough!
+grml-testing Debian repository].
+
+If you do not want to (or can't) use the grml2usb Debian package you can either
+use the grml2usb git tree running:
+
+  git clone git://git.grml.org/grml2usb.git
+  cd grml2usb
+  make -C mbr
+  sudo ./grml2usb ...
 
-If you do NOT have a Debian based system but still want to be able to use
-grml2usb you can use the provided
+or download the provided
 link:http://grml.org/grml2usb/grml2usb.tgz[http://grml.org/grml2usb/grml2usb.tgz]
 (link:http://grml.org/grml2usb/grml2usb.tgz.md5.asc[gpg signed md5 hash]).
 Download and extract the tarball and execute the provided script 'install.sh'.
 
+[NOTE]
+It is *NOT* enough to have just the grml2usb script itself without the according
+files provided either via the Debian package, the git tree or the file
+grml2usb.tgz.
+
 [[grml2hd-vs-grml2usb]]
 What's the difference between grml2hd and grml2usb?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -460,7 +478,8 @@ The following message:
 
   '/usr/sbin/grub-install: line 374: [: =: unary operator expected'
 
-This is "normal". Just ignore it.
+This is "normal". Just ignore it. (It usually doesn't appear
+on the second invocation on the same device.)
 
 [[unknown-filesystem]]
 grub-install fails with grub-probe: error: unknown filesystem?!
@@ -478,6 +497,31 @@ using FAT32 as filesystem on the partition will not work. Either set filesystem
 type to FAT32 or format the partition using FAT16. It is essential that
 device partition table and filesystem use the same filesystem type.
 
+[[mbr-vs-pbr]]
+grub-setup fails after Attempting to install GRUB to a partition instead of the MBR?!
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following message:
+
+  grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR.  This is a BAD idea.
+  grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and its use is discouraged.
+  grub-setup: error: Cannot read `/grub/core.img' correctly
+
+appears because recent grub2 versions sadly introduced a regression which avoids
+that grub is being installed into a partition (PBR, Partition Boot Record)
+instead of MBR (Master Boot Record).
+
+To work around this issue you can install grub into the MBR (Master Boot Record)
+using the '--grub-mbr' option of grml2usb or switch to syslinux as bootmanager
+(using the '--syslinux' option).
+
+To fix this issue manually you can also execute (adjust '/dev/sdX' to your
+device of course):
+
+  mount /dev/sdX1 /mnt/test
+  grub-install --force --recheck --no-floppy --root-directory=/mnt/test /dev/sdX
+
+Sorry about that.
 
 [[splash-xpm]]
 I'm getting something like "Error: /usr/share/grml2usb/grub/splash.xpm.gz can not be read"!?
@@ -490,13 +534,14 @@ you do not have a Debian system please see section <<download,Where can I get
 grml2usb?>> in this FAQ.
 
 [[fat16]]
-Why do I have to use a FAT16 filesystem?
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Why do I have to use a FAT16/FAT32 filesystem?
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-You have to use a FAT16 filesystem only if you consider using syslinux. Syslinux
-(currently) does not support any other filesystems. If you want to use another
-filesystem (like ext2/3) just don't use syslinux (drop the \--syslinux option)
-but use the default bootloader (grub) instead.
+You have to use a FAT16/FAT32 filesystem only if you consider using syslinux.
+Syslinux (currently) does not support any other filesystems. If you want to use
+another filesystem (like ext2/3) just don't use syslinux (drop the \--syslinux
+option) but use the default bootloader (grub) instead. Note that FAT32 is
+supported since syslinux version 3.0.
 
 [[cool-idea]]
 I think I've got a really cool idea!
@@ -524,54 +569,54 @@ of your grml2usb commandline (consider using the "\--verbose" option).
 Usage examples
 --------------
 
-  # grml2usb /home/grml/grml_2009.05.iso /dev/sdx1
+  # grml2usb /home/grml/grml_2009.05.iso /dev/sdX1
 
-Install specified ISO on device /dev/sdx1.
+Install specified ISO on device /dev/sdX1.
 
-  # grml2usb /home/grml/grml_2009.05.iso /home/grml/grml_small_2009.05.iso /dev/sdx1
+  # grml2usb /home/grml/grml_2009.05.iso /home/grml/grml_small_2009.05.iso /dev/sdX1
 
-Install specified ISOs on device /dev/sdx1 for multibooting ISOs.
+Install specified ISOs on device /dev/sdX1 for multibooting ISOs.
 Note: boot "grml" as usual, for booting grml-small use "grml-small on the
 bootprompt, for grml64 use "grml64" and so on... The *first* specified ISO is
 the one being the default (when just pressing enter or waiting until the timeout
 is reached).
 
-  # grml2usb /live/image /dev/sdx1
+  # grml2usb /live/image /dev/sdX1
 
-Install currently running grml live system on device /dev/sdx1.
+Install currently running grml live system on device /dev/sdX1.
 
-  # grml2usb /live/image /home/grml/grml_2009.05.iso /dev/sdx1
+  # grml2usb /live/image /home/grml/grml_2009.05.iso /dev/sdX1
 
 Install currently running grml live system and the specified
-ISO on device /dev/sdx1 for multibooting.
+ISO on device /dev/sdX1 for multibooting.
 
-  # grml2usb --fat16 /home/grml/grml_2009.05.iso /dev/sdx1
+  # grml2usb --fat16 /home/grml/grml_2009.05.iso /dev/sdX1
 
-Install specified ISO on device /dev/sdx1 and format partition /dev/sdx1 with
+Install specified ISO on device /dev/sdX1 and format partition /dev/sdX1 with
 FAT16 filesystem.
 
-  # grml2usb --syslinux /home/grml/grml_2009.05.iso /dev/sdx1
+  # grml2usb --syslinux /home/grml/grml_2009.05.iso /dev/sdX1
 
-Install specified ISO on device /dev/sdx1 and use syslinux as bootloader
+Install specified ISO on device /dev/sdX1 and use syslinux as bootloader
 (instead of grub being the default).
 
 ///////////////////////////////////////////////////////////////////////////////////////
   # grml2usb --kernel=/boot/vmlinuz-2.6.28-grml --initrd=/boot/initrd.img-2.6.28-grml \
-             /home/grml/grml_2009.05.iso /dev/sdx1
+             /home/grml/grml_2009.05.iso /dev/sdX1
 
-Install specified ISO on device /dev/sdx1 but use given kernel and initrd
+Install specified ISO on device /dev/sdX1 but use given kernel and initrd
 instead of the ones provided by the ISO.
 
   # grml2usb --squashfs=/grml/grml-live/grml_cd/live/grml.squashfs \
-             /home/grml/grml_2009.05.iso /dev/sdx1
+             /home/grml/grml_2009.05.iso /dev/sdX1
 
-Install specified ISO on device /dev/sdx1 but use given squashfs
+Install specified ISO on device /dev/sdX1 but use given squashfs
 file instead of the one provided by the ISO.
 ///////////////////////////////////////////////////////////////////////////////////////
 
-  # grml2usb --bootoptions="lang=de ssh=mysecret" grml_2009.05.iso /dev/sdx1
+  # grml2usb --bootoptions="lang=de ssh=mysecret" grml_2009.05.iso /dev/sdX1
 
-Install specified ISO on device /dev/sdx1 and use "lang=de ssh=mysecret" as
+Install specified ISO on device /dev/sdX1 and use "lang=de ssh=mysecret" as
 default bootoptions.
 
 [[ressources]]