From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 7 15:10:10 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 224A210656E9 for ; Fri, 7 Aug 2009 15:10:10 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-vw0-f180.google.com (mail-vw0-f180.google.com [209.85.212.180]) by mx1.freebsd.org (Postfix) with ESMTP id CD5648FC1D for ; Fri, 7 Aug 2009 15:10:09 +0000 (UTC) Received: by vws10 with SMTP id 10so1728288vws.7 for ; Fri, 07 Aug 2009 08:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=YMc6sw7dEnVzBRm9xfb7hBWCkSOqLLnj48RR2Cev2qk=; b=DbMpFipIZQO+mVqmpTIDxnfoT+rB+WCuBnfUPKPdBl33TXPuw3SH9FKN9OwESS8wjj s3F5dtxIM1Q+R3wAVt2MwFEVTxFSPwveieS6Ia655ToI3UM28tS4soJ1o/gwHu2GFihh 3KDrr+k9J+74zLQHK7lFw62YtnJUaBD18HgTE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type:content-transfer-encoding; b=pGa/EnZgwj/uhCiqPWulM1jGuVkKmjGWkpQW9A/9/RdjKvlSesTCy3SiMPXCGjdrLM oUU5Zft7EVE1PqENQPjSqW2tVESzPhWHNisQooNIaYJFwjjpqjvmnT4qWgRO4sLOnDhE /Jc6/tANyVMCH4L/gLL8nwAKu1r+vkSA+XfQQ= MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.220.98.20 with SMTP id o20mr913866vcn.92.1249657809120; Fri, 07 Aug 2009 08:10:09 -0700 (PDT) From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Fri, 7 Aug 2009 17:09:49 +0200 X-Google-Sender-Auth: 7ec7c76fe511bce1 Message-ID: <3131aa530908070809l2ac13931xf65981db6eeb83e8@mail.gmail.com> To: freebsd-embedded@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [NanoBSD] Can't use boot0cfg for changing the booting slice X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 15:10:10 -0000 Hi, I meet a problem under FreeBSD 7.2 and 8.0-current (nanoBSD) using boot0cfg: I can't use boot0cfg for changing the booting slice. Here is my problem: I'm using the FreeBSD Boot manager on a system with MBR partitions. The active slice is the partition 1, but I want to boot from the slice 2. Then I use boot0cfg like that: sysctl kern.geom.debugflags=16 boot0cfg -s 2 -v /dev/ad0 sysctl kern.geom.debugflags=0 But, after the reboot my system still reboot from the slice 1 (but the boot loader show correctly that the default choice is now the 2)! Where is my problem ? The "active" flag of the slice is not modified after using boot0cfg, is normal ? Here is the full log: [root@router]~#fdisk /dev/ad0 ******* Working on device /dev/ad0 ******* parameters extracted from in-core disklabel are: cylinders=968 heads=16 sectors/track=63 (1008 blks/cyl) parameters to be used for BIOS calculations are: cylinders=968 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 63, size 465822 (227 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 254/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 465948, size 465822 (227 Meg), flag 0 beg: cyl 29/ head 1/ sector 1; end: cyl 57/ head 254/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 931770, size 16065 (7 Meg), flag 0 beg: cyl 58/ head 0/ sector 1; end: cyl 58/ head 254/ sector 63 The data for partition 4 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 947835, size 16065 (7 Meg), flag 0 beg: cyl 59/ head 0/ sector 1; end: cyl 59/ head 254/ sector 63 [root@router]~#sysctl kern.geom.debugflags=16 kern.geom.debugflags: 0 -> 16 [root@router]~#boot0cfg -s 2 -v /dev/ad0 # flag start chs type end chs offset size 1 0x80 0: 1: 1 0xa5 28:254:63 63 465822 2 0x00 29: 1: 1 0xa5 57:254:63 465948 465822 3 0x00 58: 0: 1 0xa5 58:254:63 931770 16065 4 0x00 59: 0: 1 0xa5 59:254:63 947835 16065 version=1.0 drive=0x80 mask=0x3 ticks=182 bell=# (0x23) options=packet,update,nosetdrv default_selection=F2 (Slice 2) [root@router]~#sysctl kern.geom.debugflags=0 kern.geom.debugflags: 16 -> 0 [root@router]~#fdisk /dev/ad0 ******* Working on device /dev/ad0 ******* parameters extracted from in-core disklabel are: cylinders=968 heads=16 sectors/track=63 (1008 blks/cyl) parameters to be used for BIOS calculations are: cylinders=968 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 63, size 465822 (227 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 254/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 465948, size 465822 (227 Meg), flag 0 beg: cyl 29/ head 1/ sector 1; end: cyl 57/ head 254/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 931770, size 16065 (7 Meg), flag 0 beg: cyl 58/ head 0/ sector 1; end: cyl 58/ head 254/ sector 63 The data for partition 4 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 947835, size 16065 (7 Meg), flag 0 beg: cyl 59/ head 0/ sector 1; end: cyl 59/ head 254/ sector 63 Thanks, Olivier