MULTIBOOT ARCH/UZL
A user describes his experience with multibooting with Manjaro Linux, Debian 12 and Office Zero Linux 11 with usb support, suitable for my pc, I do not have the possibility to try with a pc with UEFI bios there could be some changes, so I cannot guarantee that in that case the solution I adopted works,
with my pc it is working
First of all I describe the situation, pc acer Aspire 5732z with: 4Gb of DDR3 ram, 2 × Pentium® Dual-Core CPU T4400 @ 2.20GHz, Bios legacy 3.5 System version 3.7
MBR partitioning scheme:
OS installed on SSD: Arch Linux with kernel 6.6.56-1-lts (64 bit) GUI: KDE Plasma. 6.2.0 KDE Framwork version: 6.6.0 Qt version: 6.8.0 GUI: Wayland
external hdd usb: Toshiba DTB410 1TB
systems installed on usb media: Manjaro Vulcan with kde plasma, Debian 12 KDE and Ufficio Zero 11 Cinnamon
the installation procedures for the individual operating systems are those found in the respective wikis. I won't go into more detail about all the steps…
he order of installation of the distributions on the USB support that I chose is:
It is essential that manjaro is installed last, Debian and Ufficio Zero must be installed first and can also be exchanged
once the three systems are installed and updated, turn off the PC and physically remove the hard disk, (unmounting it from the terminal is not enough) now insert the Manjaro live stick and set your PC to boot from the Manjaro installation media
update the system with the command:
sudo pacman -Syu
then check the partitions: this is my situation: seen from the hard disk
[dalmazio@archlinuxdalmazio ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 476,9G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 475,9G 0 part / sdb 8:16 0 931,5G 0 disk ├─sdb1 8:17 0 199,5G 0 part ├─sdb2 8:18 0 245G 0 part ├─sdb3 8:19 0 50,5G 0 part ├─sdb4 8:20 0 1K 0 part └─sdb5 8:21 0 181,5G 0 part sr0 11:0 1 1024M 0 rom [dalmazio@archlinuxdalmazio ~]$
sda pc hard disk, in my case it will be physically unmounted and not seen by grub… when I solve the multiboot also with pure arch I will post the definitive solution…
sda1 partizione di boot di arch sda2 partizione di sistema di arch sdb1 partizione di root di manjaro ( fat32) sdb2 partizione di sistema di manjaro di boot e home ( ext4) sdb3 partizione di debian ( boot root e home ) (ext4) sdb4 partizione estesa sdb5 partizione di ufficio zero (ext4) (home, boot, root)
Mount system partitions in the same order as the operating systems were installed:
sudo mount /dev/sdb5 /mnt sudo mount /dev/sdb3 /mnt sudo mount /dev/sdb1 /mnt sudo mount /dev/sdb2 /mnt
mount the file system:
<core> sudo mount –bind /dev/mnt/dev sudo mount –bind /proc/mnt/proc sudo mount –bind /sys/mnt /sys </core>
enter chroot:
sudo manjaro-chroot
install grub:
grub-install /dev/sdb
update grub:
grub-mkconfig -o /boot/grub/grub.cfg
exit chroot:
exit
dismantle everything:
sudo umount -R /mnt
at this point theoretically it would be enough to restart the PC and it should work:
sudo systemctl reboot
there is however the risk that with the next update of any of the distributions grub will break, if it does not break there is no need to do anything else, if it were to break you need to arm yourself with patience and repeat all the steps, from here on there are different paths that can be taken, one of which is to make the grub configuration file immutable, and it only works if the file system is not btrfs because with that file system the chattr commands are not recognized… (and it took me a whole night to understand this…)
To make the grub configuration file immutable you need to:
find the exact path of the file with the command:
find / -name grub.cfg 2>/dev/null
Once you find the file, copy it and save it to a safe medium so you have a working copy handy if something goes wrong.
In my case the path returned by the command is /boot/grub/grub.cfg
Now all that remains is to make the file immutable with the command:
sudo chattr +i /boot/grub/grub.cfg
In case you need to change operating systems or make important changes to grub you will need to remove the immutability attribute of the file:
sudo chattr -i /but/rough/rough.cfg
Check in case of system updates whether or not there are important changes to grub and whether or not it is appropriate to leave the immutability attribute.
for those who don't know, the immutability attribute prevents a file from being deleted or modified, and is hackproof sudo rm -rf /path/to/file