Table of Contents

Linux Raid

This setup installs Debian Buster on twin drives (which do not need to be identical) in RAID 1 mirror mode.

Two partitions are created, one for swap and the other for data using the “news” inode allocation scheme.

Blank disc drives (optional)

Blanking the drives is optional but useful for reinstall.

Boot from USB media, debian xfce live CD

https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.2.0-amd64-xfce.iso

sudo -s

Blank full disc

dd if=/dev/zero of=/dev/sda bs=4M

dd if=/dev/zero of=/dev/sdb bs=4M

Blank boot sector

dd if=/dev/zero of=/dev/sda bs=4M count=1

dd if=/dev/zero of=/dev/sdb bs=4M count=1

Installation

Boot from USB media, debian net install

https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.2.0-amd64-netinst.iso

Install

We setup the two discs as independent clones of each other then add both as RAID 1 as two partitions, one for data and the other as swap.

Post install

If the machine does not boot after install, change the drive order in the BIOS and reboot.

Environment

Login as root

/bin/su - root
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
Grub

Install grub onto second drive.

grub-install /dev/sdb
Other

Install useful software.

apt-get install apt-file smartmontools sudo vim tcsh bc build-essential git mercurial
apt-file update
update-alternatives --set editor /usr/bin/vim.basic