Package: util-linux
Version: 2.17.2-5
Severity: normal

Mkswap also thinks LVM volumes are a whole disk, and thus doesn't erase
the 'bootbits', and complains about it.

I have looked at the source, and it only clears it if the device does not
start at the start of the disk, or if the name ends with a number
(like in 'hda1'). This latter check causes LVM volumes (or swap files) to
be treated differently, depending on their name:
        /dev/vg/swap  -> bootbits not cleared
        /dev/vg/swap2 -> bootbits not cleared if geometry check enabled
                     bootbits cleared if geometry check disabled
Obviously, they should be cleared in both cases.

Actually, shouldn't the bootbits *always* be overwritten, as the MBR /
disklabel that might be there would cause the (now overwritten) contents
of the device to be interpreted incorrectly ? Or is there a case where the
data in the bootbits is still relevant after overwriting the contents of
the device ?

Wouldn't it be a good alternative to just check the first block(s) on
the candidate device for the presence of an MBR, disklabel or GPT ? If
there is one, the action could be refused unless the '-f' option was
given. This catches the obvious and most destructive mistakes, without
getting too much in the user's way.

Regards,

Rogier.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages util-linux depends on:
ii  debconf [debconf-2.0]   1.5.35           Debian configuration management 
sy
ii  dpkg                    1.15.8.5         Debian package management system
ii  initscripts             2.88dsf-12       scripts for initializing and 
shutt
ii  install-info            4.13a.dfsg.1-5   Manage installed documentation in 
ii  libblkid1               2.17.2-3.2       block device id library
ii  libc6                   2.11.2-6         Embedded GNU C Library: Shared 
lib
ii  libncurses5             5.7+20100313-3   shared libraries for terminal 
hand
ii  libselinux1             2.0.96-1         SELinux runtime shared libraries
ii  libslang2               2.2.2-4          The S-Lang programming library - 
r
ii  libuuid1                2.17.2-3.2       Universally Unique ID library
ii  lsb-base                3.2-23.1         Linux Standard Base 3.2 init 
scrip
ii  tzdata                  2010l-1          time zone and daylight-saving 
time
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

util-linux recommends no packages.

Versions of packages util-linux suggests:
ii  console-tools              1:0.2.3dbs-69 Linux console and font utilities
ii  dosfstools                 3.0.9-1       utilities for making and checking 
pn  util-linux-locales         <none>        (no description available)

-- debconf information:
  util-linux/noauto-with-nonzero-passnum:



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to