From: Michael Prokop Date: Mon, 16 Feb 2009 22:31:17 +0000 (+0100) Subject: Extend docs, add support for lilo on i386 vs. amd64 X-Git-Tag: v0.9.2~47 X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=3fe01e13ced8b89650a02e9422b405dac7566e0c Extend docs, add support for lilo on i386 vs. amd64 --- diff --git a/debian/rules b/debian/rules index b32058d..cc6e494 100755 --- a/debian/rules +++ b/debian/rules @@ -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 diff --git a/grml2usb.8.txt b/grml2usb.8.txt index fa621e7..b4f37e2 100644 --- a/grml2usb.8.txt +++ b/grml2usb.8.txt @@ -13,6 +13,18 @@ grml2usb [ options ] 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 ///////////////////////////////////////////////////////////////// -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/ ///////////////////////////////////////////////////////////////// diff --git a/grml2usb.py b/grml2usb.py index c2de631..b14bbd0 100755 --- a/grml2usb.py +++ b/grml2usb.py @@ -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 index 0000000..e0f22da Binary files /dev/null and b/lilo/lilo.static.amd64 differ diff --git a/lilo/lilo.static b/lilo/lilo.static.i386 similarity index 100% rename from lilo/lilo.static rename to lilo/lilo.static.i386