boot fails if fsck fails on non-fhs filesystem

Bug #441144 reported by Alexey Maximov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mountall (Ubuntu)
Fix Released
Medium
Scott James Remnant (Canonical)
Karmic
Fix Released
Medium
Scott James Remnant (Canonical)

Bug Description

1. add one line to the /etc/fstab , for example:
/dev/sdh1 /mnt ext3 relatime,errors=remount-ro 0 2

2. set FSCKFIX=no /etc/default/rcS

3. reboot it

4. if /dev/sdh1 not exist in the system, the server will stop boot and ask me to enter root pass

5. enter root pass and watch a CRAP

ubuntu hardy (server) inside vmware container
this bug exists on any version of ubuntu but AFAIK doesn't exists in the Debian.

Please watch this video for this bug http://www.youtube.com/watch?v=F5yO33hajig

Alexey Maximov (amax)
summary: - ubuntu boot process will die if you put incorrect line to the /etc/fstab
- (initscripts)
+ ubuntu boot process will messy die if you put incorrect line to the
+ /etc/fstab (initscripts)
affects: ubuntu → upstart (Ubuntu)
affects: upstart (Ubuntu) → mountall (Ubuntu)
Changed in mountall (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
summary: - ubuntu boot process will messy die if you put incorrect line to the
- /etc/fstab (initscripts)
+ boot fails if fsck fails on non-fhs filesystem
Changed in mountall (Ubuntu):
milestone: none → ubuntu-9.10
assignee: nobody → Scott James Remnant (scott)
Changed in mountall (Ubuntu Karmic):
status: Triaged → In Progress
Changed in mountall (Ubuntu Karmic):
status: In Progress → Fix Committed
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

I've uploaded a new mountall package to the ubuntu-boot PPA:

https://launchpad.net/~ubuntu-boot/+archive/ppa

I would appreciate it if you could install this and try it out. *BEFORE* you reboot though, could you run "sudo mountall --debug > mountall.log 2>&1" and attach that to this bug - then after you reboot, let me know whether it worked or not.

Thanks

Revision history for this message
Alexey Maximov (amax) wrote :

thats impossible for Hardy LTS . there is no executable file named "mountall"
http://packages.ubuntu.com/search?searchon=contents&keywords=mountall&mode=exactfilename&suite=hardy&arch=any

Primary we need to get a fix for 8.04 LTS, not only for Karmic.

I will check Karmic status now...

Revision history for this message
Alexey Maximov (amax) wrote :

i have added wrong fstab line,now checking it.

root@ubuntu:~# mount -a
mount: special device /dev/sdh5 does not exist
root@ubuntu:~# grep sdh /etc/fstab
/dev/sdh5 /mnt ext4 errors=remount-ro 0 2
root@ubuntu:~#

root@ubuntu:~# uname -a
Linux ubuntu 2.6.31-11-server #38-Ubuntu SMP Fri Oct 2 12:00:04 UTC 2009 x86_64 GNU/Linux
root@ubuntu:~# wget https://launchpad.net/~ubuntu-boot/+archive/ppa/+files/mountall_0.2.0~boot3_amd64.deb
--2009-10-09 12:29:54-- https://launchpad.net/~ubuntu-boot/+archive/ppa/+files/mountall_0.2.0~boot3_amd64.deb
Resolving launchpad.net... 91.189.90.211
Connecting to launchpad.net|91.189.90.211|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://launchpadlibrarian.net/33302513/mountall_0.2.0%7Eboot3_amd64.deb [following]
--2009-10-09 12:30:05-- http://launchpadlibrarian.net/33302513/mountall_0.2.0%7Eboot3_amd64.deb
Resolving launchpadlibrarian.net... 91.189.90.235
Connecting to launchpadlibrarian.net|91.189.90.235|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65998 (64K) [application/x-debian-package]
Saving to: `mountall_0.2.0~boot3_amd64.deb'

100%[====================================================================================================================>] 65 998 242K/s in 0,3s

2009-10-09 12:30:15 (242 KB/s) - `mountall_0.2.0~boot3_amd64.deb' saved [65998/65998]

root@ubuntu:~# mountall --debug > mountall_before.log 2>&1
^C
root@ubuntu:~#

it hangs ??????

so installing new version and checking..

root@ubuntu:~# dpkg -i mountall_0.2.0~boot3_amd64.deb
(Чтение базы данных ... на данный момент установлено 26485 файлов и каталогов.)
Подготовка к замене пакета mountall 0.1.8 (используется файл mountall_0.2.0~boot3_amd64.deb) ...
Распаковывается замена для пакета mountall ...
Настраивается пакет mountall (0.2.0~boot3) ...
Обрабатываются триггеры для man-db ...
root@ubuntu:~# mountall --debug > mountall_after.log 2>&1
^C
root@ubuntu:~#

hangs again??? :-)
rebooting.

