Start NetBSD on a GPT partition with grub2

Submitted by Fekete Zoltán on

Install grub2

If you are on linux, then it is a high change you already have it. On other systems, install it with your package manager.

Create a grub config file for NetBSD

# touch /etc/grub.d/40_custom

Add these lines to the file. You have to figure out which disk and gpt partition contains your system.

menuentry "NetBSD"{
    insmod part_gpt
    set root=(hd0,gpt4)
    knetbsd /netbsd
}

Install the new config

# update-grub

Check

You can look for NetBSD in /boot/grub/grub.cfg file, and then reboot the machine to start your NetBSD instance.