Other languages Deutsch ; English ; Nederlands ; |
Synopsis: Configure Mageia with a grub boot menu enabling installation from ISO image on disk. |
See also
- Making a bootable network install USB drive
- Installing Mageia from ISO on disk
- Booting Mageia Live from ISO images on disk using grub2
Contents
- 1 Introduction
- 2 Acknowledgements
- 3 Assumptions and scope
- 4 Benefits
- 5 Overview
- 6 Preparation
- 6.1 Step-1: Create local disk filesystem partition /mnt/install-iso/
- 6.2 Step-2: Download Mageia install ISO file
- 6.3 Step-3: Download Mageia Network Install ISO image
- 6.4 Step-4: Add entry to grub2 configuration file for booting Mageia Network Install ISO image
- 6.5 Step-5: run "drakboot"
- 6.6 Step-6: Make a note of your disk partition layout
- 7 Install process
- 8 Post install: add loopback mount of ISO install image
- 9 Appendix 1: 64 bit version of append for /etc/grub.d/40_custom
- 10 Appendix 2: 32-bit version of append for /etc/grub.d/40_custom
- 11 Appendix-3: install on a brand new disk
- 12 Appendix-4: when you have your NVMe SSD in a PCIe adapter that you added to your machine
- 13 Appendix-5: tips
Introduction
This page provides details for how to install Mageia from an install ISO image stored on disk by configuring the grub boot menu to include a new option to boot from the install ISO image. The key advantage of doing this is that the installation process does not need any installation media to work and is typically very fast limited only by the speed of the disk device. So, if you have an NVMe SSD then using this method can typically complete the main install in less than 5 minutes (dependent of how many packages you choose to install).
Acknowledgements
Thanks to Philippe Makowski for suggesting this idea.
Assumptions and scope
The method described here depends on having:
- grub2 for booting. This is the default since Mageia 6.
- A separate disk filesystem partition
/mnt/install-iso/
- A copy of Mageia install ISO file in
/mnt/install-iso/
- A copy of Mageia network install ISO also in
/mnt/install-iso/
Benefits
Firstly, no install media is needed: not CD, DVD nor USB.
Secondly, it is a fast method of installing limited only by disk speed.
Thirdly, post install, the install ISO can be loop mounted for further package installing.
A key benefit of this method of installing Mageia is that it is fast limited only by disk access speed.
For example, installing from install ISO on NVMe SSD the whole package installion phase can be complete in as little as 4 minutes with a full installation taking between 12 to 18 minutes depending on manual interaction ( for example in the partitioning and/or post install configuration phases ).
Overview
- Create a partition /mnt/install-iso for storing install ISO files (can also use existing partiton if enough space)
- Download and verify two Mageia install ISO files: 1) network install 2) Mageia install
- Create ${HOME}/etc_grub.d_40_custom and append to /etc/grub.d/40_custom
- Run drakboot
- Reboot and select your new grub boot option for "network install". Note: this allows complete flexibility and includes option for installing from ISO on disk.
- From booted network install image, select install from disk
- Identify the partition (with the install ISO) and specify the ISO file image to boot
- Complete install process (as normal)
- Post-install: loop mount the Mageia install ISO to speed package installation
Preparation
Step-1: Create local disk filesystem partition /mnt/install-iso/
Use /usr/sbin/diskdrake to create a new partition mounted at /mnt/install-iso/ on your disk drive.
Ideally, /mnt/install-iso partition should be large enough for two full install ISO images plus the netinstall iso which is about 10gb in total. At a minimum, /mnt/install-iso will need to be large enough for a single full install image plus the netinstall ISO: approximately 5gb.
The advantage of having two full install images is that we can store both the current version of Mageia and have room for the next release ISO image. This makes it easier for fresh re-install or upgrade from current to next release. For example from Mageia 8 to Mageia 9.
Label the partition INSTALL-ISO to make it easier to find and reference.
Tip: if you make the INSTALL-ISO a size like 10gb (10240mb) it will be easier to find during the install process when the list of partitions are shown.
For example:
[user@localhost ~]$ lsblk -o NAME,LABEL,UUID,MAJ:MIN,RM,SIZE,RO,TYPE,MOUNTPOINT,PARTFLAGS /dev/nvme0n1p3 NAME LABEL UUID MAJ:MIN RM SIZE RO TYPE MOUNTPOINT PARTFLAGS nvme0n1p3 INSTALL-ISO fe849253-3eff-4b04-9c15-d3ae1c94f084 259:3 0 10G 0 part /mnt/install-iso ^^^ :::
Label the partition "INSTALL-ISO" (for example, using the gparted or diskdrake programs).
[root@localhost ~]# lsblk -o NAME,LABEL /dev/sda NAME LABEL sda ├─sda1 INSTALL-ISO ├─sda2 ├─sda5 BOOT ├─sda6 │ └─crypt_sda6 SWAP ├─sda7 │ └─crypt_sda7 ROOT ├─sda8 │ └─crypt_sda8 USR-LOCAL └─sda9 └─crypt_sda9 HOME
Step-2: Download Mageia install ISO file
Connect to https://www.mageia.org/downloads/ and select your download ISO image for installing Mageia. Choose the 32 or 64 bit image to match your computer's processor. In this example, the 64bit Mageia install image is downloaded.
Download sha512 checksum file
wget https://www.mirrorservice.org/sites/mageia.org/pub/mageia/iso/9/Mageia-9-x86_64/Mageia-9-x86_64.iso.sha512
Example:
[root@localhost install-iso]# wget https://www.mirrorservice.org/sites/mageia.org/pub/mageia/iso/9/Mageia-9-x86_64/Mageia-9-x86_64.iso.sha512 --2023-08-30 21:52:34-- https://www.mirrorservice.org/sites/mageia.org/pub/mageia/iso/9/Mageia-9-x86_64/Mageia-9-x86_64.iso.sha512 Resolving www.mirrorservice.org (www.mirrorservice.org)... 212.219.56.184, 2001:630:341:12::184 Connecting to www.mirrorservice.org (www.mirrorservice.org)|212.219.56.184|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 150 [application/x-iso9660-image] Saving to: ‘Mageia-9-x86_64.iso.sha512’ Mageia-9-x86_64.iso.sha512 100%[=============================================>] 150 --.-KB/s in 0s 2023-08-30 21:52:34 (25.2 MB/s) - ‘Mageia-9-x86_64.iso.sha512’ saved [150/150]
Download Mageia install ISO file
Next, we download the install ISO file. this is over 4gb and will take a while to download:
wget https://www.mirrorservice.org/sites/mageia.org/pub/mageia/iso/9/Mageia-9-x86_64/Mageia-9-x86_64.iso
Example:
[root@localhost install-iso]# wget https://www.mirrorservice.org/sites/mageia.org/pub/mageia/iso/9/Mageia-9-x86_64/Mageia-9-x86_64.iso --2023-08-30 21:57:23-- https://www.mirrorservice.org/sites/mageia.org/pub/mageia/iso/9/Mageia-9-x86_64/Mageia-9-x86_64.iso Resolving www.mirrorservice.org (www.mirrorservice.org)... 212.219.56.184, 2001:630:341:12::184 Connecting to www.mirrorservice.org (www.mirrorservice.org)|212.219.56.184|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 4520814592 (4.2G) [application/x-iso9660-image] Saving to: ‘Mageia-9-x86_64.iso’ Mageia-9-x86_64.iso 12%[======================> ] 594.57M 7.88MB/s eta 7m 34s
Verify the downloaded ISO file
sha512sum -c Mageia-9-x86_64.iso.sha512
Example:
[root@localhost install-iso]# pwd /mnt/install-iso [root@localhost install-iso]# ls -l Mageia-9-x86_64* -rw-r--r-- 1 root root 4520814592 Aug 24 22:37 Mageia-9-x86_64.iso -rw-r--r-- 1 root root 150 Aug 24 22:37 Mageia-9-x86_64.iso.sha512 [root@localhost install-iso]# sha512sum -c Mageia-9-x86_64.iso.sha512 Mageia-9-x86_64.iso: OK
Step-3: Download Mageia Network Install ISO image
Connect to https://www.mageia.org/downloads/ and select the appropriate network install image for your system. First select "Network Installation". Choose from 32 or 64 bit according to your computer processor. Finally, select either "Free Software CD" or "Nonfree firmware CD".
download the Network Install ISO image sha512 checksum file
wget https://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/9/x86_64/install/images/Mageia-9-netinstall-nonfree-x86_64.iso.sha512
Example:
[root@localhost install-iso]# wget https://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/9/x86_64/install/images/Mageia-9-netinstall-nonfree-x86_64.iso.sha512 --2023-08-30 22:19:37-- https://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/9/x86_64/install/images/Mageia-9-netinstall-nonfree-x86_64.iso.sha512 Resolving www.mirrorservice.org (www.mirrorservice.org)... 212.219.56.184, 2001:630:341:12::184 Connecting to www.mirrorservice.org (www.mirrorservice.org)|212.219.56.184|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 169 [application/x-iso9660-image] Saving to: ‘Mageia-9-netinstall-nonfree-x86_64.iso.sha512’ Mageia-9-netinstall-nonfree-x86_64.iso.sha512 100%[===============================================>] 169 --.-KB/s in 0s 2023-08-30 22:19:38 (29.2 MB/s) - ‘Mageia-9-netinstall-nonfree-x86_64.iso.sha512’ saved [169/169]
download network install ISO image
wget https://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/9/x86_64/install/images/Mageia-9-netinstall-nonfree-x86_64.iso
Example:
[root@localhost install-iso]# wget https://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/9/x86_64/install/images/Mageia-9-netinstall-nonfree-x86_64.iso --2023-08-30 22:23:34-- https://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/9/x86_64/install/images/Mageia-9-netinstall-nonfree-x86_64.iso Resolving www.mirrorservice.org (www.mirrorservice.org)... 212.219.56.184, 2001:630:341:12::184 Connecting to www.mirrorservice.org (www.mirrorservice.org)|212.219.56.184|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 127926272 (122M) [application/x-iso9660-image] Saving to: ‘Mageia-9-netinstall-nonfree-x86_64.iso’ Mageia-9-netinstall-nonfree-x86_64.iso 100%[===============================================>] 122.00M 8.76MB/s in 14s 2023-08-30 22:23:49 (8.74 MB/s) - ‘Mageia-9-netinstall-nonfree-x86_64.iso’ saved [127926272/127926272] [root@localhost install-iso]# ls -lh Mageia-9-netinstall* -rw-r--r-- 1 root root 122M Aug 19 20:04 Mageia-9-netinstall-nonfree-x86_64.iso -rw-r--r-- 1 root root 169 Aug 19 20:04 Mageia-9-netinstall-nonfree-x86_64.iso.sha512
Verify the download
sha512sum -c Mageia-9-netinstall-nonfree-x86_64.iso.sha512
Example:
[root@localhost install-iso]# sha512sum -c Mageia-9-netinstall-nonfree-x86_64.iso.sha512 Mageia-9-netinstall-nonfree-x86_64.iso: OK
Step-4: Add entry to grub2 configuration file for booting Mageia Network Install ISO image
Note that the process of installing from an ISO image on disk is in two stages. The first stage is to boot the "Network Install" iso image and that is what we configure in grub2 (in this step).
The second stage is when we have booted "network Install" we select the install method to boot from disk and then specify the Mageia install iso image.
Here is an example of: /etc/grub.d/40_custom where the ISO install image is "Mageia-9-netinstall-nonfree-x86_64.iso" in partition /dev/sda12 mounted at /mnt/install-iso/
Take care to define the correct values for:
- set isofile=
- set root=
- loopback loop
In the examples shown here for 64-bit, these are:
- set isofile="/Mageia-9-netinstall-nonfree-x86_64.iso"
- set root='hd0,1'
- loopback loop (hd0,1)$isofile
Explanation:
- "Mageia-9-netinstall-nonfree-x86_64.iso" is the name of the Mageia Network Install image we downloaded. NB: need a "/" in front of the ISO file name.
- 'hd0,1' means the first disk /dev/sda and the 1st partition. /dev/sda1 in this example (mounted as /mnt/install-iso/ ).
Nota bene: When the install is done it is likely that /etc/grub.d/40_custom will be lost.
For this reason, create ${HOME}/etc_grub.d_40_custom on the assumption that /home/ will be preserved during the install then append ${HOME}/etc_grub.d_40_custom to /etc/grub.d/40_custom.
NB: do *not* overwrite any existing /etc/grub.d/40_custom. In Mageia 9, the default contains:
#!/usr/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above.
The following is the part we are appending to /etc/grub.d/40_custom.
NB in this example (below), we use "\$isofile" to prevent the shell from interpreting "$isofile" as an empty shell variable.
# (Copy & paste, run as non-root) cat << EEOOFF >> ${HOME}/etc_grub.d_40_custom # --------------------------------------------- added on $(date "+%Y_%m_%d at %H:%M") # Example for adding to /etc/grub.d/40_custom # # Reference: https://wiki.mageia.org/en/Installing_Mageia_from_ISO_images_on_disk_using_grub2 # # NB ensure correct values set for your configuration below: # # 1) set isofile= # example: set isofile="/Mageia-7-netinstall-nonfree-x86_64.iso" # ^ # ^ NB leading "/" # 2) set root= # example: set root="hd0,1" # This is for /dev/sda1. Other examples: # # set root="hd0,12" for /dev/sda12 mounted at /mnt/install-iso/ # # set root="hd1,9" for /dev/sdb9 mounted at /mnt/install-iso/ # # set root="hd0,gpt5" for /dev/nvme0n1p5 mounted at /mnt/install-iso/ # ^^^ ^^^^ # ^ ^ NVMe SSD (works in Mageia 8) # ^ # ^ global partition table for UEFI systems # # 3) loopback loop # example: loopback loop (hd0,1)\$isofile # NB "hd0,1" is /dev/sda1 and no "/" before "\$isofile" # Other examples: # loopback loop (hd0,gpt5)\$isofile # # NB: 2) and 3) must match # # # 64-bit example: Mageia 7 on a legacy MBR type system # /dev/sda1 mounted on /mnt/install-iso menuentry "Mageia 7 Network Install nonfree 64-bit iso" { insmod gzio insmod part_msdos insmod ext2 insmod xfs insmod loopback insmod iso9660 insmod udf set isofile="/Mageia-7-netinstall-nonfree-x86_64.iso" set root="hd0,1" loopback loop (hd0,1)\$isofile linux (loop)/isolinux/x86_64/vmlinuz isofile=\$isofile initrd (loop)/isolinux/x86_64/all.rdz } # 64-bit example: Mageia 8 nonfree on UEFI type system # /dev/nvme0n1p5 mounted at /mnt/install-iso/ # menuentry "Mageia 8 Network Install nonfree x86_64.iso" { insmod gzio insmod part_gpt insmod ext2 insmod xfs insmod loopback insmod iso9660 insmod udf set isofile="Mageia-8-netinstall-nonfree-x86_64.iso" set root="hd0,gpt5" loopback loop (hd0,gpt5)\$isofile linux (loop)/isolinux/x86_64/vmlinuz isofile=\$isofile initrd (loop)/isolinux/x86_64/all.rdz } # 64-bit example: Mageia 9 nonfree on MBR type system # /dev/sda1 mounted at /mnt/install-iso/ # example: system has both sata SSD (with /boot and /mnt/install-iso) and # M.2 NVMe SSD (with /, /usr/local, /home, and swap partitions) # menuentry "Mageia 9 Network Install nonfree 64bit /dev/sda1 => hd0,1" { insmod gzio insmod part_msdos insmod ext2 insmod xfs insmod loopback insmod iso9660 insmod udf set isofile="/Mageia-9-netinstall-nonfree-x86_64.iso" set root="hd0,1" loopback loop (hd0,1)$isofile linux (loop)/isolinux/x86_64/vmlinuz isofile=$isofile initrd (loop)/isolinux/x86_64/all.rdz } # 32-bit example: # NB: for the 32-bit version, the ISO filename has "i586" # but the "linux" and "loop" paths use "i386". # (Can verify by loop mounting the network install ISO and checking paths.) menuentry "Mageia 7 Network Install nonfree 32-bit iso" { insmod gzio insmod part_msdos insmod ext2 insmod xfs insmod loopback insmod iso9660 insmod udf set isofile="/Mageia-7-netinstall-nonfree-i586.iso" set root="hd0,1" loopback loop (hd0,1)\$isofile linux (loop)/isolinux/i386/vmlinuz isofile=\$isofile initrd (loop)/isolinux/i386/all.rdz } # # additional #LOCAL entries # ref: https://wiki.archlinux.org/index.php/GRUB#Custom_grub.cfg menuentry "System reboot" { echo "System rebooting..." reboot } menuentry "System halt" { echo "System halting..." halt } EEOOFF # (end copy & paste)
Review your ${HOME}/etc_grub.d_40_custom and verify that it is correct. In particular check the "loopback" and "linux" lines are not missing "$isofile".
NB IMPORTANT:
Verify that the settings for "set isofile=", "set root=", and "loopback loop" match and are correct for your system.
Note that the "set isofile=" value must begin with a "/" symbol followed by the name of the ISO file.
Append the grub2 configuration file to /etc/grub.d/40_custom. NB, modify user to match your login user.
# Run as root # modify "user" for your login # cat /home/user/etc_grub.d_40_custom >> /etc/grub.d/40_custom
Step-5: run "drakboot"
Now, as root, run "drakboot" to make this configuration active for next reboot.
Example:
/usr/bin/drakboot
The following drakboot windows will appear:
Step-6: Make a note of your disk partition layout
It is very useful to have a list of the partitions on your disk with the mount points when you reach the install stage.
It is also helpful to label partitions which can easily be done using, for example, /usr/sbin/diskdrake.
For example: the root partition mounted at "/" can be labelled ROOT, the home partition mounted at /home labelled HOME etc
It can be useful to either make a printout or take screen shots and copy to another device of the output from "df" and/or print the partition layout shown in gparted.
Example: from "df" command showing partition names, partition sizes and mount points:
[root@localhost install-iso]# df Filesystem Size Used Avail Use% Mounted on devtmpfs 2.9G 0 2.9G 0% /dev tmpfs 2.9G 509M 2.5G 18% /dev/shm tmpfs 2.9G 1.5M 2.9G 1% /run /dev/mapper/crypt_sda7 20G 7.3G 12G 40% / tmpfs 2.9G 0 2.9G 0% /sys/fs/cgroup tmpfs 2.9G 6.5M 2.9G 1% /tmp /dev/mapper/crypt_sda8 2.0G 6.1M 1.8G 1% /usr/local /dev/mapper/crypt_sda9 877G 259G 618G 30% /home /dev/sda5 484M 35M 420M 8% /boot /dev/sda1 5.9G 4.3G 1.3G 78% /mnt/install-iso tmpfs 594M 72K 594M 1% /run/user/1000
![]() |
^ Example from gparted: showing partition names, mount points, labels, and sizes |
If you have a printer connected (and assuming you have a single disk /dev/sda) you could make a record of the disk layout with this:
(date; echo; df; echo; lsblk -o NAME,LABEL,UUID,MAJ:MIN,RM,SIZE,RO,TYPE,MOUNTPOINT,PARTFLAGS) | lp
Example:
[user@localhost ~]$ (date; echo; df; echo; lsblk -o NAME,LABEL,UUID,MAJ:MIN,RM,SIZE,RO,TYPE,MOUNTPOINT,PARTFLAGS) Tue 21 Jul 15:50:49 BST 2020 Filesystem Size Used Avail Use% Mounted on devtmpfs 16G 0 16G 0% /dev tmpfs 16G 151M 16G 1% /dev/shm tmpfs 16G 1.5M 16G 1% /run /dev/mapper/crypt_nvme0n1p4 30G 5.2G 23G 19% / tmpfs 16G 4.0K 16G 1% /tmp /dev/nvme0n1p2 488M 202M 251M 45% /boot /dev/nvme0n1p5 9.8G 8.5G 794M 92% /mnt/install-iso /dev/nvme0n1p1 299M 296K 299M 1% /boot/EFI /dev/mapper/crypt_nvme0n1p6 30G 6.6G 22G 24% /mnt/root2 /dev/mapper/crypt_nvme0n1p7 849G 18G 831G 3% /home tmpfs 3.2G 16K 3.2G 1% /run/user/1000 NAME LABEL UUID MAJ:MIN RM SIZE RO TYPE MOUNTPOINT PARTFLAGS nvme0n1 259:0 0 953.9G 0 disk ├─nvme0n1p1 ESP 8372-54C3 259:1 0 299M 0 part /boot/EFI ├─nvme0n1p2 BOOT 9af6c862-8acf-4998-bc88-c0841cd40bc4 259:2 0 512M 0 part /boot ├─nvme0n1p3 13fbd168-c54d-4659-a8f8-1dbd63e53d30 259:3 0 20.3G 0 part │ └─crypt_nvme0n1p3 SWAP ec8a5727-4024-4c0c-a23f-dd786bfb08a8 252:0 0 20.3G 0 crypt [SWAP] ├─nvme0n1p4 4e073903-d550-4a5e-acaf-7fdd0c37f0b3 259:4 0 30G 0 part │ └─crypt_nvme0n1p4 ROOT1 4fe13fa0-0be8-4235-8885-7262e3b116b1 252:1 0 30G 0 crypt / ├─nvme0n1p5 INSTALL-ISO 439f1adb-5ec5-4bed-b71f-e5c983486426 259:5 0 10G 0 part /mnt/install-iso ├─nvme0n1p6 3b4c08d5-ca51-4a04-8aab-27bf9978b2d1 259:6 0 30G 0 part │ └─crypt_nvme0n1p6 ROOT2 a63912d6-b048-46d9-9a69-cb0698def62b 252:2 0 30G 0 crypt /mnt/root2 └─nvme0n1p7 e7b6e4fa-b86b-4967-b8c9-0dbb6796c1a9 259:7 0 862.8G 0 part └─crypt_nvme0n1p7 HOME 6770b6d4-1415-4e45-b98f-9ae2b24898b4 252:3 0 862.8G 0 crypt /home
Install process
Reboot. On the grub2 boot screen, select Mageia 9 Network Install nonfree x86_64.iso (following the example here) or whatever name you have put when you defined the grub2 "menuentry" field in /etc/grub.d/40_custom.
After booting the network install image, select "boot from disk" and identify the partition where you stored the Mageia install ISO and the name of the mageia install ISO file.
Complete install as normal.
Post install: add loopback mount of ISO install image
One of the advantages of having the Mageia install ISO file on hard disk is that we can loop mount it and add it to the URPMI configuration. This makes installing of additional packages much faster (than going out across the network).
In the example shown on this page, partition /dev/sda1 was mounted at /mnt/install-iso/.
This will not have been automatically mounted during the install but will instead be mounted as /mnt/hd/.
# df /mnt/hd/ Filesystem Size Used Avail Use% Mounted on /dev/sda12 7.9G 3.8G 3.8G 50% /mnt/hd
By examining the filesystems table /etc/fstab it will be clear that there is an entry for the Mageia install ISO.
For example:
$ grep ".iso" /etc/fstab /mnt/hd/Mageia-9-x86_64.iso /mnt/Mageia-9-x86_64 iso9660 noauto,loop 0 0
Notice that "noauto" is defined meaning that the install ISO image is not automatically mounted. We edit /etc/fstab and remove the noauto from the Mageia-9-x86_64.iso line. We replace "/hd/" with "/mnt/install-iso/" so the loop back mountpoint is in the install-iso directory.
$ grep ".iso" /etc/fstab /mnt/install-iso/Mageia-9-x86_64.iso /mnt/Mageia-9-x86_64 iso9660 loop 0 0
We can check it mounts OK with:
# mount /mnt/Mageia-9-x86_64 # df /mnt/Mageia-9-x86_64 Filesystem Size Used Avail Use% Mounted on /dev/loop0 4.2G 4.2G 0 100% /mnt/Mageia-9-x86_64
Since the install ISO image loop mounts correctly we can also remove the "noauto," from the /etc/fstab entry so that the mount will automatically happen on reboot.
Side-note:
When modifying /etc/fstab with new mount entries (like the loopback decribed above) you may see a warning message when you mount the new mount entry like:
[root@localhost install-iso]# mount -a mount: /mnt/Mageia-9-x86_64: WARNING: source write-protected, mounted read-only. mount: (hint) your fstab has been modified, but systemd still uses the old version; use 'systemctl daemon-reload' to reload.
This can easily be resolved by running (as root): systemctl daemon-reload
Now the Mageia install image is mounted, we can add it as a URPMI source to install any further packages.
In this example, we are using a 64-bit install ISO image so we append "x86_64/" to the urpmi.addmedia command (below):
# urpmi.addmedia --distrib /mnt/Mageia-9-x86_64/x86_64/ adding medium "Core Release (Installer)" before remote medium "Core Release" adding medium "Nonfree Release (Installer)" before remote medium "Core Release"
Example:
[root@zbook ~]# urpmi.addmedia --distrib /mnt/Mageia-9-x86_64/x86_64/ adding medium "Core Release (Installer)" before remote medium "Core Release" adding medium "Nonfree Release (Installer)" before remote medium "Core Release"
Run a system update to confirm loopback install ISO image urpmi source included. Note the keyword "(Installer)":
[root@zbook ~]# urpmi --auto-update medium "Core Release (Installer)" is up-to-date medium "Nonfree Release (Installer)" is up-to-date medium "Core Release" is up-to-date medium "Core Updates" is up-to-date medium "Nonfree Release" is up-to-date medium "Nonfree Updates" is up-to-date medium "nonfree" is up-to-date medium "non-free-updates" is up-to-date medium "tainted" is up-to-date medium "tainted-updates" is up-to-date medium "google-talkplugin" is up-to-date medium "google-chrome" is up-to-date Packages are up to date
Appendix 1: 64 bit version of append for /etc/grub.d/40_custom
Note, keep your own modified copy of this in your ${HOME}/etc_grub.d_40_custom for future reference because the copy that is created in /etc/grub.d/40_custom will be overwritten in the install process.
# Example for adding to /etc/grub.d/40_custom # # Reference: https://wiki.mageia.org/en/Installing_Mageia_from_ISO_images_on_disk_using_grub2 # (this copy suitable for copy&paste) # # NB ensure correct values set for your configuration below: # # 1) set isofile= # example: set isofile="/Mageia-9-netinstall-nonfree-x86_64.iso" # NB leading "/" # # 2) set root= # example: set root="hd0,1" # This is for /dev/sda1. Other examples: # /mnt/install-iso/ mounted at /dev/sda12 is "hd0,12" # /mnt/install-iso/ mounted at /dev/sdb9 is "hd1,9" # # 3) loopback loop # example: loopback loop (hd0,1)$isofile # NB "hd0,1" is /dev/sda1 and no "/" before "$isofile" # # # 64-bit example: Mageia 9 *nonfree* on UEFI type system # /dev/nvme0n1p5 mounted at /mnt/install-iso/ # menuentry "Mageia 9 Network Install nonfree x86_64.iso (on partition hd0,gpt5)" { insmod gzio insmod part_gpt insmod ext2 insmod xfs insmod loopback insmod iso9660 insmod udf set isofile="/Mageia-9-netinstall-nonfree-x86_64.iso" set root="hd0,gpt5" loopback loop (hd0,gpt5)$isofile linux (loop)/isolinux/x86_64/vmlinuz isofile=$isofile initrd (loop)/isolinux/x86_64/all.rdz }
Appendix 2: 32-bit version of append for /etc/grub.d/40_custom
# 32-bit example: # NB: for the 32-bit version, the ISO filename has "i586" # but the "linux" and "loop" paths use "i386". # (Can verify by loop mounting the network install ISO and checking paths.) menuentry "Mageia 7 Network Install nonfree 32-bit iso" { insmod gzio insmod part_msdos insmod ext2 insmod xfs insmod loopback insmod iso9660 insmod udf set isofile="/Mageia-7-netinstall-nonfree-i586.iso" set root="hd0,1" loopback loop (hd0,1)$isofile linux (loop)/isolinux/i386/vmlinuz isofile=$isofile initrd (loop)/isolinux/i386/all.rdz }
Appendix-3: install on a brand new disk
If you have a new (or empty) disk to install on, you can use it in an external USB connection and simply create the /mnt/install-iso partition, mount it, and copy the ISO images to it. Then all you need to do is boot the network install iso (eg from USB) and complete the install from ISO on hard disk process.
This page describes how to make a bootable network install USB => Making a bootable Mageia network install USB drive.
Post install, you can configure grub2 to include the network install iso. This will enable using /mnt/install-iso for subsequent installs. The install ISO can also be loop mounted and configured as a local URPMI source for package installing.
Appendix-4: when you have your NVMe SSD in a PCIe adapter that you added to your machine
For some older hardware which does not have NVMe SSD M.2 slots on the motherboard it is still possible to add a PCIe adapter card to enable you to benefit from the high speeds of NVMe SSD. However, experience has shown that adding such a PCIe adapter does not mean the extra NVMe SSD will be accessible by grub in the early stages of booting.
Despite this, if we can get the Mageia network install ISO image up and running then the PCIe adapter card mounted NVMe SSD will be usable and we can store the Mageia install ISO on it for high speed installs.
We need to make use of a USB flash drive for storing our /boot/ partition. We also need a second partition on the USB flash drive for a NETINSTALL-ISO partition which we mount at /mnt/netinstall-iso/. We then locate the other remaining partitions on the NVMe SSD ("/", /home/, swap partition, and any others needed).
The simplest way to do this is to use one flash drive for /boot/ and /mnt/netinstall-iso/ then use a second USB flash drive configured as a bootable Mageia network installer.
So, the very first install is done with the bootable Mageia network installer USB flash drive with a second flash drive for /boot/ and /mnt/netinstall-iso/ and the NVME SSD mounted in the PCIe adapter card. Once this is completed the system will boot up from the /boot/ USB flash drive accessing the remaining partitions on NVMe SSD.
Now running with the NVMe SSD we can configure the grub menu as shown above but with one difference: we point to the network install ISO on the second partition on the boot USB flash drive (because at the early stages of booting in the configuration described here the partitions on the PCIe adapter mounted NVME SSd will be unaccessible).
The network install ISO on the boot flash drive's 2nd partition is the key to unlocking access to the NVMe SSD for subsequent installs from disk copies of the Mageia install ISO.
Appendix-5: tips
Tip-1: listing partitions from grub command shell
For Step-4 (above): if you encounter difficulties correctly identifying the partition needed to configure grub2 for the network install ISO then you can reboot and hit "c" on the initial mageia boot screen to get to the grub2 command line interface and then type "ls" <ENTER-key>. This will display the list of partitions that grub2 is able to access on your computer. You then need to correlate that list with your partition list record you noted in Step-6 (above) to identify the INSTALL-ISO partition name and number.
Tip-2: edit your ${HOME}/etc_grub.d_40_custom
If you need to modify your grub2 configuration then be sure to edit ${HOME}/etc_grub.d_40_custom first and then copy the update to /etc/grub.d/40_custom before runnning drakboot. This is because when the install process is completed /etc/grub.d/40_custom will be the original "just installed" version not your modified version. You need to keep a "master copy" of your own ${HOME}/etc_grub.d_40_custom for subsequent installs and upgrades.