Booting ubuntu iso file from grub menu





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I follow Grub2 ISO boot guide



https://help.ubuntu.com/community/Grub2/ISOBoot



here is my menu for iso booting



menuentry "Ubuntu 14.04 Live" {
set isofile="/lilw/os/ubuntu.iso"
loopback loop (hd0,10)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}


but I failed to boot from iso file, it always make my system reboot.No message giving out so I don't know what happen.



If I get into grub menu and then using command at



grub >


typing these follow command:



grub > loopback loop (hd0,10)/lilw/os/ubuntu.iso
grub > linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
grub > initrd (loop)/casper/initrd.lz


and then



grub > boot


it will boot to the iso normally.



I don't want to boot this way. But the menuentry in grub does not work.



FYI: I have multiple version of ubuntu running on my system, range from 10.04 to the latest. My iso file store in sda10 which is a /home for the current ubuntu grub.



Edit 1: I extract the contains of iso file but still can't boot with ubuntu. But I can boot with Fedora 20 when extract it contains to a folder, weird..



Edit 2: Finally I find a site that help out with new grub2 command syntax. all the failed boot is because of wrong syntax in grub2



TRY THIS: solved my problems



http://git.marmotte.net/git/glim/tree/grub2



So my grub menu entry will look like this:



menuentry "Ubuntu 14.04 (LTS) Live Desktop amd64" --class ubuntu {
set isoname="ubuntu-14.04-desktop-amd64.iso"
set isofile="/lilw/os/${isoname}"
loopback loop (hd0,10)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
}


if I missing the two '{ }' of isofile it won't boot. so weird










share|improve this question

























  • Are you sure path should not be /home/lilw....? At point grub is loading, nothing is mounted, so everything is at default locations on drive. I converted to just using a /iso folder on another hard drive. And I also changed grub to use a configfile so I do not have to run sudo-update grub every time I edit my ISO boot. I can just edit configfile in my iso folder. I also have nVidia and have to add nomodeset to my boot entry.

    – oldfred
    Jul 20 '14 at 16:06











  • I know it is not /home/lilw.. because I booting from Linux Mint using the same path /lilw/os/mint.iso and it works. And I don't get what you mean by use a configfile in iso folder?

    – lilw
    Jul 20 '14 at 16:57











  • configfile is exactly what your link to glim is using. Although I just have one configfile entry in my grub and then in the actual config file have my various boot stanzas.

    – oldfred
    Jul 21 '14 at 4:46


















1















I follow Grub2 ISO boot guide



https://help.ubuntu.com/community/Grub2/ISOBoot



here is my menu for iso booting



menuentry "Ubuntu 14.04 Live" {
set isofile="/lilw/os/ubuntu.iso"
loopback loop (hd0,10)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}


but I failed to boot from iso file, it always make my system reboot.No message giving out so I don't know what happen.



If I get into grub menu and then using command at



grub >


typing these follow command:



grub > loopback loop (hd0,10)/lilw/os/ubuntu.iso
grub > linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
grub > initrd (loop)/casper/initrd.lz


and then



grub > boot


it will boot to the iso normally.



I don't want to boot this way. But the menuentry in grub does not work.



FYI: I have multiple version of ubuntu running on my system, range from 10.04 to the latest. My iso file store in sda10 which is a /home for the current ubuntu grub.



Edit 1: I extract the contains of iso file but still can't boot with ubuntu. But I can boot with Fedora 20 when extract it contains to a folder, weird..



Edit 2: Finally I find a site that help out with new grub2 command syntax. all the failed boot is because of wrong syntax in grub2



TRY THIS: solved my problems



http://git.marmotte.net/git/glim/tree/grub2



So my grub menu entry will look like this:



menuentry "Ubuntu 14.04 (LTS) Live Desktop amd64" --class ubuntu {
set isoname="ubuntu-14.04-desktop-amd64.iso"
set isofile="/lilw/os/${isoname}"
loopback loop (hd0,10)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
}


if I missing the two '{ }' of isofile it won't boot. so weird










