Ken Moffat wrote:
> As you guessed, separate boot partitions can give problems with
> grub2.
Then I haven't done a good job at explaining.
"One recommendation is to have a separate small 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.
...
cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext2
set root=(hd0,2)
menuentry "GNU/Linux, Linux 3.2.11-lfs-SVN-20120314" {
linux /boot/vmlinuz-3.2.11-lfs-SVN-20120314 root=/dev/sda2 ro
}
EOF
"If you used a separate /boot partition, remove /boot from the above
linux line. You will also need to change the set root line to point to
the boot partition."
> In my case (also with separate /boot partitions) I have a
> directory 'boot' on the boot partition (i.e. /boot/boot when
> everything is mounted) containing a symlink called 'grub' pointing
> to ../grub. I think that I created it (with /boot mounted, so from
> the host system) using
> mkdir /boot/boot
> ln s ../grub /boot/boot
Say what? If you have a separate boot partition mounted on
/mnt/lfs/boot (/boot within chroot) when you run grub-install, then
everything should be installed in the correct location. Those extra
commands should not be needed.
> I think this is necessary because grub installed its many
> components into /boot/grub and assumes that is where they should be
> when it needs them.
Grub looks for grub/ in a couple of places, the first is $root/grub and
then $root/boot/grub where the 'set root' command is used, but not the
'root=' portion of the linux line.
Can you suggest better wording for the book?
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page