partitions are not detected

FreeBSD is loaded from USB stick on ARM.

I have built one USB with just two slices (FAT16 and FreeBSD). I had no issues, but then I had no partitions.

I then built partitions and found that pre-configured fstab would fail to mount other filesystems. I tried a couple of USB sticks, but had the same result. I used sysinstall in the 1st first case: gpart and bsdlabel to create the 2nd second USB stick.

FreeBSD on Intel platform running in Parallels virtual machine is used to assemble everything.

Code:
root@:/root # bsdlabel da0s2
# /dev/da0s2:
8 partitions:
#          size     offset    fstype   [fsize bsize bps/cpg]
  a:    1048576          0    4.2BSD        0     0     0
  b:    1048576    1048576    4.2BSD        0     0     0
  c:    7778232          0    unused        0     0     # "raw" part, don't edit
  d:    1228800    2097152    4.2BSD        0     0     0
  e:     524288    3325952    4.2BSD        0     0     0
  f:      65536    3850240      swap                    
  g:    3862456    3915776    4.2BSD        0     0     0

However, when I run gpart da0s2 I get:
Code:
root@:/root # gpart show da0s2
gpart: No such geom: da0s2.

Code:
root@:/root # echo /dev/da0*
/dev/da0 /dev/da0s1 /dev/da0s2

I am running a custom built kernel on ARM:

Code:
root@fbsd:/root/SheevaPlug # cat DMZSHEEVA
# My custom sheeva kernel with ipfw firewall support.

ident		DMZSHEEVA
include		"MYSHEEVA"

options         ROOTDEVNAME=\"ufs:/dev/da0s2a\"

# ipfw configuration
options		IPFIREWALL
options		IPFIREWALL_VERBOSE
options		IPFIREWALL_VERBOSE_LIMIT=5
options		IPFIREWALL_DEFAULT_TO_ACCEPT

# disable UFS snapshots
options		NO_FFS_SNAPSHOT
options		NO_SWAPPING

Code:
root@fbsd:/root/SheevaPlug # cat MYSHEEVA 
#
# Custom kernel for Marvell SheevaPlug devices.
#
# $FreeBSD: release/9.1.0/sys/arm/conf/SHEEVAPLUG 234559 2012-04-21 20:22:02Z raj $
#

ident		SHEEVA
include		"SHEEVAPLUG"

options		GEOM_PART_BSD
options		GEOM_PART_GPT
options		GEOM_PART_MBR
options		GEOM_LABEL

options 	ROOTDEVNAME=\"ufs:/dev/da0s2\"

options		TMPFS
options		MSDOSFS

options		GEOM_ELI
options		GEOM_ZERO

nooptions 	BOOTP
nooptions 	BOOTP_NFSROOT
nooptions 	BOOTP_NFSV3
nooptions	BOOTP_WIRED_TO

The end of the dmesg output does not look suspicious to me, but would not know what to look for:

Code:
Root mount waiting for: usbus0
ugen0.2: <vendor 0x0930> at usbus0
umass0: <vendor 0x0930 USB Flash Memory, class 0/0, rev 2.00/1.10, addr 2> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x4100
umass0:0:0:-1: Attached to scbus0
Trying to mount root from ufs:/dev/da0s2 []...
mountroot: waiting for device /dev/da0s2 ...
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: < USB Flash Memory PMAP> Removable Direct Access SCSI-0 device 
da0: 40.000MB/s transfers
da0: 3828MB (7839744 512 byte sectors: 255H 63S/T 488C)

The only suspicious line I see is from dmesg:

Code:
Trying to mount root from ufs:/dev/da0s2

My kernel configuration is supposed to point to
Code:
   options         ROOTDEVNAME=\"ufs:/dev/da0s2a\"

However, I have a parent configuration without partition a. It should not affect things should it?
Code:
   options 	ROOTDEVNAME=\"ufs:/dev/da0s2\"
 
I made what looked like a minor change and it worked. I simply commented ROOTDEVNAME in the parent configuration file. I thought it was overridden, but apparently it was not. I would appreciate it if someone explained why the change made the difference.

Here are parts of configuration files:

Code:
root@fbsd:/usr/src # cat ~/SheevaPlug/DMZSHEEVA
include		"MYSHEEVA"
ident		DMZSHEEVA
options         ROOTDEVNAME=\"ufs:/dev/da0s2a\"
Code:
root@fbsd:/usr/src # cat ~/SheevaPlug/MYSHEEVA 
ident		SHEEVA
include		"SHEEVAPLUG"
# options 	ROOTDEVNAME=\"ufs:/dev/da0s2\"

FreeBSD on SheevaPlug detects all partitions properly now:

Code:
root@:/root # gpart show da0s2
=>      0  7778232  da0s2  BSD  (3.7G)
        0  1048576      1  freebsd-ufs  (512M)
  1048576  1048576      2  freebsd-ufs  (512M)
  2097152  1228800      4  freebsd-ufs  (600M)
  3325952   524288      5  freebsd-ufs  (256M)
  3850240    65536      6  freebsd-swap  (32M)
  3915776  3862456      7  freebsd-ufs  (1.9G)
Code:
root@:/root # ls /dev/da*
/dev/da0        /dev/da0s2      /dev/da0s2b     /dev/da0s2e     /dev/da0s2g
/dev/da0s1      /dev/da0s2a     /dev/da0s2d     /dev/da0s2f
 
Back
Top