share|improve this question

























  • Are you sure path should not be /home/lilw....? At point grub is loading, nothing is mounted, so everything is at default locations on drive. I converted to just using a /iso folder on another hard drive. And I also changed grub to use a configfile so I do not have to run sudo-update grub every time I edit my ISO boot. I can just edit configfile in my iso folder. I also have nVidia and have to add nomodeset to my boot entry.

    – oldfred
    Jul 20 '14 at 16:06











  • I know it is not /home/lilw.. because I booting from Linux Mint using the same path /lilw/os/mint.iso and it works. And I don't get what you mean by use a configfile in iso folder?

    – lilw
    Jul 20 '14 at 16:57











  • configfile is exactly what your link to glim is using. Although I just have one configfile entry in my grub and then in the actual config file have my various boot stanzas.

    – oldfred
    Jul 21 '14 at 4:46














1












1








1


1






I follow Grub2 ISO boot guide



https://help.ubuntu.com/community/Grub2/ISOBoot



here is my menu for iso booting



menuentry "Ubuntu 14.04 Live" {
set isofile="/lilw/os/ubuntu.iso"
loopback loop (hd0,10)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}


but I failed to boot from iso file, it always make my system reboot.No message giving out so I don't know what happen.



If I get into grub menu and then using command at



grub >


typing these follow command:



grub > loopback loop (hd0,10)/lilw/os/ubuntu.iso
grub > linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
grub > initrd (loop)/casper/initrd.lz


and then



grub > boot


it will boot to the iso normally.



I don't want to boot this way. But the menuentry in grub does not work.



FYI: I have multiple version of ubuntu running on my system, range from 10.04 to the latest. My iso file store in sda10 which is a /home for the current ubuntu grub.



Edit 1: I extract the contains of iso file but still can't boot with ubuntu. But I can boot with Fedora 20 when extract it contains to a folder, weird..



Edit 2: Finally I find a site that help out with new grub2 command syntax. all the failed boot is because of wrong syntax in grub2



TRY THIS: solved my problems



http://git.marmotte.net/git/glim/tree/grub2



So my grub menu entry will look like this:



menuentry "Ubuntu 14.04 (LTS) Live Desktop amd64" --class ubuntu {
set isoname="ubuntu-14.04-desktop-amd64.iso"
set isofile="/lilw/os/${isoname}"
loopback loop (hd0,10)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
}


if I missing the two '{ }' of isofile it won't boot. so weird










share|improve this question
















I follow Grub2 ISO boot guide



https://help.ubuntu.com/community/Grub2/ISOBoot



here is my menu for iso booting



menuentry "Ubuntu 14.04 Live" {
set isofile="/lilw/os/ubuntu.iso"
loopback loop (hd0,10)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}


but I failed to boot from iso file, it always make my system reboot.No message giving out so I don't know what happen.



If I get into grub menu and then using command at



grub >


typing these follow command:



grub > loopback loop (hd0,10)/lilw/os/ubuntu.iso
grub > linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
grub > initrd (loop)/casper/initrd.lz


and then



grub > boot


it will boot to the iso normally.



I don't want to boot this way. But the menuentry in grub does not work.



FYI: I have multiple version of ubuntu running on my system, range from 10.04 to the latest. My iso file store in sda10 which is a /home for the current ubuntu grub.



Edit 1: I extract the contains of iso file but still can't boot with ubuntu. But I can boot with Fedora 20 when extract it contains to a folder, weird..



Edit 2: Finally I find a site that help out with new grub2 command syntax. all the failed boot is because of wrong syntax in grub2



TRY THIS: solved my problems



http://git.marmotte.net/git/glim/tree/grub2



So my grub menu entry will look like this:



menuentry "Ubuntu 14.04 (LTS) Live Desktop amd64" --class ubuntu {
set isoname="ubuntu-14.04-desktop-amd64.iso"
set isofile="/lilw/os/${isoname}"
loopback loop (hd0,10)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd.lz
}


if I missing the two '{ }' of isofile it won't boot. so weird







boot grub2 iso






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 24 '14 at 11:55







lilw

















asked Jul 20 '14 at 15:38









lilwlilw

1215




1215













  • Are you sure path should not be /home/lilw....? At point grub is loading, nothing is mounted, so everything is at default locations on drive. I converted to just using a /iso folder on another hard drive. And I also changed grub to use a configfile so I do not have to run sudo-update grub every time I edit my ISO boot. I can just edit configfile in my iso folder. I also have nVidia and have to add nomodeset to my boot entry.

    – oldfred
    Jul 20 '14 at 16:06











  • I know it is not /home/lilw.. because I booting from Linux Mint using the same path /lilw/os/mint.iso and it works. And I don't get what you mean by use a configfile in iso folder?

    – lilw
    Jul 20 '14 at 16:57











  • configfile is exactly what your link to glim is using. Although I just have one configfile entry in my grub and then in the actual config file have my various boot stanzas.

    – oldfred
    Jul 21 '14 at 4:46



















  • Are you sure path should not be /home/lilw....? At point grub is loading, nothing is mounted, so everything is at default locations on drive. I converted to just using a /iso folder on another hard drive. And I also changed grub to use a configfile so I do not have to run sudo-update grub every time I edit my ISO boot. I can just edit configfile in my iso folder. I also have nVidia and have to add nomodeset to my boot entry.

    – oldfred
    Jul 20 '14 at 16:06











  • I know it is not /home/lilw.. because I booting from Linux Mint using the same path /lilw/os/mint.iso and it works. And I don't get what you mean by use a configfile in iso folder?

    – lilw
    Jul 20 '14 at 16:57











  • configfile is exactly what your link to glim is using. Although I just have one configfile entry in my grub and then in the actual config file have my various boot stanzas.

    – oldfred
    Jul 21 '14 at 4:46

















Are you sure path should not be /home/lilw....? At point grub is loading, nothing is mounted, so everything is at default locations on drive. I converted to just using a /iso folder on another hard drive. And I also changed grub to use a configfile so I do not have to run sudo-update grub every time I edit my ISO boot. I can just edit configfile in my iso folder. I also have nVidia and have to add nomodeset to my boot entry.

– oldfred
Jul 20 '14 at 16:06





Are you sure path should not be /home/lilw....? At point grub is loading, nothing is mounted, so everything is at default locations on drive. I converted to just using a /iso folder on another hard drive. And I also changed grub to use a configfile so I do not have to run sudo-update grub every time I edit my ISO boot. I can just edit configfile in my iso folder. I also have nVidia and have to add nomodeset to my boot entry.

– oldfred
Jul 20 '14 at 16:06













I know it is not /home/lilw.. because I booting from Linux Mint using the same path /lilw/os/mint.iso and it works. And I don't get what you mean by use a configfile in iso folder?

– lilw
Jul 20 '14 at 16:57





I know it is not /home/lilw.. because I booting from Linux Mint using the same path /lilw/os/mint.iso and it works. And I don't get what you mean by use a configfile in iso folder?

– lilw
Jul 20 '14 at 16:57













configfile is exactly what your link to glim is using. Although I just have one configfile entry in my grub and then in the actual config file have my various boot stanzas.

– oldfred
Jul 21 '14 at 4:46





configfile is exactly what your link to glim is using. Although I just have one configfile entry in my grub and then in the actual config file have my various boot stanzas.

– oldfred
Jul 21 '14 at 4:46










4 Answers
4






active

oldest

votes


















1














In many versions of ubuntu iso as in Ubuntu 18.10 (Cosmic Cuttlefish), the files initrd.lz are just initrd . I suggest you to go and inspect your iso file for initrd and vmlinuz files.



While booting Ubuntu 18.10, I had also made that mistake.






share|improve this answer

































    0














    Try this



     menuentry "Ubuntu 14.04 Live" {
    loopback loop (hd0,10)/lilw/os/ubuntu.iso
    linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/lilw/os/ubuntu.iso noprompt noeject
    initrd (loop)/casper/initrd.lz
    }





    share|improve this answer
























    • actually I tried that already, but it still not works. thanks. btw, I figured it out by follow some instruction here git.marmotte.net/git/glim/tree/grub2

      – lilw
      Jul 20 '14 at 17:32











    • Glad to hear that you fixed it. Then post your findings as an answer.

      – kenn
      Jul 20 '14 at 17:50



















    0















    • Place your ISO file to /live:


    sudo mkdir /live



    sudo cp somelinux.iso /live




    • Add new menu entry to the grub.cfg


    sudo gedit /etc/grub.d/40_custom



    menuentry 'ISO Ubuntu 14.04 2014 Live' --class os --class gnu-linux --class gnu --class os --group group_main {
    set isofile="/live/ubuntu-14.04-desktop-amd64.iso"

    insmod ext2
    insmod loopback
    insmod iso9660
    loopback loop (hd0,msdos5)$isofile

    linux (loop)/casper/vmlinuz.efi file=(loop)/cdrom/preseed/ubuntu.seed noprompt boot=casper persistent iso-scan/filename=/$isofile quiet splash --
    initrd (loop)/casper/initrd.lz


    }


    TO DO:




    1. change in the menu entry above the code name for your partition, holding /live/somelinux.iso, in my case it's hd0,msdos5 because it is on /dev/sda5/



    2. change the file name from somelinux.iso to yours, in my case I have: ubuntu-14.04-desktop-amd64.iso




      • update GRUB




    sudo update-grub




    • reboot






    share|improve this answer


























    • maybe this works for you, but it will not works for me, if I do the $isofile it won't know the iso, I must do thing like ${isofile}

      – lilw
      Jul 24 '14 at 10:12











    • @lilw yes, it definitely works for me, and do you want to say it won't work for you in spite that the set isofile="/live/ubuntu-14.04-desktop-amd64.iso" is presented?

      – Ruslan Gerasimov
      Jul 24 '14 at 10:22











    • yes, I did it just like what you said before, and it won't find the iso file, but if I did insert the two '{ }' outside the isofile it able to find it, really weird to me. example like this: iso-scan/filename=/${isofile}. so just the syntax. I don't know why

      – lilw
      Jul 24 '14 at 11:47





















    -1














    I figured out the problem is the syntax of grub2 changed. follow this link and find your grub entry to boot, there is still some lines you will need to fill in to work.



    http://git.marmotte.net/git/glim/tree/grub2





    share|improve this answer


























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f500295%2fbooting-ubuntu-iso-file-from-grub-menu%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      In many versions of ubuntu iso as in Ubuntu 18.10 (Cosmic Cuttlefish), the files initrd.lz are just initrd . I suggest you to go and inspect your iso file for initrd and vmlinuz files.



      While booting Ubuntu 18.10, I had also made that mistake.






      share|improve this answer






























        1














        In many versions of ubuntu iso as in Ubuntu 18.10 (Cosmic Cuttlefish), the files initrd.lz are just initrd . I suggest you to go and inspect your iso file for initrd and vmlinuz files.



        While booting Ubuntu 18.10, I had also made that mistake.






        share|improve this answer




























          1












          1








          1







          In many versions of ubuntu iso as in Ubuntu 18.10 (Cosmic Cuttlefish), the files initrd.lz are just initrd . I suggest you to go and inspect your iso file for initrd and vmlinuz files.



          While booting Ubuntu 18.10, I had also made that mistake.






          share|improve this answer















          In many versions of ubuntu iso as in Ubuntu 18.10 (Cosmic Cuttlefish), the files initrd.lz are just initrd . I suggest you to go and inspect your iso file for initrd and vmlinuz files.



          While booting Ubuntu 18.10, I had also made that mistake.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 12 at 5:51









          Kristopher Ives

          2,95211525




          2,95211525










          answered Feb 11 at 10:59









          Manish R. ChandraManish R. Chandra

          112




          112

























              0














              Try this



               menuentry "Ubuntu 14.04 Live" {
              loopback loop (hd0,10)/lilw/os/ubuntu.iso
              linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/lilw/os/ubuntu.iso noprompt noeject
              initrd (loop)/casper/initrd.lz
              }





              share|improve this answer
























              • actually I tried that already, but it still not works. thanks. btw, I figured it out by follow some instruction here git.marmotte.net/git/glim/tree/grub2

                – lilw
                Jul 20 '14 at 17:32











              • Glad to hear that you fixed it. Then post your findings as an answer.

                – kenn
                Jul 20 '14 at 17:50
















              0














              Try this



               menuentry "Ubuntu 14.04 Live" {
              loopback loop (hd0,10)/lilw/os/ubuntu.iso
              linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/lilw/os/ubuntu.iso noprompt noeject
              initrd (loop)/casper/initrd.lz
              }





              share|improve this answer
























              • actually I tried that already, but it still not works. thanks. btw, I figured it out by follow some instruction here git.marmotte.net/git/glim/tree/grub2

                – lilw
                Jul 20 '14 at 17:32











              • Glad to hear that you fixed it. Then post your findings as an answer.

                – kenn
                Jul 20 '14 at 17:50














              0












              0








              0







              Try this



               menuentry "Ubuntu 14.04 Live" {
              loopback loop (hd0,10)/lilw/os/ubuntu.iso
              linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/lilw/os/ubuntu.iso noprompt noeject
              initrd (loop)/casper/initrd.lz
              }





              share|improve this answer













              Try this



               menuentry "Ubuntu 14.04 Live" {
              loopback loop (hd0,10)/lilw/os/ubuntu.iso
              linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/lilw/os/ubuntu.iso noprompt noeject
              initrd (loop)/casper/initrd.lz
              }






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jul 20 '14 at 17:20









              kennkenn

              2,84353065




              2,84353065













              • actually I tried that already, but it still not works. thanks. btw, I figured it out by follow some instruction here git.marmotte.net/git/glim/tree/grub2

                – lilw
                Jul 20 '14 at 17:32











              • Glad to hear that you fixed it. Then post your findings as an answer.

                – kenn
                Jul 20 '14 at 17:50



















              • actually I tried that already, but it still not works. thanks. btw, I figured it out by follow some instruction here git.marmotte.net/git/glim/tree/grub2

                – lilw
                Jul 20 '14 at 17:32











              • Glad to hear that you fixed it. Then post your findings as an answer.

                – kenn
                Jul 20 '14 at 17:50

















              actually I tried that already, but it still not works. thanks. btw, I figured it out by follow some instruction here git.marmotte.net/git/glim/tree/grub2

              – lilw
              Jul 20 '14 at 17:32





              actually I tried that already, but it still not works. thanks. btw, I figured it out by follow some instruction here git.marmotte.net/git/glim/tree/grub2

              – lilw
              Jul 20 '14 at 17:32













              Glad to hear that you fixed it. Then post your findings as an answer.

              – kenn
              Jul 20 '14 at 17:50





              Glad to hear that you fixed it. Then post your findings as an answer.

              – kenn
              Jul 20 '14 at 17:50











              0















              • Place your ISO file to /live:


              sudo mkdir /live



              sudo cp somelinux.iso /live




              • Add new menu entry to the grub.cfg


              sudo gedit /etc/grub.d/40_custom



              menuentry 'ISO Ubuntu 14.04 2014 Live' --class os --class gnu-linux --class gnu --class os --group group_main {
              set isofile="/live/ubuntu-14.04-desktop-amd64.iso"

              insmod ext2
              insmod loopback
              insmod iso9660
              loopback loop (hd0,msdos5)$isofile

              linux (loop)/casper/vmlinuz.efi file=(loop)/cdrom/preseed/ubuntu.seed noprompt boot=casper persistent iso-scan/filename=/$isofile quiet splash --
              initrd (loop)/casper/initrd.lz


              }


              TO DO:




              1. change in the menu entry above the code name for your partition, holding /live/somelinux.iso, in my case it's hd0,msdos5 because it is on /dev/sda5/



              2. change the file name from somelinux.iso to yours, in my case I have: ubuntu-14.04-desktop-amd64.iso




                • update GRUB




              sudo update-grub




              • reboot






              share|improve this answer


























              • maybe this works for you, but it will not works for me, if I do the $isofile it won't know the iso, I must do thing like ${isofile}

                – lilw
                Jul 24 '14 at 10:12











              • @lilw yes, it definitely works for me, and do you want to say it won't work for you in spite that the set isofile="/live/ubuntu-14.04-desktop-amd64.iso" is presented?

                – Ruslan Gerasimov
                Jul 24 '14 at 10:22











              • yes, I did it just like what you said before, and it won't find the iso file, but if I did insert the two '{ }' outside the isofile it able to find it, really weird to me. example like this: iso-scan/filename=/${isofile}. so just the syntax. I don't know why

                – lilw
                Jul 24 '14 at 11:47


















              0















              • Place your ISO file to /live:


              sudo mkdir /live



              sudo cp somelinux.iso /live




              • Add new menu entry to the grub.cfg


              sudo gedit /etc/grub.d/40_custom



              menuentry 'ISO Ubuntu 14.04 2014 Live' --class os --class gnu-linux --class gnu --class os --group group_main {
              set isofile="/live/ubuntu-14.04-desktop-amd64.iso"

              insmod ext2
              insmod loopback
              insmod iso9660
              loopback loop (hd0,msdos5)$isofile

              linux (loop)/casper/vmlinuz.efi file=(loop)/cdrom/preseed/ubuntu.seed noprompt boot=casper persistent iso-scan/filename=/$isofile quiet splash --
              initrd (loop)/casper/initrd.lz


              }


              TO DO:




              1. change in the menu entry above the code name for your partition, holding /live/somelinux.iso, in my case it's hd0,msdos5 because it is on /dev/sda5/



              2. change the file name from somelinux.iso to yours, in my case I have: ubuntu-14.04-desktop-amd64.iso




                • update GRUB




              sudo update-grub




              • reboot






              share|improve this answer


























              • maybe this works for you, but it will not works for me, if I do the $isofile it won't know the iso, I must do thing like ${isofile}

                – lilw
                Jul 24 '14 at 10:12











              • @lilw yes, it definitely works for me, and do you want to say it won't work for you in spite that the set isofile="/live/ubuntu-14.04-desktop-amd64.iso" is presented?

                – Ruslan Gerasimov
                Jul 24 '14 at 10:22











              • yes, I did it just like what you said before, and it won't find the iso file, but if I did insert the two '{ }' outside the isofile it able to find it, really weird to me. example like this: iso-scan/filename=/${isofile}. so just the syntax. I don't know why

                – lilw
                Jul 24 '14 at 11:47
















              0












              0








              0








              • Place your ISO file to /live:


              sudo mkdir /live



              sudo cp somelinux.iso /live




              • Add new menu entry to the grub.cfg


              sudo gedit /etc/grub.d/40_custom



              menuentry 'ISO Ubuntu 14.04 2014 Live' --class os --class gnu-linux --class gnu --class os --group group_main {
              set isofile="/live/ubuntu-14.04-desktop-amd64.iso"

              insmod ext2
              insmod loopback
              insmod iso9660
              loopback loop (hd0,msdos5)$isofile

              linux (loop)/casper/vmlinuz.efi file=(loop)/cdrom/preseed/ubuntu.seed noprompt boot=casper persistent iso-scan/filename=/$isofile quiet splash --
              initrd (loop)/casper/initrd.lz


              }


              TO DO:




              1. change in the menu entry above the code name for your partition, holding /live/somelinux.iso, in my case it's hd0,msdos5 because it is on /dev/sda5/



              2. change the file name from somelinux.iso to yours, in my case I have: ubuntu-14.04-desktop-amd64.iso




                • update GRUB




              sudo update-grub




              • reboot






              share|improve this answer
















              • Place your ISO file to /live:


              sudo mkdir /live



              sudo cp somelinux.iso /live




              • Add new menu entry to the grub.cfg


              sudo gedit /etc/grub.d/40_custom



              menuentry 'ISO Ubuntu 14.04 2014 Live' --class os --class gnu-linux --class gnu --class os --group group_main {
              set isofile="/live/ubuntu-14.04-desktop-amd64.iso"

              insmod ext2
              insmod loopback
              insmod iso9660
              loopback loop (hd0,msdos5)$isofile

              linux (loop)/casper/vmlinuz.efi file=(loop)/cdrom/preseed/ubuntu.seed noprompt boot=casper persistent iso-scan/filename=/$isofile quiet splash --
              initrd (loop)/casper/initrd.lz


              }


              TO DO:




              1. change in the menu entry above the code name for your partition, holding /live/somelinux.iso, in my case it's hd0,msdos5 because it is on /dev/sda5/



              2. change the file name from somelinux.iso to yours, in my case I have: ubuntu-14.04-desktop-amd64.iso




                • update GRUB




              sudo update-grub




              • reboot







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jul 24 '14 at 10:07

























              answered Jul 21 '14 at 7:31









              Ruslan GerasimovRuslan Gerasimov

              3,10221220




              3,10221220













              • maybe this works for you, but it will not works for me, if I do the $isofile it won't know the iso, I must do thing like ${isofile}

                – lilw
                Jul 24 '14 at 10:12











              • @lilw yes, it definitely works for me, and do you want to say it won't work for you in spite that the set isofile="/live/ubuntu-14.04-desktop-amd64.iso" is presented?

                – Ruslan Gerasimov
                Jul 24 '14 at 10:22











              • yes, I did it just like what you said before, and it won't find the iso file, but if I did insert the two '{ }' outside the isofile it able to find it, really weird to me. example like this: iso-scan/filename=/${isofile}. so just the syntax. I don't know why

                – lilw
                Jul 24 '14 at 11:47





















              • maybe this works for you, but it will not works for me, if I do the $isofile it won't know the iso, I must do thing like ${isofile}

                – lilw
                Jul 24 '14 at 10:12











              • @lilw yes, it definitely works for me, and do you want to say it won't work for you in spite that the set isofile="/live/ubuntu-14.04-desktop-amd64.iso" is presented?

                – Ruslan Gerasimov
                Jul 24 '14 at 10:22











              • yes, I did it just like what you said before, and it won't find the iso file, but if I did insert the two '{ }' outside the isofile it able to find it, really weird to me. example like this: iso-scan/filename=/${isofile}. so just the syntax. I don't know why

                – lilw
                Jul 24 '14 at 11:47



















              maybe this works for you, but it will not works for me, if I do the $isofile it won't know the iso, I must do thing like ${isofile}

              – lilw
              Jul 24 '14 at 10:12





              maybe this works for you, but it will not works for me, if I do the $isofile it won't know the iso, I must do thing like ${isofile}

              – lilw
              Jul 24 '14 at 10:12













              @lilw yes, it definitely works for me, and do you want to say it won't work for you in spite that the set isofile="/live/ubuntu-14.04-desktop-amd64.iso" is presented?

              – Ruslan Gerasimov
              Jul 24 '14 at 10:22





              @lilw yes, it definitely works for me, and do you want to say it won't work for you in spite that the set isofile="/live/ubuntu-14.04-desktop-amd64.iso" is presented?

              – Ruslan Gerasimov
              Jul 24 '14 at 10:22













              yes, I did it just like what you said before, and it won't find the iso file, but if I did insert the two '{ }' outside the isofile it able to find it, really weird to me. example like this: iso-scan/filename=/${isofile}. so just the syntax. I don't know why

              – lilw
              Jul 24 '14 at 11:47







              yes, I did it just like what you said before, and it won't find the iso file, but if I did insert the two '{ }' outside the isofile it able to find it, really weird to me. example like this: iso-scan/filename=/${isofile}. so just the syntax. I don't know why

              – lilw
              Jul 24 '14 at 11:47













              -1














              I figured out the problem is the syntax of grub2 changed. follow this link and find your grub entry to boot, there is still some lines you will need to fill in to work.



              http://git.marmotte.net/git/glim/tree/grub2





              share|improve this answer






























                -1














                I figured out the problem is the syntax of grub2 changed. follow this link and find your grub entry to boot, there is still some lines you will need to fill in to work.



                http://git.marmotte.net/git/glim/tree/grub2





                share|improve this answer




























                  -1












                  -1








                  -1







                  I figured out the problem is the syntax of grub2 changed. follow this link and find your grub entry to boot, there is still some lines you will need to fill in to work.



                  http://git.marmotte.net/git/glim/tree/grub2





                  share|improve this answer















                  I figured out the problem is the syntax of grub2 changed. follow this link and find your grub entry to boot, there is still some lines you will need to fill in to work.



                  http://git.marmotte.net/git/glim/tree/grub2






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jun 2 '15 at 14:55









                  Jens Erat

                  4,15972031




                  4,15972031










                  answered Jul 21 '14 at 2:49









                  lilwlilw

                  1215




                  1215






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f500295%2fbooting-ubuntu-iso-file-from-grub-menu%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Human spaceflight

                      Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                      File:DeusFollowingSea.jpg