Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2011-01-15 Thread gregor herrmann
tag 566072 + patch
thanks

On Fri, 14 Jan 2011 20:48:38 +, Adam D. Barratt wrote:

 This appears to be due to the fact that the package build only invokes
 dh_installdebconf in the binary-indep target.  As a result the templates
 file intended to warn you about the contents of your fstab is only added
 to the package if a full build (i.e. arch:all and architecture-dependent
 packages) is being performed.
[..]
 I've verified that adding dh_installdebconf to the binary-arch target as
 well ensures that the templates are added both for a full and an
 arch-dep-binary-only build.

Hi LaMont,

for your convenience I've prepared a patch (attached) implementing
Adam's suggestion and verified that it works for both
arch-dep-binary-only and full builds.

(Since the bug was reopened only yesterday, I'm not uploading an NMU
right away.)

(Probably dh_installdebconf in binary-indep is not needed at all, but
it also doesn't hurt to keep it.)

Cheers,
gregor

-- 
 .''`.   http://info.comodo.priv.at/ -- GPG key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin,  developer - http://www.debian.org/
 `. `'   Member of VIBE!AT  SPI, fellow of Free Software Foundation Europe
   `-NP: Rod Stewart
diff -u util-linux-2.17.2/debian/rules util-linux-2.17.2/debian/rules
--- util-linux-2.17.2/debian/rules
+++ util-linux-2.17.2/debian/rules
@@ -177,7 +177,7 @@
 	dh_testdir -i
 	dh_testroot -i
 	dh_lintian -i
-	dh_installdebconf
+	dh_installdebconf -i
 	dh_installdeb -i
 	dh_gencontrol -i -- -VUpstream=$(Upstream)
 	dh_md5sums -i
@@ -188,6 +188,7 @@
 	dh_testdir -s
 	dh_testroot -s
 	dh_lintian -s
+	dh_installdebconf -s
 	dh_installinit -s -- defaults 15 85
 	[ -n $(STRIP) ] || dh_strip -s
 	dh_makeshlibs -s
diff -u util-linux-2.17.2/debian/changelog util-linux-2.17.2/debian/changelog
--- util-linux-2.17.2/debian/changelog
+++ util-linux-2.17.2/debian/changelog
@@ -1,3 +1,13 @@
+util-linux (2.17.2-6.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix fsck now failing hard for unavailable filesystems: add
+dh_installdebconf to debian/rules binary-arch target, otherwise the
+templates file doesn't get added for arch-dep-binary-only builds; thanks
+to Adam D. Barratt for the analysis (closes: #566072).
+
+ -- gregor herrmann gre...@debian.org  Sat, 15 Jan 2011 14:51:43 +0100
+
 util-linux (2.17.2-6) unstable; urgency=low
 
   [Bjørn Steensrud]


signature.asc
Description: Digital signature


Processed: Re: Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2011-01-15 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 tag 566072 + patch
Bug #566072 [util-linux] fsck now failing hard for unavailable filesystems
Ignoring request to alter tags of bug #566072 to the same tags previously set
 thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
566072: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566072
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


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



Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2011-01-14 Thread Carsten Otto
Dear all,

the patch introduced in #68 causes the postinst script to fail when
upgrading from lenny to squeeze while the fstab contains a noauto entry
with non-zero pass number.

By adding -ex to the postinst script I got:
+ db_input critical util-linux/noauto-with-nonzero-passnum
+ _db_cmd 'INPUT critical' util-linux/noauto-with-nonzero-passnum
+ IFS=' '
+ printf '%s\n' 'INPUT critical util-linux/noauto-with-nonzero-passnum'
+ IFS='
+ read -r _db_internal_line
+ RET='10 util-linux/noauto-with-nonzero-passnum doesn'\''t exist'
+ case ${_db_internal_line%%[   ]*} in
+ return 10
dpkg: error processing util-linux (--install):
 subprocess installed post-installation script returned error exit status 10

As a result, the postinst script fails with error code 10. Fixing the
fstab worked for me, but getting that information was non-trivial.

Best regards,
-- 
Carsten Otto   o...@informatik.rwth-aachen.de
LuFG Informatik 2  http://verify.rwth-aachen.de/otto/
RWTH Aachenphone: +49 241 80-21211


signature.asc
Description: Digital signature


Processed: Re: Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2011-01-14 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 reopen 566072
Bug #566072 {Done: LaMont Jones lam...@debian.org} [util-linux] fsck now 
failing hard for unavailable filesystems
'reopen' may be inappropriate when a bug has been closed with a version;
you may need to use 'found' to remove fixed versions.
 thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
566072: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566072
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


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



Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2011-01-14 Thread Adam D. Barratt
reopen 566072
thanks

On Fri, 2011-01-14 at 21:13 +0100, Carsten Otto wrote:
 the patch introduced in #68 causes the postinst script to fail when
 upgrading from lenny to squeeze while the fstab contains a noauto entry
 with non-zero pass number.
 
 By adding -ex to the postinst script I got:
[...]
 + RET='10 util-linux/noauto-with-nonzero-passnum doesn'\''t exist'
 + case ${_db_internal_line%%[   ]*} in
 + return 10
 dpkg: error processing util-linux (--install):
  subprocess installed post-installation script returned error exit status 10

This appears to be due to the fact that the package build only invokes
dh_installdebconf in the binary-indep target.  As a result the templates
file intended to warn you about the contents of your fstab is only added
to the package if a full build (i.e. arch:all and architecture-dependent
packages) is being performed.

The maintainer's i386 upload therefore includes the template, but the
buildd-generated packages do not (nor does the amd64 package which the
maintainer uploaded together with the i386 packages, so presumably the
initial build was performed on i386 and an arch-dep build on amd64).

I've verified that adding dh_installdebconf to the binary-arch target as
well ensures that the templates are added both for a full and an
arch-dep-binary-only build.

Regards,

Adam




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



Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2010-11-11 Thread LaMont Jones
On Sun, Jan 31, 2010 at 06:58:21PM -0600, John Goerzen wrote:
 Clint Adams wrote:
 Is there a legitimate reason to set a pass number if you actually do not want
 the filesystem to be checked?
 I would say probably not.  But in the past, I (and others) would
 often cut-and-paste fstab lines, then add noauto.  Previously, the
 system would not attempt to fsck filesystems marked noauto.  So this
 upgrade could render people's machines unbootable.

I'm inclined to check in preinst and at least warn the admin about what will
happen on the next boot.  Would that be sufficient for you?

 On the other side of the coin, I see no reason to fail to boot
 because a noauto filesystem didn't fsck.

It's more that a filesystem that fstab says to check failed to pass.

lamont




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



Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2010-11-11 Thread John Goerzen

On 11/11/2010 09:02 PM, LaMont Jones wrote:

On Sun, Jan 31, 2010 at 06:58:21PM -0600, John Goerzen wrote:

Clint Adams wrote:

Is there a legitimate reason to set a pass number if you actually do not want
the filesystem to be checked?

I would say probably not.  But in the past, I (and others) would
often cut-and-paste fstab lines, then add noauto.  Previously, the
system would not attempt to fsck filesystems marked noauto.  So this
upgrade could render people's machines unbootable.


I'm inclined to check in preinst and at least warn the admin about what will
happen on the next boot.  Would that be sufficient for you?


I could live with that.

-- John



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



Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2010-03-27 Thread Olivier Berger
Hi.

On Wed, Jan 20, 2010 at 04:44:46PM -0600, John Goerzen wrote:
 
 Better yet, it
 should never attempt to fsck a noauto filesystem.  If it really must,
 an error to do so ought not be fatal to the boot process.
 

I have experienced the same kind of problem.

May I suggest also that fsck displays the failing device, instead of open: No 
such file or directory, to say something like :
open /dev/sda1 : No such file or directory for instance.

That would help a great deal identify what's problematic in the fstab.

My 2 cents,

-- 
Olivier BERGER 
(OpenPGP: 1024D/B4C5F37F)
http://www.olivierberger.com/weblog/



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



Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2010-01-31 Thread Clint Adams
On Wed, Jan 20, 2010 at 04:44:46PM -0600, John Goerzen wrote:
 On a lark, I changed the pass number in fstab to 0.  That fixed the
 issue.

Is there a legitimate reason to set a pass number if you actually do not want
the filesystem to be checked?



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



Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2010-01-31 Thread John Goerzen

Clint Adams wrote:

On Wed, Jan 20, 2010 at 04:44:46PM -0600, John Goerzen wrote:

On a lark, I changed the pass number in fstab to 0.  That fixed the
issue.


Is there a legitimate reason to set a pass number if you actually do not want
the filesystem to be checked?



I would say probably not.  But in the past, I (and others) would often 
cut-and-paste fstab lines, then add noauto.  Previously, the system 
would not attempt to fsck filesystems marked noauto.  So this upgrade 
could render people's machines unbootable.


On the other side of the coin, I see no reason to fail to boot because a 
noauto filesystem didn't fsck.




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



Bug#566072: util-linux: fsck goes into maintenance shell on every boot

2010-01-20 Thread John Goerzen
Package: util-linux
Version: 2.16.2-0
Severity: critical
Justification: breaks the whole system

The behavior I describe started after a recent sid upgrade on at least
three distinct systems.

Follows is my retyping the information that appears on the console on
one of them:

Checking file systems...fsck from util-linux-ng 2.16.2
/dev/sda1: clean...
/sbin/fsck.xfs: XFS file system.
/dev/mapper/MASS1-home: clean...
/dev/mapper/crypt-home: clean...
/sbin/fsck.xfs: XFS file system.
open: No such file or directory
dosfsck 3.0.7, 24 Dec 2009, FAT32, LFN
fsck died with exit status 6
failed (code 6)
File system check failed. A log is being saved in
/var/log/fsck/checkfs if that location is writable
Give root password for maintenance.

At this point, I can run mount -av; exit 0 and the system will boot
normally.

I will attach fstab and /var/log/fsck/checkfs for your diagnostic
purposes.  It is rather annoying that there is no way to tell exactly
which filesystem caused the problem given the above output.

Examining the output in that log, it appears it is running fsck -C -R
-A -a.  I can reproduce the problem at will by running that command in
the maintenance shell.  I ran fsck -C -R -A -a -s -V in the
maintenance shell, and determined that the problem was with:

fsck.vfat -a /dev/disk/by-id/usb-Apple_iPod...-part2

You will see that this filesystem is marked user,noauto in fstab and
ought not to be checked by fsck at boot time.  It never was until
recently, either.

On a lark, I changed the pass number in fstab to 0.  That fixed the
issue.

However, this change which can render a system unbootable ought to, at
minimum, be detected and warned about in a preinst.  Better yet, it
should never attempt to fsck a noauto filesystem.  If it really must,
an error to do so ought not be fatal to the boot process.

All systems with this problem upgraded from util-linux 2.16.1-4 to
2.16.2-0.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (99, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-trunk-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages util-linux depends on:
ii  dpkg1.15.5.6 Debian package management system
ii  initscripts 2.87dsf-8scripts for initializing and shutt
ii  install-info4.13a.dfsg.1-5   Manage installed documentation in 
ii  libblkid1   2.16.2-0 block device id library
ii  libc6   2.10.2-5 Embedded GNU C Library: Shared lib
ii  libncurses5 5.7+20090803-2   shared libraries for terminal hand
ii  libselinux1 2.0.89-4 SELinux runtime shared libraries
ii  libuuid12.16.2-0 Universally Unique ID library
ii  lsb-base3.2-23   Linux Standard Base 3.2 init scrip
ii  tzdata  2009u-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-68 Linux console and font utilities
ii  dosfstools 3.0.7-1   utilities for making and checking 
pn  util-linux-locales none(no description available)

-- no debconf information
# /etc/fstab: static file system information.
#
# file system mount point   type  options   dump  pass
proc/proc   procdefaults0   0
/dev/sda2   /   ext3noatime,commit=60,errors=remount-ro 0   
1
/dev/sda1   /boot   ext3noatime 0   2
/dev/MASS1/usr  /usrxfs 
noatime,nobarrier,logbufs=8,logbsize=256k   0   2
/dev/MASS1/home /home   ext3noatime,commit=60   0   3
/dev/mapper/crypt-home /crypt   ext3noatime,commit=60   0   3
/dev/disk/by-uuid/c94d0b04-13b0-4e16-b84b-3b1212740d38 /home/jgoerzen/sdcard 
xfs noatime,nobarrier,logbsize=262144 0 3
#tmpfs  /tmptmpfs   size=100m,mode=017770   2
#tmpfs  /var/tmptmpfs   size=100m,mode=017770   2
#tmpfs  /var/runtmpfs   size=20m,mode=0755  0   2
#tmpfs  /var/lock   tmpfs   size=20m,mode=01777 0   2

/dev/disk/by-id/usb-Apple_iPod_000A270014EE772E-0:0-part2 /ipod vfat 
user,noauto 0 5

Log of fsck -C -R -A -a 
Wed Jan 20 16:32:06 2010

fsck from util-linux-ng 2.16.2
/dev/sda1: clean, 33/48192 files, 46414/192748 blocks
/sbin/fsck.xfs: XFS file system.
/dev/mapper/MASS1-home: clean, 20641/589824 files, 602844/2359296 blocks
/dev/mapper/crypt-home: clean, 8895/65536 files, 84185/261887 blocks
/sbin/fsck.xfs: XFS file system.
open: No such file or directory
dosfsck 3.0.7, 24 Dec 2009, FAT32, LFN
fsck died with exit status 6

Wed Jan 20 16:32:07 2010