From b55efcb8fc003519efff51b9385df81437d5dcb4 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 16 Mar 2022 20:39:49 +0800 Subject: [PATCH] clfs-ng: adjust grub cfg for our partition layout created earlier --- chapter10/grub.xml | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/chapter10/grub.xml b/chapter10/grub.xml index c569525c9..9a2b4858a 100644 --- a/chapter10/grub.xml +++ b/chapter10/grub.xml @@ -76,26 +76,12 @@ xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso - The location of the boot partition is a choice of the user that - affects the configuration. One recommendation is to have a separate small - (suggested size is 200 MB) partition just for boot information. That way - each build, whether LFS or some commercial distro, can access the same boot - files and access can be made from any booted system. If you choose to do - this, you will need to mount the separate partition, move all files in the - current /boot directory (e.g. the - linux kernel you just built in the previous section) to the new partition. - You will then need to unmount the partition and remount it as /boot. If you do this, be sure to update - /etc/fstab. - - Using the current lfs partition will also work, but configuration - for multiple systems is more difficult. - - Using the above information, determine the appropriate - designator for the root partition (or boot partition, if a separate - one is used). For the following example, it is assumed that the root - (or separate boot) partition is sda2. + For the following example, it is assumed that the root + partition is sda3, and the + seperate boot partition is + sda2. Replace + sda to the name of the device node for your + disk where LFS is being built. Install the GRUB files into /boot/grub and set up the boot track: @@ -144,7 +130,7 @@ insmod ext2 set root=(hd0,2) menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" { - linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro + linux /vmlinuz-&linux-version;-lfs-&version; root=/dev/sda3 ro } EOF