[Ubuntu 12.04] partitions with ext2 are NEVER cleanly unmounted on shutdown/reboot

Bug #964990 reported by Christian Niemeyer
74
This bug affects 12 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Using Ubuntu 12.04 (64bit) with all updates. I use only one partition (/dev/sda4 mounted on /).

On *every* reboot or after shutdown and booting again, I get this error message:
/dev/sda4 not cleanly unmounted, check forced

My fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid' 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/sda4 during installation
UUID=7c347aca-031a-4f6b-9213-b136eed5429c / ext2 errors=remount-ro 0 1
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

uname -a: Linux kringels 3.2.0-20-generic #32-Ubuntu SMP Thu Mar 22 02:22:46 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I'm pretty sure, it is related that I use ext2 as filesystem. I haven't found anything else, so I guess this problem doesn't occur on ext3/ext4. I only found this one: https://answers.launchpad.net/ubuntu/+source/util-linux/+question/189716
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: kringel 1671 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
CurrentDmesg: [ 70.176017] eth0: no IPv6 routers present
DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120322)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
MachineType: MICRO-STAR INTERNATIONAL CO., LTD MS-7125
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-20-generic root=UUID=7c347aca-031a-4f6b-9213-b136eed5429c ro vt.handoff=7
ProcVersionSignature: Ubuntu 3.2.0-20.32-generic 3.2.12
RfKill:

Tags: precise
Uname: Linux 3.2.0-20-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dip lpadmin plugdev sambashare sudo video
dmi.bios.date: 07/21/2006
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: 6.00 PG
dmi.board.name: MS-7125
dmi.board.vendor: MICRO-STAR INTERNATIONAL CO., LTD
dmi.board.version: 3.0
dmi.chassis.type: 3
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvr6.00PG:bd07/21/2006:svnMICRO-STARINTERNATIONALCO.,LTD:pnMS-7125:pvr3.0:rvnMICRO-STARINTERNATIONALCO.,LTD:rnMS-7125:rvr3.0:cvn:ct3:cvr:
dmi.product.name: MS-7125
dmi.product.version: 3.0
dmi.sys.vendor: MICRO-STAR INTERNATIONAL CO., LTD
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: kringel 1671 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
CurrentDmesg: [ 70.176017] eth0: no IPv6 routers present
DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120322)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
MachineType: MICRO-STAR INTERNATIONAL CO., LTD MS-7125
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-20-generic root=UUID=7c347aca-031a-4f6b-9213-b136eed5429c ro vt.handoff=7
ProcVersionSignature: Ubuntu 3.2.0-20.32-generic 3.2.12
RfKill:

Tags: precise
Uname: Linux 3.2.0-20-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dip lpadmin plugdev sambashare sudo video
dmi.bios.date: 07/21/2006
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: 6.00 PG
dmi.board.name: MS-7125
dmi.board.vendor: MICRO-STAR INTERNATIONAL CO., LTD
dmi.board.version: 3.0
dmi.chassis.type: 3
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvr6.00PG:bd07/21/2006:svnMICRO-STARINTERNATIONALCO.,LTD:pnMS-7125:pvr3.0:rvnMICRO-STARINTERNATIONALCO.,LTD:rnMS-7125:rvr3.0:cvn:ct3:cvr:
dmi.product.name: MS-7125
dmi.product.version: 3.0
dmi.sys.vendor: MICRO-STAR INTERNATIONAL CO., LTD

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Does this issue also happen with prior releases of Ubuntu, or just in 12.04?

Changed in util-linux (Ubuntu):
importance: Undecided → Medium
affects: util-linux (Ubuntu) → linux (Ubuntu)
tags: added: precise
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 964990

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : AcpiTables.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : AlsaDevices.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : AplayDevices.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ArecordDevices.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : BootDmesg.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Card0.Amixer.info.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Card0.Codecs.codec97.0.ac97.0.0.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Card0.Codecs.codec97.0.ac97.0.0.regs.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Lspci.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Lsusb.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : PciMultimedia.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ProcEnviron.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ProcModules.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : PulseList.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : RelatedPackageVersions.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : UdevDb.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : UdevLog.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : WifiSyslog.txt

