From owner-freebsd-geom@FreeBSD.ORG Tue Dec 2 13:06:45 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B3AF106564A for ; Tue, 2 Dec 2008 13:06:45 +0000 (UTC) (envelope-from rajkumars@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by mx1.freebsd.org (Postfix) with ESMTP id 5DE3A8FC1C for ; Tue, 2 Dec 2008 13:06:45 +0000 (UTC) (envelope-from rajkumars@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so3225645wfg.7 for ; Tue, 02 Dec 2008 05:06:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=6VKfs2jyG/XOiT0RGCS4GosIryS2wDudZ8sGJGtMLm0=; b=KtA3en7+i2CNxzzmDsph1nz/uHbW3WpKIjp2jnOrqpxFFBXdmGv9qDhqDYLMu1osJG ZloxFEfIc43H3xZkhDx04HsvKAEI62YCHX3bJzjGn4a5lsO+B+VVI9JXNRIi9hcmsFV4 lJZRxFGr7RGATx9eD7VM5js6mBTmnVakO4nOs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=q9bueHfdW+ky2XTSg8Jyjpfx5Gbv3qX9IaY9LeI27yMvjzJucxtAOCfT9Y0IitCrGh 7Nb5iSi/fNqtQY2WUfM6o/fOx1xkJhVPK+JnCuengKSd58KK98SZLp3gqkPAX0QWEil+ pv0bkwKJy7vXfGIzVEdJdxKHtfr/Bl2rd9VbU= Received: by 10.142.242.8 with SMTP id p8mr4874702wfh.307.1228221475452; Tue, 02 Dec 2008 04:37:55 -0800 (PST) Received: by 10.143.167.2 with HTTP; Tue, 2 Dec 2008 04:37:55 -0800 (PST) Message-ID: <64de5c8b0812020437t30236d52p6e748d508b7b7b7@mail.gmail.com> Date: Tue, 2 Dec 2008 18:07:55 +0530 From: "Rajkumar S" To: freebsd-geom@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: g_vfs_done():ufs/root1[READ(offset=106196992, length=4096)]error = 6 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2008 13:06:45 -0000 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 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