Menu

FW: Grub2Win ISO Boot - Parted Magic #3

2019-10-11
2019-10-19
  • Julian Colombo

    Julian Colombo - 2019-10-11

    Hi,

    I wish to boot the "Parted Magic 2019_09_03" ISO, or any other Parted Magic
    ISO. The ISOs appear to have the same file/folder structure.

    Is anyone able to offer a suggestion as to what the Grub2Win ISO Boot
    configuration would look like!

    Thank you.

    Julian

     
  • Ed  P

    Ed P - 2019-10-11

    Probably something like this:

    menuentry " RunTime DriveImage ISO"   --class other --class icon-gnugrub  {
    
         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" 
    #        bootfrom can be simply a generic /dev/sdxy$iso but boots faster with sda6.
    
         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
         }
    

    But you will have to tweak the bootparms, linux and initrd parms to fit your ISO and that can be fun. The latter two parms you can get by looking at the file structure in the ISO. The boot parms can sometimes be found in a boot menu in the ISO or by reviewing the app's website.

     
  • Julian Colombo

    Julian Colombo - 2019-10-16

    Mmm. I will look more into you suggestions thank you.

    Julian

     
  • Julian Colombo

    Julian Colombo - 2019-10-17

    Ed P, one of my Grub2Win Boot Menu entries looks like this:

    clear
    set isopath='/ISO/x.iso'
    set kernelpath='/kernel32'
    set bootparms='rw acpi_osi=Linux acpi_backlight=vendor rmods_dbg=0 acpi=off noapic pci=noacpi,nobios'
    getbootpartition file $isopath
    loopback loop ($root)$isopath
    test -f (loop)$kernelpath
    if [ ! $? = 0 ] ; then echo; echo * The kernel file $kernelpath was not found in the loopback filesystem; fi
    echo
    echo 'Linux will boot from ' ($root)$isopath
    echo
    linux (loop)$kernelpath $bootparms
    initrd (loop)/lrfsbase.bin (loop)/rm_scsi.b32 (loop)/rm_pata.b32 (loop)/rm_usb.b32 (loop)/rm_pcard.b32 (loop)/rm_video.b32 (loop)/rm_other.b32 (loop)/rootgui (loop)/rmconfig.bin
    if [ ! -z $reviewpause ] ; then sleep -i -v $reviewpause; fi
    echo
    echo 'GNU Grub Is Now booting Drive Image'

    ...so your example's syntax looks incorrect!

     
  • Julian Colombo

    Julian Colombo - 2019-10-17

    Hi,

    I have attached a compressed Winrar file containing a dir.txt file which lists the entire folder/file structure of the Pqmagic ISO file.

    There are some references to "Grub" so I have also included the .cfg files. Apparently, the ISO itself boots into a DOS GUI which allows to user to select which environment x32 x 64 to boot. After that, the actual Pqmagic applacation begins to load.

    I have no idea where to start or to what file names should be entered into the Grub2Win Menu. Help on this will be appreciated.

    Thanks.

    Julian

     
  • Julian Colombo

    Julian Colombo - 2019-10-17

    Trial version can be download from here: https://www.fcportables.com/parted-magic/

     
    • Ed  P

      Ed P - 2019-10-17

      That link is WAY too slow for me. 45min to download the file.

      On Wed, Oct 16, 2019 at 10:18 PM Julian Colombo jcinternetstuff@users.sourceforge.net wrote:

      Trial version can be download from here:
      https://www.fcportables.com/parted-magic/

       
      • Julian Colombo

        Julian Colombo - 2019-10-17

        You could have downloaded it about 3 times by now!

         

        Last edit: Julian Colombo 2019-10-17
  • Ed  P

    Ed P - 2019-10-17

    Julian,

    "Ed P, one of my Grub2Win Boot Menu entries looks like this:"

    That's ok, I have ones that look like this:

    set timeout=30
    set subdefault=0
    
    menuentry " Linux Mint 19.2 Cinnamon ISO"  --class debian --class icon-linux {
    
         set iso='/ISOs/linuxmint-19.2-cinnamon-64bit.iso'
         set bootparms='set image /6.4/amd64/bsd.rd '
    
         search -f $iso --set=root
         loopback loop $iso
         linux  (loop)/casper/vmlinuz  file=/cdrom/preseed/linuxmint.seed boot=casper iso-scan/filename=${iso} quiet splash --
         initrd (loop)/casper/initrd.lz
         }
    

    and

    ~~~
    `menuentry " R-Drive Image ISO" --class other --class icon-linux {

     clear
     set isopath='/ISOs/R-DriveImage_6.1.6107_OEMKit..iso'
     set kernelpath='/kernel32'
     set bootparms='rw acpi_osi=Linux acpi_backlight=vendor lang=en'
     getbootpartition file $isopath
     loopback loop ($root)$isopath
     test -f (loop)$kernelpath
     if [ ! $? = 0 ] ; then echo; echo *** The kernel file $kernelpath was not found in the loopback filesystem; fi
     echo
     echo 'Linux will boot from ' ($root)$isopath
     echo
     linux  (loop)$kernelpath $bootparms
     initrd (loop)/lrfsbase.bin (loop)/rm_scsi.b32 (loop)/rm_pata.b32 (loop)/rm_usb.b32 (loop)/rm_pcard.b32 (loop)/rm_video.b32 (loop)/rm_other.b32 (loop)/rootgui (loop)/rmconfig.bin
     if [ ! -z $reviewpause ] ; then sleep -i -v $reviewpause; fi
     echo
     echo 'GNU Grub Is Now booting R-Drive Image'
     }`
    

    ~~~

     "...so your example's syntax looks incorrect! "
    
     But they all work so...
    
     :-)
    
     

    Last edit: Ed P 2019-10-17
  • Julian Colombo

    Julian Colombo - 2019-10-17

    I found this amongst some files containing the Pmagic files:

    DEFAULT pmagic32

    LABEL pmagic32
    LINUX pmagic/bzImage
    INITRD pmagic/initrd.img,pmagic/fu.img,pmagic/m32.img,pmagic/files.cgz
    APPEND edd=on vga=normal

    LABEL pmagic64
    LINUX pmagic/bzImage64
    INITRD pmagic/initrd.img,pmagic/fu.img,pmagic/m64.img,pmagic/files.cgz
    APPEND edd=on vga=normal

    ....so I update my menu to:

     clear
     set isopath='/ISO/pmagic_pxe_2019_09_03.iso'
     set kernelpath='/pmagic/bzImage64'
     set bootparms='edd=on vga=normal'
     getbootpartition file $isopath
     loopback loop ($root)$isopath
     test -f (loop)$kernelpath
    

    if [ ! $? = 0 ] ; then echo; echo * The kernel file $kernelpath was not found in the loopback filesystem; fi
    echo
    echo 'Linux will boot from ' ($root)$isopath
    echo
    linux (loop)$kernelpath $bootparms
    initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img (loop)/pmagic/files.cgz
    if [ ! -z $reviewpause ] ; then sleep -i -v $reviewpause; fi
    echo
    echo 'GNU Grub Is Now booting Drive Image'

     ...and the ISO appears to boot but hangs after a few seconds!
    
     Julian
    
     
  • Ed  P

    Ed P - 2019-10-17

    Good job Julian. I suspect the hang is due to a bootparm option.

     
  • Julian Colombo

    Julian Colombo - 2019-10-17

    Strange about the different syntax. I will still to mine.

    I managed to boot the 2018 version ISO, all the .img files all loaded but then it appears to pause saying "Searching for PMAGIC_2018_04_30.SQFS", and about 15 seconds later the rest follows (see attachment). This file is locata inside the ISO pmagic/pmodules folder. I have no idea how to tell the Menu to find this file! Any ideas?

    Here is what my almost working Menu looks like:

     clear
     set isopath='/ISO/pmagic_2018_04_30.iso'
     getbootpartition file $isopath
     loopback loop ($root)$isopath
     test -f (loop)$kernelpath
    

    if [ ! $? = 0 ] ; then echo; echo *** The kernel file $kernelpath was not found in the loopback filesystem; fi
    echo
    echo 'Linux will boot from ' ($root)$isopath
    echo
    linux (loop)/pmagic/bzImage64 edd=on vga=normal boot=live eject=no
    initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
    if [ ! -z $reviewpause ] ; then sleep -i -v $reviewpause; fi
    echo
    echo 'GNU Grub Is Now booting Drive Image'

    That's it...almost working except for the .sqfs file.

    Julian

     
  • Ed  P

    Ed P - 2019-10-18

    This works for me.

    menuentry " Parted Magic ISO"   --class other --class icon-gnugrub  {
    
         set lang="en" 
         set iso="/ISOs/Parted_Magic_2019_09_03.iso"
         set bootparms="iso_filename=$iso root=/dev/sda6$iso directory=boot boot=live edd=on vga=normal" 
    #        root= can be simply a generic /dev/sdxy$iso but boots faster with sda6.
    
         set bootdrv=$root
         search -f $iso --set=root
         if [ $root != $bootdrv ]; then
            loopback loop $iso
            linux  (loop)/pmagic/bzImage64 $bootparms
            initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img 
            loopback --delete loop
         else
            echo "----------------------------------------"
            echo ISO NOT found.
            echo
            sleep -v -i 10
         fi
         set root=$bootdrv
         }     
    

    :-)

     

    Last edit: Ed P 2019-10-18
  • Julian Colombo

    Julian Colombo - 2019-10-19

    Once again, when I cut-and paste the above into the Grub2win 'Edit Custom Code' and save, I get an error. Why is your code syntax slightly different from mine? The "" and the } are invalid, so I replaced the "" with ' ' and removed the } and there are now no errors.

    However, when I boot I receive message 'ISO NOT found.'. I have triple-checked the ISO location and it is valid. If I invert the if statement then booting suceeds but it sill can't find the .SQFS file after the 'Searching for PMAGIC_2018_04_30.SQFS'.

    I don't know how to properly format the code here so it is what is it. Here is my menu code:

    set lang='en'
    set iso='/ISO/pmagic_2018_04_30.iso'
    set bootdrv=$root
    search -f $iso --set=root
    if [ $root != $bootdrv ]; then
       loopback loop $iso
       linux  (loop)/pmagic/bzImage64 iso_filename=$iso root=/dev/sda6$iso directory=boot boot=live edd=on vga=normal
       initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
       loopback --delete loop
    else
      echo "----------------------------------------"
      echo ISO NOT found.
      echo
      sleep -v -i 2
    fi
    set root=$bootdrv
    

    Any thoughts?

     
  • Julian Colombo

    Julian Colombo - 2019-10-19

    Ok I have finnaly sorted this all out. The following code work on my system:

     clear
     set lang='en'
     set isopath='/ISO/pmagic_2019_09_03.iso'
     getbootpartition file $isopath
     loopback loop ($root)$isopath
     linux  (loop)/pmagic/bzImage64 iso_filename=$isopath root=/dev/sda6$isopath directory=boot boot=live edd=on vga=normal
     initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
    

    Thanks guys for your help.

    Julian

     
  • Julian Colombo

    Julian Colombo - 2019-10-19

    Ok I have finally sorted this all out. The following code work on my system:

     clear
     set lang='en'
     set isopath='/ISO/pmagic_2019_09_03.iso'
     getbootpartition file $isopath
     loopback loop ($root)$isopath
     linux  (loop)/pmagic/bzImage64 iso_filename=$isopath root=/dev/sda6$isopath directory=boot boot=live edd=on vga=normal
     initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
    

    Thanks guys for your help.

    Julian

     
  • Ed  P

    Ed P - 2019-10-19

    Happy to hear you got something that works for you Julian.

    "Why is your code syntax slightly different from mine? The "" and the } are invalid, so I replaced the "" with ' ' and removed the } and there are now no errors. "

    The } character is the end of the code started with the { character which is at the end of the menuentry statement. Open your grub.cfg file and look at the menuentry for your menu and you will see the { character.

    I maintain a lot of my grub2 menus via text editors in Linux rather than Grub2Win in Windows. Just quicker than rebooting for an menu entry the same as another one I already have. When you use Grub2Win's "Edit Custom Code" it generates the menuentry statement for you. Why it errors on " characters sounds like a Grub2Win bug, grub2 has no problem with "s.

     

    Last edit: Ed P 2019-10-19

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.