Annotation of wikisrc/grub2.mdwn, revision 1.3
1.1 jdf 1: # How to install GRUB2 on NetBSD
2:
3: This how-to explains the steps needed to install GRUB2 on an existing i386/AMD64
1.3 ! gutterid 4: NetBSD installation. The steps should work on a properly chroot'ed system too.
1.1 jdf 5: Tested on NetBSD 6.0 AMD64:
6:
7: First of all, either download the package, using `pkgin install grub2`, or build
8: it yourself from package sources (`/usr/pkgsrc/sysutils/grub2`).
9:
10: After that, generate a GRUB configuration file, which tells GRUB the positions
11: of the operating system(s). The following command will generate such a file,
1.3 ! gutterid 12: while adding your NetBSD system into its list.
1.1 jdf 13:
14: # grub-mkconfig -o /grub/grub.cfg
15:
16: Now, install GRUB into your hard drive's master boot record (MBR).
1.3 ! gutterid 17: You have to know its device name for this step (e.g. `/dev/rwd0a`).
1.2 jdf 18: Exchange `/dev/rwd0a` with your desired device name, then change `/dev/rXXXa`
1.1 jdf 19: to `/dev/rwXXXd` to access the raw disk, as in the following example:
20:
21: Device name : /dev/rwd0a
22: Direct access : /dev/rwd0d
23:
24: The appropriate `grub-install` command for this drive would be:
25:
26: # grub-install --no-floppy /dev/rwd0d
27:
28: Hopefully, it should return : `Installation finished. No error reported.`
29: If it does so, simply reboot the system and you should be greeted by a nice
30: OS-selector.
31: If not, recheck your device names, if that doesn't fix it, search the web for
32: the error message.
1.3 ! gutterid 33: Even though there aren't that many resources about *GRUB on NetBSD*, you'll
1.1 jdf 34: find a lot of information at GNU/Linux-related sites which apply to this
35: scenario as well.
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb