ecryptfs mount does not support -f (fake mount)

Bug #443080 reported by stop
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
eCryptfs
Triaged
Wishlist
Unassigned
ecryptfs-utils (Ubuntu)
Triaged
Wishlist
Unassigned
Karmic
Won't Fix
Wishlist
Unassigned
mountall (Ubuntu)
Fix Released
Medium
Scott James Remnant (Canonical)
Karmic
Fix Released
Medium
Scott James Remnant (Canonical)

Bug Description

Binary package hint: e2fsprogs

When a check is forced the fsck process seems to hang. This was what was displayed on screen:

fsck from util-linux-ng 2.16
/dev/sda5 has been mounted 34 times without being checked, check forced
/dev/sda5: 176................. files (2.3% non-contiguous, 48128710/59556......

I left it running four about half an hour but nothing changed and there was no disk activity the entire time. After a hard reset both sda5 and md0 cleanly mounted.
This leds me to believe that the boot process will hang on every fsck (as this happened twice allready, and it hasn't gone successfully yet) and that an actual check of the filesystem therefore never happens...

Note that sda5 is a normal ext3 filesystem. I also have /dev/md0, but this wasn't checked when it hanged.

ProblemType: Bug
Architecture: amd64
Date: Mon Oct 5 14:52:19 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: vmnet vmci vmmon nvidia
Package: e2fsprogs 1.41.9-1ubuntu1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
SourcePackage: e2fsprogs
Uname: Linux 2.6.31-11-generic x86_64

Revision history for this message
stop (whoopwhoop) wrote :
Revision history for this message
Theodore Ts'o (tytso) wrote :

Are you sure this isn't a hardware problem? Have you tried something like: "dd if=/dev/sda5 of=/dev/null bs=32k" and see whether it completes or not?

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

Very unlikely to be fsck hanging, could you attach your /etc/fstab

affects: e2fsprogs (Ubuntu) → mountall (Ubuntu)
Changed in mountall (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
stop (whoopwhoop) wrote :
Revision history for this message
stop (whoopwhoop) wrote :

Theodore, "where" do you want me to run this command?:
* recovery concole
* karmic live (cd/usb) in a terminal
* from the desktop in a terminal
* doesn't matter
As I am under the impression that this doesn't really matter but I just want to make sure...

Revision history for this message
Theodore Ts'o (tytso) wrote :

Yeah, it shouldn't where you run the command, as long as it's a root shell. (or prefix it with "sudo" if you don't have a root shell).

If the dd command also hangs, it would be good to check out /var/log/syslog or the output of the "dmesg" command to see if there are any useful messages printed by disk's device driver.

Revision history for this message
stop (whoopwhoop) wrote :

The dd command went successfully:

root@Machine:~# dd if=/dev/sda5 of=/dev/null bs=32k
7444620+1 records in
7444620+1 records out
243945321984 bytes (244 GB) copied, 2899.34 s, 84.1 MB/s

So there's no problem there...

Changed in mountall (Ubuntu):
status: Incomplete → New
Revision history for this message
Ernst (ernst-blaauw) wrote :

Maybe this bug is related to my bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/443059
I have an ext4 system and ext4 home partition. If the boot fails, it shows that my system partition was clean and after that it stops (no message about a check for my home partition).

Revision history for this message
stop (whoopwhoop) wrote :

Ernst, every time my machine boots it shows that the partitions are "clean" (at the beginning). The only time it hangs is when a check is forced. So what you are saying is that fsck might have finished and something after that made it stop booting further?

Revision history for this message
Ernst (ernst-blaauw) wrote :

Well, I got the problem directly after an update of the 2.6.31-11 kernel (it was already installed). I don;t know if this is related. As I have two partitions (system and home), I expect two messages of fsck. However, it only showed clean for system and then it did nothing - no message about my home partition, and no possibility of booting. Every time I booted with 2.6.31-11, the boot stopped after one message of fsck. I succeeded in booting with the 2.6.31 kernel (I got that from the mainline kernel ppa. 2.6.31-10 is based on 2.6.31, 2.6.31-11 is based on 2.6.31.1), and after that I was able to boot again with the 2.6.31-11 kernel (which showed now two times clean).

I don't know if the fsck check was the problem, and if that was the case, I don't know if there was a forced check planned; when I succeeded in booting with the other kernel, I had to check both hard disks because of another bug on the LiveCD which sets the super block time wrongly. fsck detects this and forces a check because of this error, so I don't now if a check was scheduled before.

However, it is really possible that it is related: I only booted once with the other kernel and did not install any updates. The only thing that changed was that I had one successful boot in which I had to (manually) check both partitions.

Revision history for this message
stop (whoopwhoop) wrote :

Well the current kernel runs fine on my end so I doubt it is related. The reason why I think that it is fsck related is that I have / on sda5 and home on md0. When the system boots fine it will get (at the beginning) an fsck message about sda5 (clean) followed by a fsck message about md0 (clean). When the system hangs at boot it is always a forced check on sda5 (non-contiguous) and nothing at all about md0 (like it didn't get there yet). Then the system hangs...

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 443080] Re: fsck hangs during forced check at boot

On Mon, 2009-10-05 at 22:02 +0000, whoop wrote:

> Well the current kernel runs fine on my end so I doubt it is related.
> The reason why I think that it is fsck related is that I have / on sda5
> and home on md0. When the system boots fine it will get (at the
> beginning) an fsck message about sda5 (clean) followed by a fsck message
> about md0 (clean). When the system hangs at boot it is always a forced
> check on sda5 (non-contiguous) and nothing at all about md0 (like it
> didn't get there yet). Then the system hangs...
>
It's not hanging.

It's checking your disks.

Scott
--
Scott James Remnant
<email address hidden>

summary: - fsck hangs during forced check at boot
+ missing progress information for fsck
Changed in mountall (Ubuntu):
status: New → In Progress
importance: Medium → High
milestone: none → ubuntu-9.10
Revision history for this message
stop (whoopwhoop) wrote : Re: missing progress information for fsck

Scott James, I doubt that as there was no disk activity for over half an hour... I didn't hear anything (no hd crunching) and the hd light on my machine never blinked...

Revision history for this message
Ernst (ernst-blaauw) wrote :

Here too: the hd led was not blinking and no hd sound.

Some more info: the succesful boot process shows: (I did not write it down, so it is not rpecise)
fsck 2.16
fsck 2.16
/dev/sda5: clean
/dev/sda7:clean

The unsuccesful boot process shows:
fsck 2.16
/dev/sda5: clean

So there is only one fsck job it seems.

Revision history for this message
stop (whoopwhoop) wrote :

Ok, I just confirmed once again that it is not just missing progress information.
I left it running for over two hours once a check was being done. Nothing happened no disk activity no blinking hd lights. It's just dead with a blinking cursor sitting at fsck for sda5 ..... When I reset it reports clean but I get an entry with "INVALID HEADER" twice...

As Ernst's last comment describes the exact same issue I am experiencing I tend to assume it has nothing to do with "not enough feedback by the application".
I am not saying fsck is hanging (I don't know that), I am saying the system is hanging when a check is being done at boot and it doesn't look like a check is being done at all (as a fsck on my machine takes a while and there has always been noticeable disk activity during that process).

summary: - missing progress information for fsck
+ boot hangs during forced fsck
Changed in mountall (Ubuntu Karmic):
status: In Progress → New
status: New → Confirmed
Revision history for this message
stop (whoopwhoop) wrote : Re: boot hangs during forced fsck

forced check goes fine for my /dev/md0 home partition (hd activity and blinking hd light, more importantly it resumes), but still hangs for my /dev/sda5 / partition.

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

Changed in mountall (Ubuntu Karmic):
status: Confirmed → Triaged
status: Triaged → Incomplete
Revision history for this message
Ernst (ernst-blaauw) wrote :

Here you'll have my log file. Remember, at the moment my system boots fine and it's possible I have a totally different problem. But here you go. (I anonymized some things in the log file)

Revision history for this message
Ernst (ernst-blaauw) wrote :

I just restarted, and it failed. See the attachment. It says:

mountall: mount /mnt/Documenten [xxxx] terminated with status 21
mountall: Filesystem could not be mounted: /mnt/Documenten
fuse: failed to create temporary directory.

This goes on and on, and the number (xxxx) is increased every time. The only solution is ctrl-alt-del, which shows a prompt in which I could start fsck, but then it restarts.

Revision history for this message
Ernst (ernst-blaauw) wrote :
Revision history for this message
stop (whoopwhoop) wrote :

Maybe this is a stupid comment but the "sudo mountall --debug > mountall.log 2>&1" doesn't return. Or is that supposed to be the case?

Ernst my machine is working fine also... It only hangs when fsck is forced on my / (/dev/sda5 ext3). If I reset the machine after that it boots just fine. So the only problem is that it hangs every 30 boots or so and /dev/sda5 never actually gets checked.

As I get the impression that the mountall ppa hosed Ernst's machine, I am a little bit hesitant to install..... Maybe if he finds a way to fix it I can be tempted again :p

Revision history for this message
stop (whoopwhoop) wrote :

Not sure if this log is useful at all because it never returned/finished. But maybe that's supposed to happen...

Changed in mountall (Ubuntu Karmic):
status: Incomplete → New
Revision history for this message
Ernst (ernst-blaauw) wrote : Re: [Bug 443080] Re: boot hangs during forced fsck

Well, I restored my machine by booting with an USB stick and then chrooting
into the affected install. There, I could easily downgrade the package.
However, that's not an 'easy' way: you have to know how to chroot, you have
to have a LiveUSB or -CD, etc.

On Thu, Oct 8, 2009 at 15:51, whoop <email address hidden> wrote:

> Not sure if this log is useful at all because it never
> returned/finished. But maybe that's supposed to happen...
>
> ** Attachment added: "sudo mountall --debug > mountall.log 2>&1"
> http://launchpadlibrarian.net/33298349/mountall.log
>
> ** Changed in: mountall (Ubuntu Karmic)
> Status: Incomplete => New
>
> --
> boot hangs during forced fsck
> https://bugs.launchpad.net/bugs/443080
> You received this bug notification because you are a direct subscriber
> of the bug.
>

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

On Thu, 2009-10-08 at 13:51 +0000, whoop wrote:

> Not sure if this log is useful at all because it never
> returned/finished. But maybe that's supposed to happen...
>
> ** Attachment added: "sudo mountall --debug > mountall.log 2>&1"
> http://launchpadlibrarian.net/33298349/mountall.log
>
It's certainly supposed to return, unfortunately this log is truncated.

If you don't pipe to a file, what's the last thing you see - perhaps you
could copy and paste?

 status incomplete

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
stop (whoopwhoop) wrote : Re: boot hangs during forced fsck

Ah, I understand why it doesn't return. It gets stuck at my Private folder (needs a pass phrase). Considering my Private folder is part of my /home which is on /dev/md0, which doesn't hang during forced fcsk (only /dev/sda5 hangs). The attached file should contain all information information you need about /dev/sda5 ?

Revision history for this message
Rajeev (rajeeja) wrote :

So here is the party ! -

I get an error message :
"fsck from util-linux-ng 2.16
/dev/sda6 has been mounted 27 times
without being checked. check forced"

Ernst can you please elaborate on this post and give steps on how to restore the system using a Jaunty CD.
Well, I restored my machine by booting with an USB stick and then chrooting
into the affected install. There, I could easily downgrade the package.
However, that's not an 'easy' way: you have to know how to chroot, you have
to have a LiveUSB or -CD, etc.

It would be great if someone could provide detailed steps for restoration of the system.

Revision history for this message
Ernst (ernst-blaauw) wrote : Re: [Bug 443080] Re: boot hangs during forced fsck

Boot with the liveCD/USB and do:

sudo -s -H
mkdir /media/ubuntu
# system partition:
mount /dev/sda5 /media/ubuntu
#/home partition:
mount /dev/sda7 /media/ubuntu/home
mount --bind /dev/ /media/ubuntu/dev
mount --bind /dev/pts /media/ubuntu/dev/pts
mount --bind /dev/shm /media/ubuntu/dev/shm
chroot /media/ubuntu
mount -t sysfs sysfs /sys
mount -t proc proc /proc
dhclient

Now, you are in your problematic install.
You can use "sudo aptitude remove ....." to remove a certain package, "sudo
nano /etc/apt/sources.list" to remove repositories who provide faulty
packages (or sudo gedit /ubuntu/etc/apt/sources.list on the host, which is
more convenient for most people), "sudo aptitude install <package>/karmic to
downgrade a package to karmic.

On Fri, Oct 9, 2009 at 05:22, Rajeev <email address hidden> wrote:

> So here is the party ! -
>
> I get an error message :
> "fsck from util-linux-ng 2.16
> /dev/sda6 has been mounted 27 times
> without being checked. check forced"
>
> Ernst can you please elaborate on this post and give steps on how to
> restore the system using a Jaunty CD.
> Well, I restored my machine by booting with an USB stick and then chrooting
> into the affected install. There, I could easily downgrade the package.
> However, that's not an 'easy' way: you have to know how to chroot, you have
> to have a LiveUSB or -CD, etc.
>
> It would be great if someone could provide detailed steps for
> restoration of the system.
>
> --
> boot hangs during forced fsck
> https://bugs.launchpad.net/bugs/443080
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: boot hangs during forced fsck

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!

Changed in mountall (Ubuntu Karmic):
status: New → Incomplete
Revision history for this message
Ernst (ernst-blaauw) wrote : Re: [Bug 443080] Re: boot hangs during forced fsck
  • mountall.log Edit (12.7 KiB, text/x-log; charset=US-ASCII; name="mountall.log")

Here's the log.

On Fri, Oct 9, 2009 at 13:01, Scott James Remnant <email address hidden>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!
>
> ** Changed in: mountall (Ubuntu Karmic)
> Status: New => Incomplete
>
> --
> boot hangs during forced fsck
> https://bugs.launchpad.net/bugs/443080
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Ernst (ernst-blaauw) wrote :

And it booted succesfully!
I did saw that the order was different. Before, I had:
fsck 2.16
fsck2.16
/dev/sda5 clean
/dev/sda7 clean

Now, it was
fsck 2.16
/dev/sda5 clean
<another message from another process>
fsck 2.16
/dev/sda7 clean

On Fri, Oct 9, 2009 at 13:20, Ernst Blaauw <email address hidden> wrote:

> Here's the log.
>
>
> On Fri, Oct 9, 2009 at 13:01, Scott James Remnant <email address hidden>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!
>>
>> ** Changed in: mountall (Ubuntu Karmic)
>> Status: New => Incomplete
>>
>> --
>> boot hangs during forced fsck
>> https://bugs.launchpad.net/bugs/443080
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>>
>
>

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

On Fri, 2009-10-09 at 11:26 +0000, Ernst wrote:

> And it booted succesfully!
> I did saw that the order was different. Before, I had:
> fsck 2.16
> fsck2.16
> /dev/sda5 clean
> /dev/sda7 clean
>
> Now, it was
> fsck 2.16
> /dev/sda5 clean
> <another message from another process>
> fsck 2.16
> /dev/sda7 clean
>
Right, your sda5 and sda7 are on the same physical disk - so they're now
checked in series so we don't thrash them to death.

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Rajeev (rajeeja) wrote : Re: boot hangs during forced fsck

and another success story !
I was able to get Karmic up and running, hope keeps on an on an on

Thanks for all the help.

Revision history for this message
stop (whoopwhoop) wrote :

Well mountall got updated here to 0.2.0 (from regular repo's not using ppa's here). I didn't get any boot failures yet. I'll keep you's informed...

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

Fixed, per original reporter's comments

Changed in mountall (Ubuntu Karmic):
status: Incomplete → Fix Released
Revision history for this message
stop (whoopwhoop) wrote :

Well I'm sorry to report mountall 0.2.0 didn't fix the problem. I just had another show stopper at boot. Same problems... It just sits there with no disk-activity...

Changed in mountall (Ubuntu Karmic):
status: Fix Released → New
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Please attach the --debug log from a session when you get the hang with no activity

Changed in mountall (Ubuntu Karmic):
status: New → Incomplete
Revision history for this message
stop (whoopwhoop) wrote :

What debug log? You mean mountall --debug or /var/log/debug?
If I need to get something specific during that session, how do I do that if my system hangs?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 443080] Re: boot hangs during forced fsck

On Mon, 2009-10-12 at 14:03 +0000, whoop wrote:

> What debug log? You mean mountall --debug or /var/log/debug?
> If I need to get something specific during that session, how do I do that if my system hangs?
>
mountall --debug

Easiest way is to probably edit /etc/init/mountall.conf and add

 --debug >/dev/mountall.log 2>&1

to the mountall invocation itself.

To get an emergency shell, try adding the following file
as /etc/init/debug.conf:

  start on startup and tty-device-added KERNEL=tty2
  exec openvt -c 2 -w sulogin

Alt+F2 should have a shell from which you can backup the mountall.log
after a couple of minutes of hang, so you can send it. (If the root
isn't writable, try mount -o rw,remount / but be sure to remount
readonly again (ro,remount) before rebooting)

Obviously you should boot without "splash" on the kernel command-line.

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
stop (whoopwhoop) wrote : Re: boot hangs during forced fsck

Won't doing that just ensure that it gets stuck every time? I think this because running sudo mountall --debug never returns for me because it gets stuck at my Private folder and asks for pass phrases, keys and the likes... I know the pass phrase but I don't remember all the key and sypher settings (I just went for defaults, as I remember).

Also, what do you mean with "to the mountall invocation itself." Do you mean modify like this:
script
    . /etc/default/rcS
    [ -f /forcefsck ] && force_fsck="--force-fsck"
    [ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix"
    [ -n "$TMPTIME" ] && tmptime="--tmptime=$TMPTIME"
    exec mountall --daemon $force_fsck $fsck_fix $tmptime --debug >/dev/mountall.log 2>&1
end script

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 443080] Re: boot hangs during forced fsck

On Mon, 2009-10-12 at 14:51 +0000, whoop wrote:

> Won't doing that just ensure that it gets stuck every time? I think this
> because running sudo mountall --debug never returns for me because it
> gets stuck at my Private folder and asks for pass phrases, keys and the
> likes... I know the pass phrase but I don't remember all the key and
> sypher settings (I just went for defaults, as I remember).
>
That's not mountall then, that's cryptsetup!

Scott
--
Scott James Remnant
<email address hidden>

affects: mountall (Ubuntu Karmic) → cryptsetup (Ubuntu Karmic)
Revision history for this message
Hamish Downer (mishd) wrote : Re: boot hangs during forced fsck

The Private folder suggests it might be ecryptfs-utils - using the encrypted home folders as developed by Dustin Kirkland. These should not be set up until log in.

whoop: what type of encryption are you using?

Revision history for this message
stop (whoopwhoop) wrote :

Hamish, I don't know which encryption I am using. I think I followed these steps:
https://help.ubuntu.com/community/EncryptedPrivateDirectory
How do I find out which encryption I am using?
Also, my private folder is the only thing with encryption, it is on my /home which is on /dev/md0. How come I get troubles with this on /dev/sda5 then....
When I booted from a livecd and ran gparted it complained about some encryption stuff for /dev/sda5 (see attached screenshot), The passphrase I use for my private folder doesn't work for that (or any other passphrase I could think of).... So I don't get it.

Changed in cryptsetup (Ubuntu Karmic):
status: Incomplete → New
Revision history for this message
Hamish Downer (mishd) wrote :

The link you give is for the ecryptfs-utils type of encryption. Mountall shouldn't be trying to mount it.

Could you put here the contents of:

/etc/crypttab (if present)
/etc/fstab
/etc/mtab

Also could you run

$ aptitude search cryptsetup

and give the output (the letter at the start will show whether you have cryptsetup installed).

finally, could you run, at the command line:

$ sudo mountall --debug > mountall.log 2>&1

If it doesn't stop, hit Ctrl-C after a second or two, and then attach that to this bug aswell.

Revision history for this message
Hamish Downer (mishd) wrote :

It appears mountall is trying to mount a private directory that is managed by ecryptfs-utils. The password is the users login password, so it should not be mounted at boot, but only when the user logs in.

So this is a bug in mountall trying to mount something it shouldn't.

See the bottom line of http://launchpadlibrarian.net/33308567/mount (attached from comment #25 by whoop).

whoop: just noticed half the things I asked for were already attached, but could you still attach /etc/mtab - and maybe also do the sudo mountall --debug thing again to make sure we have the log with the latest version of mountall.

affects: cryptsetup (Ubuntu Karmic) → mountall (Ubuntu Karmic)
Revision history for this message
stop (whoopwhoop) wrote :

Did you see my Gparted screenshot attachment (http://launchpadlibrarian.net/33558071/gparted.png)? It still doesn't make sense to me. Why is it asking for a password (b.t.w. users login doesn't work for that) for /dev/sda5 when the Private directory stuff is on /dev/md0?

Also there is also an mtab in /var/lib/DeviceKit-disks/mtab, is that something to be concerned about?

Revision history for this message
stop (whoopwhoop) wrote :
Revision history for this message
stop (whoopwhoop) wrote :

There is no /etc/crypttab

aptitude search cryptsetup
p cryptsetup - configures encrypted block devices

/var/lib/DeviceKit-disks/mtab is an empty file

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

There's an ecryptfs bug here - it's mount tool should be aware of the -f "fake" option

affects: mountall (Ubuntu Karmic) → ecryptfs-utils (Ubuntu Karmic)
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

(mountall isn't trying to mount it, it's trying to make sure there's an /etc/mtab entry for it)

Revision history for this message
Hamish Downer (mishd) wrote :

OK - I've updated the title and subscribed Dustin Kirkland (who looks after ecryptfs). I guess the status should be triaged, but I don't seem to have permission to change that.

I'm also bewildered as to why you are being asked for a password for /dev/sda5 - have you tried just closing that window with the window close button (ie NOT the cancel button)? Have you tried a blank password? (/me grasping at straws now).

summary: - boot hangs during forced fsck
+ ecryptfs mount does not support -f (fake mount)
Revision history for this message
stop (whoopwhoop) wrote :

I tried it all, user login password, the password for my private folder, an empty password, cancel and the window close button....

Is the Action value: org.freedesktop.devicekit.disks.filesystem-mount-system-internal in the screenshot(http://launchpadlibrarian.net/33558071/gparted.png) of any use to determine the cause?

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Where is the specification of -f|--fakemount that ecryptfs is supposed to support?

:-Dustin

Changed in ecryptfs-utils (Ubuntu Karmic):
status: New → Incomplete
Revision history for this message
Eli González (eli.gonzalez) wrote :

I also have the same problem and I still looking to fix this bug.

fsck from util-Linux-ng 2.16
/dev/sda7 has mounted 37 times without being checked, check forced

Revision history for this message
Hamish Downer (mishd) wrote :

Dustin, not sure exactly, though comments #48 and #49 might be of some use. At any rate, mountall appears to expect that you won't ask for a password. But I'm no expert, just reading between the lines, so ...

I've resubscribed Scott James Remnant, who is responsible for mountall, and hope that he can point us to an expected behaviour - I suspect Dustin and Scott having a short chat via whatever means would be the quickest way to sort this out.

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

Dustin: in the mount manpage:

       -f Causes everything to be done except for the actual system call;
              if it's not obvious, this ``fakes'' mounting the file system.
              This option is useful in conjunction with the -v flag to deter‐
              mine what the mount command is trying to do. It can also be used
              to add entries for devices that were mounted earlier with the -n
              option. The -f option checks for existing record in /etc/mtab
              and fails when the record already exists (with regular non-fake
              mount, this check is done by kernel).

It's one of the standard options that util-linux-ng will always pass to its helper. Others include -s, -n, -v and -o

If this is hard to add to ecryptfs, I can ensure mount never calls mount.ecryptfs

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

Have worked around this in mountall

Changed in mountall (Ubuntu Karmic):
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Scott James Remnant (scott)
milestone: none → ubuntu-9.10
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Since Scott has worked around this, I won't try to fix this for Karmic.

However, I'll handle it in the upstream source and merge that into Lucid.

Dropping the milestone, leaving assigned to me.

:-Dustin

Changed in ecryptfs-utils (Ubuntu Karmic):
milestone: ubuntu-9.10 → none
importance: High → Wishlist
status: Incomplete → Triaged
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Steve Langasek (vorlon) wrote :

Please close out (--> "wontfix") karmic targets for bugs that are being deferred to lucid, don't just remove the milestone.

Changed in ecryptfs-utils (Ubuntu Karmic):
status: Triaged → Won't Fix
Revision history for this message
Rajeev (rajeeja) wrote :

My system was restored and I was running Karmic for a week. Now, the same problem arises. I again tried to follow your steps (below). Can you please tell me what should be removed or what causes the problem that should be removed when I'm in the problematic install (mount from disk - Solution mentioned by Ernst)

I don't think there are packages that provide faulty repos. Also, 'sudo gedit /ubuntu/ etc/apt/ sources. list' command opens a blank file.

------------------------------------------------
Boot with the liveCD/USB and do:

sudo -s -H
mkdir /media/ubuntu
# system partition:
mount /dev/sda5 /media/ubuntu
#/home partition:
mount /dev/sda7 /media/ubuntu/home
mount --bind /dev/ /media/ubuntu/dev
mount --bind /dev/pts /media/ ubuntu/ dev/pts
mount --bind /dev/shm /media/ ubuntu/ dev/shm
chroot /media/ubuntu
mount -t sysfs sysfs /sys
mount -t proc proc /proc
dhclient

Now, you are in your problematic install.
You can use "sudo aptitude remove ....." to remove a certain package, "sudo
nano /etc/apt/ sources. list" to remove repositories who provide faulty
packages (or sudo gedit /ubuntu/ etc/apt/ sources. list on the host, which is
more convenient for most people), "sudo aptitude install <package>/karmic to
downgrade a package to karmic.

Revision history for this message
Ernst (ernst-blaauw) wrote : Re: [Bug 443080] Re: ecryptfs mount does not support -f (fake mount)

Well, my solution is applicable if you enabled the boot ppa. Those apckages
are sometimes quite experimental. In that case, you can downgrade the boot
ppa packages to the 'stable' ones from the standard karmic repo.

If that's the case, you first have to disable the boot ppa. You can edit
this by typing
- 'sudo nano /etc/apt/sources.list' inside the chrooted system
- 'sudo gedit /media/ubuntu/etc/apt/sources.list' on the host system (I see
I forgot /media in my example)

It is also possible that the boot ppa repo is enabled by placing a file
inside /etc/apt/sources.list.d/. You have to look through the files in that
directory to see if one contains a link to the boot ppa.

After that, you can downgrade:
sudo aptitude install mountall/karmic

Of course, this procedure expects that the mountall from karmic is working.

On Sat, Oct 17, 2009 at 04:51, Rajeev <email address hidden> wrote:

> My system was restored and I was running Karmic for a week. Now, the
> same problem arises. I again tried to follow your steps (below). Can you
> please tell me what should be removed or what causes the problem that
> should be removed when I'm in the problematic install (mount from disk -
> Solution mentioned by Ernst)
>
> I don't think there are packages that provide faulty repos. Also, 'sudo
> gedit /ubuntu/ etc/apt/ sources. list' command opens a blank file.
>
> ------------------------------------------------
> Boot with the liveCD/USB and do:
>
> sudo -s -H
> mkdir /media/ubuntu
> # system partition:
> mount /dev/sda5 /media/ubuntu
> #/home partition:
> mount /dev/sda7 /media/ubuntu/home
> mount --bind /dev/ /media/ubuntu/dev
> mount --bind /dev/pts /media/ ubuntu/ dev/pts
> mount --bind /dev/shm /media/ ubuntu/ dev/shm
> chroot /media/ubuntu
> mount -t sysfs sysfs /sys
> mount -t proc proc /proc
> dhclient
>
> Now, you are in your problematic install.
> You can use "sudo aptitude remove ....." to remove a certain package, "sudo
> nano /etc/apt/ sources. list" to remove repositories who provide faulty
> packages (or sudo gedit /ubuntu/ etc/apt/ sources. list on the host, which
> is
> more convenient for most people), "sudo aptitude install <package>/karmic
> to
> downgrade a package to karmic.
>
> --
> ecryptfs mount does not support -f (fake mount)
> https://bugs.launchpad.net/bugs/443080
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Rajeev (rajeeja) wrote :
Download full text (3.6 KiB)

Checked source.list.d files and source.list file that you specified. I dont think I have http://ppa... or anything link with word boot enabled. But, still your solution worked once and then, I tried to boot in safe mode and repaired the packages. Again, I'm at the same point. unable to boot :(

Next, I chrooted and did 'sudo apt-get update' - thinking that this might fix (i think it created a mess)

and tried to follow the step
"After that, you can downgrade:
sudo aptitude install mountall/karmic"

The o/p is below:
root@ubuntu:/# aptitude install mountall/karmic

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following partially installed packages will be configured:
  rsyslog ubuntu-minimal virtualbox-ose-source
0 packages upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Setting up rsyslog (4.2.0-2ubuntu5) ...
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: initscript rsyslog, action "restart" failed.
dpkg: error processing rsyslog (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of ubuntu-minimal:
 ubuntu-minimal depends on rsyslog; however:
  Package rsyslog is not configured yet.
dpkg: error processing ubuntu-minimal (--configure):
 dependency problems - leaving unconfigured
Setting up virtualbox-ose-source (3.0.8-dfsg-1ubuntu1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Adding modules to DKMS build system
Doing initial module builds

Error! Your kernel source for kernel 2.6.27-7-generic cannot be found at
/lib/modules/2.6.27-7-generic/build or /lib/modules/2.6.27-7-generic/source.
dpkg: error processing virtualbox-ose-source (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 rsyslog
 ubuntu-minimal
 virtualbox-ose-source
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up virtualbox-ose-source (3.0.8-dfsg-1ubuntu1) ...
Adding modules to DKMS build system
Doing initial module builds

Error! Your kernel source for kernel 2.6.27-7-generic cannot be found at
/lib/modules/2.6.27-7-generic/build or /lib/modules/2.6.27-7-generic/source.
dpkg: error processing virtualbox-ose-source (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up rsyslog (4.2.0-2ubuntu5) ...
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: initscript rsyslog, action "restart" failed.
dpkg: error processing rsyslog (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent confi...

Read more...

Revision history for this message
Rajeev (rajeeja) wrote :

oops actually i did sudo apt-get upgrade ! instead of sudo apt-get update
that i mentioned in the last post.

this took a while, since it was upgrading all kind of packages.

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

I've uploaded a new version of mountall (0.2.5) to the ubuntu-boot PPA, as usual I would appreciate a little testing before I upload it to the archive proper.

Thanks

Revision history for this message
Rajeev (rajeeja) wrote :

wow. for some mysterious reason when i tried to boot my trouble system....it went through. Can someone throw some light on this?

Also, I'm a little afraid of getting updates and installing new packages now :)

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

This bug was fixed in the package mountall - 0.2.5

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

  * Filesystem check progress reporting, including cancellation. LP: 446596.
  * When we're waiting for a mountpoint, if a few seconds of inactivity
    passes, report what we're waiting for and allow Escape to drop you to
    a recovery shell.
  * Start usplash for filesystem check progress reporting or when we've
    been waiting for more than a few seconds. LP: #431184.

  * Hide error removing /forcefsck, people mis-report this as a bug and
    don't tell us the error above it.
  * Don't call mount.ecryptfs or mount.aufs when adding an entry for
    /etc/mtab; these helpers are broken and do not support the -f argument.
    This means your passphrase may end up in /etc/mtab, blame them not me.
    LP: #431954, #443080.
  * Unlink /etc/mtab~ after creating/truncating /etc/mtab and before writing
    mtab entries. LP: #431865.
  * Stop the recovery shell if the user runs shutdown within it, so we
    don't run mountall again. LP: #452196.
  * If the root filesystem check fails, we'll need to reboot, so just have
    the recovery shell script do that.

  * Post-review logic fixes.

 -- Scott James Remnant <email address hidden> Tue, 20 Oct 2009 12:19:16 +0100

Changed in mountall (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
Rajeev (rajeeja) wrote :

not sure if it helps, but a little trial error indicated:

Case 1: Turn on my laptop without the power cord connected.

No fsck error.

Case 2: Turn on the laptop with power cord connected.

fsck from util-linux-ng 2.16
/dev/sda5 has been mounted 34 times without being checked, check forced

A little more info:

While upgrading my internet stopped working and in the middle of the installation I unplugged all devices attached. Later I went to another location and continued my installation.

Let me know if you need more info.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

fsck is disabled when you're on battery power, for your protection (so
that the battery doesn't die during the middle of an fsck recovery,
which would be *very* bad).

:-Dustin

Revision history for this message
stop (whoopwhoop) wrote :

I still get stuck at boot. This happens about once every ten boots (on average). It gets stuck right after fsck now.. It just sits there, with a blinking cursor and no hd activity....
Please let me know if there is any (more) information I can provide to solve this problem...
I am using mountall 0.2.5
Also tell me if this has nothing to do with ecryptfs, and if I need to report this as a new bug (although I am under the impression that this is still the original issue at hand, and we might have fixed another bug in the process)...

Changed in mountall (Ubuntu Karmic):
status: Fix Released → New
Revision history for this message
Hamish Downer (mishd) wrote :

whoop: might be good to do about
$ sudo mountall --debug > mountall0.2.5.log 2>&1

and then attach the resultant file to the bug again

Revision history for this message
stop (whoopwhoop) wrote :
Revision history for this message
Rajeev (rajeeja) wrote :

Thanks for the info Dustin, with new kernel upgrade. Everythings seems so good so far..

Revision history for this message
Rajeev (rajeeja) wrote :

again there seems to be some problem. Please find the o/p to: sudo mountall --debug > mountall0.2.5.log 2>&1

Revision history for this message
stop (whoopwhoop) wrote :

Are you referring to me Rajeev? If so, I attached the log in comment #71

Revision history for this message
Rajeev (rajeeja) wrote :

No whoop i face similar problem as you, I have attached my o/p or log to the command "mountall --debug > mountall0.2.5.log 2>&1" in #73. I think it might help kernel ppl get a better idea.

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

This bug has been fixed.

If you are still having problems, please file a new report.

Changed in mountall (Ubuntu Karmic):
status: New → Fix Released
Changed in ecryptfs-utils (Ubuntu Karmic):
assignee: Dustin Kirkland (kirkland) → nobody
Changed in ecryptfs-utils (Ubuntu):
assignee: Dustin Kirkland (kirkland) → nobody
Changed in ecryptfs:
status: New → Won't Fix
status: Won't Fix → Triaged
importance: Undecided → Wishlist
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I took a crack at adding a -f fake-mount option to mount.ecryptfs.c today. I'm attaching the not-yet-functional diff, simply to store it off somewhere until I have time to come back and take another look at it.

The argument parsing still needs some work.

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

Other bug subscribers

Patches

Remote bug watches

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