root@ubuntu:~# sync
root@ubuntu:~# reboot
root@ubuntu:~# Connection to 172.16.26.128 closed by remote host.
Connection to 172.16.26.128 closed.

its amazing, but now I am unable to boot even in the recovery mode, all hangs silently. =)

Revision history for this message
Alexey Maximov (amax) wrote :

lol, rebooting with init=/bin/bash recovery mode. commented fstab line.
did reboot, ctrl+D and got nice registers.

Revision history for this message
Alexey Maximov (amax) wrote :

nice registers if init=/bin/bash and mount / -o remount,rw
if you do reboot and ctrl+D

Revision history for this message
Alexey Maximov (amax) wrote :

so, i restored original mountall 1.7, its now booted successfully. so you have wrong mountall in the ppa.

attaching files.

Revision history for this message
Alexey Maximov (amax) wrote :
Revision history for this message
Alexey Maximov (amax) wrote :
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Sorry about the issues with the previous PPA versions, as usual things worked just fine when I tested it in the various rigs I have here - of course it flatly failed when installed on normal systems because I hadn't actually tested that ;)

I've uploaded a new ~boot4 version, this one feels much better (and I'm running it on my laptop now :p)

As before, after installing the package but *before* you reboot, please run with --debug and attach the log to the bug - then after rebooting, let me know how it works out.

Thanks for all your help with testing, this is a big change and it's good to know that it's now working for 95% of people and your help getting it work for the final 5% is greatly appreciated!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mountall - 0.2.0

---------------
mountall (0.2.0) karmic; urgency=low

  [ Colin Watson ]
  * Always check the root filesystem if --force-fsck is used, regardless of
    passno. LP: #435707.

  [ Johan Kiviniemi ]
  * Have each fsck instance create a lock for each underlying physical device.
    If you have a single disk or RAID, all filesystem checks will happen
    sequentially in order to avoid thrashing. On more complex configurations,
    you’ll benefit from the parallel checks mountall has been doing all along.
    LP: #434974.

  [ Scott James Remnant ]
  * Flush standard output and error before spawning processes to make
    capturing logs easier (otherwise we end up repeating things still in
    the buffer), and before calling exec().
  * Turn the code upside down so that each mount knows what it's waiting
    for, and allow multiple dependencies. This makes the code much more
    readable putting the "policy" in a single function, and will make it
    much easier in future when this is done by Upstart.
  * For kernel filesystems listed in fstab, honour the order that they
    are listed in fstab. LP: #432571, #433537, #436796
  * Always create new swap partition mounts for each fstab entry, don't
    treat them as updating the same. LP: #435027.
  * Virtual filesystems under local or remote filesystems (and local under
    remote) don't delay the virtual or local events. LP: #431040.
  * Simplify event emission, this has the advantage that we can now output
    what mount points we're waiting for and what they are waiting for as
    well.
  * Fixed issue with trailing slashes. LP: #443035.
  * Only run hooks if the filesystem was not already mounted. LP: #444252.
  * Don't clean up /tmp when run without --tmptime argument.
  * Ignore loop and ram devices until ready. LP: #441454.
  * Add options to binfmt_misc filesystem, which will probably cause it to
    be mounted on boot as well.
  * Synchronously mount local and virtual filesystems, I suspect this is
    the real cause behind the XFS races as one will modprobe and the other
    will not (and fail). LP: #432620.
  * Synchronously activate swap to avoid out of memory issues when checking
    the root filesystem.
  * Enumerate existing udev devices on startup, so we don't always have to
    see udev be coldplugged.
  * Don't break on general errors for non-essential filesystems.
    LP: #441144.
  * Don't repeat attempts to mount a filesystem without having first
    succeded to mount another.
  * Still restart mountall even if the recovery shell fails.
  * Don't queue filesystem check when device is "none", or missing, or the
    filesystem is marked nodev.
  * Generate a "mount" event before mounting a filesystem, and wait for its
    effects to complete.

 -- Scott James Remnant <email address hidden> Fri, 09 Oct 2009 16:50:46 +0100

Changed in mountall (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
Alexey Maximov (amax) wrote :

what about ubuntu 8.04 LTS ??? %(

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.