How to install software RAID using Mint Live CD
Solution 1
Yes, you can use chroot to install mdadm:
sudo -s
for f in sys proc dev ; do mount --bind /$f /mnt/$f
chroot /mnt
apt-get install mdadm
Replace /mnt with wherever you mounted your root filesystem.
Solution 2
I tried different solutions to make RAID 0 and none worked. I used my imagination and I did it. So, I leave here my humble contribution, because I have used Linux for years, but I am not an expert. You know... if the system works, you don't use your knowledge. What do I think about? The Ubuntu site says that grub installs in RAID 1. When my installation is finished, livecd would not accept the partition I chose. But... why make RAID to boot??? My solution...
- Run LiveCD Mint
- Open the terminal
apt-get update
dd if=/dev/zero of=/dev/sda bs=1M status=progress
dd if=/dev/zero of=/dev/sdb bs=1M status=progress
fdisk /dev/sda
- type "n" to new partition
- choose "1"
- choose default beginning
- type "+500M" (I tried 200 and 300 and got a "no space cause raid use metadata")
- type "a" to make it "bootable"
- type "n" again
- choose "2"
- choose default beginning and end
- type "t"
- type "fd"
- type "w" to write
- make the same to sdb
probably you got something like that:
/dev/sda1 * 2048 1026047 1024000 500M 83 Linux /dev/sda2 1026048 488397167 487371120 232,4G fd Linux RAID autodetect
apt-get install mdadm
apt-get install raidutils
I think raidutils is optional – I don't know.
mdadm --create /dev/md2 --level=0 --raid-devices=2 /dev/sda2 /dev/sdb2
I choose to boot in sda1 and after install grub in sdb2, in case of problem in sda1 – no problem, it's small space. No raid to boot - It worked fine.
cat /proc/mdstat
Is raid active? Ok
mkfs.ext4 /dev/md2
- Try to install liveCD and chose "advanced option"
- click mouse in md2 to change it to "journaling ext4" - in my case, the first option
- choose format
- and choose "/" ok
- right below choose "sda" to device to bootloader installation
After installation, don't reboot
Open the terminal again
sudo mount /dev/md2 /target/
sudo mount --bind /dev/ /target/dev/
sudo mount --bind /sys/ /target/sys/
sudo mount --bind /proc/ /target/proc/
sudo mount /dev/sda1 /target/boot/
cat /etc/resolv.conf >> /target/etc/resolv.conf
Here I got a "permission denied". No problem. I opened one file and copy the text to other
sudo xed /etc/resolv.conf
copy text, leave it in the empty file below and save
sudo xed /target/etc/resolv.conf
sudo chroot /target
sudo apt-get update
sudo apt-get install mdadm
sudo grub-install /dev/sda
That's all. Reboot and have fun.
Related videos on Youtube
slhck
Updated on September 18, 2022Comments
-
slhck over 1 year
I wish to install Linux Mint 11 with RAID 1 for my
/home
. I was wondering if I can install RAID 1 during the installation from the Live CD.I have managed to set up RAID from the Live CD and install Linux Mint 11 to it, but on reboot it will not recognize the RAID volume as mdadm is not installed. Can I install RAID drivers from my Live CD onto the installed Mint using
chroot
and get Mint to recognise the volumes on reboot? Is there a better alternative?I know this would be a trivial exercise using the Alternate CD in Ubuntu but Mint does not have an Alternate CD (at least that I aware of).
My machine setup:
disk 1 . 120GB SSD mount / disk 2 . 1TB spindle raid 1 mount /home disk 3 . 1TB spindle raid 1 mount /home
-
Canadian Luke about 10 years
-
-
Admin over 8 yearsThanks, this works. you may want to issue echo nameserver 8.8.8.8 >/etc/resolv.conf if apt-get fails to resolve ubuntu package server names after the chroot (this is a Google public DNS)
-
MikeP about 7 yearsA nice short 45 step process. Easy peasy.