File:  [NetBSD Developer Wiki] / wikisrc / grub2.mdwn
Revision 1.2: download - view: text, annotated - select for diffs
Sun Dec 9 18:47:53 2012 UTC (9 years, 9 months ago) by jdf
Branches: MAIN
CVS tags: HEAD
Fix typo: s/Exhange/Exchange/

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

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb