Skip to main content

Booting ISO Images in Mageia7

Years ago, I used GRUB and memdisk to boot directly from ISO images I kept in /boot/. Things like SpinRite, F4UBD, PLPBT and so on. It was pretty straightforward on 32-bit Linux using GRUB.

Then GRUB2 came along and I found it frustrating. What made it even worse was that much of what I found on the Internet was specific to Ubuntu and the non-standard way in which Ubuntu implements things. As well, for the Ubuntu crowd, solutions were presented as recipes, so copy-paste ruled the day without any explanation as to why certain settings were chosen and what options were available. In other words, it was difficult to translate these "solutions" to anything but Ubuntu Linux.

For Mageia, it is helpful to know what the distro uses as the default directories. Mageia provides the following file:

# /etc/grub-customizer/grub.cfg
# Configuration file for grub-customizer
#(not to be confused with grub.cfg for grub2)

#Command name changes for




# These are the default configuration file locations used by grub2 in Mageia.





Also note that to avoid confusion with GRUB commands, all GRUB2 commands in Mageia are prefixed with grub2-*.

Where Is the GRUB2 Bootloader Installed?

Reboot your machine and enter the GRUB2 menu and press C which brings you to the GRUB2 command prompt. For now, the only one that you need is: ls.

To discover this, the following two commands are useful.

$ sudo grub2-probe -t device /boot/grub2

which in my case, returns /dev/sdc1.

To discover the UUID of the device, 

$sudo grub2-probe -t fs_uuid /boot/grub2

which returns for me,


While the configuration file for GRUB2 is kept in /boot/grub2/grub.cfg, it is not to be edited directly. Instead, configuration files found in /etc/grub.d are accessed to build the configuration file that is ultimately used. The filename prefixes in that directory have specific meaning to GRUB2 and by default, the file 40_custom is intended to be modified by the user. The file must be executable to be included in the final configuration.

Let's create a custom GRUB2 menu entry for F4UBCD. Falcon 4's Universal Boot CD is Grub4DOS-based and provides many system utilities as well as a running Windows MiniXP . The intent is to provide tools to repair computer systems. The ISO image contains a readme.txt file with a plethora of information The information about the ISO image is:

$ sudo isoinfo -d -i /boot/F4UBCD.iso 
CD-ROM is in ISO 9660 format
System id: Win32
Volume id: F4UBCD v4.61
Volume set id: 
Publisher id: 
Data preparer id: 
Copyright File id: 
Abstract File id: 
Bibliographic File id: 
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 357231
El Torito VD version 1 found, boot catalog is in sector 64
NO Joliet present
NO Rock Ridge present
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff 42 66

But what kind of ISO image is it? Standard or Hybrid? Using fdisk -l on the image, a hybrid ISO image will look like a hard drive with partitions, a standard ISP image will look like this:
# fdisk -l  /boot/F4UBCD.iso
Disk /boot/F4UBCD.iso: 697.7 MiB, 731609088 bytes, 1428924 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

We may not need all this information, but that's how to get it if we do.

One extra component we may need is memdisk. It's part of the Syslinux package and can boot floppy images, hard disk images and some ISO images. However, Mageia7's version of syslinux does not provide memdisk.

Here's what a custom script will look like to boot a grub4dos ISP image, F4UBCD.iso.

menuentry "F4UBCD" {

This is our first line that provides the name of the menu entry to GRUB2; it always ends with a left curly bracket. The entire menu entry will end with a right curly bracket.

insmod iso9660
insmod part_msdos
insmod chain

These three lines load modules necessary for GRUB2 to look inside the image. These modules provide iso9660 support which is needed to read optical discs that use this filesystem, provide support for MS-DOS (MBR) partitions and partitioning tables and provide support for MS-DOS (MBR) partitions and partitioning tables.

chainloader (hd2,0)+1

This line invokes the chainloader on the hard drive discovered above.




Popular posts from this blog

DOS4GW.EXE Version 2.01a and Alternative DOS Extenders

DOS4GW.EXE The Tenberry DOS extender DOS4GW.EXE was used by many early DOS games. I still enjoy playing many of these games and DOS4GW.EXE is usable with DOSBox , so they can be played on Linux. However, the version of DOS4GW.EXE that was included with the game was whatever was current at the time. The most recent version that includes many bugfixes that possibly affected the games when used with DOSBox have been fixed in the latest version, 2.01a. It's not free at US$49, but you can downloaded it here . Simply substitute it for whatever version of DOS4GW.EXE your game provided and enjoy the bug-fixed goodness. Tenberry also makes a "high-performance" "pro" version of DOS4GW.EXE, but it costs $300. I think that they could sell quite a few of these to hobby users (since, you know, DOS is dead) for US$5. Open Souce to the Rescue There are better performing, free and Open Source alternatives available and worth a look. DPMI Explained Let's unders

Unreal Tournament GOTY/UT99 for Modern Linux

Released on November 16, 1999, Unreal Tournament (also known as UT99) is an arena first-person shooter for Multiplayer on-line competition or you can play against bots off-line. It features several game types, with more details provided at Wikipedia . The game was re-released on February 25, 2000 as Unreal Tournament Game of the Year Edition (GOTY) which included the three bonus packs released previously and additional mods, or game modifiers that had become popular. It is the GOTY version that is available from STEAM or . The GOG version for Windows installs in Linux and plays well using WINE , PlayOnLinux or Codeweaver's Crossover . There is a Linux binary available in two versions, one for the original game and one for the GOTY edition . Also provided at that site is the Official Bonus Pack with a Linux installer. All these Linux installers are created with makeself . There are some issues using such a crusty old Linux binary. Let's see why getting a Lin

Unpack those .EXE game files from (Plus other un-packers)

I just came upon innoextract today. I have many of the wonderful games from, some of which have native Linux Clients. Before now, I've had to use PlayOnLinux or Crossover to install these for use with WINE, then add the Linux client. InnoSetup as a way to create an installer to install the games on Windows.  Daniel Scharrer has created innoextract to allow the unpacking of those archives on a non-Windows platform. The website provides information on using innoextract , but this information from the page is very useful: Installers installers with a 2.x.x version number on the download page or in the filename use InnoSetup 5.5.0 and cannot be extracted by innoextract 1.2 and older. Older installers use InnoSetup 5.2.3 and usually have no version in the filename. Some multi-part installers with version 2.1.x or higher use RAR archives (renamed to .bin) to store the game data. These files are not part of the InnoSetup installer and require