Trouble booting system with root within gvinum volume

From: Sean C. Farley <scf_at_FreeBSD.org>
Date: Wed, 21 Oct 2009 18:35:18 -0500 (CDT)
I have been trying to setup a system (testing with VirtualBox) using 
gvinum.  Here are the basics for the setup.  Some steps skipped for the 
install, as they look good.  Unfortunately, I only get (F1, F2 and F3). 
Pressing F3 only provided a '#'.  I have the two "drives" connected to 
SATA ports within VirtualBox.

I originally tried to add the fake root via gpart, but it has no 
mechanism to create a partition that overlaps another one.  gpart show 
does not show the fake root (should be partition 1 in ad4s3 and ad6s3), 
so I am suspicious that it is not seen.

The idea for the Vinum root was taken from here:
http://www.freebsd.org/doc/en/books/handbook/vinum-root.html

Also, would the swap below be able to accept a core dump from a panic?


# Create two MBR-based drives with three slices each.  Two for Windows7 
# (if I ever find the desire to do that) and one for FreeBSD.  gvinum 
# uses the 'h' partition for both.
gpart create -s mbr ad4
gpart create -s mbr ad6
gpart add -s 100M -t '!7' ad4      # Windows7 stuff; ignore
gpart add -s 100M -t '!7' ad6      # Windows7 stuff; ignore
gpart add -s 20G -t '!7' ad4       # Windows7 stuff; ignore
gpart add -s 20G -t '!7' ad6       # Windows7 stuff; ignore
gpart add -t freebsd ad4
gpart add -t freebsd ad6
gpart create -s bsd ad4s3
gpart create -s bsd ad6s3
gpart add -b 16 -t freebsd-vinum -i 8 ad4s3
gpart add -b 16 -t freebsd-vinum -i 8 ad6s3


# vinum.conf (gvinum create vinum.conf).  Mirror /, /tmp, /usr and /var. 
# Stripe swap.
drive a device /dev/ad4s3h
drive b device /dev/ad6s3h
volume root
   plex org concat
     sd length 1g drive a
   plex org concat
     sd length 1g drive b
volume swap
   plex org striped 256k
     sd length 2g drive a
     sd length 2g drive b
volume tmp
   plex org concat
     sd length 1g drive a
   plex org concat
     sd length 1g drive b
volume var
   plex org concat
     sd length 2g drive a
   plex org concat
     sd length 2g drive b
volume usr
   plex org concat
     sd drive a
   plex org concat
     sd drive b


# Add the 'a' partition as a fake root for the boot loader to find to 
# both drives (only the first show below).
# Offset is offset of 'h' partition plus offset of root subdisk (16 + 
# 265).
# Size is size of root subdisk.

# /dev/ad4s3:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
   a:  2097152      281    4.2BSD     2048 16384     0
   c: 83681262        0    unused        0     0         # "raw" part, don't edit
   h: 83681246       16     vinum


# Add bootstrap code to both drives.
gpart bootcode -b /boot/boot0 ad4
gpart bootcode -b /boot/boot0 ad6

Sean
-- 
scf_at_FreeBSD.org
Received on Wed Oct 21 2009 - 21:35:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC