Re: grub-install in chroot
2007/10/17, Shane Spencer <firstname.lastname@example.org>:
grub-install isn't really needed, make sure the package is installed
in the chroot environment. chroot in and make sure /boot/grub exists.
The rest should work a little like this:
cp -a /usr/lib/grub/x86(or whatever arch)/* /boot/grub/
This command should be executed inside chroot
Assuming /dev/sda is your the drive you want to install grub on:
echo (hd0) /dev/sda > /etc/boot/device.map
And suppose these are run outside of chroot.
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2
This is a more flexible way to install grub.
Is it possible to add either of these methods to the Installation Guide? I usually
try to follow the official documentation and in this case it is not complete from
this point of view.