Results 1 to 9 of 9

Thread: How to Boot from 13.1 ISO image direct from hard drive using Grub2

  1. #1

    Default How to Boot from 13.1 ISO image direct from hard drive using Grub2

    Hello,

    and it's come, 13.1 long term support, most fans OpenSuse like me making preparation to install or upgrade,
    so it's easy way to boot installation DVD direct from Grub2 menu, if you have already running OpenSuse or another distro with
    Grub2 on your boot disk, and it's relatively easy,
    based on https://forums.opensuse.org/english/...isk-grub2.html with few my findigs,

    just put code posted below to /etc/grub.d/40_custom

    Code:
    #!/bin/shexec tail -n +3 $0
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    
    menuentry "openSUSE 13.1 x86-64 DVD" {
      insmod loopback
      insmod udf
      insmod iso9660
      insmod gzio
      insmod part_msdos
      insmod ext2
    # full path to iso image
      set isofile=/home/isos/openSUSE-13.1-DVD-x86_64.iso
    # first disk no partitions, second have grub2 on mbr, boot from bios boot menu 
      set root=(hd0,1)
      loopback loop $isofile
    # .../linux "install" it may contain install, upgrade, rescue - install start installation process
     linux (loop)/boot/x86_64/loader/linux install=hd:$isofile
      initrd (loop)/boot/x86_64/loader/initrd
    }
    after save this file execute from root console or sudo -s

    Code:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    for OpenSuse, mostly update-grub for another distro,

    and this one is for clonezilla live,it's can help make backup for sometimes times not working upgrade

    Code:
    menuentry "Clonezilla live" {insmod loopback
    insmod iso9660
    # boot-dev/full_path_to_iso
    set isofile="/home/isos/clonezilla-live-2.2.0-29-amd64.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" keyboard-layouts=\"\" ocs_live_batch=\"no\" locales=\"\" vga=788 ip=frommedia nosplash toram=filesystem.squashfs findiso=$isofile
    initrd (loop)/live/initrd.img
    }
    I hope some one have find this usefull.

    Thank You

    Regards
    Czeslaw M.

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: How to Boot from 13.1 ISO image direct from hard drive using Grub2

    So I gave this a try, but it is not working for me. The basic error is the ISO file is not found. Anyone else get this to work by chance?

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,284

    Default Re: How to Boot from 13.1 ISO image direct from hard drive using Grub2

    Whee did you put it? on boot home is not mounted

  4. #4

    Default Re: How to Boot from 13.1 ISO image direct from hard drive using Grub2

    Quote Originally Posted by jdmcdaniel3 View Post
    So I gave this a try, but it is not working for me. The basic error is the ISO file is not found. Anyone else get this to work by chance?

    Thank You,
    Most crytical part is below

    .....
    set root=(hdx.y)
    .....

    is working for me, with "dev/hdb" and first partition is "/home" - i mean no separate partition for "Home directory",
    "hdb" have grub2 on "mbr", when bios boot um my pc i using bios boot menu to boot form second drive "hdb".

    path to iso looks for me like this (/dev/hdb)/home/isos/opensuse.ios, hdb become firs device (hd0.y) and
    /home/isos is on first partition on this drive with ext4 file system.

    If you have separate "Home directory" the (hdx.y), 'y' means partition contain "home directory" and depends of your "hd's/partitions" combination,
    btw u can play with this parameters manually when grub2 menu comes up pres 'e' modify any parameters you like, when done pres 'F10'

    I hope this will help you.

    thanks

    Regards
    Czeslaw M.

  5. #5
    Join Date
    Sep 2012
    Posts
    7,090

    Default Re: How to Boot from 13.1 ISO image direct from hard drive using Grub2

    Have you seen autoiso.cfg (part of current grub2 sources)? May be you could contribute your code for detection of openSUSE ISOs there ...

    grub.git - Unnamed repository; edit this file 'description' to name the repository.

  6. #6
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: How to Boot from 13.1 ISO image direct from hard drive using Grub2

    OK, it works like a champ now. I elected to use the new rescue CD ISO image. Here is the code I placed into the file /etc/grub.d/40_custom as root:

    Code:
    #!/bin/sh
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    
    menuentry "openSUSE 13.1 Rescue-CD x86-64 DVD" {
      insmod loopback
      insmod udf
      insmod iso9660
      insmod gzio
      insmod part_msdos
      insmod ext2set root=(hd0,3)
    # full path to iso image, I placed it in the root boot folder.
      set isofile=/boot/openSUSE-13.1-Rescue-CD-x86_64-Build0091-Media.iso
    # Where is your Root Partition?  hd0=1st disk and 3=3rd Partition. !Important!
      set root=(hd0,3)
      loopback loop $isofile
    # .../linux "install" it may contain install, upgrade, rescue - install start installation process
     linux (loop)/boot/x86_64/loader/linux install=hd:$isofile
      initrd (loop)/boot/x86_64/loader/initrd
    }
    Notice the top line was wrong and I had to split into two lines. Since the command "set root=(hd0,3)" sets the root partition location, I elected to place the rescue ISO image "openSUSE-13.1-Rescue-CD-x86_64-Build0091-Media.iso" in the /boot folder which is in my root openSUSE 13.1 partition.

    I am using my grub2cmd bash script for this edit process you can find here:

    GNU Grub2 Command Listing Helper with --help & Input - Blogs - openSUSE Forums

    Thanks for your fine post here.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  7. #7

    Default Re: How to Boot from 13.1 ISO image direct from hard drive using Grub2

    Hello,

    since it is not work with OpneSuse 13.1 installed, this is a version to load ISO image from OpenSuse 13.1 with GPT + LVM + Btrfs (or any modern Linux distribution with LVM manger)

    Code:
    menuentry "openSUSE 13.1 DVD" {
      insmod loopback
      insmod udf
      insmod iso9660
      insmod gzio
      insmod part_gpt
      insmod btrfs
      insmod lvm
      # hard drive and partition contain folder "/home/isos" eg '/dev/mapper/system-home'
      set isofile=/home/isos/openSUSE-13.1-DVD-x86_64.iso
      set root=(hd0,1)
      loopback loop $isofile
      linux (loop)/boot/x86_64/loader/linux install=hd:$isofile
      initrd (loop)/boot/x86_64/loader/initrd
    }
    and remember, you always can modify grub2 menu, pres 'e', modify what you want and 'F10' to boot it.

    Regards

    Czeslaw M.

  8. #8

    Default Re: How to Boot from 13.1 ISO image direct from hard drive using Grub2

    I have Opensuse installed on a USB stick, so I can run my OS wherever I go.
    I have it formatted with one ext4 partition and one vfat partition
    The installation was a normal one, with grub booting the system.
    Now I want to add others ISOs to the boot menu... let's say SystemRescueCD or so.
    So the system you describe will fit my goal, but the problem is I will not know if root=(hd0,1) or something totally different because it will depend on the computer I am booting, so Is there any way to set it in a device computer independent way?

    regards


    Quote Originally Posted by cmruk View Post
    Hello,

    and it's come, 13.1 long term support, most fans OpenSuse like me making preparation to install or upgrade,
    so it's easy way to boot installation DVD direct from Grub2 menu, if you have already running OpenSuse or another distro with
    Grub2 on your boot disk, and it's relatively easy,
    based on https://forums.opensuse.org/english/...isk-grub2.html with few my findigs,

    just put code posted below to /etc/grub.d/40_custom

    Code:
    #!/bin/shexec tail -n +3 $0
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    
    menuentry "openSUSE 13.1 x86-64 DVD" {
      insmod loopback
      insmod udf
      insmod iso9660
      insmod gzio
      insmod part_msdos
      insmod ext2
    # full path to iso image
      set isofile=/home/isos/openSUSE-13.1-DVD-x86_64.iso
    # first disk no partitions, second have grub2 on mbr, boot from bios boot menu 
      set root=(hd0,1)
      loopback loop $isofile
    # .../linux "install" it may contain install, upgrade, rescue - install start installation process
     linux (loop)/boot/x86_64/loader/linux install=hd:$isofile
      initrd (loop)/boot/x86_64/loader/initrd
    }
    after save this file execute from root console or sudo -s

    Code:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    for OpenSuse, mostly update-grub for another distro,

    and this one is for clonezilla live,it's can help make backup for sometimes times not working upgrade

    Code:
    menuentry "Clonezilla live" {insmod loopback
    insmod iso9660
    # boot-dev/full_path_to_iso
    set isofile="/home/isos/clonezilla-live-2.2.0-29-amd64.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" keyboard-layouts=\"\" ocs_live_batch=\"no\" locales=\"\" vga=788 ip=frommedia nosplash toram=filesystem.squashfs findiso=$isofile
    initrd (loop)/live/initrd.img
    }
    I hope some one have find this usefull.

    Thank You

    Regards
    Czeslaw M.

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,721

    Default Re: How to Boot from 13.1 ISO image direct from hard drive using Grub2

    This is an (two years) old thread. Do you realy think many people are subscribed to it and will see your post? Also your problem is not exactly the same as the original one as shown in the title.

    Please start a new thread of your own, with a good title to draw the attention of people with the right knowledge.

    This thread is CLOSED.
    Henk van Velden

Posting Permissions

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