You are not logged in.
Dear all,
I have two HDD of different size that I want in raid0, with encryption (with only one password) and btrfs (for snapshots). So I made Btrfs on LUKS on LVM. The problem is that Grub says "error: no such cryptodisk found". Here is my setup:
lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1M 0 part
└─sda2 8:2 0 931.5G 0 part
├─VG0-tmp 254:0 0 3G 0 lvm
├─VG0-swap 254:1 0 6G 0 lvm
└─VG0-system 254:2 0 1.4T 0 lvm
sdb 8:16 0 465.8G 0 disk
├─sdb1 8:17 0 465.8G 0 part
│ └─VG0-system 254:2 0 1.4T 0 lvm
└─sdb2 8:18 0 1007K 0 part
lvdisplay:
--- Logical volume ---
LV Path /dev/VG0/tmp
LV Name tmp
VG Name VG0
LV UUID EXNmit-06hh-hDok-L6Au-Uz4f-NkhS-hMKGlv
LV Write Access read/write
LV Creation host, time archiso, 2016-02-06 15:17:51 +0000
LV Status available
# open 0
LV Size 3.00 GiB
Current LE 768
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0
--- Logical volume ---
LV Path /dev/VG0/swap
LV Name swap
VG Name VG0
LV UUID n2LVUX-vv9M-Q33n-hPkB-WnbW-1x4a-0EFMle
LV Write Access read/write
LV Creation host, time archiso, 2016-02-06 15:18:04 +0000
LV Status available
# open 0
LV Size 6.00 GiB
Current LE 1536
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1
--- Logical volume ---
LV Path /dev/VG0/system
LV Name system
VG Name VG0
LV UUID ZJbYNI-xDPM-f8BJ-JMcz-iuQv-Yw8M-8YWXez
LV Write Access read/write
LV Creation host, time archiso, 2016-02-06 15:19:01 +0000
LV Status available
# open 0
LV Size 1.36 TiB
Current LE 355396
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:2
gdisk -l sda:
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 3BAEF9F1-E92F-4A07-8FF2-E769356F1543
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 4095 1024.0 KiB EF02 BIOS boot partition
2 4096 1953525134 931.5 GiB 8E00 Linux LVM
gdisk -l sdb:
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): AE485317-0F59-4BDB-A2BF-C0C6ECE80A2D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 8-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 2048 976773134 465.8 GiB 8E00 Linux LVM
2 34 2047 1007.0 KiB EF02 BIOS boot partition
mkinitcpio.conf:
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES="piix ide_disk reiserfs"
MODULES=""
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=""
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No raid, lvm2, or encrypted root is needed.
# HOOKS="base"
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS="base udev autodetect block filesystems"
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS="base udev block filesystems"
#
## This setup assembles a pata mdadm array with an encrypted root FS.
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
# HOOKS="base udev block mdadm encrypt filesystems"
#
## This setup loads an lvm2 volume group on a usb device.
# HOOKS="base udev block lvm2 filesystems"
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems"
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""
/etc/default/grub:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="cryptdevice=/dev/VG0/system:cryptoroot root=/dev/mapper/cryptoroot"
GRUB_ENABLE_CRYPTODISK=y
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="lvm part_gpt part_msdos cryptodisk luks"
# 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"
I installed grub with:
grub-install --target=i386-pc --recheck /dev/sda --modules="part_gpt part_msdos lvm luks cryptodisk"
I tried the tip from https://wiki.archlinux.org/index.php/Btrfs#GRUB :
Users experiencing the following: error no such device: root when booting from a RAID style setup then edit /usr/share/grub/grub-mkconfig_lib and remove both quotes from the line echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}". Regenerate the config for grub and the system should boot without an error.
Did I miss a typo or something ?
[EDIT]:
It was an old Grub installation on sdb. I changed boot order to search the bootloader on sda first (the good Grub installation) and it's OK. Now I have to search how to remove this old Grub on sdb. Thanks for your help and sorry for the noise ! :-(
Last edited by Tucky (2016-02-07 20:29:37)
Offline