a5bd9f6
From 8d7ed36e113b21de18a1b4a2bf81d218d79114d2 Mon Sep 17 00:00:00 2001
a5bd9f6
From: =?UTF-8?q?Gr=C3=A9goire=20Sutre?= <gregoire.sutre@gmail.com>
a5bd9f6
Date: Wed, 1 Aug 2012 00:18:57 +0200
a5bd9f6
Subject: [PATCH 018/364] Update manual NetBSD-wise.
a5bd9f6
a5bd9f6
---
a5bd9f6
 ChangeLog      |  5 +++++
a5bd9f6
 docs/grub.texi | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
a5bd9f6
 2 files changed, 67 insertions(+), 2 deletions(-)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index 01d4f92..b246d4e 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,3 +1,8 @@
a5bd9f6
+2012-07-31  Grégoire Sutre  <gregoire.sutre@gmail.com>
a5bd9f6
+
a5bd9f6
+	* docs/grub.texi: Note that NetBSD/i386 is Multiboot-compliant.
a5bd9f6
+	(NetBSD): New subsection.
a5bd9f6
+
a5bd9f6
 2012-07-22  Ales Nesrsta  <starous@volny.cz>
a5bd9f6
 
a5bd9f6
 	* grub-core/bus/usb/ehci.c: PCI iter. - added PCI bus master setting.
a5bd9f6
diff --git a/docs/grub.texi b/docs/grub.texi
a5bd9f6
index b5954da..b0e7f59 100644
a5bd9f6
--- a/docs/grub.texi
a5bd9f6
+++ b/docs/grub.texi
a5bd9f6
@@ -311,8 +311,10 @@ tables are also loaded.
a5bd9f6
 
a5bd9f6
 @item Support non-Multiboot kernels
a5bd9f6
 Support many of the various free 32-bit kernels that lack Multiboot
a5bd9f6
-compliance (primarily FreeBSD, NetBSD, OpenBSD, and
a5bd9f6
-Linux). Chain-loading of other boot loaders is also supported.
a5bd9f6
+compliance (primarily FreeBSD, NetBSD@footnote{The NetBSD/i386 kernel
a5bd9f6
+is Multiboot-compliant, but lacks support for Multiboot modules.},
a5bd9f6
+OpenBSD, and Linux). Chain-loading of other boot loaders is also
a5bd9f6
+supported.
a5bd9f6
 
a5bd9f6
 @item Load multiples modules
a5bd9f6
 Fully support the Multiboot feature of loading multiple modules.
a5bd9f6
@@ -897,6 +899,7 @@ Here, we describe some caveats on several operating systems.
a5bd9f6
 @menu
a5bd9f6
 * GNU/Hurd::
a5bd9f6
 * GNU/Linux::
a5bd9f6
+* NetBSD::
a5bd9f6
 * DOS/Windows::
a5bd9f6
 @end menu
a5bd9f6
 
a5bd9f6
@@ -997,6 +1000,63 @@ the size, run the command @command{uppermem} @emph{before} loading the
a5bd9f6
 kernel. @xref{uppermem}, for more information.
a5bd9f6
 
a5bd9f6
 
a5bd9f6
+@node NetBSD
a5bd9f6
+@subsection NetBSD
a5bd9f6
+
a5bd9f6
+Booting a NetBSD kernel from GRUB is also relatively easy: first set
a5bd9f6
+GRUB's root device, then load the kernel and the modules, and finally
a5bd9f6
+run @command{boot}.
a5bd9f6
+
a5bd9f6
+@enumerate
a5bd9f6
+@item
a5bd9f6
+Set GRUB's root device to the partition holding the NetBSD root file
a5bd9f6
+system.  For a disk with a NetBSD disk label, this is usually the first
a5bd9f6
+partition (a:).  In that case, and assuming that the partition is on the
a5bd9f6
+first hard disk, set GRUB's root device as follows:
a5bd9f6
+
a5bd9f6
+@example
a5bd9f6
+grub> @kbd{insmod part_bsd}
a5bd9f6
+grub> @kbd{set root=(hd0,netbsd1)}
a5bd9f6
+@end example
a5bd9f6
+
a5bd9f6
+For a disk with a GUID Partition Table (GPT), and assuming that the
a5bd9f6
+NetBSD root partition is the third GPT partition, do this:
a5bd9f6
+
a5bd9f6
+@example
a5bd9f6
+grub> @kbd{insmod part_gpt}
a5bd9f6
+grub> @kbd{set root=(hd0,gpt3)}
a5bd9f6
+@end example
a5bd9f6
+
a5bd9f6
+@item
a5bd9f6
+Load the kernel using the command @command{knetbsd}:
a5bd9f6
+
a5bd9f6
+@example
a5bd9f6
+grub> @kbd{knetbsd /netbsd}
a5bd9f6
+@end example
a5bd9f6
+
a5bd9f6
+Various options may be given to @command{knetbsd}.  These options are,
a5bd9f6
+for the most part, the same as in the NetBSD boot loader.  For instance,
a5bd9f6
+to boot the system in single-user mode and with verbose messages, do
a5bd9f6
+this:
a5bd9f6
+
a5bd9f6
+@example
a5bd9f6
+grub> @kbd{knetbsd /netbsd -s -v}
a5bd9f6
+@end example
a5bd9f6
+
a5bd9f6
+@item
a5bd9f6
+If needed, load kernel modules with the command
a5bd9f6
+@command{knetbsd_module_elf}.  A typical example is the module for the
a5bd9f6
+root file system:
a5bd9f6
+
a5bd9f6
+@example
a5bd9f6
+grub> @kbd{knetbsd_module_elf /stand/amd64/6.0/modules/ffs/ffs.kmod}
a5bd9f6
+@end example
a5bd9f6
+
a5bd9f6
+@item
a5bd9f6
+Finally, run the command @command{boot} (@pxref{boot}).
a5bd9f6
+@end enumerate
a5bd9f6
+
a5bd9f6
+
a5bd9f6
 @node DOS/Windows
a5bd9f6
 @subsection DOS/Windows
a5bd9f6
 
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6