apport information

description: updated
Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : AcpiTables.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : AlsaDevices.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : AplayDevices.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ArecordDevices.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : BootDmesg.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Card0.Amixer.info.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Card0.Codecs.codec97.0.ac97.0.0.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Card0.Codecs.codec97.0.ac97.0.0.regs.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Lspci.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : Lsusb.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : PciMultimedia.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ProcEnviron.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : ProcModules.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : PulseList.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : RelatedPackageVersions.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : UdevDb.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : UdevLog.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote : WifiSyslog.txt

apport information

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :
Download full text (3.2 KiB)

WHOOPS! Sorry, I ran apport twice.

And yes, this happens only with 12.04. I use ext2 quite often with previous versions of Ubuntu. Never had this error before.

On shutdown it says something like "is busy". On booting after the fsck it says something like: "fsck [367] terminated with status 1" and then the boot process continues as it should.

I created the partition using Lucid Lynx with Gparted. Here's some more information from my 12.04 (precise) ext2 partition. I noticed that the Inode size is 128. However, this isn't the standard anymore (it's 256, I guess) this should cause no problems.
sudo dumpe2fs -h /dev/sda4
dumpe2fs 1.42 (29-Nov-2011)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 7c347aca-031a-4f6b-9213-b136eed5429c
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: ext_attr filetype sparse_super
Default mount options: (none)
Filesystem state: not clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 1720320
Block count: 3437910
Reserved block count: 171895
Free blocks: 1863043
Free inodes: 1517985
First block: 0
Block size: 4096
Fragment size: 4096
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Last mount time: n/a
Last write time: Tue Mar 27 08:03:34 2012
Mount count: 1
Maximum mount count: 30
Last checked: Tue Mar 27 07:57:49 2012
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128

----

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' 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/sda4 during installation
UUID=7c347aca-031a-4f6b-9213-b136eed5429c / ext2 errors=remount-ro 0 1
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

----

sudo fdisk -l

Disk /dev/sda: 400.1 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders, total 781422768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00010f0d

   Device Boot Start End Blocks Id System
/dev/sda1 * 63 5638814 2819376 83 Linux
/dev/sda2 33142782 745095167 355976193 5 Extended
/dev/sda3 745095168 781422591 18163712 83 Linux
/dev/sda4 5638815 33142094 13751640 83 Linux
/dev/sda5 40017920 745095167 352538624 83 Linux
/dev/sda6 33142784 40017919 3437568 83 Linux

Partition table entr...

Read more...

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :

...and status is set to "Confirmed" now.

PS: Information, I didn't mentioned so far: I have no swap partition, as I usually don't have.

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :

The boot process nearly *always* continues normally after the quite long time fscheck takes.

There is no "Reboot Linux" (like when ext2 partitions have serious errors), and I did not encountered further errors.
And no actual data loss at all, either.

And lost+found is empty:
sudo ls -la /lost+found/
total 52
drwxr-xr-x 2 root root 49152 Mar 23 07:09 .
drwxr-xr-x 24 root root 4096 Mar 23 21:52 ..

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.3 kernel[1] (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[1] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-precise/

tags: added: needs-upstream-testing
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :

Ok, just I tested it right now. It still does happen the same way. I rebooted twice to double-check. Still happens.

Running now on: uname -a
Linux kringels 3.3.0-030300-generic #201203182135 SMP Mon Mar 19 01:36:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
(from: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-precise/

Setting to 'Confirmed'. Maybe someone with love for ext2 can also check this?

tags: removed: needs-upstream-testing
tags: added: kernel-bug-exists-upstream
Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :

and done tagging.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

This issue appears to be an upstream bug, since you tested the latest upstream kernel. Would it be possible for you to open an upstream bug report at bugzilla.kernel.org [1]? That will allow the upstream Developers to examine the issue, and may provide a quicker resolution to the bug.

If you are comfortable with opening a bug upstream, It would be great if you can report back the upstream bug number in this bug report. That will allow us to link this bug to the upstream report.

[1] https://wiki.ubuntu.com/Bugs/Upstream/kernel

Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :

I'm not 100% sure though, that this is related to the kernel. But mabye init-scripts, upstart, shutdown scripts? Maybe this isn't even directly related to util-linux package itself.

Second problem is that we have no other confirmation of this bug so far. I personally wouldn't like to link this bug upstream without any other confirmation.

This bug is pretty big (though no noticeable data loss so far), because ext2 is still a major filesystem and Ubuntu 12.04 is going to be LTS. I really use ext2 a lot because of simplicity. Imho, if it doesn't get fixed in the upstream kernel, I would love to see Ubuntu developers patching this.

But I really don't understand that this major bug on a major filesystem is now set to 'Triaged' for the 3.2.* kernel. Sorry. And thanks though so far.

Revision history for this message
Christian Niemeyer (christian-niemeyer) wrote :

Having a little lack of time, I linked this bug report at forum.ubuntuusers.de and other places. I guess someone might take a look at it.

And I will test again with another installation on another system, this time with 12.04 (32bit), as soon as possible. Maybe something in the installation process went wrong, however the filesystem should be fine after all those (very long) checks.

Revision history for this message
Mohd Nur Asyrani (asyrani86) wrote :

Let me know, if this bug already fixed. Its happened too my Ubuntu 12.04(32bit) too

Revision history for this message
Daniel Lupulescu (lupulescud) wrote :

Ubuntu 12.04 LTS. Latest kernel update and the bug is stil present.

Revision history for this message
Michal Šigut (michalsigut) wrote :

I confirm the bug - after upgrade to Ubuntu 12.04 32bit - ext2 partition - same error message. Each reboot, hd is beeing checked. So it lasts very long time. Do you think it could be repaired soon or should I reinstall ubuntu and choose another fs?

Revision history for this message
Daniel Lupulescu (lupulescud) wrote :

Question is: The bug only manifest on non-jurnalised fs or the same behaviour is on all fs and because of journal are never seen in check at startup. I installed ubuntu on ex2 usb stick and I need a non journalised fs.

Revision history for this message
Michal Šigut (michalsigut) wrote :

I have converted ext2 to ext3 with tune2fs. And it's ok now. I checked converted hd after shutdown and it was without errors. So unmounting works correctly with ext3. The only difference between ext2 and ext3 is journal so I think journal is the cause. I suppose the problem is only in non-journalised ext2 fs and journalised filesystems work correctly (the bug isn't there either hidden).

Changed in linux (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Hans Streibel (hans-streibel) wrote : Re: [Bug 964990] Re: [Ubuntu 12.04] partitions with ext2 are NEVER cleanly unmounted on shutdown/reboot

On Tue, May 22, 2012 at 09:33:34AM -0000, Daniel Lupulescu wrote:
> ** Changed in: linux (Ubuntu)
> Status: Triaged => Fix Released

I just made a dist-upgrade but the problem persists!
fsck is still executed at every boot.

Revision history for this message
Dirk Kraft (dirk-kraft) wrote :

Still present for me in a fully updated 12.04.

Revision history for this message
Dirk Kraft (dirk-kraft) wrote :

This bug is obviously not fixed in 12.04. Could someone please reopen it (or tell us where/how it is fixed).

Revision history for this message
Daniel Lupulescu (lupulescud) wrote :

Install Ubuntu 12.04 on usb pendrive formatted ext2
On first system boot do a full system update
After reboot a normal fs check is performed
On next reboots you shoult not see the fs check
Ext2 filesystem is normally forced checked every 20 or 30 mounts
You can tune that behaviour using tune2fs

I hope this helps!

Revision history for this message
Jerre Domitilli (jerredomitilli) wrote :

16GB USB '/' formatted EXT2, NO SWAP, Pre-release Updates enabled, Issue persists.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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