Jump to content











Photo
- - - - -

How to boot a Runtime Live CD ISO using Grub2


  • Please log in to reply
33 replies to this topic

#26 911CD.net

911CD.net

    Member

  • Advanced user
  • 54 posts
  •  
    United States

Posted A week ago


Then, provided that I understand correctly the GRUB2 commands, your test/example is irrelevant (or maybe better ;) off-topic), there is no .iso involved in it, the AIO Boot evidently extracts the kernel and the initrd (and very likely all the rest) from the .iso and makes a "flat" boot.

 

 

I tended to agree with you Wonko, that's an impressive menu, but on closer look it's intriguing.

### Start \AIO\Files\Linux\runtimelivecd
### ADRIANE-KNOPPIX_V7.2.0gCD-2013-07-28-EN.iso
set extract_path="/AIO/Files/Linux/runtimelivecd"
menuentry "[1] Start Knoppix in graphics mode" --hotkey=1 {
    linux    ${extract_path}/boot/isolinux/linux lang=en apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 knoppix_dir=${extract_path}/KNOPPIX
    initrd    ${extract_path}/boot/isolinux/minirt.gz
}

Note the setting of the extract_path variable and it's use after linux and initrd.   This thing is referencing the ISO just link the loop option. 

 

Grub2 may have an option you were not aware of.  I know I wasn't.  I gotta do some testing with this function.   :)

 

Thank you for posting your file alacran. :cheers:



#27 911CD.net

911CD.net

    Member

  • Advanced user
  • 54 posts
  •  
    United States

Posted A week ago

Well, this didn't work in my grub2 system.

menuentry " RunTime DriveImage ISO 2"   --class other --class icon-gnu  {
# http://reboot.pro/topic/21880-how-to-boot-a-runtime-live-cd-iso-using-grub2/page-2#entry208146

   set extract_path="/ISOs/runtimelivecd.iso"
   search -f $extract_path --set=root
#menuentry "[1] Start Knoppix in graphics mode" --hotkey=1 {
    linux    ${extract_path}/boot/isolinux/linux lang=en apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 knoppix_dir=${extract_path}/KNOPPIX
    initrd    ${extract_path}/boot/isolinux/minirt.gz
}

According to https://www.aioboot.com/en/ AIO Boot loads 2 boot loaders,

 

If you check the “Auto install Bootloader” box, Grub2 and Clover will be installed.

 

and I suspect alacran's menu may be Clover format.



#28 911CD.net

911CD.net

    Member

  • Advanced user
  • 54 posts
  •  
    United States

Posted A week ago

In any case, can you (for future use) post the complete entry that is working (better) for you?
 

 

Each of these work for me.

     set bootparms="iso-scan/filename=$iso lang=en apm=power-off nomce hpsa.hpsa_allow_any=1 loglevel=2 bootfrom=/dev/sda6$iso"
     set bootparms="iso-scan/filename=$iso lang=en apm=power-off nomce hpsa.hpsa_allow_any=1 loglevel=2 bootfrom=/dev/sdxy$iso"
     set bootparms="lang=en apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 knoppix_dir=/KNOPPIX bootfrom=/dev/sda6$iso"

The latter based on alacran's menu.



#29 cdob

cdob

    Gold Member

  • Expert
  • 1397 posts

Posted A week ago

What about
bootfrom=/dev/dummy
or
bootfrom=/dev/null

.
Knoppix searches devices

/dev/*

http://reboot.pro/to...os/#entry166793
.
menuentry "runtimelivecd" {
  set iso_path=/images/runtimelivecd.iso
  set _lang=en
  #search --set=root --file $iso_path
  loopback loop $iso_path
  set params=bootfrom=/dev/*$iso_path lang=$_lang apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1
  linux (loop)/boot/isolinux/linux $params
  initrd (loop)/boot/isolinux/minirt.gz
  loopback --delete loop
}
.
Example Boot message:

Runtime Live found at: /dev/sdb1/images/runtimelivecd.iso



#30 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14323 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted A week ago

@cdob

Very Good :)

 

The "/dev*" syntax looks just fine  :thumbsup: and makes a lot more sense than putting a "random", "intentionally wrong" device name.

 

Still using the UUID  and root=/dev/disk/by-uuid/${uuid} remains (to me) the most "correct" way. (provided it works :unsure:)

 

The point of debate is IMHO rather whether the UUID should be "dynamically retrieved" (with the theoretical risk, just like using the "/dev*" syntax, of booting a distro .iso from "another" volume BUT fully "portable") or if it should be "static" (i.e. generated for the specific USB stick volume, and as such not simply "portable" by simply copying the menu entry). :dubbio:

 

 

@alacran

Don't worry :), no harm was done, I pointed it out only because it would not work (as it didn't actually work for EdP) unless the file extraction occurs, and again, if we are talking of .iso booting, it must be .iso booting, AND NOT ay other way of booting (and sure flat booting works, no real news here).

 

@911CD.net

Which part of "complete menu entry" was not clear to you? :w00t:

(see cdob's post just above this to see what is a complete menu entry, hint: NOT only the set bootparms= line)

 

:duff:

Wonko



#31 911CD.net

911CD.net

    Member

  • Advanced user
  • 54 posts
  •  
    United States

Posted A week ago


cdob,  /dev/*  WOW!!

 

@911CD.net

Which part of "complete menu entry" was not clear to you? :w00t:

(see cdob's post just above this to see what is a complete menu entry, hint: NOT only the set bootparms= line)


Sorry, my mind reading glasses weren't available and I didn't see the word "menu" in your "complete entry" request.  :P



#32 911CD.net

911CD.net

    Member

  • Advanced user
  • 54 posts
  •  
    United States

Posted A week ago

Well, this menu resulted in a blank screen.

menuentry " RunTime DriveImage ISO"   --class other --class icon-gnu  {

     set iso="/ISOs/runtimelivecd.iso"
     set bootparams="bootfrom=/dev/*$iso lang=en apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1"
    
     set bootdrv=$root
     search -f $iso --set=root
     if [ $root != $bootdrv ]; then
        loopback loop $iso
        linux  (loop)/boot/isolinux/linux $bootparms
        initrd (loop)/boot/isolinux/minirt.gz
        loopback --delete loop
     else
        echo "----------------------------------------"
        echo ISO NOT found.
        echo
        sleep -v -i 10
     fi
     set root=$bootdrv
     }

Even when I changed /dev/* to /dev/sda6. :(

 

 

-update-

 

What the hell!!  Even when I use a bootparm set that worked before I'm getting a blank screen.   :confused1:

 

I literally turned the netbook off and on to refresh RAM and the ISO still boots to a blank screen.  :frusty:

 

:mega_shok:

 

 

-update-

 

And now it works again, :)  with this menu.

menuentry " RunTime DriveImage ISO"   --class other --class icon-gnu  {
 
     set lang="en"
     set iso="/ISOs/runtimelivecd.iso"
     set bootparms="iso-scan/filename=$iso lang=$lang apm=power-off nomce hpsa.hpsa_allow_any=1 loglevel=2 bootfrom=/dev/sda6$iso"
   
     set bootdrv=$root
     search -f $iso --set=root
     if [ $root != $bootdrv ]; then
        loopback loop $iso
        linux  (loop)/boot/isolinux/linux $bootparms
        initrd (loop)/boot/isolinux/minirt.gz
        loopback --delete loop
     else
        echo "----------------------------------------"
        echo ISO NOT found.
        echo
        sleep -v -i 10
     fi
     set root=$bootdrv
     }

And with bootfrom=/dev/sdxy or /dev/*  Knoppix treats them the same and does a search for the ISO, as cdob noted.  I initially thought the "*" was getting resolved by grub2.

 

The loopback --delete loop is something new for me.  I've never used it before.


Edited by 911CD.net, A week ago.


#33 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14323 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 6 days ago

  echo ISO NOT found.
 

 

Maybe 

echo ISO $iso NOT found.

would be a more informative message.

 

:duff:

Wonko



#34 911CD.net

911CD.net

    Member

  • Advanced user
  • 54 posts
  •  
    United States

Posted 6 days ago

Maybe 

echo ISO $iso NOT found.

would be a more informative message.

 

 

True.  Thank you.  The menuitem I copied for this was for testing files on USB drives so I simply changed USB to ISO.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users