Menu

Add an ISO file

Tarq
2024-02-16
2024-03-08
1 2 > >> (Page 1 of 2)
  • Tarq

    Tarq - 2024-02-16

    good greeting
    Can you please guide me on how to add an ISO file?

     
  • Drummer

    Drummer - 2024-02-16

    Hi again Tarq,

    I refer you to Ed.

    He is the master of all things ISO.

    Dave

     
  • Ed  P

    Ed P - 2024-02-17

    Hello Tarq.

    Booting an ISO is fairly easy to do. Booting it the with the settings it needs can be an effort,

    Possible ISO boot parms: boot=/, from=all, from=$iso, fromiso=$iso, findiso=$iso, iso-scan/filename=$iso, bootfrom=/dev/sda6$iso

    The $iso is a variable I set for the name of the ISO so I can use the same menu for different ISOs.

    This is an example of a menu I use:

     menuentry " GParted Live - ISO" --class debian   --class icon-debian  {
    
     echo "Boot disk address is: "$root
     echo "Prefix is:            "$prefix
     echo "The boot mode is:     "$grub2win_bootmode
    
     set iso=/ISOs/gparted-live-0.30.0-1-i686.iso
     search -f $iso --set=root
    
     echo "ISO root is:          "$root
     echo "ISO is:               "$iso
     echo " "
     loopback loop $iso
     sleep -v -i 8
     linux (loop)/live/vmlinuz findiso=$iso boot=live union=overlay username=user config components quiet noswap ip= net.ifnames=0 nosplash locales=en_US.UTF-8 keyboard-layouts=us gl_batch
     initrd (loop)/live/initrd.img
     echo "Booting GParted"
     }
    
     Note the parameters on the last 2 lines.  Finding them takes time 
     either searching the web for posts relating to the ISO, reading 
     instructions that come with the ISO, and searching through the 
     ISO's boot code looking for parameters it uses.  And each ISO is 
     unique.
    
     Which ISO are you looking to boot?
    
     

    Last edit: Ed P 2024-02-18
    • Tarq

      Tarq - 2024-02-18

      What I meant is: Can the program find the path to the ISO file of a system image of a Linux distribution in the form of a compressed file?

      OS Name:                   Microsoft Windows 10 Pro
      OS Version:                10.0.19045 N/A Build 19045
      System Type:               x64-based PC
      BIOS Version:              Insyde F.72, 04/10/2023`
      
       

      Last edit: Tarq 2024-02-18
  • Ed  P

    Ed P - 2024-02-18

    Yes, the program can find the path to the ISO file when you choose menu "Type: isoboot", click the "Load Sample Code" button and then the "Select ISO File" button.

    As for "in the form of a compressed file" I have no idea what that means. Are you zipping ISO files?

     
    • Tarq

      Tarq - 2024-02-18

      As for "in the form of a compressed file" I have no idea what that means. Are you zipping ISO files?

      I do not compress ISO files, but by the nature of the ISO file, it is classified as a compressed file, and this is what is intended

       

      Last edit: Tarq 2024-02-18
  • Ed  P

    Ed P - 2024-02-18

    I don't know what file manager system you use that classifies ISO files as compressed Tarq. On my Windows 11 system in the File Explorer window .iso files show as Disc Image File. .zip files show as Compressed (zipped) Folder. I have an old notebook with Windows 10, I'll have to remember to check how it classifies .iso files the next time I use it.

     
    • Tarq

      Tarq - 2024-02-21

      The file system is the default Windows Explorer and also it appears to me that it is a system image file and not compressed. I classify any file that needs writing or burning as
      It is compressed. I was wrong. I meant that it needs to be burned and written to discs. That's all
      Well, now the GRUB boot loader settings screen appears for me, and I need to type a command related to the target operating system in order to access the boot folder. Is it necessary to know the unique identifier of the disk in order to access the path?

       
  • Ed  P

    Ed P - 2024-02-18

    BTW When I see a .iso file in my Windows 11 File Explorer, double clicking on it opens it in another File Explorer window. The .iso file is not compressed.

     

    Last edit: Ed P 2024-02-18
  • Ed  P

    Ed P - 2024-02-21

    Here is the directory structure of an ISO file I am currently working on:

    C:\Users\Ed>dir g:
     Volume in drive G is Linux Lite 6.6
     Volume Serial Number is 3901-DE17
    
     Directory of G:\
    
    09/12/2023  02:28 AM    <DIR>          .disk
    02/06/2022  12:21 AM    <DIR>          EFI
    09/12/2023  02:20 AM               197 README.diskdefines
    02/06/2022  12:21 AM    <DIR>          boot
    09/12/2023  02:28 AM             2,048 boot.catalog
    09/12/2023  02:28 AM    <DIR>          casper
    09/12/2023  02:20 AM    <DIR>          dists
    09/12/2023  02:20 AM    <DIR>          install
    09/12/2023  02:28 AM            40,782 md5sum.txt
    09/12/2023  02:20 AM    <DIR>          pool
    09/12/2023  02:20 AM    <DIR>          preseed
    09/12/2023  02:28 AM                 0 ubuntu
                   4 File(s)         43,027 bytes
                   8 Dir(s)               0 bytes free
    
    And these are the Grub  commands I am using to try and boot it:
    

    ` menuentry " Linux Lite 6.6 " --class custom --class icon-isoboot {

     set isofile='/ISOs/linux-lite-6.6-64bit.iso'
     set kernelpath='/casper/vmlinuz'                 
     set initrdpath='/casper/initrd.gz'             
     set bootparms='file=/cdrom/preseed/custom.seed boot=casper xforcevesa nomodeset iso-scan/filename=${isofile} ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --'
    
     search -f $isofile --set=root
     loopback loop $isofile
     linux (loop)$kernelpath $bootparms
     initrd (loop)$initrdpath
    

    }`

    The isopath variable defines the location of the .iso file on my harddrive.  It does not include the drive's identity.  That is found with the search command.  The Linux system sees the iso file's folders via the loopback command.
    
    The kernelpath and initrdpath settings are found by searching the various folders in the iso file looking for the required boot files vmlinuz and initrd.
    
    The bootparms settings are found by searching the various folders in the iso file looking for boot parms the iso uses when booting.  Sometimes they are in one place, sometimes they are in multiple places and sometimes you need to tweak them to fit your system, like the ram size.
    
    I hope this helps.
    
    BTW The iso that I'm playing with starts to boot and then fails.  I'm still trying to figure it out.
    
     

    Last edit: Ed P 2024-02-21
  • Ed  P

    Ed P - 2024-02-21

    Also, the bootparms with this iso are the longest set I've ever used. I copied them from somewhere. My normal bootparms are more like these:

    bootparms='boot=/ iso-scan/filename='$root$isopath' noprompt noeject'

     
  • Tarq

    Tarq - 2024-02-21

    I think the screen I'm standing on indicates that the program is unable to see the raw image of the system. I have another device that has a program affiliated with easybcd and accessed the initial system image and then the grub screen. More theoretical clarification and leave the practical to me about that.

     

    Last edit: Tarq 2024-02-21
  • Tarq

    Tarq - 2024-02-21

    grub boot file
    Paths and labels
    linuxmint-21.3-xfce-64bit
    D:\
    D:\boot\grub
    Storage unit serial number FE3EEDEA
    grub file in attachments

     

    Last edit: Tarq 2024-02-21
  • Ed  P

    Ed P - 2024-02-21

    Looking forward to seeing your Grub2Win ISO boot menu.

    BTW I got my test ISO to finally boot. The bootparms needed more quotes.

     

    Last edit: Ed P 2024-02-21
    • Tarq

      Tarq - 2024-02-21

      You can do whatever you want, but I checked it and I do not think it is completed automatically. Perhaps the program requires manual input. I thought my role was to add the command to boot from the path of the ISO file and nothing more.

       
  • Ed  P

    Ed P - 2024-02-21

    No, Grub2Win does not complete it automatically. Some user thought and effort is involved. And when you get it to boot you feel lie you've accomplished something. lol

     
  • Ed  P

    Ed P - 2024-02-22

    So, is this the menu you're testing?

    #
    #            This is sample code for booting from an iso file
    #            via the Grub2Win g2wisoboot function
    #
    #            See the Grub2Win help file advanced topics section for more information
    #
    #            Note: There are many many ISO files available. They are all different.
    #                  You must examine your particular ISO file with a utility like 7-Zip to
    #                  obtain the proper kernel and initrd paths.
    #                  You can then set the kernelpath and initrdpath variables below.
    #                  The kernel and initrd files will not be found unless the correct paths are set.         
    #
         clear
         set isopath='/linuxmint-21.3-xfce-64bit.iso'
         set kernelpath='/casper/vmlinuz'                   # Example '/vmlinuz'
         set initrdpath='/casper/initrd.lz'                 # Example '/initrd.img'
         set bootparms='boot=casper username=mint hostname=mint quiet splash --' 
    # Example 'boot=/ iso-scan/filename='$isopath' noprompt noeject ---'
    #
         g2wisoboot                                          # Run the g2wisoboot function
    #
    

    Easy to set up with the grub.txt file's help. But finding the parm to trigger the linuxmint's iso boot function might take some testing.

     

    Last edit: Ed P 2024-02-22
  • Ed  P

    Ed P - 2024-02-22

    Try adding these options to the begining of the bootparms:

    'file=/cdrom/preseed/linuxmint.seed iso-scan/filename=/iso/'$isopath'

     
  • Tarq

    Tarq - 2024-02-22

    Well, can you provide me with the operating parameter in the MX-23.2_fluxbox_x64 distribution, and I will try to find the kernel path and the rest of the paths?

     

    Last edit: Tarq 2024-02-22
  • Ed  P

    Ed P - 2024-02-22

    Probably not since it will take about 20 mins to download. Try the same parms as what you used for linuxmint and post the results of that approach.

     
  • Ed  P

    Ed P - 2024-02-22

    The \boot\syslinux\syslinux.cfg and \boot\isolinux\isolinux.cfg and README files are good starting points. The APPEND parms are bootparms. Unfortunately neither mention booting from the ISO file. Try the 2 parms I suggested for your linux mint iso. As I have mentioned before, finding them for ISOs is tedious, time consuming, trial & error, Google searches.

    The \boot\grub\loopback.cfg may be the bootparms required to boot the ISO.

     

    Last edit: Ed P 2024-02-22
    • Tarq

      Tarq - 2024-02-23

      No root device specified. Boot arguments must include a root=parameter.

       

      Last edit: Tarq 2024-02-23
  • Tarq

    Tarq - 2024-02-23

    I think that the boot loader does not reach the root partition that was allocated because there are spaces in the label or the unique disk identifier must be entered

     

    Last edit: Tarq 2024-02-23
  • Tarq

    Tarq - 2024-02-23

    I think the partition path on the disk is missing in the instructions

     
  • Ed  P

    Ed P - 2024-02-23

    Good to hear your making progress but without seeing the parms you have set I can't offer much advice. I don't agree with your thinking though.

     
1 2 > >> (Page 1 of 2)

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.