If you want to install Debian on a RAID or fakeRAID device - one that is configured and initialized from the BIOS, you may end up in a case where, at some point during the install, the installer will not find any partitions.
To install on a RAID or fakeRAID, you would:
Install
option highlighted, press Tab and edit the line in order to append the string mdadm=true
and then press Enter.mdadm=true
did the trick - but most likely that will not be the case.Now it is time to assemble the array, so let us scan for it by issuing:
mdadm --assemble --scan
Which will tell you that it has assembled the array you have configured in your BIOS. The next step is to determine what device your RAID array is on. You would issue:
cat /proc/mdstat
which will list the device followed by the devices that are part of the RAID. For example:
/dev/md126 sdb sdc ...
The md126
is the device that Linux created when it assembled the array. The next step is to start the array by issuing:
mdadm --manage /dev/md126 --run
where md126
is the device you found by issuing cat /proc/mdstat
. After you run the last command, you should be told that the array has been made active, and to check that, you can issue again:
cat /proc/mdstat
which should tell you that the array is active.
Now it is time to continue the install, so:
/dev/md126
.It may happen that after you attempt to boot your new RAID, you get an error such as:
mdadm: No devices in conf file were found.
in which case you have to assemble the RAID array manually to boot into the system.
To avoid this issue, once you have booted into the system, edit /etc/default/grub
and add the option:
rootdelay=10
to the kernel parameters.
The effect is that upon booting the system will wait for the devices to settle before probing for RAID arrays.
In case something goes wrong, you do not have to reinstall the whole thing again. Instead, boot off the DVD or netinstall CD and go to Advanced→Rescue Mode
. With Rescue Mode
selected, press Tab and append mdadm=true
to the command line and press Enter. This will boot you in rescue mode where you can progress some steps after which you should assemble and run the RAID array again as discussed in the previous section.
You may need to mount the array manually in order to install grub or make changes to the install. In that case, you would leave the installer as it is, press Alt–> to switch to a different terminal and press Enter to activate it. Now, you can assemble the RAID array as per the previous section.
After the RAID array has been assembled and started, you can mount the partitions (for example, /dev/md126p1
may be the root partition):
mount /dev/md126p1 /mnt
Once the partition is mounted on /mnt
we now bind-mount some essential virtual filesystems:
mount -o bind /dev /mnt/dev mount -o bind /proc /mnt/proc mount -o bind /sys /mnt/sys
After which we can change-root to the mounted partition by issuing:
chroot /mnt
You will notice that the prompt has changed. We are now inside the root partition and we can edit files, run grub-update
if we change grub files, etc… To exit the rootjail, we issue exit
and unmount everything:
umount /mnt/proc umount /mnt/sys umount /mnt/dev umount /mnt
and we can then reboot.