1

I have two encrypted partitions on my system (/etc/fstab contains following lines:)

/dev/mapper/sda2_crypt /              ext4    errors=remount-ro 0        1
/dev/mapper/sda3_crypt none           swap    sw              0         0

Before release upgrade, after any reboot I was asked for sda2_crypt passphrase and after entering correct password for this partition, I was asked for csda3_crypt (swap) partition and after entering correct password for swap partition boot process was started and login screen was been displayed.

But after I upgraded from Lubuntu 16.04 to 18.04, there are some differences in boot process:

1) there is 20 or more lines of boot process (or pre-boot actions) that was not present before this. Before this upgrade the first line of text screen was password request for sda2_crypt partition. These new lines is about my CD-ROM, USB devices, graphic card and other hardwares:

...
[    2.154964] cdrom: Uniform CD_ROM driver revision 3.20
...
[    2.404918] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.410061] hidraw: raw HID events driver (C) Jiri Kosina
...
[    2.904677] [drm] Initialized radeon 2.36.0 20080528 for 0000:02:00.0 on minor 0
[    3.044778] Switched to clocksource tsc
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.

2) After above new lines, it asks for sda_crypt partition password (by a prompt different from the prompt before upgrade):

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... Please unlock disk sda2_crypt:

In this stage, before this when I typed the password, there was displayed an asterisk * for each character of password, but now no asterisks for password characters, but it works if I enter the correct password and the boot process continue:

cryptsetup (sda2_crypt) crypt setup successfully.
...

3) But before upgrade, after above stage I was asked for sda3_crypt (swap) partition password, but now there is no prompt for this password request and boot progress goes over until it shows:

[***    ] (1 of 3) A start job is running for dev-mapper-sda3_crypt.device (28s / no limit)
[ ***   ] (2 of 3) A start job is running for dev-disk-by\x2duuid-0d7eb3a2\x2dd6b0\x2d41a8\x2db7a7\x2debec030a3d41.device

In above stage if I enter any password or enter any key, nothing occurs, until the wait time is finished.

How I can solve this problem, so It asks me for swap partition passphrase as before?

PHP Learner
  • 2,788
  • 10
  • 30
  • 48

1 Answers1

0

I solved my problem using guides provided in this answer: first I run mkswap on my swap partition:

sudo mkswap /dev/sda3

It gives me a new UUID.

Then commented out the line on my /etc/crypttab file related to swap partition and replaced it by following line:

cryptswap        UUID=<new UUID>   none   luks,swap,offset=1024

After reboot, it asked me for swap partition password (but not in the manner it was asking before upgrade; before upgrade swap partition passphrase was requested just after successful cryptsetup of sda2_crypt. But now passphrase of sda3_cryptwas asked for after some lines of boot time logs).

However, the problem is solved and after login swapon --summary results in:

Filename                       Type         Size     Used       Priority
/dev/dm-1                      partition    8002044  0          -1

and free -m results in:

                           total          used        free       shared         buff/cache        available
Mem:                        1926           420        1087           25                417             1352
Swap:                       7814             0        7814
PHP Learner
  • 2,788
  • 10
  • 30
  • 48