Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Using grub 2 to boot an iso off hard drive

  1. #1
    Join Date
    Jun 2009
    Beans
    12

    Using grub 2 to boot an iso off hard drive

    I have a dual boot machine windows xp & Ubuntu 10.04. I want to use Grub 2 to boot an Ubuntu 8.04 32bit live cd image off my hard drive. I put a copy of the 8.04 iso in a new directory /boot/iso. I added the following lines to my grub.cfg.

    menuentry "Ubuntu Live 8.04 32bit" {
    loopback loop /boot/iso/ubuntu804.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu804.iso noeject noprompt --
    initrd (loop)/casper/initrd.lz
    }

    my current error message is
    error: invalid file name 'boot=casper'.

    Thanks in advance

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Using grub 2 to boot an iso off hard drive

    Here is one

    menuentry "Ubuntu Live 8.04 32bit" {
    loopback loop (hdX,Y)/boot/iso/ubuntu804.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu804.iso noeject noprompt
    initrd (loop)/casper/initrd.gz
    }
    Last edited by drs305; July 21st, 2010 at 05:59 PM. Reason: initrd.gz not initrd.lz
    GRUB2

    Retired.

  3. #3
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Using grub 2 to boot an iso off hard drive

    My loop mount of 9.04 uses initrd.gz and only the newer versions use initrd.lz.

    Not sure about 8.04 but I thought it was a change from gz to lz about version 9.10.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  4. #4
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Using grub 2 to boot an iso off hard drive

    oldfred is correct. I just mounted my hardy .iso and it is initrd.gz. I believe it changed to .lz in 9.10.

    I've edited my previous post to reflect the older convention. Thanks oldfred
    GRUB2

    Retired.

  5. #5
    Join Date
    Jun 2009
    Beans
    12

    Re: Using grub 2 to boot an iso off hard drive

    I modified my grub.cfg and I still get the same error. I am testing this functionality in a Virtualbox machine. Here is some more information.

    1. fdisk
    root@user01-desktop:~# fdisk -l
    Disk /dev/sda: 10.7 GB, 10737418240 bytes
    255 heads, 63 sectors/track, 1305 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xdd33dd33
    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 780 6265318+ 7 HPFS/NTFS
    /dev/sda2 781 1306 4218881 5 Extended
    /dev/sda5 781 1279 4003840 83 Linux
    /dev/sda6 1279 1306 214016 82 Linux swap / Solaris
    root@user01-desktop:~#

    2. the iso
    root@user01-desktop:/boot/iso# ls -l
    total 716748
    -rw-r--r-- 1 user01 user01 733945856 2010-07-21 11:34 ubuntu804.iso
    root@user01-desktop:/boot/iso#

    3. some grub.cfg entries, Ubuntu 10.04 boots fine

    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Ubuntu, with Linux 2.6.32-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,5)'
    search --no-floppy --fs-uuid --set e...
    linux /boot/vmlinuz-2.6.32-23-generic root=UUID=e... ro quiet splash
    initrd /boot/initrd.img-2.6.32-23-generic
    }


    menuentry "Ubuntu Live 8.04 32bit" {
    loopback loop (hd0,5)/boot/iso/ubuntu804.iso
    loopback (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu804.iso noeject noprompt initrd (loop)/casper/initrd.gz
    }

    Can someone make a Virtualbox machine with this working? Then it could be available for download. This is the beauty of open source. There are many posts in the forums with people trying to get this to work http://ubuntuforums.org/showthread.p...age+hard+drive.

    One working example will answer all of the questions. According to this site http://michael-prokop.at/blog/2009/0...iso-via-grub2/ grml is required to boot an iso.
    Last edited by dan98; July 24th, 2010 at 06:07 PM.

  6. #6
    Join Date
    Jun 2009
    Beans
    12

    Re: Using grub 2 to boot an iso off hard drive

    With this grub 2 entry I made some progress.

    menuentry "ubu804 ISO" {
    loopback loop (hd0,5)/boot/iso/ubuntu804.iso
    linux (loop)/casper/vmlinuz boot=casper
    iso-scan/filename=/boot/iso/ubuntu804.iso noprompt
    initrd (loop)/casper/initrd.gz
    }

    I made it to this prompt:

    Busybox v1.1.3 (Debian 1:1.1.3-5ubuntu12) Built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    (initramfs)


    I can enter commands at this prompt. This grub.cfg entry is very similar to my other one except for linux loop instead of loopback and the noeject. Do you know what command I am missing? I am trying to boot all the way to the LiveCD gui.

  7. #7
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Using grub 2 to boot an iso off hard drive

    I've been playing with this for a good part of the day, experimenting with various iterations. So far with no luck. I takes me back a year or so when I was trying to determine the way to mount an Ubuntu ISO without any existing documentation.

    A couple of observations that may help you. First, telling us that you were trying to do this in a VM is important. The menu entries provided in earlier posts are all for 'real' ISOs mounted on a normal system.

    Secondly, you can check your (hd0,5) choice by using grub's tab complete feature. At the menu, press "c" to get to the Grub2 command line. From there, start typing your "loopback loop" line. When you have typed
    loopback loop (hd0,5)/
    double-TAB and see if anything comes up. Unless you are running a 'saved' VM, I would suspect you will get no results. (On my machine, 0,5 is the swap).

    Next, if you got no results, try (hd0,1)/ and I think you will find your /boot folder and contents. If so, use (hd0,1) for the entire line.

    Finally, where I have been concentrating my attempts has been the 'linux' line. When I was experimenting on my real system, I usually ended up at the 'initramfs' point because of a problem with the 'linux' line. As I've said, I haven't found the proper combination to get past 'initramfs', but the entries after "linux (loop)/casper/vmlinuz' is where I suspect the problem lies. I don't think the first part of the line is the problem since after typing 'linux (loop)/casper/vm' a double-TAB will complete the vmlinuz.

    Anyway, if I'd spent as much time on Google as I have playing with the VM I may have found a solution. Hopefully someone will post the solution for you.
    GRUB2

    Retired.

  8. #8
    Join Date
    Jun 2009
    Beans
    12

    Re: Using grub 2 to boot an iso off hard drive

    Thanks for looking into this for me. I also ended up at the 'initramfs' point with Ubuntu 8.04. I tried Ubuntu 10.04 and I get '(initiramfs) Unable to find a medium containing a live file system'. The VM is working the same as a physical machine.

    I don't think 'Using grub 2 to boot an iso off hard drive' works. It sounds nice. Does anyone out there have this working? Should I try booting a livecd .iso file from a different distro?

  9. #9
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Using grub 2 to boot an iso off hard drive

    Without the VM I directly boot ISO from my flash drive with grub2. I have several versions of Ubuntu, gparted, system rescue and they all work. I do not know what change the VM should make.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  10. #10
    Join Date
    Jun 2009
    Beans
    12

    Re: Using grub 2 to boot an iso off hard drive

    Thanks for the reply. drs305 and I can only make it to the initramfs prompt.

    I have some questions for you.
    1. Is your flash drive bootable?
    2. Are you booting a ubuntu .iso file? If I did an ls on your flash drive would I just see a few .iso files.
    3. Has the .iso file been mounted or expanded into a folder?
    4. Is your thumb drive formatted fat32?
    5. Can you please post all or part of your grub.cfg file?

    I can figure out the VM changes. So far I haven't seen any. I get the same results as drs305. I also can build everything on a clean no OS physical machine if needed.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •