Jump to content











Photo
- - - - -

How to boot a Runtime Live CD ISO using Grub2


  • Please log in to reply
34 replies to this topic

#1 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 02 November 2018 - 04:17 PM

I boot ISOs.  I have been doing it for a long time, in the past with Grub4DOS and now with Grub2Win.  Most of the ISOs now are Linux based and fairly straight forward to boot.  The Runtime Live ISO is Knoppix based, but I've had a hard time finding the right parms to do it.  Has anyone here done it and if so can point me in the right direction? 

 

https://www.runtime....ery-live-cd.htm

 

I would especially like to do it with the /efi/boot/BOOTX64.efi file but that may be a stretch. :lol:

 

Ed

 

 

 

 



#2 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3042 posts
  • Location:Nantes - France
  •  
    France

Posted 03 November 2018 - 07:15 PM

Not sure I get yout question right but I boot winpe with grub2 without too much troubles.

In standard bios mode thus, not tested efi yet.

 

I use MakeIso with "patch table" option.

 

Grub.img is made with the following command :

grub-mkimage.exe -o grub.img --format=i386-pc-eltorito --prefix="(cd)/boot/grub" multiboot part_msdos iso9660 biosdisk

Below my grub.cfg:

set timeout=15
set default=0 # Set the default menu entry

menuentry "GRUB4DOS" {
	linux (cd)/grub.exe --config-file=(cd)/menu.lst
}	
menuentry "hd0" {
     insmod part_msdos
     insmod chain
     chainloader (hd0,1)+1
}	
menuentry "Windows 7 BIOS MBR hd0" {
     insmod part_msdos
     insmod ntldr
     insmod ntfs
     ntldr (hd0,msdos1)/bootmgr
}
menuentry "Windows XP BIOS MBR hd0" {
     insmod part_msdos
     insmod ntldr
     insmod ntfs
     ntldr (hd0,msdos1)/ntldr
}
menuentry "Windows 7 BIOS MBR cd" {
     insmod part_msdos
     insmod ntldr
     insmod ntfs
     ntldr (cd)/bootmgr
}





#3 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 03 November 2018 - 09:53 PM

Hi erwan.l, thanks for taking a look at this.

 

I like your 1st menuitem.  I've often wondered if that would work. :)

 

I don't create ISOs, I download them.  And while I have installed a couple to USB drives I boot most them directly from my Windows 10 harddrive using grub2.

 

Here are some of my grub2 menuitems.

menuentry " LIVESLAK ISO"  --class debian --class icon-linux {
     set iso='/ISOs/slackware64-live-xfce-current.iso'
     set bootparms='load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=us '
 
     search -f $iso --set=root
     loopback loop $iso
     linux (loop)/boot/generic livemedia=/dev/sda6:/$iso $bootparms
     initrd (loop)/boot/initrd.img
     }
 
menuentry " Ubuntu ISO"  --class ubuntu --class icon-ubuntu {
     set iso='/ISOs/ubuntu-18.04.1-desktop-amd64.iso'
     set bootparms='boot=casper iso-scan/filename='$iso' splash -- '
 
     search -f $iso --set=root
     loopback loop $iso
     linux (loop)/casper/vmlinuz $bootparms
     initrd (loop)/casper/initrd.lz
     }
 
menuentry " RunTime DriveImage ISO"   --class other --class icon-unknown  {
     set iso='/ISOs/runtimelivecd.iso'
     set bootparms='lang=us bootfrom=(loop)'
    
     set bootdrv=$root
     search -f $iso --set=root
     if [ $root != $bootdrv ]; then
        loopback loop ($root)$iso
#        chainloader (loop)$bootmgr
        echo
        echo '(root)iso ' ($root)$iso
        echo 'bootfrom ' $loop
        echo
        sleep -i -v 10
        linux  (loop)/KNOPPIX/KNOPPIX $bootparms
        initrd (loop)/KNOPPIX/KNOPPIX1
     else
        echo "----------------------------------------"
        echo ISO NOT found.
        echo
        sleep -v -i 10
     fi
     set root=$bootdrv
     }

The last one is the one I'm struggling with.

 

The ISO has a /KNOPPIX folder and a /boot/isolinux folder.  I've tried both with no success so far.  And I've tried a lot of different boot file combinations. 

 

If you download the Runtime Live CD ISO you will see what I'm using.  I'm sure it's designed to be installed to a USB drive or a CD and would boot with Grub2 but I've booted ISOs directly before.  :)



#4 maro

maro

    Newbie

  • Members
  • 13 posts
  •  
    New Zealand

Posted 03 November 2018 - 11:48 PM

I'm not so sure about any GRUB2 configuration, but I'm certain '/KNOPPIX/KNOPPIX' is not a Linux kernel file. It contains the live file system, that is to be loop-mounted, during the boot process.

 

According to the '/boot/isolinux/*.cfg' files the kernel file should be either '/boot/isolinux/linux' (for 32-bit) or '/boot/isolinux/linux64' (for 64-bit), and the initrd file is '/boot/isolinux/minirt.gz'



#5 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 04 November 2018 - 03:53 AM

I'm not so sure about any GRUB2 configuration, but I'm certain '/KNOPPIX/KNOPPIX' is not a Linux kernel file.

:lol: I told you I've tried many combinations. :)

 

I tried your suggestions;

linux  (loop)/boot/isolinux/linux64 $bootparms
        initrd (loop)/boot/isolinux/minirt.gz

and ended up with a blank screen.

 

