Author Topic: Installing Linux MCE rc1 on raid 1 array  (Read 3153 times)

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Installing Linux MCE rc1 on raid 1 array
« on: August 01, 2007, 02:47:35 am »
My Configuration:

Hybrid:
 AMD 64 3500+
 MSI K9N6PGM-F Socket AM2 NVIDIA GeForce 6100
 1GB pc6400
 GeForce 7300GS
 2 500GB SATA hard drives in RAID 1 array

8 Port Netgear switch

Netgear wireless router (with dhcp disabled)

Sceptre 37" LCD TV

Windows XP pc orbiter

Warning: this is most probably not the best way to install a raid array, but it did work for me. Your mileage may vary.

Boot Kubuntu i386 Alternate cd
Follow the install instructions until it starts the disk partitioner.

This is where I'm pretty sure I do something wierd.

Partition and format just one of the drives for now. Select "Device for Raid" for each partition until you have your disk the way you want it (and be sure to make your boot partition bootable).

disk partitioner:

disk 1 (/dev/sda):
#1 primary 50MB Bootable
#2 primary 30GB   
#3 primary 469GB
#4 primary 560MB

Then "Configure Software Raid"
For some reason it automatically creates /dev/md0 with /dev/sda1 which is fine with me as it does it as raid 1. Create new md device. I had to select level 1 but other than that the default settings worked for me. When it asks what disks to add, you'll only chose one in the list for each md device that you create. When you finish you end up with something like:

/dev/md0 RAID 1 /dev/sda1 50MB
/dev/md1 RAID 1 /dev/sda2 30GB
/dev/md2 RAID 1 /dev/sda3 469GB
/dev/md3 RAID 1 /dev/sda4 560MB

Now partition each raid device the way you would any normal partition to get:

/dev/md0 RAID 1 /dev/sda1 50MB /boot
/dev/md1 RAID 1 /dev/sda2 30GB /
/dev/md2 RAID 1 /dev/sda3 469GB /home
/dev/md3 RAID 1 /dev/sda4 560MB swapspace

I select ext3 for all file systems and select the noatime option to improve performance a little, but I'm sure you can do what you normally do here. After that just follow the rest of the installer and let it reboot. Once you log in check to make sure your arrays are up (I don't see how you would have finished the install and rebooted otherwise, but still) with:

 cat /proc/mdstat

you should get something like:

Personalities : [raid1]
md3 : active raid1 sda4[0]
      546112 blocks [2/1] [U_]

md2 : active raid1 sda3[0]
      458494976 blocks [2/1] [U_]

md1 : active raid1 sda2[0]
      29294400 blocks [2/1] [U_]

md0 : active raid1 sda1[0]
      48064 blocks [2/1] [U_]

unused devices: <none>

The [U_] on each line tells us that one disk is up and the other is down, which is as it should be since we haven't told the system about it yet. Now here's a trick my grandpappy taught me:

 sfdisk -d

will print the partition info for a drive and sfdisk will partition a disk so combining the two we get:

 sfdisk -d /dev/sda | sfdisk /dev/sdb

will take the partition table from disk sda and use it to make sdb so. As far as I know that's the best way to be sure 2 partitions are the same size. Now that your drives are partitioned the same, you just have to tell the computer to use the second drive in the arrays:

 mdadm /dev/md1 --add /dev/sdb2
mdadm: added /dev/sdb2

now if you cat /proc/mdstat you should see something like:
Personalities : [raid1]
md3 : active raid1 sdb4[2] sda4[0]
      546112 blocks [2/1] [U_]
        resync=DELAYED

md2 : active raid1 sdb3[2] sda3[0]
      458494976 blocks [2/1] [U_]
        resync=DELAYED

md1 : active raid1 sdb2[2] sda2[0]
      29294400 blocks [2/1] [U_]
      [===============>.....]  recovery = 79.7% (23359488/29294400) finish=1.3min speed=73344K/sec

md0 : active raid1 sdb1[1] sda1[0]
      48064 blocks [2/2] [UU]

Notice the [UU] now and the "recovery ="? that means it worked. I think. Someone please tell me if I'm wrong, but once I let all the arrays do a full resync, I can put the cable on either drive (please don't pull both of them unless you're super cool and have a spare drive installed) and other than a short slowdown on the desktop, the system doesn't seem to be affected. I haven't figured out how to get the system to see the drive when I plug it back in without a restart though so if anyone knows that, I'd appreciate it.

Ok, now our base system is up and running and it's time to install linuxmce.

I go off the recommended path here again and upgrade a couple things because I'm lazy. First I comment the line for the cd out of /etc/apt/sources.list and run

 apt-get update

and

 apt-get install ssh smbfs

ssh because I wanted to get info to write this and I just kind of like being connected from my desktop and smbfs is because I can't be bothered to burn the LinuxMCE iso's and just copy them to the kubuntu desktop from the network (I've installed lmce many times trying to get it to work properly). I don't think you actually have to install smbfs since you can just use the network browser from the desktop without it, but I haven't had a problem with it so far.
 I then mount the iso of the packages cd (or just put the cd in)

mount -t iso9660 -o loop /home/ruben/Desktop/LinuxMCE\ 1.1\ RC1/linuxmce-1.1-packages.iso /media/media/

and run the installer .deb:

dpkg -i /media/media/mce-installer_2.0.1-1_i386.deb

which will put the install icon on the desktop. At this point we're at LMCE install proper and I've got to say that from the installer on I've been very impressed with the improvements in RC1 over the previous releases. It's not perfect yet, but it's made a great stride towards being something I would think belongs in a mainline distro or package. One problem I noticed still happening is that after I start the installation and it restarts for the nvidia driver, my screen resolution is a lot lower than it should be or was before. I finally traced this to the line:

Option         "UseEdid" "False"

in xorg.conf. By commenting it out, the specified resolution is used.
Log back in and restart the installer. I chose hybrid and Primarily a media PC and simply followed the prompts through until it asked for the cd's. Here I'll mention that if you tell it you have an iso on the drive (if you were cool enough just to copy the images to the local machine) for all 3 cd's (especially the kubuntu cd), it seems to take a LOT less time to cache them. I'm sure I had a couple errors in my install, however it finally finishes and asks me to restart. When it does it automatically loads up the core and MD software after a little while. I think this is where people are just getting impatient. With every install I've done, as long as I wait until I'm sure the system is ready for the next step, I haven't had any problems other people are reporting.
  As far as setup, I'd recommend just following the onscreen guide (good job with the videos, but I'd put a control so she doesn't keep repeating herself over and over) and connect your periphrials when you get to each screen. My air-mouse and hdhomerun were both detected automatically, as were my windows shares. I'm still waiting on my usb-uirt to come in so I can control the tv. Same with my z-wave controller, but I do have the z-wave system working with the ha07 remote on it's own, so I'm fairly certain it will work with little issue. I'll definitely post an update when everything comes in, but I'm really impressed so far. I've also got a nokia 770 I picked up intending to use it for a mobile orbiter so when I get that compiled and working, I'll be even happier. -Ruben