Your message dated Wed, 20 Aug 2014 09:38:48 +0200
with message-id <[email protected]>
and subject line closing as fixed in current stable
has caused the Debian Bug report #628038,
regarding during shutdown, cannot mount root filesystem read-only
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
628038: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628038
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cryptsetup
Version: 2:1.1.3-4squeeze2
Severity: normal

After installing and setting up cryptsetup, I noticed that the root
filesystem wasn't getting mounted read-only on shutdown anymore, thus
causing it to be unclean on the next startup.

Specifically, one of the last messages printed to the screen during the
shutdown sequence was now this:
Mounting root filesystem read-only...mount: / is busy
Failed

Then when the system was starting up again, fsck.reiserfs reported
"Filesystem is NOT clean".

This was very repeatable, so I did some investigation.

I have just one device in my crypttab:
# <target name> <source device>         <key file>      <options>
name    /name.enc_vol    none   
precheck=un_blkid,check=blkid,cipher=aes-cbc-essiv:sha256,size=256,hash=ripemd160

So I was surprised to discover *two* loopback devices configured:

saturn:/home/jdietrch# losetup -a
/dev/loop0: [0801]:15801 (/name.enc_vol)
/dev/loop1: [0801]:15801 (/name.enc_vol)
saturn:/home/jdietrch# 

Further investigation revealed the reason: The function
handle_crypptab_line_start() checks to make sure the target device
doesn't exist. If it does exist, the function exits with "return 0". But
it doesn't remove the loopback device that was set up earlier in the
function. So I added a call rm_lo_setup just before the "return 0" and
now I only have one loopback device as expected:

saturn:/home/jdietrch# losetup -a
/dev/loop0: [0801]:15801 (/name.enc_vol)
saturn:/home/jdietrch# 

Also, the message at the end of the shutdown sequence now says this:
Mounting root filesystem read-only...done

And when the system starts up again, fsck.reiserfs reports that the
"Filesystem is clean"

Here is the change I made as a patch:

--- cryptdisks.functions.original       2011-03-11 04:05:53.000000000
-0500
+++ cryptdisks.functions        2011-05-26 10:46:18.000000000 -0400
@@ -556,6 +556,7 @@
        # Make sure that target device doesn't exist
        if [ -b "/dev/mapper/${dst}_unformatted" ] || [ -b
        "/dev/mapper/$dst" ]; then
                device_msg "$dst" "running"
+               rm_lo_setup
                return 0
        fi
 
I don't know if this is the correct or best way to fix problem noted at
the beginning of this message, but in any case cryptsetup shouldn't
prevent the system from shutting down cleanly.

In case it matters, my system is running up-to-date squeeze.

Let me know if you need any more information, or if there is anything
else I can do to help.

Thanks,
James Dietrich





--- End Message ---
--- Begin Message --- I'm closing the bugreport as it's already fixed in current stable (wheezy).

Kind regards,
 jonas

--- End Message ---

Reply via email to