[Bug 874774] Re: could not mount /dev/mapper/cryptswap1

TJ 874774 at bugs.launchpad.net
Mon Nov 14 23:51:01 UTC 2011


Hi Steve. Well spotted! I was at the end of a long session when I
developed the patch.

I'll rework it and test again.

For those that are interested I tested this under my own control in the
following way:

1. Boot the PC to the GRUB menu
2. Edit the boot entry's "linux" line, remove any extraneous parameters such as "recovery", "quiet splash" and replace with "init=/bin/bash"
3. Press F10 to boot with the customised command-line
4. Linux will run a bash terminal instead of the usual upstart init process and therefore upstart will not run, allowing you to control and monitor the process.
5. Create several spare terminals to help you explore using: 

 getty -8 -n -l /bin/bash 38500 tty2 &
 getty -8 -n -l /bin/bash 38500 tty3 &
 getty -8 -n -l /bin/bash 38500 tty4 &

You can switch between the terminals using Alt+F1/F2/F3/F4

6. Make the root file-system read/write
mount -o remount <ROOTDEV>  /  (you will need to replace <ROOTDEV> to match the mount-point of the system's root device )
7. Edit the upstart script using nano:
 /usr/bin/nano /etc/init/cryptdisks.udev.conf

insert the following lines at the very beginning of the "script" block,
then save the file (Ctrl+X):

 exec > /tmp/crypt_$(basename $DEVNAME).log 2>&1
 set -x

This will cause the script to create a log file in/tmp/ for each DEVNAME
that it is called for.

8. Create a temporary file-system for /tmp/:
 mount -t tmpfs -o size=20m tmpfs /tmp

9. At one of the terminals start the "init" process:
 exec init

10. Switch to another terminal (Alt+F2/F3/F4) and check the /tmp/ directory shows some log files with names like "crypt_dm-14.log
 ls -lstra /tmp/

11. Examine the contents of each log file to identify the device you are debugging using the system pager "less", e.g:
 less /tmp/crypt_dm-14.log

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to cryptsetup in Ubuntu.
https://bugs.launchpad.net/bugs/874774

Title:
  could not mount /dev/mapper/cryptswap1

Status in “cryptsetup” package in Ubuntu:
  Triaged
Status in “cryptsetup” source package in Oneiric:
  Triaged
Status in “cryptsetup” source package in Precise:
  Triaged

Bug description:
  On multiple fresh installs since beta release 2 i have been experiencing this issue:
  during boot up, i receive the message "could not mount /dev/mapper/cryptswap1 M for manual S for skip"
  obviously I'm expecting no message to show up at all and it should boot perfectly fine. I do however believe that i have found where the problem lies, it is in /etc/fstab
  This is how the original file looked:

  # /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/sda7 during installation
  UUID=482c5b33-9ce8-4575-b787-cddeb1e93a5e /               ext4    errors=remount-ro 0       1
  # swap was on /dev/sda8 during installation
  #UUID=eb23dadc-8e08-4769-8fc5-0b1216b67e5b none            swap    sw              0       0
  /dev/mapper/cryptswap1 none swap sw 0 0

  
  i believe the problem is that the following line of:
  #UUID=eb23dadc-8e08-4769-8fc5-0b1216b67e5b none            swap    sw              0       0

  is not supposed to be commented out, i believe this happens somewhere
  in install. The ghetto fix for this is simply to remove the comment on
  it, but it definitely should not be happening...

  i have also found a eerily similar problem from Ubuntu 9.10 Bug
  #490760  which is a "duplicate" of another bug that is why i
  classified this as cryptsetup, because that bug was.

  Here is more information:

  Description:	Ubuntu 11.10
  Release:	11.10

  cryptsetup:
    Installed: 2:1.1.3-4ubuntu2
    Candidate: 2:1.1.3-4ubuntu2
    Version table:
   *** 2:1.1.3-4ubuntu2 0
          500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
          100 /var/lib/dpkg/status

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/874774/+subscriptions




More information about the foundations-bugs mailing list