Saturday, July 26, 2008

Install Debian on a Software Raid 1

Steps:

  1. Boot the Debian Etch installer.
  2. If the installation comes to "Partition method", use "Manual".
  3. In the following menu, scroll to your first disk and hit enter: the partitionier asks you, if you want to create an empty partition table. Say "yes". (Hint: this will erase your existing data, if any.)
  4. The partitioner is back in the disk overview, scroll one line downwards over the line with "FREE SPACE" and hit enter.
  5. Create a partition with the size you need. Select "Primary" for type for the new partition. Select "Beginning" for the location for the new partition.
  6. In the "Partition settings" menu, go to "Use as" and hit enter.
  7. Change the type to "physical volume for RAID".
  8. Finish this partition with "Done setting up the partition".
  9. Create other partitions on the same disk, if you like.
  10. Now repeat all the steps from the first disk for the second disk.
  11. After this, you should have at least two disks with the same partition schema and all partitions should be marked for RAID use.
  12. Now look at the first menu entry in the partitioner menu, there is a new line: "Configure software RAID". Go into this menu.
  13. Answer the question, if you like to write the changes, with "Yes".
  14. Now pick "Create MD device".
  15. Use RAID1 and give the number of active and spare devices (2 and 0 in our case).
  16. In the following menu, select the same device number on the first and second disk and Continue.
  17. Repeat this step for every two devices until you are done. Then use "Finish" from the Multidisk configuration options.
  18. You are back in the partitioner menu and now you see one ore more new partitions named as "Software RAID Device". You can use this partitions like any normal partition and continue installing your system.
Install boot loader (grub) on the second hard drive:
  1. Start the grub command shell:
    # grub
  2. At the 'grub>" shell prompt create new boot record for the second drive:
    root (hd1,0)
    setup (hd1)
    quit

View RAID status:
# cat /proc/mdstat
or
# mdadm -D /dev/md0

Add a drive to RAID device:
# mdadm --add /dev/md0 /dev/sda1

References:
  1. Install Debian Etch on a Software Raid 1 with S-ATA disks
  2. Monitoring and Managing Linux Software RAID

"rtc: lost some interrupts at 1024Hz." Messages Again

I got a lot of "rtc: lost some interrupts at 1024Hz." messages after installed zaptel-1.4.11 and the ztdummy module was enabled.

The PC platform details:
- Debian GNU/Linux 4.0r1 on i386 with update applied
- Shuttle KPC K45 Barebones
- CPU Celeron C430 1.8 GHz

I can fix this problem by applying the method in my previous post on 6-Oct-2007. However, when I press the power button, the system power off immediately instead of a clean shutdown. After a lot tries, I still cannot fix the power button problem.

Finally, I reinstall the system using Debian GNU/Linux 4.0r3 on Amd64 (i.e. 64-bit version). The "rtc: lost some interrupts at 1024Hz." never occur again.

Thursday, July 24, 2008

Change Debian to Use Local Time Instead of UTC

In /etc/default/rcS, set UTC=no.