Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 2000 07:53:03 -0800 (PST)
From:      didier.poirot@sun.com
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/23380: newfs_msdos breaks the DOS partition table (and BSD label sector)
Message-ID:  <200012081553.eB8Fr3853015@freefall.freebsd.org>
Resent-Message-ID: <200012081600.eB8G04c54728@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help


>Number:         23380
>Category:       i386
>Synopsis:       newfs_msdos breaks the DOS partition table (and BSD label sector)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 08 08:00:04 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Poirot
>Release:        4.1
>Organization:
Sun Microsystems
>Environment:
FreeBSD bongo 4.0-RELEASE FreeBSD 4.0-RELEASE #11: Fri Dec  8 16:37:27 CET 2000     dp@bongo:/usr/src/sys/compile/GENERIC  i386

>Description:
Installing a MSDOS filesystem with the newfs_msdos(1) utility in the
first partition of the first slice (e.g /dev/ad0s1a) of a disk breaks 
the DOS partition table contained in the sector 0 of the disk (the MBR). 

Note: the partition 'a' must start at the beginning of the slice, e.g
the oa# field of the disktab entry must be set to 0.

The newfs_msdos utility writes to 'absolute' sector 0 of the disk, 
instead of writing to 'relative' sector 0 (relative to beginning of the
slice, not of the disk). It also tries to write to 'absolute' sector
1 (which contain the BSD label), must access is denied by the system.


>How-To-Repeat:
1. Using fdisk(1) create 1 slice( e.g ad0s1), starting at 0, type 165
2. Using disklabel, write a label to the disk slice mentionned above.
   This label should contain a partition starting at 0.
3. Use newfs_msdos on this partition (e.g /dev/ad0s1a).
4. Try to re-read the DOS partition table with fdisk.

>Fix:
The disktab entry used must not start at offset 0 in the slice, but say
at 16.



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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012081553.eB8Fr3853015>