Installing Linux Mint on RAID?
Hello,
I've been trying for several days to install Linux Mint 21 on software RAID and have been unsuccessful so far.
Currently, my system is running on a single 500GB hard drive, and I want to migrate it to a RAID level 5 if possible, but the boot loader fails to install.
After that, I would restore the system using a snapshot created with Timeshift. This snapshot is on an external hard drive.
I installed mdadm using
apt-get install mdadm and successfully created a RAID5.
/dev/md0 has been created. When I start the installation of Linux Mint, it goes well until the GRUB step.
I get an error regarding GRUB.

When I run
grub-install /dev/sda I also get an error.

The same thing happens with sdb and sdc. I then installed a fourth disk that is not a member of the RAID and this time when I choose
/dev/sde1 for the installation of GRUB:

When I search online, I find tutorials but nothing works.
For the restoration part, the solution that often comes up is to make a disk image. The problem is that the hard drive is 500GB, the RAID will be made up of three 240GB solid disks, so it won't fit.
Many suggest reducing the size, but I'm afraid it might crash and I would lose my original system on the 500GB disk.
I really need support.
Thank you in advance.
Guillaume
8 answers
Hello,
GRUB must be installed on the header of the disk from which GRUB boots. The target device is therefore independent of software RAID and/or LVM.
When you configure software RAID and/or LVM, the devices involved in a RAID device (or LVM) are only used at the time of declaring that device. For example, if you create a RAID device from two physical partitions, the devices associated with those two physical partitions are only used in the command (mdadm) that declares the RAID device. The same principle applies when declaring a volume group (and the logical volumes it contains) in LVM.
Once the devices are declared, only the final devices are formatted. Suppose for example that I create a software RAID /dev/md0 involving two physical partitions /dev/sda1 and /dev/sda2, and that this RAID device is involved in a LVM volume group vg divided into three logical volumes /dev/vg/root, /dev/vg/home, and /dev/vg/swap. Then only the devices /dev/vg/root, /dev/vg/home, and /dev/vg/swap need to be formatted (either with mkfs or mkswap depending on whether the partition is to be used as swap or to host a filesystem).
Note that when you format a partition (with mkswap or mkfs), the data contained on the respective disk areas is lost (in my example, everything that was on /dev/sda1 and /dev/sdb1 is therefore lost when you format /dev/vg/root, /dev/vg/home, and /dev/vg/swap).
A device (physical, LVM, or RAID) can only be mounted (with mount) if it has been formatted.
If you have changed the partitioning of your hard drives, make sure to regenerate grub with the following command:
sudo update-grub
If the problem persists after restarting, please provide us with the result of the previous command as well as those of the following commands:
- RAID configuration:
sudo mdadm -v --detail --scan /dev/md0
- LVM configuration (if you are using it):
sudo lvdisplay
- Partition table:
sudo parted -l
- Installed grub packages and grub-loaded modules:
dpkg -l | grep ^ii | cut -d" " -f3 | grep grub grep insmod /boot/grub/grub.cfg
Good luck
Hello,
There's something I don't understand, which is that I can't reboot since I'm in liveCD.
I'm trying to install Linux Mint 21 on a RAID, should I format using the terminal or with the Linux Mint installer?
Also, with what I'm asking, do you know of something feasible that is commonly requested by users? Or, would installing LM21 on an SSD and taking daily snapshots with Timeshift be sufficient and that a RAID, no matter its level, would just be overkill?
It's not that I absolutely want to abandon the idea of RAID, but it seems to be very complex and somewhat too much tweaking, which doesn’t reassure me. ;-)
Thanks,
Guillaume
Hello Guillaume,
I'm having a hard time understanding what you're saying in message #6, especially because the sentences have a lot of mistakes and are oddly phrased. Try to be clearer in your future messages.
There is something I don't understand, it's that I can't reboot since I'm in liveCD.
Rebooting into Linux on the hard drive? I don't get the "since I'm in live CD," what's the connection? You can always reboot your PC, choosing to boot from the hard drive. If everything is correctly configured and installed (grub, partitioning, linux, etc.), there shouldn't be any reason it won't work.
I'm trying to install Linux Mint 21 on a RAID, should I format using the terminal or with the Linux Mint installer?
It doesn't matter, the result is the same. The only thing is that you shouldn't format a partition that contains the operating system you are currently using.
Also, with what I'm asking, do you know something feasible that is commonly requested by users?
I don't understand.
Or, would installing LM21 on an SSD and making daily snapshots with Timeshift be sufficient, and that a RAID, no matter its level, would just be overkill?
LM21, is that Linux Mint 21?
What's the connection between making backups with Timeshift and RAID? Are you saying that you want to set up a RAID 1 in case one of the two drives fails?
If the question is: I want to avoid losing data if a drive fails, then yes, making backups with Timeshift or anything else can be a way to do that. It’s not necessarily useful to save everything.
- You should mainly back up /home (because that's where your documents reside). Everything else can be reinstalled. If you've configured anything complicated (like a web server), it may be worth backing up the configuration files you've modified. Traditionally, people do this with rsync (to back up data to another drive, possibly installed in another machine).
- You can, in case your Linux is acting up, save the list of installed packages (see dpkg --get-selections) and use the resulting file after reinstalling to restore all the software you had installed.
- When a drive starts to fail, there are warning signs and it generally gives you time to recover most of your files. Personally, I use neither RAID nor Timeshift.
It's not that I absolutely want to give up the idea of RAID, but it seems very complex and a bit too fiddly at the same time, which doesn't reassure me. ;-)
It's up to you :-) Personally, I find that setting up RAID (and LVM) can be done quite easily during installation by following this tutorial. The installer runs the necessary commands behind the scenes, and at this stage nothing is installed, so there's no great risk.
Setting up software RAID (and/or LVM) isn't unfeasible after installation, but it's indeed a bit technical (fiddly might not be the right word, but maybe it seems unclear to you because you haven't yet familiarized yourself with these concepts) and potentially risky (if you don't take care to back up your important documents) because if you mess up, you can lose data on certain partitions.
Good luck
Hello,
I checked out the tutorial https://doc.ubuntu-fr.org/tutoriel/installation_raid_lvm and there are options like RAID that are not available in Linux Mint but seem to be available in Ubuntu. I believe this is because mdadm is not installed by default in Linux Mint.

