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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/874774

Title:
  could not mount /dev/mapper/cryptswap1

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to