mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-07-18 02:05:06 +01:00
clfs-ng: adjust grub cfg for our partition layout created earlier
This commit is contained in:
parent
029f725554
commit
b55efcb8fc
@ -76,26 +76,12 @@ xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></
|
|||||||
there access GRUB modules in the boot partition. The default location
|
there access GRUB modules in the boot partition. The default location
|
||||||
is /boot/grub/.</para>
|
is /boot/grub/.</para>
|
||||||
|
|
||||||
<para>The location of the boot partition is a choice of the user that
|
<para>For the following example, it is assumed that the root
|
||||||
affects the configuration. One recommendation is to have a separate small
|
partition is <filename class="partition">sda3</filename>, and the
|
||||||
(suggested size is 200 MB) partition just for boot information. That way
|
seperate boot partition is
|
||||||
each build, whether LFS or some commercial distro, can access the same boot
|
<filename class="partition">sda2</filename>. Replace
|
||||||
files and access can be made from any booted system. If you choose to do
|
<replaceable>sda</replaceable> to the name of the device node for your
|
||||||
this, you will need to mount the separate partition, move all files in the
|
disk where LFS is being built.</para>
|
||||||
current <filename class="directory">/boot</filename> 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 <filename
|
|
||||||
class="directory">/boot</filename>. If you do this, be sure to update
|
|
||||||
<filename>/etc/fstab</filename>.</para>
|
|
||||||
|
|
||||||
<para>Using the current lfs partition will also work, but configuration
|
|
||||||
for multiple systems is more difficult.</para>
|
|
||||||
|
|
||||||
<para>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 <filename
|
|
||||||
class="partition">sda2</filename>.</para>
|
|
||||||
|
|
||||||
<para>Install the GRUB files into <filename
|
<para>Install the GRUB files into <filename
|
||||||
class="directory">/boot/grub</filename> and set up the boot track:</para>
|
class="directory">/boot/grub</filename> and set up the boot track:</para>
|
||||||
@ -144,7 +130,7 @@ insmod ext2
|
|||||||
set root=(hd0,2)
|
set root=(hd0,2)
|
||||||
|
|
||||||
menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" {
|
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
|
||||||
}</literal>
|
}</literal>
|
||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user