I will check the /boot/isolinux/*.cfg file and see if there are any boot parms I need to change.  One for booting from the ISO.

 

Thanks for the suggestions maro.  :cheers:



#6 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 04 November 2018 - 08:45 AM

Here are my Knoppix grub2 menus - you will need to modify them for your purposes

# uses /dev/sdxx but seems to ignore the device anyway and finds it!
# WORKS but NOT UEFI-32
if ! $EFI32; then
if [ -e "$isofpath/knoppix.iso" ]; then
menuentry "Knoppix 32 live ISO" --unrestricted --class linux{
set isoname=knoppix.iso ; CHECK_MNU_FOLDER
set root=$root2
set gfxpayload=1024x768x16,800x600
loopback loop $isofile
linux (loop)/boot/isolinux/linux iso-scan/filename=$isofile lang=en apm=power-off nomce  hpsa.hpsa_allow_any=1 loglevel=2 bootfrom=/dev/sdb2$isofile
initrd (loop)/boot/isolinux/minirt.gz
boot
}
fi
fi
#lang=en apm=power-off initrd=minirt.gz nomce hpsa.hpsa_allow_any=1 loglevel=1


# uses /dev/sdxx but seems to ignore the device anyway and finds it!
# WORKS but NOT UEFI-32
# debug vga= and video params added for debug purposes
if ! $EFI32; then
if [ -e "$isofpath/knoppix.iso" ]; then
menuentry "Knoppix 64 live ISO" --unrestricted --class linux{
set isoname=knoppix.iso ; CHECK_MNU_FOLDER
set root=$root2
set gfxpayload=1024x768,8000x600
loopback loop $isofile
linux (loop)/boot/isolinux/linux64 iso-scan/filename=$isofile debug vga=791 video=1024x768 lang=en apm=power-off initrd=minirt.gz nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 bootfrom=/dev/sdb2$isofile
initrd (loop)/boot/isolinux/minirt.gz
boot
}
fi
fi


#7 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 04 November 2018 - 08:21 PM

Thank you Steve.

 

This is what I tried:

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

     set iso="/ISOs/runtimelivecd.iso"
     set bootparms="iso-scan/filename=$iso lang=us apm=power-off nomce  hpsa.hpsa_allow_any=1 loglevel=2 bootfrom=$root$iso"
    
     set bootdrv=$root
     search -f $iso --set=root
     if [ $root != $bootdrv ]; then
        set gfxpayload=1024x768x16,800x600
        loopback loop ($root)$iso
        echo
        echo 'bootparms ' $bootparms
        echo
        sleep -i -v 15
        linux  (loop)/boot/isolinux/linux $bootparms
        initrd (loop)/boot/isolinux/minirt.gz
     else
        echo "----------------------------------------"
        echo ISO NOT found.
        echo
        sleep -v -i 10
     fi
     set root=$bootdrv
     }

and another blank screen. :(

 

No error msgs, no log to check, nothing. :angry:

 

I defragged the drive the ISOs are on so I know that's not the problem.  The bootparms display looked reasonable, and if they weren't I should have gotten an error msg but I get nothing.



#8 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 04 November 2018 - 09:19 PM

Apparently the Runtime ISO is very different from normal knoppix - look at the \boot\isolinux\isolinux.cfg file

 

for E2B (grub4dos) I can use these lines...

 

set APPEND=ramdisk_size=100000 lang=en apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 noswap tz=localtime
kernel /boot/isolinux/linux64 %APPEND%
initrd /boot/isolinux/minirt.gz

 

 

you will need to add the iso-scan/filename= and  bootfrom= params

 

for 32-bit use linux instead of linux64



#9 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 04 November 2018 - 11:32 PM

Got it!  :victory:

 

These parms work,

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

 

The difference, the bootfrom code.  Specifying the path to the ISO in specific Linux code of /dev/sda6 rather than a root variable or none at all.

 

On my harddrive not a problem, moving to a different system would require tweaking.  Can't imagine what it would be like on a USB drive.

 

The ISO's Knoppix includes Wine which allows running DriveImage XML from it.  WOW!!  An impressive system.

 

Main problem now is getting my netbook's touch pad to work.  It moves the pointer but tapping on it dosn't equate to a click.

 

 

Thank you for your help guys.   :good: :cheers:



#10 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 05 November 2018 - 04:28 PM

It seems to me :unsure: like in your earlier attempt:

set iso="/ISOs/runtimelivecd.iso"
     set bootparms="iso-scan/filename=$iso lang=us apm=power-off nomce  hpsa.hpsa_allow_any=1 loglevel=2 bootfrom=$root$iso"
    
     set bootdrv=$root
     search -f $iso --set=root

you modify the $root variable AFTER having defined bootparams (bootfrom) as a function of $root. :w00t:

 

:duff:

Wonko



#11 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 05 November 2018 - 07:00 PM

I tried many scenarios Wonko including hard coding the correct root values into the bootparms.  It didn't matter,  bootfrom requires the /dev/sdxy format.  That's why I left the bootparms variable where I did.

 

The bootfrom's format makes running the ISO from a USB drive awkward.  The menu would need some kind of script to either convert the root value to the /dev/sdxy format or a reminder to the user to edit it before continuing.

 

Nice hearing from you Wonko:cheers:

 

Ed



#12 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 05 November 2018 - 07:15 PM

Did you try a 'wrong' partition for bootfrom=/dev/sdxy ?? I found even if you put the wrong  sd partition it still worked (at least in previous versions)??



#13 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 05 November 2018 - 08:29 PM

Said in other words, AFTER you have run ON GRUB2 COMMAND LINE this:





set bootdrv=$root
search -f $iso --set=root

WHAT is the value of $root? :dubbio:

 

It may be a problem with the exact way the value is attributed to the $root value.

 

I seem to remember we had something similar some time ago (about a different linux distro/booting way), I'll see if I can find it.

 

EDIT:

Found it:

http://reboot.pro/to...ow-to/?p=201775

 

It has to be seen if the nice  :thumbsup:

...
probe -u --set=uuid ${root}
...
... root=/dev/disk/by-uuid/${uuid} ...
...

approach works on the specific distro.

 

:duff:

Wonko



#14 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 05 November 2018 - 10:24 PM

Did you try a 'wrong' partition for bootfrom=/dev/sdxy ?? I found even if you put the wrong  sd partition it still worked (at least in previous versions)??

 

:eek: Are you serious!!

 

No, I had not tried a wrong partition.  I tried several options: $root$iso, ($root)$iso, $iso and finally /dev/sda6$iso.

 

Just tried /dev/sda1, /dev/sdb6, and /dev/sdx0 and maybe /dev/sdxy, I want to retry that one, and they all worked. :o     Unbelievable.  Well that makes USB usage easy.

 

Thank you Steve.  :worship: 



#15 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 05 November 2018 - 10:33 PM

Said in other words, AFTER you have run ON GRUB2 COMMAND LINE this:

set bootdrv=$root
search -f $iso --set=root

WHAT is the value of $root? :dubbio:

It may be a problem with the exact way the value is attributed to the $root value.

 

hd0,gpt6

 

Definitely not sda6. 

 

For USB use I was thinking of looking into UUID use but after Steve's revelation NO need.  :)



#16 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 06 November 2018 - 02:47 AM

JFYI:

 

As I was curious about this runtimelivecd.iso decided to download it and used AIO Boot to include it on my AIO Boot USB stick, as it is not listed under its Linux distributions list, I selected knoppix and it was copied as runtimelivecd.iso and the respective config was automatically created on the USB with my selected name to launch it, it booted flawlessly (Grub2 boot manager), not a single problem, but excluding DriveImage XML (free for home users), all other tools are not free and require user license.

 

alacran



#17 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 06 November 2018 - 05:12 AM

Thanks alacran.  I've spent my time getting it to boot rather than using any of the apps on it.  Nice to know DriveImage XML is free still.  And I'm pretty sure GParted and the Disk Digger are free also though I not idea what Disk Digger does.

 

Can you post your grub2 menuitem for it?  Curious how it compares to what I'm using.



#18 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 06 November 2018 - 05:27 AM

 


It has to be seen if the nice  :thumbsup:

...
probe -u --set=uuid ${root}
...
... root=/dev/disk/by-uuid/${uuid} ...
...

approach works on the specific distro.

Your probe line is strange.  One I have used in the past is simply:

 

probe -u $root --set=USBuuid

 

as in

menuentry   'UUID tests'       --class other   --class icon-unknown   --class custom_004  {     

     set USB_drv=/boot/syslinux/vmlinuz

     echo "Boot drive: "$root
     echo " "
     search -f $USB_drv --set=root
     if [ $? = 0 ]; then
        echo "USB drive:  "$root
        probe -u $root --set=USBuuid
        echo "UUID: "$USBuuid
        echo " "
        echo " "
        sleep -i -v 30 ; echo
     else
        echo "----------------------------------------"
        echo " "
        echo "No USB drive found."
        echo " "
        ls ; echo
        sleep -i -v 10 ; echo
     fi 
}


#19 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 06 November 2018 - 12:39 PM

Maybe then, eliminating completely the bootfrom parameter from the kernel parameters (or leaving it blank) may work as well. :unsure:

 

:duff:

Wonko



#20 911CD.net

911CD.net

    Member

  • Advanced user
  • 86 posts
  •  
    United States

Posted 06 November 2018 - 04:55 PM

Maybe then, eliminating completely the bootfrom parameter from the kernel parameters (or leaving it blank) may work as well. :unsure:

 

 

Removing it doesn't work.  Blank screen.  Leaving it blank doesn't work either.  Blank screen.  Leaving the device parm generic works but takes longer to boot.

 

It boots and DriveImage XML works and GParted work so the ISO is useful for us home users. :)



#21 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 06 November 2018 - 06:08 PM

Hmmm. :unsure:
 
Queer :w00t:
 
What about
bootfrom=/dev/dummy
or
bootfrom=/dev/null
 
:dubbio:
 
Still using the UUID (dynamically retrieved) and root=/dev/disk/by-uuid/${uuid} seems like more "correct", I wonder if there is a timing difference in booting.

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

JFYI:
 
As I was curious about this runtimelivecd.iso decided to download it and used AIO Boot to include it on my AIO Boot USB stick, as it is not listed under its Linux distributions list, I selected knoppix and it was copied as runtimelivecd.iso and the respective config was automatically created on the USB with my selected name to launch it, it booted flawlessly (Grub2 boot manager), not a single problem, but excluding DriveImage XML (free for home users), all other tools are not free and require user license.
 
alacran

Good :), can you share what GRUB2 entry has AIO boot generated?
 
:duff:
Wonko

#22 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 06 November 2018 - 08:29 PM

This is runtimelivecd.cfg:

 

 

### 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
}
menuentry "[2] Start ADRIANE desktop with speech" --hotkey=2 {
    linux    ${extract_path}/boot/isolinux/linux lang=en apm=power-off video=640x480 initrd=minirt.gz nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 adriane knoppix_dir=${extract_path}/KNOPPIX
    initrd    ${extract_path}/boot/isolinux/minirt.gz
}
menuentry "[3] Start Knoppix in debug mode" --hotkey=3 {
    linux    ${extract_path}/boot/isolinux/linux lang=en apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 debug knoppix_dir=${extract_path}/KNOPPIX
    initrd    ${extract_path}/boot/isolinux/minirt.gz
}
menuentry "[4] Start Knoppix in debug mode" --hotkey=4 {
    linux    ${extract_path}/boot/isolinux/linux64 lang=en apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 debug knoppix_dir=${extract_path}/KNOPPIX
    initrd    ${extract_path}/boot/isolinux/minirt.gz
}
if [ -f ${extract_path}/boot/isolinux/linux64 ]; then
menuentry "[5] Start Knoppix with 64bit kernel" --hotkey=5 {
    linux    ${extract_path}/boot/isolinux/linux64 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
}
menuentry "[6] Start ADRIANE with 64bit kernel" --hotkey=6 {
    linux    ${extract_path}/boot/isolinux/linux64 lang=en apm=power-off video=640x480 nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 adriane  knoppix_dir=${extract_path}/KNOPPIX
    initrd    ${extract_path}/boot/isolinux/minirt.gz
}
menuentry "[7] Start Knoppix in debug mode" --hotkey=7 {
    linux    ${extract_path}/boot/isolinux/linux lang=en apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 debug knoppix_dir=${extract_path}/KNOPPIX
    initrd    ${extract_path}/boot/isolinux/minirt.gz
}
menuentry "[8] Start Knoppix in 64-bit debug mode" --hotkey=8 {
    linux    ${extract_path}/boot/isolinux/linux64 lang=en apm=power-off nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 debug knoppix_dir=${extract_path}/KNOPPIX
    initrd    ${extract_path}/boot/isolinux/minirt.gz
}
fi
if [ -n "$pc" ]; then
menuentry "[9] Start RAM check" --hotkey=9 {
    linux16    ${extract_path}/boot/isolinux/memtest foo
}
fi
### End \AIO\Files\Linux\runtimelivecd
 

 

I booted it from first option.

 

alacran



#23 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 06 November 2018 - 08:56 PM

This is runtimelivecd.cfg:

 

 

I booted it from first option.

 

alacran

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.

 

:duff:

Wonko



#24 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 06 November 2018 - 08:56 PM

@911CD.net

 

Thanks alacran.  I've spent my time getting it to boot rather than using any of the apps on it.  Nice to know DriveImage XML is free still.  And I'm pretty sure GParted and the Disk Digger are free also though I not idea what Disk Digger does.

 

Yes, you are right, Gparted is free software as allways, about Disk Digger I didn't run it (as you, I don't know what is its use), but I was talking about backup an recovery tools, on this category only DriveImage XML is free for home users, and I can run it and recuva on all my WinPEs so I think this livecd is useless for me.

 

alacran



#25 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 06 November 2018 - 09:28 PM

@Wonko

 

I haven't sleep in the last 36 hours so I didn't bother to check how the source *.iso was copied to USB stick.  Same happened with config, just found it and pasted to the post without analyze it. Sorry for the inconvenience.

 

But if this way (extracted or flat boot) it works fine without any problem, why not use it, it is just a folder on the drive with same content and size as the Iso.

 

alacran






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users