1

Before: SATA internal SSD with a LUKS encrypted ext4 partition (Debian installation) + a small unencrypted boot partition with kernel, initrd and GRUB configuration files

After: that same disk is now externally attached with a USB-to-SATA adapter

Now GRUB fails to boot it, but both GRUB and the Debian kernel recognize the disk (I see the correct size and partitions). Also after loading the kernel it asks for the LUKS password, and it recognizes it (if entered correctly) I've tried providing the kernel and initrd files from the GRUB command line, and also loading the old grub.cfg file with the GRUB 'configfile' command.

This was the GRUB section that worked with the former setup:

menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8b6b854f-d92a-439d-a0e3-315d39bb0802' {
    load_video
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos3'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  a597f222-87d2-4e19-8965-aa0eff0bceea
    else
      search --no-floppy --fs-uuid --set=root a597f222-87d2-4e19-8965-aa0eff0bceea
    fi
    echo    'Loading Linux 4.9.0-11-amd64 ...'
    linux   /vmlinuz-4.9.0-11-amd64 root=UUID=8b6b854f-d92a-439d-a0e3-315d39bb0802 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd  /initrd.img-4.9.0-11-amd64   

And this are the various error screens (I can't remember what screen corresponds to what I was trying)

enter image description here

enter image description here

enter image description here

Is it even possible to boot the Debian install with this new setup?

7
  • First two pictures, grub worked and kernel loaded, and you got stuck in initramfs, hard to say why exactly, check /proc/partitions and /proc/cmdline. Third picture grub has a problem, possibly just a typo set root=(hd0,msdos3) Feb 15, 2020 at 23:46
  • 1
    From the busybox prompt can you see (and edit) /etc/fstab ? This might need editing to change references from sda to sdb.
    – gogoud
    Feb 16, 2020 at 8:25
  • @gogoud The file is empty (additionaly I confirmed it on a running Linux system by unpacking the initrd.img file)
    – golimar
    Feb 16, 2020 at 10:16
  • see feeding.cloud.geek.nz/posts/… - might help
    – gogoud
    Feb 17, 2020 at 11:14
  • There is a new internal one, and the old one is attached by USB (and shows up fine after loading the kernel as /dev/sda)
    – golimar
    Feb 18, 2020 at 7:52

1 Answer 1

0

I see that it correctly sets up the encrypted volume sdb2_crypt, so I tried this and it worked:

linux   /vmlinuz-4.9.0-11-amd64 root=/dev/mapper/sdb2_crypt ro 
initrd  /initrd.img-4.9.0-11-amd64  

It booted into a recovery environment as it was not recognizing some filesystems in /etc/fstab, after commenting them out, saving and rebooting it boots into the LXDE login screen.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .