Menu

Booting from *.iso

Anonymous
2009-10-27
2013-02-08
1 2 > >> (Page 1 of 2)
  • Anonymous

    Anonymous - 2009-10-27

    Hi,
    From the release note of new 2.7 version:
    "it can scan file with *.iso extension and seach kernels/initrd inside them, and… it is easier to install because pre-built packages for Debian and Fedora for both i386 and amd64 are provided for download."

    Does it mean if I create a DVD with two fedora distribution ISOs and install gujin to make it bootable, it will identify the bootloders in the the ISOs and allow me to boot from either of those?

    I recently tried some thing similar to that, but gujn did not show the option to boot from ISOs.
    Thanks in advance,
    Pradip

     
  • Benny

    Benny - 2009-10-27

    I wish we could. I spent alot of time on it. the conclusion is that the bootloader really can do it, but when the control is given to initrd, this one seldom can read an ISO file and find the path for the os. As far as I remember only knoppix could do it. (I did it a couple of years ago).

     
  • Anonymous

    Anonymous - 2009-10-27

    Hi Benny,
    I read your whole thread about the multiboot DVD. The new version gave me some hope in its change note.

    http://freshmeat.net/projects/gujin/releases/304298

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2009-10-28

    Hi.
    If you create a new ISO filesystem containing the file gujin.bcd (as explained in the docs, no-emulation El-Torito booting) and two files named (for instance) fedora-ia32.iso and fedora-amd64.iso, the latest version of Gujin will display two lines, showing the kernel/initrd in each of the iso files.
    For it to work, you need to have filenames vmlinux*/initrd* into the root or /boot directory of each *.iso files, and you need each iso to handle the linux command line parameter "bootfrom=/dev/sda3/fedora-ia32.iso".
    I do not think Fedora live-CD satisfy those two conditions, but I did not try myself - please report if success.
    I also do not know what extra parameters are needed on the Linux command line of each live CD.

     
  • Anonymous

    Anonymous - 2009-10-28

    Thanks Etienne,
    I will try it over the week end and report back.

    Quick question here. Is there any way to disable the option to scan the Hard Drive and other devices except the DVD. My main goal is to create the DVD that will show a boot menu with the ISOs present in the DVD.
    Thanks again for your kind attention.

    Pradip

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2009-10-28

    Pradip,

    if you recreate the boot.bcd file (./gujin boot.bcd), you can add more command line parameters (./gujin -hl gives the list corresponding to the Gujin menu) like disabling probing floppy disks, bios hard disks, and/or searching disk and partition "mbr" - you can also set a default Linux command line there.

    I would still advise to start with the default and then remove some probing slowly, I do not exactly remember what is needed for probing vmlinuz/initrd inside a simulated disk over an iso image. If you have the default Gujin config, just remove each tickbox and type Control-R to reprobe to see what is found with that configuration.

    Anyway, the first thing to do is to modify the iso to have vmlinuz/initrd inside the /boot directory, and keep that *.iso image into your main distribution /boot directory to see if a standard Gujin will find and propose to boot it (with "probe file in iso image" box checked). There is a maximum namelength for vmlinux/initrd of 32 chars (Gujin probes iso but do not handle juliet or other extensions). You can display the command line passed to the kernel by keeping the control key pressed at the end of loading the initrd until the "go!" message, to see the bootfrom= parameter. Press the keyboard "pause" key to stop display and read messages.

    Have fun,
    Etienne.

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2009-11-04

    Shall I assume, by the lack of answer, that anyway the latest Fedora do not support the "bootfrom=" Linux command line, and so there is no point to try putting two Fedora ISO images into the same ISO9660 filesystem?

     
  • Anonymous

    Anonymous - 2009-11-07

    Sorry about not reporting last week. My life is not giving me much time to work on this. I have not gone that far. Few things I did last week:

    **Copy fedora cd to hard drive:**

    1. #mkdir cdrom
    2. #mkdir feroda
    3. mount -o loop Fedora-11-i686-Live.iso cdrom
    4. cp -r cdrom/* feroda/
    5. umount cdrom

    Now I have the files in ferora folder. Try to change the cdrom label and see if the CD can Boot.

    1. #vi fedora/isolinux/ isolinux.cfg
    2. change the line "append initrd=initrd0.img root=CDLABEL=**fi686** rootfstype=auto ro liveimg quiet  rhgb"
    3. #mkisofs -o fi686.iso -R -J -hide-rr-moved -v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat -V "fi686" fedora/
    4. #cdrecord -v -dev=1,0,0 fi686.iso

    Tried to boot with the cd and it worked. So I can change the Label.

    Next I renamed the isolinux folder to boot (Gujin will only look at Boot folder, right?)

    1. #mv fedora/isolinux fedora/boot
    2. #mkisofs -o fi686.iso -R -J -hide-rr-moved -v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux.bin -c boot/boot.cat
    3. #cdrecord -v -dev=1,0,0 fi686.iso

    Tried to boot with the cd and it did not work.

    Any idea what else to change to make it working?

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2009-11-09

    The main question is, does Gujin find the vmlinux* and initrd* files in /boot of the CDROM?
    I do not have a Fedora DVD at hand, but I think the kernel and initrd were named strangely: they have to be exactly "vmlinux\*" (or "bzimage\*") and "initrd\*" (or "initra\*").

    Note that you could change the name of the "/boot" directory by the "-bootdir=" option to the Gujin installer, or from the Gujin menu (that directory name is limited to 15 letters), so something like:

        ./gujin -bootdir=isolinux -probe_cdrom=1 -probe_file_in_iso_image=1 gujin.bcd

    But then you have to have your DVD image in the root directory and have "search files in root" checked, or have your DVD image in /isolinux of your root partition, for Gujin to find your DVD image.

    That does not change that the first thing to check is if Fedora DVD does accept the "bootfrom=/dev/sda1/*" kernel option, and that can be checked without burning a DVD: just copy the DVD in your had disk like /dvd.iso, extract and rename the kernel and initrd (find them from isolinux configuration file) like /vmlinuz-dvd and /initrd-dvd (in the root of your current filesystem), reboot and under Gujin setup, uncheck the "enable disk write", change the command line to what it is in isolinux configuration and add "bootfrom=/dev/sda1/dvd.iso", and select to boot /vmlinuz-dvd.

    What does happen then: does Fedora find and use /dev/sda1/dvd.iso, or does it complain that it cannot find his DVD? If you have a command line, check that the command line does contain the right "bootfrom=" parameter by typing "cat /proc/cmdline".

    If Fedora DVD do not accept bootfrom=, Gujin will not be able to do anything.

     
  • Benny

    Benny - 2009-11-09

    I spent the whole Sunday (it was raining..) on Gujin.

    This morning I got the following link on my Google reader:
    http://www.pendrivelinux.com/boot-iso-from-usb-flash-drive/

    this can be a solution and an idea for Etienne… ;-)

    Benny

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2009-11-09

    The link you cite tells:

    > Using CD Emulation via GRUB to Boot
    > from an ISO on your Flash Drive will
    > only work if the system or program
    > being booted uses the BIOS to access
    > the virtual disk. If the OS loads and
    > uses its own drivers to access the
    > controller (which most Linux initrd's
    > do), the emulated CD is no longer
    > accessible.

    That is why you need a distribution which accept the bootfrom= command line, Linux do not use the BIOS to access the CDROM.

    Nothing will work but the memtest/Parted Magic CDROM (which is already supported by Gujin).

     
  • Benny

    Benny - 2009-11-09

    You are right Etienne !

    I first tried Parted Magic and then Ubuntu, Fedora, Suse, Puppy, BackTrack….. :-( none worked.

    So ? what's next ?

    Actually it was really exciting copy all those images on my 8GB stick and hope…

    make us dreaming !

    Benny

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2009-11-10

    I think Gujin is already able to boot any distribution which support the bootfrom= command line, and probably the debian derived distribution will boot once you re-create the CD/DVD and insert a directory named /boot containing filename vmlinuz\* and initrd\*, and regenerate the right command line in the gujin which boots the system (on your USB stick or on the DVD) by:

    ./gujin -cmdline=…. boot.*

    You can find which files to use for the kernel and initrd, and which command line, in the configuration file of isolinux.
    Then you can put this iso file on your USB stick formated either with FAT (file limited to 4 Gbytes) or ext4fs and it will boot.

    For distribution which do not support bootfrom=, it is probably a simple one liner patch in the initialisation scripts to add that support, kind of "mount -o loop $bootfrom /" at the place the CDROM is being mounted - but I can't give more details because I do not know that part.

    To know if a distribution handle the bootfrom= parameter, follow the steps in message 9.

    Etienne.

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2009-11-16

    OK, following that link, I downloaded the smallest distribution to test myself: slitaz-2.0.iso from http://www.slitaz.org/en/get/index.html#stable .

    This distribution has a file name bzimage in the /boot directory, but its initrd  is named rootfs.gz, so Gujin will not find it.

    So, I did, as root:
    <pre>
    # mount -o loop '/home/etienne/Desktop/slitaz-2.0.iso' /mnt/disk
    # cp -a /mnt/disk /home/etienne/rootcd
    # cp /home/etienne/rootcd/boot/rootfs.gz /home/etienne/rootcd/boot/initrd
    # genisoimage -R -o slitaz-test.iso -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
             -V "SliTaz" -input-charset iso8859-1 -boot-info-table rootcd
    # cp slitaz-test.iso '/media/EL-BOOT-V28'
    # umount /mnt/disk/ /media/EL-BOOT-V28
    </pre>

    As you can see, I am using the development version as version 2.8, but did not change anything concerning that part (loading files inside CDROM). So the USB key /media/EL-BOOT-V28 already has Gujin installed on it (by ./gujin /dev/sdb -disk=BIOS:0x80,auto ).

    If I boot a PC with that USB key, I go to the menu and tick "search files in ISO images", then press again space to have the list of kernels - Gujin has a bug there and do not reprobe all filesystems (disk configuration changed should reprobe) so I force reprobe by Control-R.

    I then have the menu with "slitaz-test.iso:/boot/{BZIMAGE,INITRD}" that I can click on and slitaz works without problem, even if the kernel command line do not contains "rw root=/dev/null vga=normal autologin" as described in isolinux.cfg. The default username has no password.

    The kernel could be modified to contain the default cmdline by the gujin-cmdline utility in Gujin install-2.7.tar.gz - that is not the official way to insert a command line, but should work.

    The problem about reprobing will be fixed in the next Gujin version, but do not appear if the Gujin setup has been previously saved (tick the box, tick the "write enable" box, and then reboot).

    Cheers,
    Etienne.

     
  • Gert Hulselmans

    Gert Hulselmans - 2009-11-21

    Parted Magic can be booted as unpacked iso, but doesn't use the bootfrom= cheatcode
    See http://partedmagic.com/documentation/124-grub4dos-iso-booting.html for more info.

    Ubuntu can be booted from an iso. You need to add "iso-scan/filename=/boot/iso/ubuntu-9.10-desktop-i386.iso" to the kernel parameters.

    See also  for other parameters used by other distributions.

    A bit offtopic, but not that much:
    MEMDISK can boot iso's now (syslinux-3.83-pre3 and higher).

      : http://www.panticz.de/MultiBootUSB

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2009-11-23

    I am trying to fix a problem now: If a big ISO image is on an ext2 filesystem, it will have too many fragments (the file metadata is interleaved with the file data, usual data fragment of 8192 sectors, max 128 fragments for Gujin so max size is approx CDROM size, not DVD).
    A file with too many fragments will not be counted as an ISO file in the initial screen.

    Using another filesystem would work, but FAT has a filesize limit and ext4 is not understood by the new Knoppix… Putting the ISO onto a iso9660 filesystem should work.

    Handling all those cheat-code will be painfull, the only solution seems to recognise patterns in the iso filename…

     
  • Benny

    Benny - 2010-01-12

    Hi you all,
    I believe I found a reasonable compromize on the following article:
    http://psychoticspoon.blogspot.com/2009/01/booting-multiple-livecds-from-single.html

    I tested it an it works.

    Although, ideally, having a partition crammed with our preferred iso distribution would be the best solution, we experienced that it is up to the distribution itself once launched finding the right path to proceed with the boot. Ultimately we cannot do anything than tricks to be documented replicated on the following release.

    The article teaches on how to initialize an USB pen with gujin and then create logical partitions where you can copy your iso (I used dd if=my.iso of=/dev/sdb5+)

    I am happy with it and I wish to proceed by:

    - testing persistence (a casper-rw partition) accross distributions and their releases.
    - trying the same procedure with DVDs (multisessions)
    - playing with gujin configuration in order to decrease the clutter on the screen during the initial boot choice (ie. allow ONLY eltorito entries)

    any help/suggestions are welcome

    warm regards
    benny

    I would like also to

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2010-01-14

    Hello Benny59,

    The booting-multiple-livecds-from-single.html file you follow is a nice description of what to do, but I would add a few comments (the system do not allow me to add comments to that page):

    >an i386 computer running Linux (other architectures won't work with the bootloader)

    Well, I did not have any problem with amd64/x86_64 architecture.

    > As root, enter fdisk /dev/driveName

    Most distribution are auto-mounting USB drives, so a successfull "umount /dev/driveName*" (with the star) is needed before.

    > First, format the first partition on your USB stick by entering
    > mkfs.msdos -F 16 /dev/driveName1
    > Then, download the
    > Gujin installer and unzip it. Enter the gujin-install directory and run
    > ./instboot boot.bin /dev/driveName1 -disk=BIOS:0x80 -w
    > This will install the bootloader to the first partition.

    Well, ./instboot will anyway recreate completely the FAT partition, so anything written by "mkfs.msdos -F 16 /dev/driveName1" will be completely erased: you can remove this step.

    Also, because you do not pass the -mbr-device= parameter to ./instboot, the boot record of the USB stick is not initialised, you rely on the initial MBR to load the "active" partition. Some USB sticks may be sold blank, it would not work for those.

    I would first suggest:
    ./instboot boot.bin /dev/driveName1 -disk=BIOS:0x80 -mbr-device=/dev/driveName -w
    I would more suggest using Gujin-2.7 to use the new command line:
    ./gujin /dev/driveName1 -disk=BIOS:0x80 -mbr
    Moreover, the -disk parameter shows that your PC is booting USB drives as BIOS drive number 0x80 - most PC are using BIOS drive number 0x00 - but fortunately most PC pass in the DX register which drive was booted, and Gujin supports that method by the parameter -disk=BIOS:0x80,auto. The 0x80 is what is written in the MBR, but the disk used is coming from the DX register.
    So I would finaly suggest:
    ./gujin /dev/driveName1 -disk=BIOS:0x80,auto -mbr

    If you want to reduce the number of steps, you could also ask the Gujin installer to create the initial partition table, I think you will get what you want by something like (32768 is the number of sectors of the first partition):
    ./gujin /dev/driveName1 -disk=BIOS:0x80,auto -mbr -geometry=32768
    and then you just need to add each partition for each CDROM.

    I also want to add that some PC (for instance my EeePc) will not boot a USB stick if it has a partition table, it will only boot superfloppy format - that complete method will not work there.

    I think you can acheive persistence by using files on the first DOS partition you have created, but I do not know what you require exactly for persistence.

    I can tell you that some PC refuse to boot multisession DVD, i.e. they boot with one session, but writing the second session will stop the PC booting. I did not do a full try to know if the problem is in the number of session, or the fact that any session added should have it's own bootloader because the PC will only boot the El-Torito of the last session added. The former problem is not fixable, the latter is.

    To display only El-Torito session in the menu, you just need to disable things probed: boot your USB stick, go to the Gujin menu and untick checkboxes search_disk_mbr search_part_mbr search_topdir_files …, check the checkbox "enable write to disk" and then uncheck it (to write once the configuration): next time you boot you will no more see those files.
    You can also pass parameter like "-search_disk_mbr=0 -search_part_mbr=0 -search_topdir_files=0 -menu_with_disk=0 -probe_ide_disk=0" to ./instboot or ./gujin.
    I would recommend to check the command line of that Gujin on USB, something like the only word "quiet" will probably be best (set and save it it like the checkboxes).

    Have fun,
    Etienne.

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2010-01-14

    Arrrg, in all my command lines I have done an error, it is not the partition name to give as parameter (because the partition may not still exists) but the disk name - so I should have suggested:
    ./gujin /dev/driveName -disk=BIOS:0x80,auto -mbr
    and:
    ./gujin /dev/driveName -disk=BIOS:0x80,auto -mbr -geometry=32768

    Note also that you may need to erase the first sector (or delete all the partitions with fdisk) beforehand, and may have to inform the linux kernel that the partition table has changed by " hdparm -z /dev/driveName " if you ask the ./gujin installer to change the partition table.

    Installing a bootloader in a partition which only exists in the Linux kernel memory and no more exists in the partition table would be a major error - the Gujin installer inform the kernel of the change of partition table at the last step of the installation, not before installing. Reprobing of the partition table of a disk (by hdparm or ./gujin or ./instboot) with Linux will fail if one of the partition is mounted. A more quick and dirty method to reprobe is just to remove the USB stick and insert it again, you just need to wait that everything is written on it before unplug.

    Have fun,
    Etienne.

     
  • Etienne LORRAIN

    Etienne LORRAIN - 2010-01-14

    To be more precise, the target of the ./gujin, i.e. the argument /dev/* is:

    1- a partition if that partition already exists, and the bootloader needs to be installed inside it. Then the -mbr if present will say to also update the MBR, keeping the previous partition table. No special partition reprobing is needed by the Linux kernel,
    because partitions do not change. You can then install Gujin in /dev/sda4 even if /dev/sda1 is mounted.

    2- a disk if the Gujin installer has to recreate the partition table by itself. Anyway in most cases the partition will not exist already so udev will not have created the device /dev/sdc1. Only in this case can you give the -geometry=32768 parameter to specify the size of the partition. In this case the -mbr parameter is there to differenciate in between creating a superfloppy (no partition table, like a floppy disk but bigger) or a full hard disk (with a partition table). Only in this case could happen a problem if one partition of the device is mounted and the Linux kernel then refuses to reprobe the partition table, problem solved by unmounting all partitions of the device or unplugging the USB drive.

    Sorry for the confusion, I hope it is all clear now.
    Etienne.

     
  • Benny

    Benny - 2010-01-14

    GREAT COMMENT Etienne !!!

    DVD, if you remember I starting having fun with  multisessions in 2007 when we first met. I gave up for a while because I was frustrated not managing to do what I can do now with a USB disk. However, still I have in the background that open task hopefully solving with 2.7

    I have made some progresses moving from a 1GB stick to a 320GB Lacie 2.5 inc USB disk.
    I had already some work stuff on it so I am carefull not to loose data.
    I am now leveraging on that huge space creating a 16MB partition /dev/sdb1 for hostig gujin
    partitions  /dev/sdb2 and 3 are the original Lacie ones (FAT + NTFS)
    Then I created at the tail of the disk an exended partition (around 10GB for the moment) with logical partitions where I can dd all ISOs I want to test.

    About the persistence: at the moment I am interested on the UBUNTU family mechanism only (maybe a little puppy configuration saving), so I created an ext2 logical partition called casper-rw (a magic word for ubuntu). I will have fun on this matter but I think it is not relevant to the booting subject

    I generated a nice clutter on the screen, so I will follow your suggestions to clean up the entries. (I must say as an IT marketing person that Gujin delights my technical background but it is not nice for the eye, you should add a configuration file only for cosmetics, ie. splash )

    Still I have a problem on my configuration: on the Lacie USB HD FAT32 partition I use to keep orignal ISOs distributions.
    well, I expect Gujin probing that partition and propose ALSO these entries, instead it shows none.
    Any clue ?

    Regards
    benny

     
  • Benny

    Benny - 2010-01-14

    In addition: some tech information

    df | grep media
    /dev/sdb7              2079284     62572   1911088   4% /media/casper-rw
    /dev/sdb2             31208480  17140976  14067504  55% /media/EXCHANGE
    /dev/sdb5               704662    704662         0 100% /media/Linux Mint 8 Helena
    /dev/sdb3            265964100  83468416 182495684  32% /media/LaCie
    /dev/sdb1                22592       194     22398   1% /media/EL-BOOT-V27
    /dev/sdb6               706532    706532         0 100% /media/Ubuntu 9.10 i386

    my ISO files are on the EXCHANGE partition

    benny@mint ~ $ sudo fdisk /dev/sdb
    password for benny:

    The number of cylinders for this disk is set to 38913.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)

    Comando (m per richiamare la guida): p

    Disco /dev/sdb: 320.0 GB, 320072933376 byte
    255 testine, 63 settori/tracce, 38913 cilindri
    Unità = cilindri di 16065 * 512 = 8225280 byte
    Identificativo disco: 0x00079077

    Dispositivo Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           1           3       22648+   6  FAT16
    La partizione 1 non termina al limite del cilindro.
    /dev/sdb2               3        3890    31223745    b  W95 FAT32
    La partizione 2 non termina al limite del cilindro.
    /dev/sdb3            3891       37001   265964107+   7  HPFS/NTFS
    La partizione 3 non termina al limite del cilindro.
    /dev/sdb4           37002       38913    15358140    f  W95 Esteso (LBA)
    /dev/sdb5           37002       37092      730926   83  Linux
    /dev/sdb6           37093       37182      722893+  83  Linux
    /dev/sdb7           38651       38913     2112516   83  Linux

    Comando (m per richiamare la guida):

    sorry for the italian: the message says that the partition does not end at the limit of the cylinder.

    benny

     
  • Benny

    Benny - 2010-01-14

    Latest news: Successfully copied on the partition also Knoppix 6.2 and Sabayon games. Unsuccessfull GentooLiveDVD which hangs and UBCD4WIN which goes to bluescreen while booting. I will make additional investigation on the last one.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.