Debian 11 + uEFI + Software RAID

This document is going to describe for you the setup that I have come up with to get uEFI and Software RAID to play nice together. I performed this setup using the current release of Debian 11.3 but I’m sure this process will work with any version of Debian or Debian based release.

Example partition table layout

jlucas@cloud9:~$ lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT     FileSystem Format
<snip>
├─sdi1    8:129  0   571M  0 part  /boot/efi      #FAT32
├─sdi2    8:130  0   977M  0 part  
│ └─md0   9:0    0   976M  0 raid1 /boot          #ext4
├─sdi3    8:131  0   7.6G  0 part  [SWAP]         #swap
└─sdi4    8:132  0 214.4G  0 part  
  └─md1   9:1    0 214.3G  0 raid1 /              #ext4
sdj       8:144  0 223.6G  0 disk  
├─sdj1    8:145  0   571M  0 part  
├─sdj2    8:146  0   977M  0 part  
│ └─md0   9:0    0   976M  0 raid1 /boot          #ext4
├─sdj3    8:147  0   7.6G  0 part  [SWAP]         #swap
└─sdj4    8:148  0 214.4G  0 part  
  └─md1   9:1    0 214.3G  0 raid1 /              #ext4

The <snip> is a portion that I took our of additional drives that are not related to the OS drives.

To make the system fully bootable from either drive, you have to replicate the /dev/sdi1 partition to /dev/sdj1. The following line will take care of that:

sudo dd if=/dev/sdi1 of=/dev/sdj1 bs=1M status=progress

A caveat to this is that when booting, since both /dev/sdi1 and /dev/sdj1 are a bit for bit copy of each other they system could at random mount either partition. So, you need to take find

About the Author

Jim Lucas

Owner and proprietor of this establishment

Leave a Reply

Your email address will not be published. Required fields are marked *