Extend docs, add support for lilo on i386 vs. amd64
authorMichael Prokop <mika@grml.org>
Mon, 16 Feb 2009 22:31:17 +0000 (23:31 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 16 Feb 2009 22:31:17 +0000 (23:31 +0100)
debian/rules
grml2usb.8.txt
grml2usb.py
lilo/lilo.static.amd64 [new file with mode: 0755]
lilo/lilo.static.i386 [moved from lilo/lilo.static with 100% similarity]

index b32058d..cc6e494 100755 (executable)
@@ -34,10 +34,11 @@ install: build
        dh_installdirs usr/share/grml2usb/lilo usr/share/grml2usb/grub
 
        # Add here commands to install the package into debian/grml2usb.
-       install -m 755 grml2usb             debian/grml2usb/usr/sbin/
-       install -m 755 lilo/lilo.static     debian/grml2usb/usr/share/grml2usb/lilo/lilo.static
-       install -m 644 grub/splash.xpm.gz   debian/grml2usb/usr/share/grml2usb/grub/splash.xpm.gz
-       install -m 644 grub/stage2_eltorito debian/grml2usb/usr/share/grml2usb/grub/stage2_eltorito
+       install -m 755 grml2usb               debian/grml2usb/usr/sbin/
+       install -m 755 lilo/lilo.static.i386  debian/grml2usb//usr/share/grml2usb/lilo/lilo.static.i386
+       install -m 755 lilo/lilo.static.amd64 debian/grml2usb//usr/share/grml2usb/lilo/lilo.static.amd64
+       install -m 644 grub/splash.xpm.gz     debian/grml2usb/usr/share/grml2usb/grub/splash.xpm.gz
+       install -m 644 grub/stage2_eltorito   debian/grml2usb/usr/share/grml2usb/grub/stage2_eltorito
 
 # Build architecture-dependent files here.
 binary-arch: build install
index fa621e7..b4f37e2 100644 (file)
@@ -13,6 +13,18 @@ grml2usb [ options ] <ISO[s]> <device>
 Important! The grml team does not take responsibility for loss of any data!
 *******************************************************************************
 
+Introduction
+------------
+
+grml2usb installs grml on a given partition of your usb device and makes it
+bootable.
+
+grml2usb provides multi-iso support, meaning you can specify several grml ISOs
+on the command line at once and select the grml flavour you would like to boot
+on the bootbrompt then. Notice that the default ISO (that's when pressing just
+enter on the bootprompt or wait until the timeout matches) will be the *first*
+one specified on the grml2usb command line.
+
 Options
 -------
 
@@ -104,20 +116,11 @@ Return version and exit.
 
 Enable verbose mode.
 
-Introduction
-------------
-
-grml2usb installs grml on a given partition of your usb device and makes it
-bootable.
-
-grml2usb provides multi-iso support, meaning you can specify several grml ISOs
-on the command line at once and select the grml flavour you would like to boot
-on the bootbrompt then. Notice that the default ISO (that's when pressing just
-enter on the bootprompt or wait until the timeout matches) will be the *first*
-one specified on the grml2usb command line.
+Developers Corner
+-----------------
 
 Directory layout on usb device
-------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
   boot/ ->
     |-- addons/
@@ -194,6 +197,34 @@ Directory layout on usb device
     |-- grml64-small.module
     `-- grml64-small.squashfs
 
+Grabbing the source
+~~~~~~~~~~~~~~~~~~~
+
+  git clone git://git.grml.org/grml2usb.git
+
+Developers Debugging Hints
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To play with grml2usb you can avoid using a real device via a loopback file
+setup, like:
+
+  dd if=/dev/zero of=~/loopback bs=1M count=100 # adjust size to your needs
+  losetup /dev/loop1 ~/loopback
+
+Then create according partitions either running for example:
+
+  echo -en "n\np\n1\n\n\n t \n 6\n a\n1\n w\n" | fdisk /dev/loop1
+
+or:
+
+  parted /dev/loop1 -s "mkpart primary fat16 0 -1s mkfs 1 fat16"
+
+Finally create a filesystem and execute grml2usb as needed:
+
+  mkfs.vfat /dev/loop1
+  grml2usb --bootloader-only --mbr /grml/isos/grml-small_2008.11.iso /dev/loop1
+
+
 Usage examples
 --------------
 
@@ -245,10 +276,10 @@ Author
 Michael Prokop <mika@grml.org>
 
 /////////////////////////////////////////////////////////////////
-http://git.grml.org/?p=grml2usb.git
 http://wiki.grml.org/doku.php?id=tips#multiboot_usb_pen
 http://www.startx.ro/sugar/isotostick.sh
 https://help.ubuntu.com/community/Installation/FromUSBStick
 http://unetbootin.sourceforge.net/
 http://www.tux.org/pub/people/kent-robotti/looplinux/rip/mkusb.sh
+https://fedorahosted.org/liveusb-creator/
 /////////////////////////////////////////////////////////////////
index c2de631..b14bbd0 100755 (executable)
@@ -404,7 +404,11 @@ def install_mbr(device):
     if options.lilo:
         lilo = options.lilo
     else:
-        lilo = '/usr/share/grml2usb/lilo/lilo.static'
+        from platform import architecture
+        if architecture()[0] == '64bit':
+            lilo = '/usr/share/grml2usb/lilo/lilo.static.amd64'
+        else:
+            lilo = '/usr/share/grml2usb/lilo/lilo.static.i386'
 
     if not is_exe(lilo):
         raise Exception, "lilo executable can not be execute"
diff --git a/lilo/lilo.static.amd64 b/lilo/lilo.static.amd64
new file mode 100755 (executable)
index 0000000..e0f22da
Binary files /dev/null and b/lilo/lilo.static.amd64 differ
similarity index 100%
rename from lilo/lilo.static
rename to lilo/lilo.static.i386