Recently I decided to install LMDE on my machine. I knew that this Fake RAID controller was going to cause me some trouble, so I was kind of prepared. lol
In my first attempt I tried to use the installer right away and as I was expecting it didn't worked! :) The live-installer only detected the two HDs but not the RAID. That's ok, so I tried to go on and setup the RAID by hand... All went well: installing dmraid, loading the modules and finally activating the RAID through dmraid. Then I went to execute the live-installer again hoping it would detect the mapper so I could choose it. For my surprise: no, it won't detect. :( So I went to the official IRC channel #linuxmint-debian@irc.spotchat.org where Ikey told me that the live-installer wasn't capable of working with RAIDs yet. The solution: manually installing! Ikey was very kind to help me through all the process! Thank you! I can anticipate that it was a SUCCESS, so he asked me to post my experience in the forums and here is a quote from him:
Very nice! =DDue to the help of AkiraYB on IRC I am now investigating the addition of RAID support to LMDE's live-installer, as we have now deemed it within the realm of our control and easy enough to implement. I will do this within the shortest time-frame possible for the hopeful inclusion in the next live-installer. Many thanks to AkiraYB for going through the process on IRC and making this possible.
I used Linux Mint Debian (201012/201101) for this tutorial. As you can see, the procedure can easily be adapted to any other system, regardless it's a system with or without a RAID controller. But here we're addressing systems with a Fake RAID.
So, here we go to the real deal! Enjoy!
First Things First
As we're going to work with the console and writing some characters like '/' (slash) and setting passwords, it's important to have a keyboard working properly. I mean, with the right layout for it... So, go ahead and configure yours in the Control Panel! :D
For now on, the terminal will be our best friend! So it's important that you have some familiarity with it. Also, although I have done the procedure at least two times by now, as I'm writing by logs, memory and trying to make some improvements to it, it's subject to errors.
The majority of the time we'll do our work as root, so it's important to note that when the shell command comes after a '#' then the command is executed as root, when it comes after a '$' then it is executed by a normal user.
I recommend opening a terminal and issuing a:
Code: Select all
$ sudo su
Activate your Fake RAID
First we have to install dmraid. Simple enough:
Code: Select all
# apt-get update
# apt-get install dmraid
Code: Select all
# modprobe dm_mod
# modprobe dm_mirror
Code: Select all
# dmraid -ay
RAID set "pdc_diif" was activated
RAID set "pdc_diif1" was activated
RAID set "pdc_diif2" was activated
RAID set "pdc_diif3" was activated
RAID set "pdc_diif4" was activated
Now we're ready to go!
Create Partitions
Time for some partitioning... I recommend using GParted for the task. Just make sure to select the mapper (/dev/mapper/pdc_diif in my case) to your RAID if it isn't already selected. Revise your modifications before committing! Hopefully GParted will create the filesystems (format) the partitions you created. You did your backup, right?! :)
Here's my configuration, just for reference:
Code: Select all
/dev/mapper/pdc_diif1 100MB ext2 /boot
/dev/mapper/pdc_diif2 30GB ext4 /
/dev/mapper/pdc_diif3 80GB ext4 /home
/dev/mapper/pdc_diif4 2GB swap swap
Installation
Now we have to create the folders and then mount the partitions on the right location (remember that I'm using my configuration as an example, you have to adapt it to yours):
Code: Select all
# mkdir /mnt/target
# mount /dev/mapper/pdc_diif2 /mnt/target
# mkdir /mnt/target/boot
# mount /dev/mapper/pdc_diif1 /mnt/target/boot
# mkdir /mnt/target/home
# mount /dev/mapper/pdc_diif3 /mnt/target/home
Code: Select all
# mkdir /mnt/source
# mount -o loop -t squashfs /live/image/casper/filesystem.squashfs /mnt/source
Code: Select all
# rsync -avz /mnt/source/ /mnt/target/
Change to our New System (chroot)
"Enter" our new system so we can make the initial configuration:
Code: Select all
# umount /mnt/source
# mount --bind /dev /mnt/target/dev
# mount --bind /dev/pts /mnt/target/dev/pts
# mount --bind /dev/shm /mnt/target/dev/shm
# mount --bind /proc /mnt/target/proc
# mount --bind /sys /mnt/target/sys
# mount --bind /tmp /mnt/target/tmp
# cp -f /etc/resolv.conf /mnt/target/etc/resolv.conf
# chroot /mnt/target
Code: Select all
# dpkg-reconfigure tzdata
# dpkg-reconfigure locales
# dpkg-reconfigure keyboard-configuration
Clean Up the System
The base filesystem comes with a mint user used here in the live environment. In our installation we don't need it:
Code: Select all
# userdel -rf mint
We need to wipe out some lines from the GDM config file that are specific for the live environment. There are some ways of doing it, I suggest using the editor nano for the task so you can see what's going on. But if you're felling lucky, you can simply use the sed command to remove what we don't need.
The SED way
Code: Select all
# sed -e /^[^#\[]*$/d -i /etc/gdm3/daemon.conf
Code: Select all
# nano /etc/gdm3/daemon.conf
Code: Select all
TimedLoginEnable=false
AutomaticLoginEnable=true
TimedLogin=mint
AutomaticLogin=mint
TimedLoginDelay=30
With these lines GDM will try to automatic login with the mint user that we don't have anymore, and it'll break... :)
Now we have to remove every package related to the live environment:
Code: Select all
# apt-get remove --purge live-initramfs live-config live-config-sysvinit live-installer live-installer-slideshow
Manage Users
Next, we set the root password:
Code: Select all
# passwd
We need a user, right?! :)
Code: Select all
# adduser <username>
Add this user to the sudo group so we can sudo:
Code: Select all
# usermod -a -G sudo <username>
File Systems Table (/etc/fstab)
It's time to tell the system how it's organized by editing the file /etc/fstab:
Code: Select all
# nano /etc/fstab
Code: Select all
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' 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>
proc /proc proc defaults 0 0
/dev/mapper/pdc_diif1 /boot ext2 defaults 0 2
/dev/mapper/pdc_diif2 / ext4 defaults 0 1
/dev/mapper/pdc_diif3 /home ext4 defaults 0 2
/dev/mapper/pdc_diif4 swap swap defaults 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
Code: Select all
# echo <hostname> > /etc/hostname
# sed -e 's/mint/<hostname>/' -i /etc/hosts
Don't Forget dmraid, the Culprit
Code: Select all
# apt-get update
# apt-get install dmraid
Finally, GRUB
Make sure you select /dev/dm-0 (/dev/mapper/pdc_diif in my case) to install it to the MBR!
Code: Select all
# dpkg-reconfigure grub-pc
Exit chroot, Umount, Reboot!
Code: Select all
# exit
# umount /mnt/target/tmp
# umount /mnt/target/sys
# umount /mnt/target/proc
# umount /mnt/target/dev/shm
# umount /mnt/target/dev/pts
# umount /mnt/target/dev
# umount /mnt/target/home
# umount /mnt/target/boot
# umount /mnt/target
THAT'S IT!
Congratulations! You have now LMDE installed on your Fake RAID! Enjoy!!! :)
It can appear to be very difficult to execute these steps seeing the length of this post, but I think I have over detailed a bit too much in order to help you understand what is going on in each step (but not too much at the same time :)). It isn't that much complicated, really. It's just a lot to do... =D
Again, many thanks to Ikey for helping me with all the process and making this guide possible!
Thanks for your attention! Cya! o/
AkiraYB.