2

I have installed Ubuntu 15.10 on Macbook Pro Retina late 2013. It was working well until I break the boot by reinstalling grub.

Now I am not able to repair it.

I have three partitions:

/dev/sda1 - /boot - ext2 
/dev/sda2 - / - root, ext4, enrypted with luks 
/dev/sda3 - swap, encrypted with luks

I have no logical volumes there.

I have tried to reinstall grub with initramfs to configure to boot in BIOS mode and was getting either blinking cursor and nothing happening or macbook into reboot loop.

My configuration is:

/etc/crypttab (unchanged as I had it from beginning)

root UUID=***`<uuid of encrypted /dev/sda2>`*** none luks,discard
swap UUID=***`<uuid of encrypted /dev/sda3>`*** none luks,discard,swap

/etc/initramfs-tools/conf.d/cryptroot:

target=root,source=UUID=***`<uuid of encrypted /dev/sda2>`***,key=none,discard

/etc/initramfs-tools/conf.d/resume:

RESUME=UUID=***`<uuid of encrypted /dev/sda3>`***

/etc/default/grub (this configuration gives me blank screen with blinking cursor):

GRUB_ENABLE_CRYPTODISK=y
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:root root=/dev/mapper/root"
GRUB_PRELOAD_MODULES="lvm luks cryptodisk"
GRUB_INIT_TUNE="480 440 1"

When I change to GRUB_CMDLINE_LINUX="cryptdevice=UUID=<uuid of encrypted /dev/sda2>:root root=/dev/mapper/root" - I get into continuous reboot loop

Steps I take:

sudo su
cryptdisk luksOpen /dev/sda2 root
mount /dev/mapper/root /mnt
mount /dev/sda1 /mnt/boot
mount -o bind /dev /mnt/dev
mount -o bind /dev/pts /mnt/dev/pts
mount -o bind /sys/mnt/sys
mount -o bind /proc /mnt/proc
mount -o bind /run /mnt/run
chroot /mnt /bin/bash
update-initramfs -k all -c
grub-install /dev/sda
update-grub
exit
reboot

lsinitramfs /boot/initrd* | grep cryptsetup gives:

sbin/cryptsetup
lib/cryptsetup
lib/cryptsetup/askpass
lib/x86_64-linux-gnu/libcryptsetup.so.4

Any ideas what I could be missing or doing wrong?

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.