kern/157819: [geom] gpart(8): drop serial from MBR

Eir Nym eirnym at gmail.com
Mon Jun 13 07:30:14 UTC 2011


>Number:         157819
>Category:       kern
>Synopsis:       [geom] gpart(8): drop serial from MBR
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 13 07:30:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Eir Nym
>Release:        FreeBSD-Current r222913
>Organization:
Private Person
>Environment:
>Description:
boot0cfg is aware about "serial number" field in MBR code, gpart(8) is not. If this field is broken, Windows Vista/7 (XP?) doesn't want to boot.
>How-To-Repeat:
Install Windows with MBR partition scheme, 

install FreeBSD without installer like this:

# gpart add -t freebsd ada0
# gpart create -s MBR ada0s3
# bsdlabel -wB ada0s3
# newfs ada0s3a
# mount ada0s3a /mnt
// here unpack FreeBSD distro into /mnt and do initial configuration.
# dd if=/dev/ada0 of=orig.mbr 
# gpart bootcode -b /mnt/boot/boot0 ada0
# boot0cfg -v ada0

if you do `boot0cfg -Bvb /mnt/boot/boot0` instead of `gpart bootcode` MBR serial will be preserved and windows vista/7 (xp?) will boot correctly.
>Fix:
be aware about MBR serial on MBR partition scheme

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list