Date: Fri, 7 Aug 2009 17:09:49 +0200 From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= <olivier@cochard.me> To: freebsd-embedded@freebsd.org Subject: [NanoBSD] Can't use boot0cfg for changing the booting slice Message-ID: <3131aa530908070809l2ac13931xf65981db6eeb83e8@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3131aa530908070809l2ac13931xf65981db6eeb83e8>