NetBSD-Bugs archive

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

bin/43430: disklabel -i should not create overlapping partions (except unused)



>Number:         43430
>Category:       bin
>Synopsis:       disklabel -i should not create overlapping partions (except 
>unused)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 07 16:55:00 +0000 2010
>Originator:     Rainer Glaschick
>Release:        NetBSD 5.1_RC2
>Organization:
>Environment:
NetBSD kerneu 5.1_RC2 NetBSD 5.1_RC2 (GENERIC) #0: Fri May 21 04:32:33 UTC 2010 
 
builds%b8.netbsd.org@localhost:/home/builds/ab/netbsd-5-1-RC2/i386/201005210534Z-obj/home/builds/ab/netbsd-5-1-RC2/src/sys/arch/i386/compile/GENERIC
 i386

>Description:
disklabel -i allows the user to define overlapping partitions. 

In particular, the indication of "'$' for all remaining" is misleading; it 
should at least read "'$' for end of disk", making clear that not the remaining 
space until the next used partition is meant. The man page is silent about this 
"feature", which is very dangerous.

Moreover, although new with NetBSD, I doubt that there are many cases where 
overlapping partitions in a disklabel are useful, except unused partitions like 
c and d. So I would prefer - in the interactive mode at least - that, before 
writing a disklabel, it should be checked for consistency, and acknowledge 
required for write if there are overlaps. 

Note that checking the consistency manually requires additions, as the display 
is in start/length notation, not in start/end notation. See also PR#5277

I marked the severity 'serious', because I think that it should not be so easy 
to create disklabels that lead to corrupted file systems.
>How-To-Repeat:
Just enter $ for the size of a partition if there is another one behind.

Or make partition 'a' of 500MB size, and let partition 'b' start at 200MB

>Fix:
Check partitions with a pocket calculator before writing. 



Home | Main Index | Thread Index | Old Index