Difference between revisions of "NetBSD"
(→Installation for grub2) |
(→Booting NetBSD installer) |
||
Line 98: | Line 98: | ||
== Installation for pv-grub == | == Installation for pv-grub == | ||
− | + | Install to xbd0. You may choose whatever options you want as long as the first partition is preserved as-is. If the boot partition is formatted or removed, however, you will be unable to boot. | |
− | You may choose whatever options you want as long as the first partition is preserved as-is. If the boot partition is formatted or removed, however, you will be unable to boot. | ||
== Installation for grub2 == | == Installation for grub2 == | ||
− | You may install with whatever options you choose as long as the first partition has room for the netbsd kernel (approximately 8MiB) and the | + | Install to xbd0. You may install with whatever options you choose as long as the first partition has room for the netbsd kernel (approximately 8MiB) and the |
[[grub2#Compatible_file_systems|file system]] is compatible with grub2.<br> | [[grub2#Compatible_file_systems|file system]] is compatible with grub2.<br> | ||
Revision as of 01:55, 5 September 2015
Contents
Grub or Grub2?
Using GRUB2 with NetBSD is much easier than legacy pvgrub. GRUB2 with 64-bit NetBSD works everywhere. If you want to use 32-bit NetBSD, however, GRUB2 may not be supported. You can check by trying to change the bootloader . If i386+grub2 is not supported, you can either contact support to see if you can be moved to a server that does support it or you can use a special partition scheme as documented below.
Partitioning for use with pv-grub
From the Management Console, to make accessing the live rescue image more easy verify you are using "pv-grub"
9. swap pvgrub/grub2 bootloaders currently "pv-grub"
Verify whether you are running in 32 bit (i386) or 64 bit (amd64) mode by looking at
6. swap i386/amd64 bootloaders currently "i386"
and switch if desired.
Shut down your machine if it is running. Then select
2. create/start, opens OOB console (try this if the machine is not running)
This will bring up a menu resembling:
GNU GRUB version 0.97 (131072K lower / 0K upper memory) +-------------------------------------------------------------------------+ | user bootloader configuration | | Debian GNU/Linux, kernel 3.2.0-4-amd64 Live Rescue | | Debian GNU/Linux, kernel 3.2.0-4-amd64 (single-user mode) Live Rescue | | ubuntu-trusty-14.04-64 rescue | | ubuntu-trusty-14.04-64 install | | centos5-64 rescue | | centos5-64 install | | debian-wheezy-7.0-64 rescue | | debian-wheezy-7.0-64 install | | fedora20-64 rescue | | fedora20-64 install | | centos6-64 rescue | v +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line.
Boot Debian GNU/Linux Live Rescue
from GRUB.
Log in as root.
Run the following:
wipe-and-reinstall /distros/<tab complete to desired distro>
This will create a boot partition and add the normal kernel, install kernel, and menu.lst to that boot partition. Write and quit. "Reboot" the machine so that you can boot the NetBSD installer.
Booting NetBSD installer
From the Management Console, to make accessing the live rescue image more easy verify you are using "pv-grub"
9. swap pvgrub/grub2 bootloaders currently "pv-grub"
Verify whether you are running in 32 bit (i386) or 64 bit (amd64) mode by looking at
6. swap i386/amd64 bootloaders currently "i386"
and switch if desired.
Shut down your machine if it is running. Then select
2. create/start, opens OOB console (try this if the machine is not running)
This will bring up a menu resembling:
GNU GRUB version 0.97 (131072K lower / 0K upper memory) +-------------------------------------------------------------------------+ | user bootloader configuration | | Debian GNU/Linux, kernel 3.2.0-4-amd64 Live Rescue | | Debian GNU/Linux, kernel 3.2.0-4-amd64 (single-user mode) Live Rescue | | ubuntu-trusty-14.04-64 rescue | | ubuntu-trusty-14.04-64 install | | centos5-64 rescue | | centos5-64 install | | debian-wheezy-7.0-64 rescue | | debian-wheezy-7.0-64 install | | fedora20-64 rescue | | fedora20-64 install | | centos6-64 rescue | v +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line.
Boot netbsd install
from GRUB.
Installation for pv-grub
Install to xbd0. You may choose whatever options you want as long as the first partition is preserved as-is. If the boot partition is formatted or removed, however, you will be unable to boot.
Installation for grub2
Install to xbd0. You may install with whatever options you choose as long as the first partition has room for the netbsd kernel (approximately 8MiB) and the
file system is compatible with grub2.
After finishing the install, you will need to manually add the Xen kernel. Go to the "Utility Menu" and Enter a shell. Perform the following:
mount /dev/xbd0d /mnt chroot /mnt ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.5/amd64/binary/kernel/netbsd-XEN3_DOMU.gz ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.5/amd64/binary/kernel/MD5 ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.5/amd64/binary/kernel/SHA512 #Do not use if this fails grep "$(/usr/bin/cksum -a md5 netbsd-XEN3_DOMU.gz)" MD5 #Do not use if this fails grep "$(/usr/bin/cksum -a sha512 netbsd-XEN3_DOMU.gz)" SHA512 mkdir /grub echo "set default=0 set timeout=5 menuentry 'NetBSD, with kernel netbsd-XEN3_DOMU.gz ' { linux /netbsd-XEN3_DOMU.gz }" > /grub/grub.cfg rm MD5 rm SHA512 exit umount /mnt exit
Select "Back to main menu" and then "Halt the system". Wait for the computer to reboot.
Type 'ctrl-]' to exit back to the management console. From the management console, select
4. force power off (destroy/hard shutdown)
Select
9. swap pvgrub/grub2 bootloaders currently "pv-grub"
to use grub2. Select
2. create/start, opens OOB console (try this if the machine is not running)
to start your VM.
Rescuing NetBSD install
The shell available from the NetBSD installer from the initial pv-grub boot menu may be used as a minimal rescue image.