NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/40360: fictitious disklabels do not handle devices without an MBR



>Number:         40360
>Category:       kern
>Synopsis:       fictitious disklabels do not handle devices without an MBR
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 10 19:25:00 +0000 2009
>Originator:     Jared D. McNeill
>Release:        NetBSD 5.99.5
>Organization:
        
>Environment:
        
        
System: NetBSD black.invisible.ca 5.99.5 NetBSD 5.99.5 (GENERIC) #44: Thu Jan 8 
07:01:09 EST 2009 
jmcneill%black.invisible.ca@localhost:/export/home/jmcneill/branches/HEAD/src/sys/arch/amd64/compile/GENERIC
 amd64
Architecture: x86_64
Machine: amd64
>Description:
        When inserting a USB device that only contains a FAT filesystems,
        the auto-generated disklabel incorrectly reports a 4.2BSD filesystem
        at the beginning of the device.
>How-To-Repeat:
        $ dd if=/dev/zero of=/tmp/test.img bs=1m count=5
        5+0 records in
        5+0 records out
        5242880 bytes transferred in 0.010 secs (524288000 bytes/sec)
        $ sudo -s
        # vnconfig vnd0 /tmp/test.img  
        # newfs_msdos /dev/rvnd0d
        /dev/rvnd0d: 10192 sectors in 1274 FAT12 clusters (4096 bytes/cluster)
        MBR type: 1
        bps=512 spc=8 res=1 nft=2 rde=512 sec=10240 mid=0xf0 spf=4 spt=32 
hds=64 hid=0
        # vnconfig -u vnd0
        # vnconfig vnd0 /tmp/test.img
        # disklabel vnd0
        [...]
        #        size    offset     fstype [fsize bsize cpg/sgs]
         a:     10240         0     4.2BSD      0     0     0  # (Cyl.      0 - 
     4)
         d:     10240         0     unused      0     0        # (Cyl.      0 - 
     4)
        # mount -t msdos /dev/vnd0d /mnt
        # df -k /mnt
        Filesystem   1K-blocks       Used      Avail %Cap Mounted on
        /dev/vnd0d         5096          0       5096   0% /mnt
>Fix:
        

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index