Quantcast
Channel: MX Linux Forum
Viewing all articles
Browse latest Browse all 4157

Tips & Tricks by users • Re: Example of btrfs installation and a btrfs MX boot problem

$
0
0
I did install latest MX-23.3(july release) in a btrfs partition as done in an example video on youtube which explain how to install MX in a btrfs partition.
I did not install any boot loader, cause I will boot my new latest MX-23.3(july) with the boot loader I have in another MX-23.3(my old os has same installation on a btrfs partition).

When installation is finished and I reboot:
1) I boot in my old MX-23.3(my old os)
2) I mount the new partition with MX-23.3(july release) , I just click on it on thunar file software
3 I open a terminal and I run:

Code:

 sudo update-grub 

I noticed the file /boot/grub/grub.cfg does detect the new MX-23.3(july release) but the file misses to add a "/@" to the configuration file, you must check the part

Code:

 ### BEGIN /etc/grub.d/30_os-prober ###linux /boot/vmlinuz-6.1.0-23-amd64 root=/dev/XXXXXXXinitrd /boot/initrd.img-6.1.0-23-amd64### END /etc/grub.d/30_os-prober ###
To make the boot of the new btrfs MX-23.3(july release) to work properly, I have to modify that lines adding "/@" at the beginning, then I copy that lines in the file /etc/grub.d/40.custom. The file /boot/grub/grub.cfg tells explicitely that it must not be modified.

Code:

linux /@/boot/vmlinuz-6.1.0-23-amd64 root=/dev/XXXXXXXinitrd /@/boot/initrd.img-6.1.0-23-amd64
At the end I must keep also the not working boot options, which is not a great thing when you boot your computer.

If someone has some trick or some other solution on how to have 3 partitions with 3 MX btrfs installed I'd like to know more.
Yes.
First don't do it the way you have done, b/c next update-grub run e.g. with a new kernel installation, all your
changes are gone.
The reason GRUB get's confused, when you have mounted the partition.
And when you have not mounted, GRUB will not find the other installation.
To fix:
Add within the top-subvolume some symlinks, so with the top-subvolume
you have those symlinks:

Code:

boot -> @/bootetc -> @/etclib -> @/liblib64 -> @/lib64usr -> @/usr
Now when update grub is running, it finds the installation and also detects the "@" subvolume.
Better keep during update-grub the partition not mounted.
You can create the symlinks in different ways:
Here maybe the simplest way:
Open terminal.
Create a temporary mount point

Code:

mkdir /tmp/mount
Mount the other btrfs partition /dev/XXXX at the top-subvolume:

Code:

sudo mount -o subvolid=5 /dev/XXXXX /tmp/mount
create the symlinks mentioned above,

Code:

sudo ln -s  @/boot @/etc @/lib @/lib64 @/usr  /tmp/mount
unmount /tmp/mount

Code:

sudo umount  /tmp/mount
now run update-grub again:

Code:

sudo update-grub
You should now find the correct subvolume "@" of the "/" root subvolume within /boot/grub/grub.cfg.

Statistics: Posted by fehlix — Tue Jul 23, 2024 7:56 pm



Viewing all articles
Browse latest Browse all 4157

Trending Articles