But, when you say that when a disk starts to fail, there are signs. Yes, that's true and it makes sense, the disk manager will start indicating that there are unrecoverable sectors, there will be slowness, etc.
Listen, I'm running out of time, unfortunately. So, what I'm going to do is drop the idea of RAID and manage to get a SSD. Sure a SSD can fail, but there is less risk than with an HDD. Coupled with a daily Timeshift, I will have the same system after restoration if I replace the HDD with the SSD, (in case of failure, of course).
The idea of RAID wasn't really to protect the files; but rather to protect the system configuration, particularly the user interface which is, sorry for the anglicism, "fine-tuned" to perfection for my needs. My files are stored elsewhere.
My apologies if my French is a bit difficult to understand, I don't come from France and in Canada, as you probably know, French is not quite the same. :-P
Guillaume
Hello Guillaume,
The SSD and timeshift indeed seem more appropriate. Then whether we're talking about user profiles or your user profile (which includes the "fine-tuned" configuration of your graphical interface), everything is in your personal folder (e.g., /home/guillaume) and therefore on the /home partition. So you just need to back up this partition to be worry-free.
As for how to do it, timeshift works perfectly, others use rsync or clonezilla. All these solutions seem more suitable to me than RAID, which, depending on the type of RAID, is more for mirroring a disk (for example in a disk bay) and/or optimizing performance in reading and/or writing (depending on the type of RAID and the disks involved). All this to say that I think you’re making the right decision by choosing timeshift over RAID.
Best wishes
Hello,
To permanently fix grub, you need to boot normally, and once you’ve booted, redeploy it with the command:
sudo update-grub
As for timeshift, I can’t tell you much more since I’ve never used it, but I think a good start would be to indicate which command you want to run, what result you’re getting, and what the tutorials say about timeshift on this topic... and when you have a clearer picture, you can then ask your question more precisely (in a new thread, since it’s a new subject).
Good luck
Hello,
Regarding message #14, I just checked at home and it's actually normal to have ro at that place. Here's an excerpt from my /boot/grub/grub.cfg:
set linux_gfx_mode= export linux_gfx_mode menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b9cbe1a9-3263-44d2-ada6-973c29aa0895' { load_video insmod gzio if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi insmod part_gpt insmod ext2 search --no-floppy --fs-uuid --set=root b9cbe1a9-3263-44d2-ada6-973c29aa0895 echo 'Loading Linux 5.18.0-3-amd64 ...' linux /boot/vmlinuz-5.18.0-3-amd64 root=UUID=b9cbe1a9-3263-44d2-ada6-973c29aa0895 ro quiet echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-5.18.0-3-amd64 } As you can see in the line that starts with "linux," I also have a "ro."
If your filesystem / is mounted as ro, there is a good reason for it. What are the error messages? Are they the same as in #13? If so, it’s more about how to resolve those messages that we need to look into (see for example this link).
Have you checked if in /etc/fstab, the line corresponding to /, there wasn't a "ro"? In your case, the UUID will be different (and it must be kept as is) but here’s what the line in question looks like on my end:
UUID=b9cbe1a9-3263-44d2-ada6-973c29aa0895 / ext4 errors=remount-ro 0 1 Good luck
Hello,
Yes indeed, my other machines also have a "ro". So that's normal. ;-)
There is no error message like in message #13 but the screen remains black with the hostname and "login" as if I could give you an example, Ubuntu server console. I would like to send you an image but I am no longer on site until Friday.
If I log into the system in this state, the file system is in read only. If I restart, I replace "ro" with "rw" and press F10, it normally starts up with the Linux Mint welcome screen and everything. If I log in, the file system is no longer in read only until I restart.
/etc/fstab looks like:
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda2 during installation UUID=d646f079-d10b-464f-9b2d-f1f612b6f96e / ext4 defaults 0 1 /swapfile none swap sw 0 0 # 192.168.3.2:/mnt/disks/workstation-dc /nfs/backups nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0 # UUID=EE05-6276 /boot/efi vfat defaults 0 1 # /dev/sda1 /mnt/disk ext4 defaults 0 0 #
Thank you,
Guillaume
Hello Guillaume,
If the screen stays black after starting past grub, it’s probably the graphics server that crashes, so it has nothing to do with this ro/rw story. Moreover, the file /etc/fstab seems correct regarding /.
It would be better to switch to text mode (ctrl alt f2), log in, and report back the results of:
lscpi | egrep "3D|VGA" grep EE /var/log/Xorg.0.log
Good luck


Hello,
I read the tutorial, but I'm able to create the RAID5, that's not the problem. The issue is that I can't install GRUB and boot my system.
I would gladly go with a hardware RAID, my motherboard supports RAID1, okay it's not RAID5 as I wanted but it's better than nothing.
I know that hardware RAID is controller-dependent, if it fails, I will restore the system with a Timeshift snapshot.
The array made up of two SSDs is set up in the BIOS, the problem is that LinuxMint does not detect the array. Should I provide a driver to LM?
My motherboard is Asus PRIME A520M-K.
Guillaume
Just a question like that, should I wait for the synchronization to finish before installing anything, including GRUB? Can I install GRUB on /dev/md0 in the case of RAID1? But in the case of RAID5, where should I install GRUB?
I still need help, please, if anyone has other leads.
Thank you,