install_gentoo_raid1
This is an old revision of the document!
Table of Contents
How to create Gentoo system disks with RAID1 hard drive setup
Create partitions on both disks with same configuration.
parted -a opt /dev/sda mklabel gpt mkpart primary xfs 1 2mb mkpart primary xfs 2mb 2000mb mkpart primary xfs 2000mb 10000mb mkpart primary xfs 10000mb -1 name 1 grub name 2 boot name 3 swap name 4 root set 1 bios_grub on set 2 raid on set 3 raid on set 4 raid on parted /dev/sda set 1 bios_grub on parted /dev/sdb set 1 bios_grub on
Now create raid:
mdadm --create --verbose /dev/md125 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2 mdadm --create --verbose /dev/md126 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3 mdadm --create --verbose /dev/md127 --level=1 --raid-devices=2 /dev/sda4 /dev/sdb4
mkswap /dev/md126 && swapon /dev/md126 mkfs.xfs /dev/md125 mkfs.xfs /dev/md127##################################
Enter Installed System From Install Cd
1. Boot up with the Gentoo minimal cd.
2. Mount your gentoo partitions…
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
3. chroot into the install gentoo environment…
cd /mnt/gentoo
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
Add LVM and RAID support at boot time
genkernel --lvm --mdadm --install initramfs
Install GRUB
If need To install GRUB, need to enter installed Gentoo system: Enter Installed System From Install Cd
and install GRUB2 on both physical disks with RAID support
emerge — ask sys-boot/grub:2 emerge mdadm grub2-install /dev/sda grub2-install /dev/sdb grub2-mkconfig -o /boot/grub/grub.cfg
add RAID support at initial boot sequence add
“domdadm rootfstype=xfs” to /etc/default/grub(Gento):
GRUB_CMDLINE_LINUX="root=UUID=a5c783a2-2cb5-4480-8e61-860b503a4c05 rootfstype=XFS domdadm dolvm"
list HDD UUID’s
blkid
add HDD UUID’s to fstab file
nano -w /etc/fstab UUID=cce19bb0–9ec1–4417-b18d-69b9b9eb610a /boot xfs defaults,noatime 0 2 UUID=eb55e616–2951–42db-be28–880f66f1d185 none swap sw 0 0 UUID=748ec6a3-be66–4b5b-a73b-da5f066baaf4 / xfs noatime 0 1
Source: How to install Gentoo Linux with RAID1 hard drive setup (VirtualBox tested)
Add records to mdadm.conf file:
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
install_gentoo_raid1.1750401479.txt.gz · Last modified: by norman
