Hello Community!
I tried the whole day long to setup up an LVM type Raid1 Volume on Debian 8.5, but the Server is not be able to boot from it.
First of all here is the error i get from GRUB2:
here are the steps i made, first i boot into grml (a Live-CD/Rescue-System): (factory new /dev/sda & /dev/sdb )
1 . then i create the partitions on both drives:
- 512M Primary (Linux raid autodetect)
- 20G Primary 8e (Linux LVM)
2. now i create the Raid for my /boot and format as ext4
- mdadm --create /dev/md0 --level=1 --raid-disks=2 /dev/sda1 /dev/sdb1
- mkfs.ext4 /dev/md0
3. its time for the volume group
pvcreate /dev/sda2
pvcreate /dev/sdb2
vgcreate vg0 /dev/sda2 /dev/sdb2
4. we come to the volumes and format them
lvcreate -n root -L 20G vg0 --type raid1
lvcreate -n swap -L 4G vg0 --type raid1
root@grml ~ # lvscan
ACTIVE '/dev/vg0/root' [10,00 GiB] inherit
ACTIVE '/dev/vg0/swap' [4,00 GiB] inherit
mkfs.ext4 /dev/vg0/root mkswap /dev/vg0/swap
5. mount the volumes
mount /dev/vg0/root /mnt
cd /mnt
mkdir boot
mkdir proc
mkdir dev
mkdir sys
mkdir home
mount /dev/md0 boot/
- create fstab
mkdir etc
cd etc
vi fstab
`proc /proc proc defaults 0 0
/dev/md0 /boot ext4 defaults 0 2
/dev/vg0/root / ext4 defaults 0 1
/dev/vg0/swap none swap defaults,pri=1 0 0`
7. debootstrap debian jessie
debootstrap --arch amd64 jessie /mnt ftp://ftp.de.debian.org/debian/
8. mount some essentials
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
9. chroot into the shiny new debian
chroot /mnt /bin/bash
10. set a new root password
passwd
11. add contrib & non-free to the sourcelist
nano /etc/apt/sources.list
deb http://ftp.de.debian.org/debian jessie main contrib non-free
12. install packages
apt-get install mdadm openssh-server lvm2 locales ntp vim-nox firmware-realtek
13. configure locales
dpkg-reconfigure locales tzdata
14. install the kernel
apt-get install linux-image-amd64
15. grub2
apt-get install grub2
selecting sda & sdb as install devices
grub-install --no-floppy /dev/sda
grub-install --no-floppy /dev/sdb
update-grub /dev/md0
update-initramfs -u
16. exit and reboot
exit
shutdown -r now
maybe any body can help me, i hope i only forget something.