Install issues

William A. Mahaffey III wam at hiwaay.net
Wed Oct 14 13:37:31 UTC 2015



I am attempting to provision a MythTV box using FreeBSD 9.3R. I prepped 
an install disk with a default install image & some scripts I added to 
automate the partitioning/slicing process. I have been clunking around 
with various not-quite-right efforts, & am currently stuck with a 
puzzling error: 'gpart: autofill: No space left on device'. I googled 
that message & found a bit of stuff, mostly dated several years ago & 
apparently mostly fixed. I attach my setup-script & the output of the 
process running that script. I added some extra output as per a mailing 
list post dated 2011. I am trying to partition/slice 2 HDD's to use as a 
mirrored (& bootable) root drive & a striped /home. I may be all wet 
here, but the problems I am having right now seem to be unrelated to my 
possibly flawed decision-making as to bootable mirrored disk partitions. 
Any clues appreciated. TIA & have a good one.


-- 

	William A. Mahaffey III

  ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                            -- Gen. George S. Patton Jr.

-------------- next part --------------
ada0 destroyed
ada1 destroyed
ada0 created
ada1 created
Progress so far (create -s mbr ada[0,1]):
 
=>      1  7575551  da0  MBR  (3.6G)
        1       32       - free -  (16k)
       33  7573500    1  freebsd  [active]  (3.6G)
  7573533     2019       - free -  (1M)

=>      0  7573500  da0s1  BSD  (3.6G)
        0  7573500      1  freebsd-ufs  (3.6G)

=>        63  1953525105  ada0  MBR  (931G)
          63  1953525105        - free -  (931G)

=>        63  1953525105  ada1  MBR  (931G)
          63  1953525105        - free -  (931G)

Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 7575551
first: 1
entries: 4
scheme: MBR
Providers:
1. Name: da0s1
   Mediasize: 3877632000 (3.6G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 16896
   Mode: r1w1e2
   attrib: active
   rawtype: 165
   length: 3877632000
   offset: 16896
   type: freebsd
   index: 1
   end: 7573532
   start: 33
Consumers:
1. Name: da0
   Mediasize: 3878682624 (3.6G)
   Sectorsize: 512
   Mode: r1w1e3

Geom name: da0s1
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 7573499
first: 0
entries: 8
scheme: BSD
Providers:
1. Name: da0s1a
   Mediasize: 3877632000 (3.6G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 16896
   Mode: r1w1e1
   rawtype: 7
   length: 3877632000
   offset: 0
   type: freebsd-ufs
   index: 1
   end: 7573499
   start: 0
Consumers:
1. Name: da0s1
   Mediasize: 3877632000 (3.6G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 16896
   Mode: r1w1e2

Geom name: ada0
Providers:
1. Name: ada0
   Mediasize: 1000204886016 (931G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   descr: HGST HTS721010A9E630
   lunid: 5000cca7dce98565
   ident: JR10046P2YAK7N
   fwsectors: 63
   fwheads: 16

Geom name: ada1
Providers:
1. Name: ada1
   Mediasize: 1000204886016 (931G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   descr: HGST HTS721010A9E630
   lunid: 5000cca7dce98519
   ident: JR10046P2YAGTN
   fwsectors: 63
   fwheads: 16

Geom name: da0
Providers:
1. Name: da0
   Mediasize: 3878682624 (3.6G)
   Sectorsize: 512
   Mode: r1w1e3
   descr: MUSHKIN MKNUFDPR4GB
   ident: C1005473D05C9225
   fwsectors: 63
   fwheads: 255

gpart: autofill: No space left on device
gpart: autofill: No space left on device
Progress so far ('add -t freebsd' ada[0,1]):
 
=>      1  7575551  da0  MBR  (3.6G)
        1       32       - free -  (16k)
       33  7573500    1  freebsd  [active]  (3.6G)
  7573533     2019       - free -  (1M)

=>      0  7573500  da0s1  BSD  (3.6G)
        0  7573500      1  freebsd-ufs  (3.6G)

=>        63  1953525105  ada0  MBR  (931G)
          63  1953525105        - free -  (931G)

=>        63  1953525105  ada1  MBR  (931G)
          63  1953525105        - free -  (931G)

gpart: arg0 'ada0s1': Invalid argument
gpart: arg0 'ada1s1': Invalid argument
Progress so far ('create -s bsd' ada[0,1]):
 
=>      1  7575551  da0  MBR  (3.6G)
        1       32       - free -  (16k)
       33  7573500    1  freebsd  [active]  (3.6G)
  7573533     2019       - free -  (1M)

=>      0  7573500  da0s1  BSD  (3.6G)
        0  7573500      1  freebsd-ufs  (3.6G)

=>        63  1953525105  ada0  MBR  (931G)
          63  1953525105        - free -  (931G)

=>        63  1953525105  ada1  MBR  (931G)
          63  1953525105        - free -  (931G)

Progress so far (add -t freebsd -a 4k ada[0,1]):
 
=>      1  7575551  da0  MBR  (3.6G)
        1       32       - free -  (16k)
       33  7573500    1  freebsd  [active]  (3.6G)
  7573533     2019       - free -  (1M)

=>      0  7573500  da0s1  BSD  (3.6G)
        0  7573500      1  freebsd-ufs  (3.6G)

=>        63  1953525105  ada0  MBR  (931G)
          63  1953525105        - free -  (931G)

=>        63  1953525105  ada1  MBR  (931G)
          63  1953525105        - free -  (931G)

gpart: No such geom: ada0s1.
gpart: No such geom: ada0s1.
gpart: No such geom: ada0s1.
gpart: No such geom: ada1s1.
gpart: No such geom: ada1s1.
gpart: No such geom: ada1s1.
Progress so far (2 HDD's MBR):
 
=>      1  7575551  da0  MBR  (3.6G)
        1       32       - free -  (16k)
       33  7573500    1  freebsd  [active]  (3.6G)
  7573533     2019       - free -  (1M)

=>      0  7573500  da0s1  BSD  (3.6G)
        0  7573500      1  freebsd-ufs  (3.6G)

=>        63  1953525105  ada0  MBR  (931G)
          63  1953525105        - free -  (931G)

=>        63  1953525105  ada1  MBR  (931G)
          63  1953525105        - free -  (931G)

gmirror: Can't get informations about /dev/ada0s1a: No such file or directory.
gpart: No such geom: mirror/gmroot.
gpart: No such geom: mirror/gmroot.
gpart: arg0 'mirror/gmroots1': Invalid argument
gpart: No such geom: mirror/gmroots1.
gpart: No such geom: mirror/gmroot.
gpart: arg0 'mirror/gmroot': Invalid argument
gpart: No such geom: mirror/gmroots1.
gpart: No such geom: mirror/gmroots1.
newfs: /dev/mirror/gmroots1a: could not find special device
mount: /dev/ufs/root: No such file or directory
gstripe: Can't get informations about /dev/ada0s1d: No such file or directory.
gpart: No such geom: stripe/gshome.
gpart: No such geom: stripe/gshome.
gpart: arg0 'stripe/gshomes1': Invalid argument
gpart: No such geom: stripe/gshomes1.
gpart: No such geom: stripe/gshomes1.
newfs: /dev/stripe/gshomes1a: could not find special device
mount: /dev/ufs/home: No such file or directory
Progress so far, done:
 
=>      1  7575551  da0  MBR  (3.6G)
        1       32       - free -  (16k)
       33  7573500    1  freebsd  [active]  (3.6G)
  7573533     2019       - free -  (1M)

=>      0  7573500  da0s1  BSD  (3.6G)
        0  7573500      1  freebsd-ufs  (3.6G)

=>        63  1953525105  ada0  MBR  (931G)
          63  1953525105        - free -  (931G)

=>        63  1953525105  ada1  MBR  (931G)
          63  1953525105        - free -  (931G)

Now (IMPORTANT !!!!) type exit to return to the installer and installation will proceed.
-------------- next part --------------
#!/bin/sh

# Install FreeBSD 9.3R on gmirror/gstripe UFS partitions (GPT or MBR), 2 HDD's.

# FreeBSD 9.3R has nice and simple partition editor (Expert mode).
# Still, if you want gmirror/gstripe setup you have to use "Shell" mode and do things manually.
# This guide will help you create a FreeBSD system using gmirror/gstripe by hand.

# Boot from FreeBSD 9.3R installation media.
# Start installation, answer the questions until you endup on "Partitioning" screen. Choose "Shell" here.

# 'gpart list` & `geom disk list`

# If the drives are *NOT* empty:

gpart destroy -F ada0
gpart destroy -F ada1

# Partition the drives (MBR)
# Create MBR partition table

# If the drive is empty:

# gpart create -s mbr -a 4k ada0
# gpart create -s mbr -a 4k ada1

gpart create -s mbr ada0
gpart create -s mbr ada1

echo "Progress so far (create -s mbr ada[0,1]):"; echo ' '; gpart show; gpart list; geom disk list	# see what we have so far ....

gpart add -t freebsd -b 1 -a 4k ada0
gpart add -t freebsd -b 1 -a 4k ada1

echo "Progress so far ('add -t freebsd' ada[0,1]):"; echo ' '; gpart show	# see what we have so far ....

# Create MBR slices for FreeBSD

gpart create -s bsd ada0s1
gpart create -s bsd ada1s1

# gpart add -s 32g -t freebsd-ufs  -b 64 -a 4k ada0s1
# gpart add -s 32g -t freebsd-ufs  -b 64 -a 4k ada1s1

# gpart add -s  8g -t freebsd-swap       -a 4k ada0s1
# gpart add -s  8g -t freebsd-swap       -a 4k ada1s1

# gpart add        -t freebsd-ufs        -a 4k ada0s1
# gpart add        -t freebsd-ufs        -a 4k ada1s1

echo "Progress so far ('create -s bsd' ada[0,1]):"; echo ' '; gpart show	# see what we have so far ....

# gpart add -t freebsd -b 64 -a 4k ada0
# gpart add -t freebsd -b 64 -a 4k ada1

# gpart add -t freebsd      -a 4k ada0
# gpart add -t freebsd      -a 4k ada1

echo "Progress so far (add -t freebsd -a 4k ada[0,1]):"; echo ' '; gpart show	# see what we have so far ....

# gpart create -s bsd ada0s1
# gpart create -s bsd ada1s1

# echo "Progress so far (create -s bsd ada[0,1]s1):"; echo ' '; gpart show	# see what we have so far ....

# This example shows how to create mirrored & striped UFS partitions. This is just an example, you might want to rethink which partitions will be striped, mirrored or simple.

# Create partitions on the first disk

# There will be no ada0s1c (or index -i 3) because partition "c" is a special entry covering entire slice and is not used for filesystem.

gpart add -s 32G -t freebsd-ufs  -l root1 -a 4k ada0s1		# Create root (/) partition (will be mirrored, needs ada1s1a)
gpart add -s  8G -t freebsd-swap -l swap1 -a 4k ada0s1		# Create swap partition
# glabel label swap1 /dev/ada0s1b
gpart add        -t freebsd-ufs  -l home1 -a 4k ada0s1		# Create /home partiton (will be striped, needs ada1s1d)

# Last partition is added without -s (size) so it will cover the rest of the available space.

# Create partitions on the second disk

# There will be no ada1s1c (or index -i 3) because partition "c" is a special entry covering entire slice and is not used for filesystem.

gpart add -s 32G -t freebsd-ufs  -l root2 -a 4k ada1s1		# Create root (/) partition (will be mirrored, needs ada0s1a)
gpart add -s  8G -t freebsd-swap -l swap2 -a 4k ada1s1		# Create swap partition
# glabel label swap2 /dev/ada1s1b
gpart add        -t freebsd-ufs  -l home2 -a 4k ada1s1		# Create /home partiton (will be striped, needs ada0s1d)

# Last partition is added without -s (size) so it will cover the rest of the available space.

echo "Progress so far (2 HDD's MBR):"; echo ' '; gpart show	# see what we have so far ....

# Create mirrored/striped UFS filesystems (MBR)
# Create filesystems

# Load required kernel modules:

kldload geom_mirror
kldload geom_stripe

# OR:

# gmirror load
# gstripe load

# Filesystems are formatted using newfs utility, -L is the label, filesystem will be available as /dev/ufs/label, and -U turns Soft Updates on.

gmirror label -v gmroot /dev/ada0s1a /dev/ada1s1a	# Mirrored UFS partitions: currently only root ....
gpart add -t freebsd -a 4k mirror/gmroot		# Add FreeBSD slice under gmroot ....
gpart show mirror/gmroot				# see what we have so far ....
gpart create -s BSD mirror/gmroots1			# Create FreeBSD scheme under gmroots1 ....
gpart show mirror/gmroots1				# see what we have so far ....

# Install simple MBR boot loader (boots active slice, verbatim out of handbook :-/ ....):
gpart bootcode -b /boot/mbr mirror/gmroot
gpart set -a active -i 1 mirror/gmroot
gpart bootcode -b /boot/boot mirror/gmroots1

gpart add -t freebsd-ufs -a 4k mirror/gmroots1
newfs -U -L root /dev/mirror/gmroots1a			# Now setup actual FS ....
mount /dev/ufs/root /mnt				# & mount it where the installer expects to find it.

gstripe label -v gshome /dev/ada0s1d /dev/ada1s1d	# Striped UFS partitions: /home ....
gpart add -t freebsd -a 4k stripe/gshome		# Add FreeBSD slice under gshome ....
gpart show stripe/gshome				# see what we have so far ....
gpart create -s BSD stripe/gshomes1			# Create FreeBSD scheme under gmhomes1 ....
gpart show stripe/gshomes1				# see what we have so far ....

gpart add -t freebsd-ufs -a 4k stripe/gshomes1
newfs -U -L home /dev/stripe/gshomes1a			# Now setup actual FS ....
mount /dev/ufs/home /mnt/home				# & mount it where the installer expects to find it.

echo 'Progress so far, done:'; echo ' '; gpart show	# see what we have so far ....

# Type exit and installation will proceed.

echo Now \(IMPORTANT \!\!\!\!\) type exit to return to the installer and installation will proceed.
 


More information about the freebsd-questions mailing list