Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
    

2 Answers 2

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.

share|improve this answer

I had to do this a few times, and the following shows some detailed examples of configuring both / and /home under a RAID when installing Linux Mint 11:

(1) boot from the live CD

(2) setup the software RAID

mint ~ # apt-get -y install mdadm 
mint ~ # mdadm --assemble --scan 
mint ~ # parted /dev/sda 
(parted) mklabel gpt 
(parted) mkpart primary ext3 1MB 500MB 
(parted) mkpart primary ext4 500MB 50.5GB 
(parted) mkpart primary linux-swap 50.5GB 114.5GB 
(parted) mkpart primary ext4 114.5GB 100% 
(parted) quit 

mint ~ # parted /dev/sdb 
(parted) mklabel gpt 
(parted) mkpart primary ext3 1MB 500MB 
(parted) mkpart primary ext4 500MB 50.5GB 
(parted) mkpart primary linux-swap 50.5GB 114.5GB 
(parted) mkpart primary ext4 114.5GB 100% 
(parted) quit 
mint ~ # mkfs.ext3 /dev/sda1 
mint ~ # mkfs.ext4 /dev/sda2 
mint ~ # mkfs.ext4 /dev/sda4 
mint ~ # mkfs.ext3 /dev/sdb1 
mint ~ # mkfs.ext4 /dev/sdb2 
mint ~ # mkfs.ext4 /dev/sdb4 
mint ~ # mdadm --create /dev/md0 --level 1 --raid-devices 2 /dev/sd[ab]2 
mint ~ # mdadm --create /dev/md1 --level 1 --raid-devices 2 /dev/sd[ab]4 

(3) Wait until it is done syncing:

mint ~ # watch cat /proc/mdstat 

(4) install the OS, while not yet choosing whether or not to reboot

When prompted to "Allocate drive space", choose "Something else" so that the already created RAID partitions can be used.

Double click /dev/md0 to create a partition on it. The size should be about 50 GB. double click the now available "free space" under md0, and specify "Ext4" and mount point /. Do the same thing for md1, except choose /home -- the size should almost be 2 TB.

Double click /dev/sda1, select "Ext3" and /boot -- the size should almost be 500 MB.

Double click /dev/sda3, and select "swap area". Do the same for /dev/sdb3. The size should be about 64 GB.

Select /dev/sda for the boot loader installation. Finish the GUI installation, but DON'T reboot yet.

(5) install mdadm on the installed system and reconfigure GRUB (double check that everything including /boot and /home are still mounted in target by the installer):

mint ~ # mount --bind /dev/ /target/dev 
mint ~ # mount -t proc proc /target/proc 
mint ~ # mount -t sysfs sys /target/sys/ 
mint ~ # chroot /target 
mint / # apt-get install mdadm 
mint / # cat /etc/mdadm/mdadm.conf 
mint / # apt-get install --reinstall grub-pc 
mint / # exit

(6) click "Restart Now" from the gui installer

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.