2

I feel this is a stupid question.

I have an encrypted Arch setup (without LVM) were a single disk (sdc) contains an unencrypted boot partition and the encrypted root partition.

Below the output of lsblk:

NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda             8:0    0   1.4T  0 disk  
└─sda1          8:1    0   1.4T  0 part  
sdb             8:16   1   3.8G  0 disk  
└─sdb1          8:17   1   3.8G  0 part  
sdc             8:32   0 238.5G  0 disk  
├─sdc1          8:33   0    64M  0 part  /boot
└─sdc2          8:34   0 238.4G  0 part  
  └─cryptroot 254:0    0 238.4G  0 crypt /
sdd             8:48   0  83.9G  0 disk  
├─sdd1          8:49   0   100M  0 part  
└─sdd2          8:50   0  83.8G  0 part  
sde             8:64   0 930.8G  0 disk  
└─sde1          8:65   0 930.8G  0 part  
sr0            11:0    1  1024M  0 rom   

Everything works fine as long as I have a USB drive plugged in (it may even be empty), however when I unplug the USB drive ("sdb" in the dump above), grub reports that /sdc2 is not a LUKS container (not the exact message but the gist of it).

What I believe that when the USB drive is disconnected, the device containing my arch installation becomes sdb (every id is shifted one?)

GRUB_DEFAULT=0
GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sdc2:cryptroot"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

#GRUB_SAVEDEFAULT="true"
GRUB_DISABLE_SUBMENU=y

I also tried

GRUB_CMDLINE_LINUX="cryptdevice=UUID=fb9a6cc1-592f-46ca-9d26-ccaa6a3d4ea9:cryptroot"

But with the same problems (below is the output of blkid)

/dev/sda1: LABEL="Ny diskenhed" UUID="589299B7929999D8" TYPE="ntfs" PARTUUID="a450f178-01"
/dev/sdb1: LABEL="ARCH_201508" UUID="C83D-1650" TYPE="vfat" PARTUUID="0005b309-01"
/dev/sdc2: UUID="fb9a6cc1-592f-46ca-9d26-ccaa6a3d4ea9" TYPE="crypto_LUKS" PARTUUID="0fc4f1e5-02"
/dev/sdd1: LABEL="Reserveret til systemet" UUID="0220B61820B612A1" TYPE="ntfs" PARTUUID="cde3ca74-01"
/dev/sdd2: UUID="A0B8B723B8B6F73E" TYPE="ntfs" PARTUUID="cde3ca74-02"
/dev/sde1: LABEL="Helium" UUID="6E32E1EF32E1BC69" TYPE="ntfs" PARTUUID="fad27ece-01

I followed this guide for setting up Arch on LUKS

How can I fix this?

  • 1) You should generally never use /dev identifiers for either fstab or crypttab. 2) you should only use the ArchWiki guides for installing Arch ever (In this case, the Beginners' Guide and the page on Disk Encryption). 3) It looks like you're missing the part of the kernel command line that specifies the root partition as being /dev/mapper/cryptroot. – HalosGhost Aug 14 '15 at 21:10
1

The answer HalosGhost provided should be correct. In this particular case your issue is most likely due to missing

root=UUID=< UUID for root dev >

Adding answer for posterity.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.