My first attempt at installing OpenSUSE on mdadm with encryption and LVM has failed over the last 3 days. Here is some of my attempts.
My first attempt i use Linux Mint KDE to set up the partitions like this.
Make a boot 1 GB sda8 ext4
Make the Partitions to hold RAID0 (mdadm) on /sda9 /sdb7
mdadm --create --verbose /dev/md1 --level=stripe --raid-devices=2 /dev/sda9 /dev/sdb7
Next i encrypt the RAID0
sudo cryptsetup -v --cipher serpent-xts-plain --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/md1
Then open it
cryptsetup luksOpen /dev/md1 lvm_encrypted
Make the pv, vg, lv
vgcreate OpenSUSE /dev/mapper/lvm_encrypted
lvcreate -L 42GB -n lvroot OpenSUSE
lvcreate -L 8GB -n lvhome OpenSUSE
lvcreate -L 8GB -n lvopt OpenSUSE
lvcreate -L 8GB -n lvsrv OpenSUSE
lvcreate -L 8GB -n lvtmp OpenSUSE
lvcreate -L 8GB -n lvusrlocal OpenSUSE
lvcreate -L 8GB -n lvvar OpenSUSE
lvcreate -l 100%FREE -n lvswap OpenSUSE
Now i close LVM and and lvm_encrypted and restart and put in the OpenSUSE Leap 42.1 Installer iin the drive and power up the installation.
It succesfully find and is able to unlock my RAID0 and then ask for password. Which also a success.
I then install OpenSUSE Leap to sda8 (boot ext4) and the newly created LVM.
Install goes fine and no errors pops up.
On the next reboot while trying to boot OpenSUSE Leap 42.1 it hangs right after it has found /dev/md1 and never ask for password. I attempted to use the rescue cd and succeded in assembling raid, unlock LUKS, mount all LVM’s together and make a new initrd.
But fails after succesfully finding /dev/md1 but still never ask for password.
After playing alot with OpenSUSE LEAP RescueCD part i ended up deciding to make it all again but this time using OpenSUSE LEAP Installer to configure the HDD’s.
So this time i boot up the OpenSUSE LEAP 42.1 installer (very simple this time since its all done with GUI) and create /dev/md1 out of /dev/sda9 /dev/sdb7.
Follow up by encrypting the partition putting LVM Volume Group “OpenSUSE” on it and creating the Logical Volumes.
Installing OpenSUSE LEAP with /dev/sda8 ext4 as boot and the rest should be logical how i install.
On this first boot it ask’s for my password but hangs right after at Found device lvswap.
I have tried again using the RescueCD part of the installer assemble raid, open LUKS container and mounting all Logical Volumes just as it was a system and then making a new initrd. Still fails at boot telling me it found lvswap (as the only thing) and staying at thats screen until i hit the computers Physical Shutdown Button.
I allso tried figuring out how to add modules and hooks to initrd but failed at finding the info on the net
On both attempts I have also tried only making a /dev/sda8 ext4 and lvroot, lvhome, lvswap but after trying different things over the last 3 days i feel its on time to write it on OpenSUSE forum and figure out if i need to make a bug report or its just me who doing something wrong? (or maybe doing something impossible?)
I thanks all who spend time on looking at my problem and going as for as to the bottom of my post reading my thanks and pleed for help.
Best Regards all,