Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Boot from ISO with GRUB.

  1. #1
    Join Date
    Jan 2008
    Location
    Huntsville, AL.
    Beans
    157
    Distro
    Ubuntu 9.10 Karmic Koala

    Exclamation Boot from ISO with GRUB.

    How do I use GRUB to boot directly off of an iso? I have a ubuntu 7.10 ISO (Gutsy, I do not want to upgrade to Hardy yet), but my old lappy that I found in the garage recently has no CD drive, and I cannot get it to boot off of our external DVD drive, it apparently cannot boot off of any USB device. I know it is possible to do this, I have just not found a good tutorial. I used grub to boot an installer, but it needed to download the file, once I booted off of it, and it could not detect my internet connection, and I tried both wireless G, and ethernet. I am running Windows 98SE on a Toshiba Sattelite 1730, with 192MB RAM, 700MHz Proccesor, and a 10GB HDD, although I have 3.75GB worth of SD cards that I can use if I need to. I have GRUB, already, and I know how to modify it. I found this lappy in our garage, and once I bought a new power cord, it works fine, except for a few flaws, one being the CD drive does not work. oh, and I do have a floppy drive, and a spare floppy, if I need one, but I have ne experience using one, and if I need to do something with it, you will need to dumb it down as much as possible. Any help will be appreciated, I don't really care how, I just need to boot the ISO without using any external devices. Oh, and if you know how to fix the internet problem in the ubuntu install thing, that would work, too. Ideal situation: Someone provide me with a couple files to download, where to put them, and a string of code to enter into the menu.lst file.


    Oh, and partitioning part of my HDD to act as a make-shift CD drive is not an option. I cannot partition my drive without booting off of an ISO in the first place, as Windows 98 does not have the capability to partition the HDD it is currently using.

    Thanks in advance!
    Dell Dimension 3000. 1.7GHz, 1GB RAM, 40GB (Windows XP, Windows 7 RC), 40GB (unformatted), 30 GB (Ubuntu 9.10) HDD. Blog: http://youthofeternity.wordpress.com

  2. #2
    Join Date
    Jun 2007
    Beans
    1,745

    Re: Boot from ISO with GRUB.

    you can remap an ISO file to be treated as a partition as far as the system is concerned:

    Code:
    grub> map (hd1,1)PATHtoISO.iso (hd4)
    grub> map --rehook
    grub> chainloader (hd4)+1
    grub> rootnoverify (hd4)
    grub> boot
    But be warned that this doesn't always work based on grub versions(the feature of --rehook has been taken out and put back in more times than I care to count)
    Last edited by scragar; April 29th, 2008 at 07:56 PM.

  3. #3
    Join Date
    Jan 2008
    Location
    Huntsville, AL.
    Beans
    157
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Boot from ISO with GRUB.

    Quote Originally Posted by scragar View Post
    you can remap an ISO file to be treated as a partition as far as the system is concerned:

    Code:
    grub> map (hd1,1)PATHtoISO.iso (hd4)
    grub> map --rehook
    grub> chainloader (hd4)+1
    grub> rootnoverify (hd4)
    grub> boot
    But be warned that this doesn't always work based on grub versions(the feature of --rehook has been taken out and put back in more times than I care to count)
    So that little peice of code is EXACTLY what I enter at the bottom of the menu.lst file (except I put the path to the iso, of course)? That sounds like it just might work! I am actually still downloading the iso file, and, this being an older lappy, it is going to take another 2&1/2 hours. However, in the meantime, I would appreciate further input. You can never have too many right answers.
    Dell Dimension 3000. 1.7GHz, 1GB RAM, 40GB (Windows XP, Windows 7 RC), 40GB (unformatted), 30 GB (Ubuntu 9.10) HDD. Blog: http://youthofeternity.wordpress.com

  4. #4
    Join Date
    Jun 2007
    Beans
    1,745

    Re: Boot from ISO with GRUB.

    no, you don't do it like that, you run grub directly from a command line, and then copy those lines into it, changing hd1,1 to your HD/partition (if you don't know it use
    Code:
    find /boot/grub/stage1
    )

  5. #5
    Join Date
    Jan 2008
    Location
    Huntsville, AL.
    Beans
    157
    Distro
    Ubuntu 9.10 Karmic Koala

    Arrow Re: Boot from ISO with GRUB.

    Ok, in response to your warning about the grub version, I am using grub4dos. Also, what I am looking for is a code of string to add to the bottom of the menu.lst file. If I need to download any extra files, and add them, too, I am willing to do that. I am a Linux user, and do not have any experience using DOS, so modifying anything that way is not really an option, for me. I can open the menu.lst file, and modify it however I want, and I have a bit of experience doing that. If someone could tell me what to add/do to that, I would be most grateful.

    Dell Dimension 3000. 1.7GHz, 1GB RAM, 40GB (Windows XP, Windows 7 RC), 40GB (unformatted), 30 GB (Ubuntu 9.10) HDD. Blog: http://youthofeternity.wordpress.com

  6. #6
    Join Date
    Jan 2008
    Location
    Huntsville, AL.
    Beans
    157
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Boot from ISO with GRUB.

    Quote Originally Posted by scragar View Post
    no, you don't do it like that, you run grub directly from a command line, and then copy those lines into it, changing hd1,1 to your HD/partition (if you don't know it use
    Code:
    find /boot/grub/stage1
    )
    I get what you are saying, now. I tried that, and it had some hard drive errors, I forget what they were, specifically. If I run into them again, I will remember them, and post them here. If I could boot off of a USB device, that would work best. However, when running GRUB, it does not know I have a USB device (as far as I can tell, I might not be doing something that I need to be doing. Any ideas/code on mounting/booting off of a USB device (w/iso) with GRUB?
    Dell Dimension 3000. 1.7GHz, 1GB RAM, 40GB (Windows XP, Windows 7 RC), 40GB (unformatted), 30 GB (Ubuntu 9.10) HDD. Blog: http://youthofeternity.wordpress.com

  7. #7
    Join Date
    Jun 2009
    Beans
    1

    Re: Boot from ISO with GRUB.

    ------------------------
    timeout 3
    default 0


    title Test ISO Boot
    map (hd0,0)/Test.iso (hd3)
    map --rehook
    chainloader (hd3)+1
    rootnoverify (hd3)
    boot

    ------------------------

    I put this code in menu.lst,
    tried 3 different images (Windows PE, Hiren's and Ubuntu 9.04) and got the same error :


    any clues?..
    Last edited by Legre; June 11th, 2009 at 06:01 AM.

  8. #8
    Join Date
    Sep 2008
    Location
    Sweden
    Beans
    16

    Re: Boot from ISO with GRUB.

    Hi Legre!

    I'm doing a bit of research on this, actually with about half an hour of googling "from all angles" just behind me... and some previous laboration as well.

    I think You may be on to it there... and suspect You're getting the HDD errors because the ISO You're using most likely is actually a CD/DVD disc... very much different from HDD's from a hardware & hardware level accessing code's point of view.

    So, try this if You can:
    see if switching out "(hd3)" in the "map", "chainloader" & "rootnoverify" instructions to "(cd)" is possible... that _could_ be the trick!

    If I had the time to lab further myself right now, I'd be on it in a split second...

    I'll post again if I either test it out before You, or hopefully to congratulate You on Your success with it..


    /Mike



    Quote Originally Posted by Legre View Post
    ------------------------
    timeout 3
    default 0


    title Test ISO Boot
    map (hd0,0)/Test.iso (hd3)
    map --rehook
    chainloader (hd3)+1
    rootnoverify (hd3)
    boot

    ------------------------

    I put this code in menu.lst,
    tried 3 different images (Windows PE, Hiren's and Ubuntu 9.04) and got the same error :

    (( --- Image cut out --- )))
    Last edited by FuturePusher; June 16th, 2009 at 03:44 AM.

  9. #9
    Join Date
    Feb 2009
    Beans
    54

    Re: Boot from ISO with GRUB.


  10. #10
    Join Date
    Jun 2009
    Beans
    1

    Re: Boot from ISO with GRUB.

    Total noob here....

    I tried the following using grub4dos in a usb stick. The iso booted but the live os would not boot. It stopped at an (initramfs) prompt

    Code:
    title Ubuntu 8.10 (Live CD)
    map (hd0,0)/ubuntu810.iso (hd32)
    map --rehook
    chainloader (hd32)
    rootnoverify (hd32)
    boot
    Thinking it might be an issue of the iso getting unmounted I tried dumping the contents of the iso into a folder and pointing it to the kernel but got the same results using the following:

    Code:
    title Ubuntu 8.10
    find --set-root /U810/casper/initrd.gz
    kernel /U810/casper/vmlinuz boot=casper persistent rw splash
    initrd /U810/casper/initrd.gz
    boot

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •