@ -100,3 +100,70 @@ Execute as *lfs* user.
@@ -100,3 +100,70 @@ Execute as *lfs* user.
```bash
make
```
## Grub config
Grub is initiated with the following menu :
```bash
$ cat /mnt/lfs/boot/grub/grub.cfg
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod part_gpt
insmod ext2
search --set=root --fs-uuid=8c137b8d-3612-4715-94c2-8203e273318f
set gfxpayload=1024x768x32
menuentry "GNU/Linux, Linux 6.18.10-lfs-13.0-systemd with blockdevice" {
linux /boot/vmlinuz-6.18.10-lfs-13.0-systemd root=/dev/vdb1 ro
}
menuentry "GNU/Linux, Linux 6.18.10-lfs-13.0-systemd with partuuid" {
linux /boot/vmlinuz-6.18.10-lfs-13.0-systemd root=PARTUUID=001cdfe1-01 ro
}
```
The *partuuid* section is not required, but can be helpful if you add another disk or change boot order in bios. partuuid is *more* immutable then *vdx* .
Devices are extracted from the following command :
```bash
$ lsblk -o UUID,PARTUUID,PATH,MOUNTPOINT
UUID PARTUUID PATH MOUNTPOINT
/dev/sr0
/dev/vda
e46c1c50-d494-44f2-a826-41afc1b76eae 9ffe027f-01 /dev/vda1 /
9ffe027f-02 /dev/vda2
cae0487a-2eca-44c7-aa5f-060ea258f30c 9ffe027f-05 /dev/vda5 [SWAP]
/dev/vdb
8c137b8d-3612-4715-94c2-8203e273318f 001cdfe1-01 /dev/vdb1 /mnt/lfs
```
In this configuration extracted from a libvirt host (*/dev/vdxn*) with a second disk dedicated to LFS, /mnt/lfs device entry is filtered.
The grub config is made with it.
*cclfs* doesn't install the bootloader. It use the bootloader of the host.
You can install it if you want before or after the first boot.
See instruction in *LFS* book and *BLFS* book. There is only one bootloader *by default* at boot nonetheless.
On Debian Trixie (13) (at least), OS_PROBER is disabled.
Just uncomment the line in /etc/default/grub or customize a config file in /etc/grub.d/ .
And reinstall the bootloader.
```bash
$ su -
$ grep PROBER /etc/default/grub
GRUB_DISABLE_OS_PROBER=false
# vim /etc/default/grub
# update-grub
```
In default configuration, libvirt doesn't activate a second disk, so it won't boot.
Activate the second disk in the boot options.
You can find devices seen by *bios* with the grub console : type *c* at grub general menu
```bash
ls
(hd0,msdos1) (hd0,msdos5) (hd1,msdos1)
```
If you don't see your *LFS* partition, it won't boot.