kern/108355: boot0cfg -s 2 does not work if noupdate is set.

nick at anywi.com nick at anywi.com
Thu Jan 25 22:50:14 UTC 2007


>Number:         108355
>Category:       kern
>Synopsis:       boot0cfg -s 2 does not work if noupdate is set.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 25 22:50:11 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Nick Hibma
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
AnyWi Technologies
>Environment:
System: FreeBSD hind.van-laarhoven.org 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #5: Wed Jan 17 18:49:39 CET 2007 root@:/usr/src/sys/i386/compile/HIND i386

File: boot0.S           Status: Up-to-date

Working revision:    1.14.2.1
Repository revision: 1.14.2.1        /home/ncvs/src/sys/boot/i386/boot0/boot0.S,v
Sticky Tag:          RELENG_6 (branch: 1.14.2)
Sticky Date:         (none)
Sticky Options:      (none)
>Description:
When 'update' is set through boot0cfg you can select the default slice through
boot0cfg -s. However, if you use the following command to initialise your boot0
no matter what you select you always get the slice that was selected during
initialisation of the boot0 sector.

	boot0cfg -B -b /boot/boot0 -s 2 -m 3 -o noupdate,packet ad0

You can now NOT select slice 1 as the boot partition with

	boot0cfg -s 1 ad0

as if the missing update action makes boot0.S forget the value read from _OPT.
Instead you get the following (second slice is booted but boot0cfg is selected):

mount ; boot0cfg -v ad0
/dev/ad0s2a on / (ufs, local, read-only)
devfs on /dev (devfs, local)
/dev/md0 on /etc (ufs, local)
/dev/md1 on /var (ufs, local)
#   flag     start chs   type       end chs       offset         size
1   0x00      0:  1: 1   0xa5    477: 15:32           32       244704
2   0x80    478:  1: 1   0xa5    955: 15:32       244768       244704
3   0x00    956:  0: 1   0xa5    959: 15:32       489472         2048

version=1.0  drive=0x80  mask=0x3  ticks=182
options=packet,noupdate,nosetdrv
default_selection=F1 (Slice 1)

>How-To-Repeat:

On a spare machine:

        boot0cfg -B -b /boot/boot0 -s 2 -m 3 -o noupdate,packet ad0
	boot0cfg -s 1 ad0
	reboot
	# notice how it still boots from the second slice, not the selected one.
	
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list