GRUB should be correctly configured for your platform automatically based on your profile. If you would like to make it explicit, however, you may specify it so:
echo 'GRUB_PLATFORMS="ieee1275"' >> /etc/portage/make.conf
emerge --ask --verbose sys-boot/grub:2
The GRUB2 software has now been merged to the system, but not yet installed.
If you partitioned your disk using GPT (the preferred method), then you can safely install GRUB to your BIOS boot partition. Presuming the first disk (the one where the system boots from) is /dev/sda, the following commands will do:
grub-install --target=sparc64-ieee1275 --recheck /dev/sda
To find the boot device string to enter in the firmware, use the grub-ofpathname tool. If your BIOS boot partition is the first partition on the disk, select the entire disk:Otherwise, explicitly select the BIOS boot partition:
If you partitioned your disk using a Sun partition table instead, you must install GRUB using blocklists. In this mode, instead of providing the physical disk as an argument, you should provide the path to the partition on which /boot/grub is mounted.
grub-install --target-sparc64-ieee1275 --recheck --force --skip-fs-probe /dev/sda1
Next, generate the GRUB2 configuration based on the user configuration specified in the /etc/default/grub file and /etc/grub.d scripts. In most cases, no configuration is needed by users as GRUB2 will automatically detect which kernel to boot (the highest one available in /boot/) and what the root file system is. It is also possible to append kernel parameters in /etc/default/grub using the GRUB_CMDLINE_LINUX variable.
To generate the final GRUB2 configuration, run the grub-mkconfig command:
grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ... Found linux image: /boot/vmlinuz- Found initrd image: /boot/initramfs-genkernel-- done
The output of the command must mention that at least one Linux image is found, as those are needed to boot the system. If an initramfs is used or genkernel was used to build the kernel, the correct initrd image should be detected as well. If this is not the case, go to /boot/ and check the contents using the ls command. If the files are indeed missing, go back to the kernel configuration and installation instructions.
SILO, the SPARC bootloader
emerge --ask sys-boot/silo
Next create /etc/silo.conf:
nano -w /etc/silo.conf
Below an example silo.conf file is shown. It uses the partitioning scheme we use throughout this book, kernel- as kernel image and initramfs-genkernel-sparc64- as initramfs.
partition = 1 # Boot partition (= root partition)
root = # Root partition
timeout = 150 # Wait 15 seconds before booting the default section
image = /boot/kernel-
label = linux
append = "initrd=/boot/initramfs-genkernel-sparc64- root="
When using the example silo.conf file as delivered by Portage, be sure to comment out all lines that aren't needed.
If the physical disk on which to install SILO (as bootloader) differs from the physical disk on which /etc/silo.conf resides, then first copy over /etc/silo.conf to a partition on that disk. If /boot/ is a separate partition on that disk, copy over the configuration file to /boot/ and run /sbin/silo:
cp /etc/silo.conf /boot
/sbin/silo -C /boot/silo.conf
/boot/silo.conf appears to be valid
Otherwise just run /sbin/silo:
/etc/silo.conf appears to be valid
Run silo (with parameters if necessary) again each time after updating or installing the package.