3

I did a mess while installing ubuntu 14.04 on my XPS 15 (9530 haswell) and I need help to rebuild boot partition.

My computer has one miniSATA SSD 32 GB and a 1TB HDD. I crypted both with LUKS with LVM over it:

root@ubuntu:/boot# lsblk -o name,uuid,mountpoint
NAME                                 UUID                                       MOUNTPOINT
sda                                                                         
└─sda1                               cbe475e3-f468-42eb-88db-8b0c3b537afa   
  └─sda1_crypt (dm-3)                tknpdm-4E1r-wAZR-f3SJ-FV79-EQM7-Lmn67L 
    ├─vg_hdd_sys_data-lv_swap (dm-4) 96cc436a-cb46-4a7f-9474-518f5be9ff9a   
    ├─vg_hdd_sys_data-lv_var (dm-5)  38deba4b-b619-4769-813f-0c0f578d2e2f   /var
    └─vg_hdd_sys_data-lv_home (dm-6) 685e392a-8fe3-46e9-8c2f-4c935125a0e5   /home
sdb                                                                         
├─sdb1                               DF18-FC5D                              /boot/efi
├─sdb2                               804c4cae-3d8e-4f7b-baec-867ee87e46de   /boot
├─sdb3                               df369b26-8205-488d-a01d-36456a737905   
│ └─sdb3_crypt (dm-0)                viOrjh-O4SE-OEbC-8xVW-mTnL-uZ3O-cmZQvl 
│   └─vg_ssd_system-lv_root (dm-1)   97a7d810-dc46-415b-9f0f-bf1ee0c2bb01   /
└─sdb4                               4e094c6d-874e-45ac-84f9-8a0192245551   
  └─sdb4_crypt (dm-2)                5a18c2b6-197a-42f5-a489-677d3d747b00   /boot/fskey
sdc                                                                         
└─sdc1                               3795-F7B6                              
loop0                          

At first, I've got to make it work, but I was asked twice for passphrase at boot time, before it asked me for my user password. Kind of too much. Take a look at my /etc/crypttab:

root@ubuntu:/boot# cat /etc/crypttab
sdb3_crypt UUID=df369b26-8205-488d-a01d-36456a737905 none luks,discard
sda1_crypt UUID=cbe475e3-f468-42eb-88db-8b0c3b537afa none luks

My /etc/fstab:

 root@ubuntu:/boot# cat /etc/fstab
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/vg_ssd_system-lv_root /               ext4    noatime,errors=remount-ro 0       1
# /boot was on /dev/sdb2 during installation
UUID=804c4cae-3d8e-4f7b-baec-867ee87e46de /boot           ext2    defaults        0       2
# /boot/efi was on /dev/sdb1 during installation 
UUID=DF18-FC5D  /boot/efi       vfat    defaults        0       1
/dev/mapper/vg_hdd_sys_data-lv_home /home           ext4    defaults        0       2
/dev/mapper/vg_hdd_sys_data-lv_var /var            ext4    defaults        0       2
/dev/mapper/vg_hdd_sys_data-lv_swap none            swap    sw              0       0

Everything was fine until I tried to change it to be asked only once for passphrase at boot time. So I:

  • created one crypted-by-passphrase volume (sdb4, 20 MB) containing a keyfile
  • mounted it on /boot/fskey
  • added this keyfile to my other crypted volumes

Here follows my new crypttab and fstab:

root@ubuntu:/boot# cat /etc/crypttab
sdb4_crypt UUID=4e094c6d-874e-45ac-84f9-8a0192245551 none luks,discard
sdb3_crypt UUID=df369b26-8205-488d-a01d-36456a737905 /boot/fskey/keyfile luks,discard
sda1_crypt UUID=cbe475e3-f468-42eb-88db-8b0c3b537afa /boot/fskey/keyfile luks


root@ubuntu:/boot# cat /etc/fstab
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/vg_ssd_system-lv_root /               ext4    noatime,errors=remount-ro 0       1
# /boot was on /dev/sdb2 during installation
UUID=804c4cae-3d8e-4f7b-baec-867ee87e46de /boot           ext2    defaults        0       2
# /boot/efi was on /dev/sdb1 during installation
UUID=DF18-FC5D  /boot/efi       vfat    defaults        0       1
/dev/mapper/sdb4_crypt  /boot/fskey     ext2        defaults        0       2
/dev/mapper/vg_hdd_sys_data-lv_home /home           ext4    defaults        0       2
/dev/mapper/vg_hdd_sys_data-lv_var /var            ext4    defaults        0       2
/dev/mapper/vg_hdd_sys_data-lv_swap none            swap    sw              0       0
root@ubuntu:/boot# mount /dev/mapper/vg_hdd_sys_data-lv_home /home

To update these changes to initrd, i did:

update-initramfs -u -v -k all

When I rebooted, it failed and finished at the drop box. I rebooted with usb live, mounted each partition under /mnt, chrooted to /mnt, moved crypttab to initial configuration and then I reapplied the command above, but this time, all I had is:

root@ubuntu:/boot# update-initramfs -u -v -k all
Nothing to do, exiting.

I rebooted and failed again. I've got so upset that I did what I should not:

root@ubuntu:/boot# update-initramfs -d -v -k all

Obviously, things got worse: when I reboot, instead of busybox, I've got a blank screen with a blinking Caps-Lock key.

I rebooted in recovery mode, so now I see a message:

RAMDISK: EOF while reading compressed data

I rebooted it on my usb live key, did again the mount&chroot procedure and tried in vain again to rebuild initrd:

root@ubuntu:/boot# update-initramfs -c -v -k all
Nothing to do, exiting.

Any ideas? I'm about to reinstalling from zero ubuntu. But I would be glad if one could help me.

Many thanks,

Luis

  • Good news: I've got to make it reboot properly using mkinitramfs: ` cd /boot;mkdir temp;export TMPDIR=/boot/temp;mkinitramfs -o initrd.img-$(uname -r)` – luis Apr 28 '14 at 11:04
  • However, still unable to boot with only one passphrase... any help? – luis Apr 28 '14 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.