View Full Version : [ubuntu] 10.04 fsck at boot - partitions already mounted?
September 7th, 2011, 11:12 PM
I have a rather curious error I can't seem to figure out. I've installed Ubuntu 10.04 server with the following partitioning scheme:
/ = 17GB ext4
/opt = 45 GB ext4
/spare = 16GB ext4
swap = 2GB
The system boots and runs fine, however, after a couple reboots, the normal fsck craps out with messages like:
/dev/sda4 is mounted.
WARNING!! The filesystem is mounted. If you continue you will cause ***SEVERE*** filesystem damage.
Hitting ctrl-alt-del bypasses this and system boots fine. However the system needs to survive remote unnattended reboots.
How can it be possible that the partitions are mounted BEFORE fsck runs?
Any help you can provide would be most welcome.
September 8th, 2011, 05:01 PM
How are you running fsck?
September 8th, 2011, 06:28 PM
Just the standard default fsck that ubuntu runs at boot on all partitions.
We are doing nothing special.
We are several experienced Ubuntu admins here and are literally at a loss as to how a filesystem could already be mounted before fsck runs.
Thanks in advance for any assistance you can provide.
September 8th, 2011, 06:42 PM
Maybe ureadahead is causing this? I disabled that.
September 8th, 2011, 07:12 PM
That's a pretty good idea, it seems logical too that ureadahead would need to briefly mount a partition to check if it needs to load any boot files from it.
I did see "ureadahead-other terminated with status code 4" in the upstart messages.
I will try to disable it, and will report back.
Again, thanks so much for the reply!
September 8th, 2011, 07:40 PM
Entilza: disabling ureadahead actually made the problem worse. Now the problem occurs on every reboot instead of intermittently.
September 8th, 2011, 07:49 PM
Run fsck manually off a livecd and see what happens.
September 8th, 2011, 07:53 PM
It's ok it's happening each time now you can really fix it.
Can we see /etc/fstab
Also df -h please
September 8th, 2011, 08:20 PM
Also try actually removing ureadahead not just disabling it. You don't need it it.
apt-get purge ureadahead
September 8th, 2011, 08:42 PM
# /etc/fstab: static file system information.
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=fdde5005-eb22-4699-b11f-74167e6be5bd / ext4 errors=remount-ro 0 1
# /opt was on /dev/sda2 during installation
UUID=97cb7e24-9a41-4aa7-b1e4-a309af8c9e73 /opt ext4 defaults 0 2
# /spare was on /dev/sda4 during installation
UUID=ffa76f4b-4232-4e35-af9a-c2fd8211efc0 /spare ext4 defaults 0 2
# swap was on /dev/sda3 during installation
UUID=42c6ad27-d6a0-4a52-8e50-ea966f7f6621 none swap sw 0 0
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00051991
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2067 16600064 83 Linux
/dev/sda2 2067 7538 43944960 83 Linux
/dev/sda3 7538 7781 1952768 82 Linux swap / Solaris
/dev/sda4 7781 9730 15651840 83 Linux
All pretty standard stuff.
After purging ureadahead, it still hangs on every boot, same error as originally reported: fdisk bails because partition is mounted already.
I'll try fsck from a LiveCD next, although I'm not expecting much because the fs is not corrupted... It's just being prematurely mounted by someone before fsck runs.
September 8th, 2011, 09:05 PM
I think I figured it out guys... thanks for all your help, seriously.
It turns out there was an application that was installing a udev auto-mount rule which was mounting the USB peripherals as /dev/sda2 before anything else ran.
September 8th, 2011, 09:08 PM
Is it only /dev/sda4 that comes with this message? That would mean your operating system is fine because your OS looks to be on /dev/sda1
So what's on /spare perhaps that can give you a clue as to what is trying to mount it.
I'd also check /var/log/syslog
/var/log/boot.log (will be just what was in boot)
maybe verify the UUID in /etc/fstab by using blkid ?
September 8th, 2011, 09:09 PM
Ok hope you got it, good luck :) atleast the ureadahead errors won't show anymore though so if you want you can leave ureadahead off.
September 8th, 2011, 09:20 PM
Once again thank you Entilza. As soon as I did df -h I saw duplicate entries for /dev/sda2 and /dev/sda4 and the rest was solved in a minute.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.