#!/bin/bash source /etc/profile # install grub chroot "$chroot" emerge grub # add installed kernel entry cat < "$chroot/boot/grub/grub.conf" default 0 timeout 1 title=Gentoo Linux ($kernel_version-gentoo) root (hd0,0) kernel /boot/kernel-genkernel-x86_64-$kernel_version-gentoo root=/dev/ram0 real_root=/dev/sda4 initrd /boot/initramfs-genkernel-x86_64-$kernel_version-gentoo DATAEOF # make the disk bootable chroot "$chroot" /bin/bash < /etc/mtab && \ grub-install --no-floppy /dev/sda DATAEOF