g_vfs_done():ufs/root1[READ(offset=106196992, length=4096)]error = 6
Rajkumar S
rajkumars at gmail.com
Tue Dec 2 05:06:45 PST 2008
Hi,
I am working on a nanobsd derived system for updating an embedded
pfSense image. The disk is partitioned into 4 partitions with 2
similar "code" partitions. One of the two code partition is live at
any moment. To update the partition image is written to the other
partition and a command like boot0cfg -s 2 -v ad2 to boot to the new
partition.
Instead of using device names I am using bsdlabel and refer the disks
using the label in fdisk.
Current partitions are as follows:
nanoimg:~# fdisk ad2
******* Working on device /dev/ad2 *******
parameters extracted from in-core disklabel are:
cylinders=1999 heads=16 sectors/track=63 (1008 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1999 heads=16 sectors/track=63 (1008 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 32, size 239584 (116 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 467/ head 15/ sector 32
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 239648, size 239584 (116 Meg), flag 0
beg: cyl 468/ head 1/ sector 1;
end: cyl 935/ head 15/ sector 32
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 479232, size 2048 (1 Meg), flag 0
beg: cyl 936/ head 0/ sector 1;
end: cyl 939/ head 15/ sector 32
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 481280, size 20480 (10 Meg), flag 0
beg: cyl 940/ head 0/ sector 1;
end: cyl 979/ head 15/ sector 32
dmesg shows the following when booting:
ad2: 983MB <LEXAR ATA FLASH V1.01> at ata1-master PIO4
GEOM: ad2: partition 4 does not start on a track boundary.
GEOM: ad2: partition 4 does not end on a track boundary.
GEOM: ad2: partition 3 does not start on a track boundary.
GEOM: ad2: partition 3 does not end on a track boundary.
GEOM: ad2: partition 2 does not start on a track boundary.
GEOM: ad2: partition 2 does not end on a track boundary.
GEOM: ad2: partition 1 does not start on a track boundary.
GEOM: ad2: partition 1 does not end on a track boundary.
GEOM_LABEL: Label for provider ad2s3 is ufs/cfg.
GEOM_LABEL: Label for provider ad2s4 is ufs/cf.
GEOM_LABEL: Label for provider ad2s1a is ufs/root0.
GEOM_LABEL: Label for provider ad2s2a is ufs/root1.
Trying to mount root from ufs:/dev/ufs/root0
Fstab is:
/dev/ufs/root0 / ufs ro 1 1
/dev/ufs/cfg /cfg ufs rw,noauto 2 2
/dev/ufs/cf /cf ufs ro 1 1
I can switch booting to ufs/root0 or ufs/root1 using a command like
mettlenano:~# sysctl kern.geom.debugflags=16
kern.geom.debugflags: 0 -> 16
and
mettlenano:~# boot0cfg -s 1 -v ad2
# flag start chs type end chs offset size
1 0x00 0: 1: 1 0xa5 467: 15:32 32 239584
2 0x80 468: 1: 1 0xa5 935: 15:32 239648 239584
3 0x00 936: 0: 1 0xa5 939: 15:32 479232 2048
4 0x00 940: 0: 1 0xa5 979: 15:32 481280 20480
version=1.0 drive=0x80 mask=0x3 ticks=182
options=packet,update,nosetdrv
default_selection=F1 (Slice 1)
But after executing this command I get the following messages in my dmesg.
GEOM_LABEL: Label ufs/cf removed.
GEOM_LABEL: Label ufs/cfg removed.
GEOM_LABEL: Label ufs/root1 removed.
GEOM_LABEL: Label ufs/root0 removed.
g_vfs_done():ufs/root1[READ(offset=106196992, length=4096)]error = 6
g_vfs_done():ufs/root1[READ(offset=106196992, length=4096)]error = 6
g_vfs_done():ufs/root1[READ(offset=106201088, length=4096)]error = 6
I have no idea why such messages are appearing. Also some commands
like reboot does not work.
mettlenano:~# reboot
/sbin/reboot: Device not configured.
mettlenano:~# less
/usr/bin/less: Device not configured.
But some other commands work. Any one with any idea about what could
be wrong here?
raj
More information about the freebsd-geom
mailing list