Content-Type: multipart/related; start=; boundary=----------OzsRO2YwiP7CblbdpPJmnq Content-Location: http://wiki.archlinux.org/index.php/Installing_with_Software_RAID_or_LVM Subject: =?utf-8?Q?Installing=20with=20Software=20RAID=20or=20LVM=20-=20ArchWiki?= MIME-Version: 1.0 ------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=Installing_with_Software_RAID_or_LVM.htm Content-Type: text/html; name=Installing_with_Software_RAID_or_LVM.htm Content-Id: Content-Location: http://wiki.archlinux.org/index.php/Installing_with_Software_RAID_or_LVM Content-Transfer-Encoding: 8bit Installing with Software RAID or LVM - ArchWiki
Arch Logo
Arch Linux

Installing with Software RAID or LVM

From ArchWiki


Note: This is currently a work in progress! I will delete this comment when it is no longer applicable -- that is, once I have tested it through at least once fully. At this point, many parts have been tested, but new parts recently added may not be exactly correct yet.

Contents

[edit] Disclaimer

Installing a system with RAID is a complex process. Anything could go wrong. You could make a mistake, I could make a mistake, there could be a bug in something. Backup all your data first. Make sure only the drives involved in the installation are attached while doing the install. You've been warned!

Also note that this document is up-to-date with all "Archisms" as of 0.7.1. It may not be applicable to previous releases of Arch Linux.

[edit] General Approach

For starters, note that this document seeks primarily to give you a good example walkthrough of how to install Arch with Software RAID or LVM support for a typical case. It won't try to explain all the possible things you can do -- it's more to give you an example of something that will work that you can then tweak to your own purposes.

In this example, the machine I'm using will have three similar IDE hard drives, at least 80GB each in size, installed as primary master, primary slave, and secondary master, with my installation CD-ROM drive as the secondary slave. I will assume these can be reached as /dev/hda, /dev/hdb, and /dev/hdc, and that the cdrom drive is /dev/cdrom.

To make this easy, I won't be trying to put the root filesystem on LVM. While this is technically possible to do, Arch does not (yet) provide a nice way to do it, so let's leave that can of worms shut for now.

We'll create a 100MB /boot partition, a 2048MB (2GB) swap partition, a 40GB root partition, and leave the rest of the drivespace for LVM. The boot and swap partitions will be RAID1, while the root and LVM partitions will be RAID5. Why RAID1? For boot, it's so you can boot the kernel from grub (which has no RAID drivers!), and for swap, it's for speed.

Each RAID1 redundant partition will have three physical partitions, all the same size, one on each of the drives. The total storage capacity will be the size of a single one of these physical partitions. A RAID1 redundant partition with 3 physical partitions can lose any two of its physical partitions and still function.

Each RAID5 redundant partition will also have three physical partitions, all the same size, one on each of the drives. The total storage capacity will be the combined size of two of these physical partitions, with the third drive being consumed to provide parity information. A RAID5 redundant partition with 3 physical partitions can lose any one of its physical partitions and still function.

In this example, we'll create the /home partition in LVM, and mount it prior to install.

[edit] Get the Arch Installer CD

Please note that in order to use LVM, you need the lvm2 and dev-mapper packages installed, otherwise you won't be able to see any LVM partitions on reboot, until you install those packages. Note that the Arch 0.7.1 Base installer does not contain these packages, but the Arch 0.7.1 Full installer does. So if you're going to use LVM, you'll need to download the bigger ISO. My example will describe you using the Full installer; the changes should be minimal if you wish to use the Base installer instead.

[edit] Outline

Just to give you an idea of how all this will work, I'll outline the steps. The details for these will be filled in below.

  1. Boot the Installer CD
  2. Partition the Hard Drives
  3. Create the RAID Redundant Partitions
  4. Create and Mount the Main Filesystems
  5. Setup LVM and Create the /home LVM Volume
  6. Install and Configure Arch
  7. Install Grub on the Primary Hard Drive
  8. Unmount Filesystems and Reboot
  9. Install Grub on the Alternate Boot Drives
  10. Archive your Filesystem Partition Scheme

[edit] Procedure

[edit] Boot the Installer CD

First, load all your drives in the machine. Then boot the Arch Linux 0.7 Full installation CD.

At the syslinux boot prompt, hit enter: we want to use the SCSI kernel, which has support for RAID and LVM built in.

So far, this is easy. Don't worry, it gets harder.

[edit] Partition the Hard Drives

We'll use cfdisk to do this partitioning. We want to create 4 partitions on each of the three drive:

Partition 1 (/boot): 100MB, type FD, bootable
Partition 2 (swap): 2048MB, type FD
Partition 3 (/): 20000MB, type FD
Partition 4 (LVM): <Rest of the drive>, type FD

Note that in general, in cfdisk, you can use the first letter of each Bracketed Option to select it; however, this is not true for the Write command, presumably for safety's sake, and so you have to use the arrow keys to select it.

First run:

# cfdisk /dev/hda

Create each partition in order:

  1. Select New.
  2. Hit Enter to make it a Primary partition.
  3. Type the appropriate size (in MB), or for Partition 4, just hit enter to select the remainder of the drive.
  4. Hit Enter to choose to place the partition at the Beginning.
  5. Select Type, hit enter to see the second page of the list, and then type fd for the Linux RAID Autodetect type.
  6. For Partition 1 on each drive, select Bootable.
  7. Hit down arrow (selecting the remaining freespace) to go on to the next partition to be created.

When you're done, select Write, and confirm y-e-s that you want to write the partition information to disk.

Then select Quit.

Repeat this for the other two drives:

# cfdisk /dev/hdb
# cfdisk /dev/hdc

Create the same exact partitions on each disk. If a group of partitions of different sizes are assembled to create a redundant RAID partition, it will work, but the redundant partition will be in multiples of the size of the smallest one, leaving the rest of the allocated drive space to waste.

[edit] Load the RAID Modules

Before using mdadm, you need load the modules for the RAID levels you'll be using. In this example, we're using levels 1 and 5, so we'll load those. You can ignore any modprobe errors like "cannot insert md-mod.ko: File exists". Busybox's modprobe can be a little slow sometimes.

# modprobe raid1
# modprobe raid5

[edit] Create the RAID Redundant Partitions

Now that you've created all the physical partitions, you're ready to set up RAID. The tool you use to create RAID arrays is mdadm.

To create /dev/md0 (/):

# mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/hda3 /dev/hdb3 /dev/hdc3

To create /dev/md1 (/boot):

# mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/hda1 /dev/hdb1 /dev/hdc1

To create /dev/md2 (swap):

# mdadm --create /dev/md2 --level=1 --raid-devices=3 /dev/hda2 /dev/hdb2 /dev/hdc2

To create /dev/md3 (LVM):

# mdadm --create /dev/md3 --level=5 --raid-devices=3 /dev/hda4 /dev/hdb4 /dev/hdc4

At this point, you should have working RAID partitions. When you create the RAID partitions, they need to sync themselves so the contents of all three physical partitions are the same on all three drives. The hard drives lights will come on as they try to sync up. You can monitor the progress by typing:

# cat /proc/mdstat

You can also get particular information about, say, the root partition by typing:

# mdadm --misc --detail /dev/md0

You don't have to wait for synchronization to finish -- you may proceed with the installation while syncronization is still occurring. You can even reboot at the end of the installation with synchronization still going.

[edit] Create and Mount the Main Filesystems

I like Reiser (3.x), so I use it for almost everything. GRUB supports it for booting, and it handles small files well. It's about as well tested as EXT3. You can choose other types if you wish.

To create /:

# mkreiserfs /dev/md0

To create /boot:

# mkreiserfs /dev/md1

To create swap space:

# mkswap /dev/md2

Now, mount the boot and root partitions where the installer expects them:

# mount /dev/md0 /mnt
# mkdir /mnt/boot
# mount /dev/md1 /mnt/boot

[edit] Setup LVM and Create the /home LVM Volume

If you are using an archlinux install CD <= 0.7.1, you have to create and mount a sysfs partition on /sys, to keep lvm from getting cranky. If you forget to do this, instead of giving you an intelligent error message, lvm will simply Segmentation fault at various inconvenient times. Be warned!

To mount the sysfs partition, do:

# mkdir /sys
# mount -t sysfs none /sys

Make sure that the device-mapper module is loaded:

# modprobe dm-mod

Now you need to do is tell LVM you have a Physical Volume for it to use. It's really a virtual RAID volume (/dev/md3), but LVM doesn't know this, or really care. Do:

# lvm pvcreate /dev/md3

LVM should report back that it has added the Physical Volume. You can confirm this with:

# lvm pvscan

Now it's time to create a Volume Group (which I'll call array) which has control over the LVM Physical Volume we created. Do:

# lvm vgcreate array /dev/md3

LVM should report that it has created the Volume Group array. You can confirm this with:

# lvm vgscan

Next, we create a Logical Volume called home in Volume Group array which is 50GB in size:

# lvm lvcreate --size 50G --name home array

LVM should report that it created the Logical Volume home. You can confirm this with:

# lvm lvscan

This Logical Volume will now be available as the device /dev/array/home. We create a ReiserFS filesystem on it, and mount it:

# mkreiserfs /dev/array/home
# mkdir /mnt/home
# mount /dev/array/home /mnt/home

We've created all our filesystems! And we're ready to install the OS!

[edit] Install and Configure Arch

This section doesn't attempt to teach you all about the Arch Installer. It leaves out some details here and there for brevity, but still seeks to be basically follow-able. If you're having trouble with the installer, you may wish to seek help elsewhere in the Wiki or forums.

Here's the walkthrough:

  • Type /arch/setup to launch the main installer.
  • Select < OK > at the opening screen.
  • Select 1 CD_ROM to install from CD-ROM (or 2 FTP if you have a local Arch mirror on FTP).
  • Now at the main menu, Select 2 Select Packages and select all the packages in the base category, as well as the mdadm and lvm2 packages from the system category. Note: mdadm & lvm2 are included in base category since arch-base-0.7.2.
  • Select 3 Install Packages. This will take a little while.
  • Select 4 Configure System:

arch =< 0.7.1:

Edit /mnt/etc/mkinitrd.conf. Make sure that REMOVE_RAID and REMOVE_DM are not set to 1. Then set the RAID_DEVICES variable to be a space-delimited list of the devices in your root (/) RAID array. An example mkinitrd.conf excerpt is shown below.

# we're not booting from USB or Firewire...
REMOVE_USB=1
REMOVE_FW=1
# but we do need these...
REMOVE_RAID=
REMOVE_DM=
# our root (/) RAID array is at md0
RAID_ROOT_ARRAY="md0"
# we only need to list the devices in our ROOT array, not all the arrays
RAID_ROOT_DEVICES="/dev/hda3 /dev/hdb3 /dev/hdc3"

arch >= 0.7.2:

Add the raid hook to the HOOKS list in /etc/mkinitcpio.conf (before 'filesystems', NOT after). Then specify the raid array you're booting from like:

 # Example with /dev/md0 for / & /dev/md1 for /boot:
 md=1,/dev/hda1,/dev/hdb1 md=0,/dev/hda3,/dev/hdb3

See Configuring mkinitpcio using RAID for more details.

[All versions] Edit your /etc/rc.conf. It should contain a USELVM entry already, which you should change to:

USELVM="yes"

Please Note: The rc.sysinit script that parses the USELVM variable entry will accept either yes or YES, however it will not accept mixed case. Please be sure you've got your capitalization correct.

Edit your Grub /boot/grub/menu.lst so that your boot entry looks like:

arch =< 0.7.1:

# (0) Arch Linux
title  Arch Linux  [[/boot/vmlinuz26]]
root   (hd0,0)
kernel /vmlinuz26 root=/dev/md0 ro

arch >= 0.7.2:

# (0) Arch Linux
title  Arch Linux  [[/boot/vmlinuz26]]
root   (hd0,0)
  kernel /vmlinuz26 root=/dev/md0 ro md=0,/dev/hda3,/dev/hda3

Edit your /etc/fstab to contain the entries:

/dev/md0                /       reiserfs        defaults        0       0
/dev/md2                swap    swap            defaults        0       0
/dev/md1                /boot   reiserfs        defaults        0       0
/dev/array/home         /home   reiserfs        defaults        0       0

At this point, make any other configuration changes you need to other files.

  • Select 5 Install Kernel. Choose to install the v2.6 kernel.

Then exit the configuration menu.

Since you will not be installing Grub from the installer, select 7 Exit Install to leave the installer program.

[edit] Install Grub on the Primary Hard Drive (and save the RAID config)

This is the last and final step before you have a bootable system!

As an overview, the basic concept is to copy over the grub bootloader files into /boot/grub, mount a procfs and a device tree inside of /mnt, then chroot to /mnt so you're effectively inside your new system. Once in your new system, you will run grub to install the bootloader in the boot area of your first hard drive. Then we save our new RAID configuration in /etc/mdadm.conf so it can be re-assembled automatically after we reboot.

Copy the GRUB files into place and get into our chroot:

# cp -a /mnt/usr/share/grub/i386-pc/* /mnt/boot/grub
# sync
# mount -o bind /dev /mnt/dev
# mount -t proc none /mnt/proc
# chroot /mnt /bin/bash

At this point, you may no longer be able to see keys you type at your console. I'm not sure of the reason for this (NOTE: try "chroot /mnt /bin/<shell>"), but it you can fix it by typing reset at the prompt.

Once you've got console echo back on, type:

# grub

After a short wait while grub does some looking around, it should come back with a grub prompt. Do:

grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Now you need to save our RAID configuration so it can be re-assembled automatically each time we boot. Previously, this was an unnecessary step in Arch because the RAID drivers were built in to the kernel. But when loaded after the kernel boots (as modules), arrays are not autodetected. Hence this configuration file.

The default /etc/mdadm.conf should be pretty much empty (except for a lot of explanative comments). All you need to do is capture the output from an mdadm query command and append it to the end of mdadm.conf.

# mdadm -D --scan >>/etc/mdadm.conf

That's it. You can exit your chroot now by hitting CTRL-D or typing exit.

[edit] Unmount Filesystems and Reboot

The hard part is all over! Now just a few commands to unmount filesystems, and then you get to reboot into your new system:

# cd /
# umount /mnt/dev /mnt/proc /mnt/home /mnt/boot
# umount /mnt

Now remove the CD from your CD-ROM drive, and type:

# reboot

[edit] Install Grub on the Alternate Boot Drives

Once you've successfully booted your new system for the first time, you will want to install Grub onto the other two disks (or on the other disk if you have only 2 HDDs) so that, in the event of disk failure, the system can be booted from another drive. Log in to your new system as root and do:

# grub
grub> device (hd0) /dev/hdb
grub> root (hd0,0)
grub> setup (hd0)
grub> device (hd0) /dev/hdc
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

[edit] Archive your Filesystem Partition Scheme

Now that you're done, it's worth taking a second to archive off the partition state of each of your drives. This guarantees that it will be trivially easy to replace/rebuild a disk in the event that one fails. You do this with the sfdisk tool and the following steps:

# mkdir /etc/partitions
# sfdisk --dump /dev/hda >/etc/partitions/disc0.partitions
# sfdisk --dump /dev/hdb >/etc/partitions/disc1.partitions
# sfdisk --dump /dev/hdc >/etc/partitions/disc2.partitions

[edit] Conclusion

You're done! I hope you've succeeded in setting up Arch Linux on your server with RAID and LVM!

[edit] Credits

This document was written by Paul Mattal with with significant help from others. Comments and suggestions are welcome at paul at archlinux dot org.

Thanks to all who have contributed information and suggestions! This includes:

  • Carl Chave
  • Guillaume Darbonne

Retrieved from "http://wiki.archlinux.org/index.php/Installing_with_Software_RAID_or_LVM"

This page has been accessed 14,593 times. This page was last modified 05:08, 26 December 2006. Content is available under GNU Free Documentation License 1.2.


------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=favicon.png Content-Type: image/x-icon; name=favicon.png Content-Location: http://wiki.archlinux.org/favicon.ico Content-Transfer-Encoding: Base64 iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+g vaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1AIcBjAgxdElVwAAAB10 RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAADPElEQVR42u3W W4hVVRwG8J/nTA5lZZoo3YxoCrInu1hBF3ZpQyARE2r1tg3qQYggNhSREQTR7J6a h0qxDRFR1otYQiJtolBJRcaYUWFKMycvpWHecsyZXtaJzWnPzPEcxR76Xg5nr7X/ 37e+/V/fWtUky5dOmjz1zI+9G/e4AGjbs33rqt19mw+7QJjQ6MQkyzvwPOZhOvZj LXrSOBo4bwKSLJ+AF/A62kumnMKr6E7jaOScCgjkPVjSQK0VeCaNo+GzEVAZZ3xp g+TwNLrPmQNJlndiTQMi67EwjaNPWxKQZPlk9OGaJvrqMGalcXSglU+wtElymIq3 mnYgyfIbsAMTW9jeI5iTxtHmZhx4uUXy2sJew+1YFFwZ34Eky6/GrnMgoObC7DSO TuN97MU7+CqMlTrwbIPkwziEE+O48Bz6Q3reiHXYiPv+JSDJ8mrYy2NhX8iFaWkc TcOluBVv4ljJ/EVJll+OoyFNYQ6+DplRaStMfmiczl+LJ9M4+ufgCtHbjxeTLH8X nwSCGibhMXyA7+rcSXCy+AkWjUG+GvOL5PVI42g3omBzEY+G3+klry2pFOyfP0rt 3rDy0+M1RhpHJ9CFbYXHD4b6XSWvDNYcmD2Kwj/xVBpHxxtt/TSOjmJhoUGn/NC7 YV6wvB7LagLmjlKvO42j/rPdf2kc7cQrtf8/7+hdWbLAbVheEzCvpM5BpC3kQA+2 w/SZHZfVjR3A4xiqJFnejnvKCqRxdKxZ9jSOOtcsf+MKmHH9TcWhATwQflVwJy6u e38Iy5rknoVVWN2/Yd1Vh375yZQZ16q2XTSCDHdgZzGIylb/eRpHB8+S+C6sxPe1 rTcyMmzL2s9UqlVzHnliIRbjSP1hdFtJsY8bJJ0S4ntTiNgFhXT9AysGB/rux5F7 uxafKr2W45a6Z8fxxRikV4bM6EJn3UV1b0jM1fgSJ38b3CUk5MzRBFxXYn/xkJkY vttcPIy7UcXv2IKtwYH1obHKbsYfBbGlAi4pPvhr6NSH6AiHzCzcHA6afXgPLwWi /aOQleHbIL5UwK8FFza1TWxfE47bgdDNLSONozNJlm8Y7Ub0Nk7im3CjHXZ+sN7/ +C/ib8oD7D2dIJzqAAAAAElFTkSuQmCC ------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=wikiprintable.css Content-Type: text/css; name=wikiprintable.css Content-Location: http://wiki.archlinux.org/skins/common/wikiprintable.css?42 Content-Transfer-Encoding: 8bit /* MediaWiki print stylesheet */ body { color: #000000; background: #ffffff; } /* MSIE/Win doesn't understand 'inherit' */ a, a.external, a.new, a.stub { color: black ! important; text-decoration: none ! important; } #article { margin: 0 ! important; } /* Continue ... */ a, a.external, a.new, a.stub { color: inherit ! important; text-decoration: inherit ! important; } /* Hide ugly UI stuff */ #quickbar, #topbar, #footer, #siteNotice, .editsection, .toctoggle { display: none; } /* */ #article { position: relative; margin: inherit ! important; } .printfooter { border-top: solid 1px black; display: block ! important; } /* Old stuff, fixme: a.CBlink { color: #0000AA; text-decoration: none; font-size: 12pt; } a.interwiki, a.external { color: #3333BB; text-decoration: none; } h1.pagetitle { padding-bottom: 0; margin-bottom: 0; } i.link, u.link { color: #000066; } p.subtitle { padding-top: 0; margin-top: 0; } */ ------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=wikibits.js Content-Type: application/x-javascript; name=wikibits.js Content-Location: http://wiki.archlinux.org/skins/common/wikibits.js?42 Content-Transfer-Encoding: Base64 Ly8gTWVkaWFXaWtpIEphdmFTY3JpcHQgc3VwcG9ydCBmdW5jdGlvbnMKCnZhciBj bGllbnRQQyA9IG5hdmlnYXRvci51c2VyQWdlbnQudG9Mb3dlckNhc2UoKTsgLy8g R2V0IGNsaWVudCBpbmZvCnZhciBpc19nZWNrbyA9ICgoY2xpZW50UEMuaW5kZXhP ZignZ2Vja28nKSE9LTEpICYmIChjbGllbnRQQy5pbmRleE9mKCdzcG9vZmVyJyk9 PS0xKQogICAgICAgICAgICAgICAgJiYgKGNsaWVudFBDLmluZGV4T2YoJ2todG1s JykgPT0gLTEpICYmIChjbGllbnRQQy5pbmRleE9mKCduZXRzY2FwZS83LjAnKT09 LTEpKTsKdmFyIGlzX3NhZmFyaSA9ICgoY2xpZW50UEMuaW5kZXhPZignYXBwbGV3 ZWJraXQnKSE9LTEpICYmIChjbGllbnRQQy5pbmRleE9mKCdzcG9vZmVyJyk9PS0x KSk7CnZhciBpc19raHRtbCA9IChuYXZpZ2F0b3IudmVuZG9yID09ICdLREUnIHx8 ICggZG9jdW1lbnQuY2hpbGROb2RlcyAmJiAhZG9jdW1lbnQuYWxsICYm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1biBhbnkgYWRkZWQtb24gZnVuY3Rpb25z Cglmb3IgKHZhciBpID0gMDsgaSA8IG9ubG9hZEZ1bmN0cy5sZW5ndGg7IGkrKykg ewoJCW9ubG9hZEZ1bmN0c1tpXSgpOwoJfQoKCWRvbmVPbmxvYWRIb29rID0gdHJ1 ZTsKfQoKLy9ub3RlOiBhbGwgc2tpbnMgc2hvdWxkIGNhbGwgcnVuT25sb2FkSG9v aygpIGF0IHRoZSBlbmQgb2YgaHRtbCBvdXRwdXQsCi8vICAgICAgc28gdGhlIGJl bG93IHNob3VsZCBiZSByZWR1bmRhbnQuIEl0J3MgdGhlcmUganVzdCBpbiBjYXNl Lgpob29rRXZlbnQoImxvYWQiLCBydW5PbmxvYWRIb29rKTsKCmhvb2tFdmVudCgi bG9hZCIsIG13U2V0dXBUb29sYmFyKTsK ------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=common.css Content-Type: text/css; name=common.css Content-Location: http://wiki.archlinux.org/skins/common/common.css?42 Content-Transfer-Encoding: 8bit /* * common.css * This file contains CSS settings common to Wikistandard, Nostalgia and CologneBlue */ /* For clarity, explicitly state some recommendations from to make sure the editsection links scale right */ h1 { font-size: 2em; } h2 { font-size: 1.5em; } h3 { font-size: 1.17em; } h5 { font-size: .83em; } h6 { font-size: .75em; } h1, h2, h3, h4, h5, h6 { font-weight: bolder } /* Now the custom parts */ /* Make edit sections (which are inside h# tags) normal-sized */ .editsection { font-weight: normal; float: right; margin-left: 5px; } h1 .editsection { font-size: 50% } h2 .editsection { font-size: 66.7% } h3 .editsection { font-size: 85.5% } h5 .editsection { font-size: 120% } h6 .editsection { font-size: 133% } #footer { clear: both } /* images */ div.floatright { float: right; clear: right; margin: 0 0 1em 1em; } div.floatright p { font-style: italic; } div.floatleft { float: left; clear: left; margin: 0.3em 0.5em 0.5em 0; } div.floatleft p { font-style: italic; } /* Print-specific things to hide */ .printfooter { display: none; } /* table standards */ table.rimage { float:right; margin-left:1em; margin-bottom:1em; text-align:center; font-size:smaller; } /* thumbnails */ div.thumb { margin-bottom: .5em; border-style: solid; border-color: white; width: auto; } div.thumbinner { border: 1px solid #ccc; padding: 3px !important; background-color: #f9f9f9; font-size: 94%; text-align: center; overflow: hidden; } html .thumbimage { border: 1px solid #ccc; } html .thumbcaption { border: none; text-align: left; line-height: 1.4em; padding: 3px !important; font-size: 94%; } div.magnify { float: right; border: none !important; background: none !important; } div.magnify a, div.magnify img { display: block; border: none !important; background: none !important; } div.tright { clear: right; float: right; border-width: .5em 0 .8em 1.4em; } div.tleft { float: left; clear: left; margin-right: .5em; border-width: .5em 1.4em .8em 0; } /* Page history styling */ /* the auto-generated edit comments */ .autocomment { color: #4b4b4b; } #pagehistory span.user { margin-left: 1.4em; margin-right: 0.4em; } #pagehistory span.minor { font-weight: bold; } #pagehistory li { border: 1px solid White; } #pagehistory li.selected { background-color:#f9f9f9; border:1px dashed #aaaaaa; } table.diff { background:white; } td.diff-otitle { background:#cccccc; } td.diff-ntitle { background:#cccccc; } td.diff-addedline { background:#ccffcc; font-size: 94%; } td.diff-deletedline { background:#ffffaa; font-size: 94%; } td.diff-context { background:#eeeeee; font-size: 94%; } span.diffchange { color: red; font-weight: bold; } img { border: none; } img.tex { vertical-align: middle; } span.texhtml { font-family: serif; } #toc, .toc { border: 1px solid #bba; background-color: #f7f8ff; padding: 5px; font-size: 95%; text-align: center; } #toc h2, .toc h2 { display: inline; border: none; padding: 0; font-size: 100%; font-weight: bold; } #toc ul, .toc ul { list-style-type: none; list-style-image: none; margin-left: 0; padding-left: 0; text-align: left; } #toc ul ul, .toc ul ul { margin: 0 0 0 2em; } #toc .toctoggle, .toc .toctoggle { font-size: 94%; } .error { color: red; font-size: larger; } /* preference page with js-genrated toc */ #preftoc { float: left; margin: 1em 1em 1em 1em; width: 13em; } #preftoc li { border: 1px solid White; } #preftoc li.selected { background-color:#f9f9f9; border:1px dashed #aaaaaa; } #preftoc a, #preftoc a:active { display: block; color: #005189; } #prefcontrol { clear: left; float: left; margin-top: 1em; } div.prefsectiontip { font-size: 94%; margin-top: 1em; } fieldset.prefsection { margin-top: 1em } fieldset.operaprefsection { margin-left: 15em } /* emulate center */ .center { width: 100%; text-align: center; } *.center * { margin-left: auto; margin-right: auto; } /* small for tables and similar */ .small, .small * { font-size: 94%; } table.small { font-size: 100% } div.townBox { position:relative; float:right; background:White; margin-left:1em; border: 1px solid gray; padding:0.3em; width: 200px; overflow: hidden; clear: right; } div.townBox dl { padding: 0; margin: 0 0 0.3em 0; font-size: 96%; } div.townBox dl dt { background: none; margin: 0.4em 0 0 0; } div.townBox dl dd { margin: 0.1em 0 0 1.1em; background-color: #f3f3f3; } /* use this instead of #toc for page content */ .toccolours { border:1px solid #aaaaaa; background-color:#f9f9f9; padding:5px; font-size: 95%; } #siteNotice { border:1px solid #aaaaaa; padding-left: 0.5em; padding-right: 0.5em; } .redirectText { font-size:150%; margin:5px; } .searchmatch { color: red; font-weight: bold; } .sharedUploadNotice { font-style: italic; } span.unpatrolled { font-weight:bold; color:red; } span.updatedmarker { color:black; background-color:#00FF00; } span.newpageletter { font-weight:bold; color:black; background-color:yellow; } span.minoreditletter { color:black; background-color:#C5FFE6; } table.gallery { border: 1px solid #cccccc; margin: 2px; padding: 2px; background-color:#ffffff; } table.gallery tr { vertical-align:top; } table.gallery td { vertical-align:top; background-color:#f9f9f9; border: solid 2px white; } div.gallerybox { margin: 2px; width: 150px; } div.gallerybox div.thumb { text-align: center; border: 1px solid #cccccc; margin: 2px; } div.gallerytext { font-size: 94%; padding: 2px 4px; } span.comment { font-style: italic; } span.changedby { font-size: 95%; } .previewnote { text-align: center; color: #cc0000; } .editExternally { border-style:solid; border-width:1px; border-color:gray; background: #ffffff; padding:3px; margin-top:0.5em; float:left; font-size:small; text-align:center; } .editExternallyHelp { font-style:italic; color:gray; } li span.deleted { text-decoration: line-through; color: #888; font-style: italic; } /* Classes for EXIF data display */ table.mw_metadata { margin-left: 0.5em; } table.mw_metadata caption { font-weight: bold; } table.mw_metadata th { font-weight: normal; } table.mw_metadata td { padding: 0.1em; } table.mw_metadata { border: none; border-collapse: collapse; } table.mw_metadata td, table.mw_metadata th { border: 1px solid #aaaaaa; padding-left: 4px; padding-right: 4px; } table.mw_metadata th { background-color: #f9f9f9; } table.mw_metadata td { background-color: #fcfcfc; } table.mw_metadata td.spacer { background: inherit; border-top: none; border-bottom: none; } table.collapsed tr.collapsable { display: none; } .visualClear { clear: both; } #mw_trackbacks { border: solid 1px #bbbbff; background-color: #eeeeff; padding: 0.2em; } /* Allmessages table */ #allmessagestable th { background-color: #b2b2ff; } #allmessagestable tr.orig { background-color: #ffe2e2; } #allmessagestable tr.new { background-color: #e2ffe2; } #allmessagestable tr.def { background-color: #f0f0ff; } #jump-to-nav { display: none; } table.gallery td.galleryheader { text-align: center; font-weight: bold; } div.multipageimagenavbox { border: solid 1px silver; padding: 4px; margin: 1em; -moz-border-radius: 6px; background: #f0f0f0; } div.multipageimagenavbox div.thumb { border: none; margin-left: 2em; margin-right: 2em; } div.multipageimagenavbox hr { margin: 6px; } table.multipageimage td { text-align: center; } /* Table pager (e.g. Special:Imagelist) - remove underlines from the navigation link - collapse borders - set the borders to outsets (similar to Special:Allmessages) - remove line wrapping for all td and th, set background color - restore line wrapping for the last two table cells (description and size) */ .TablePager_nav a { text-decoration: none; } .TablePager { border-collapse: collapse; } .TablePager, .TablePager td, .TablePager th { border: 0.15em solid #777777; padding: 0 0.15em 0 0.15em; } .TablePager th { background-color: #eeeeff } .TablePager td { background-color: #ffffff } .TablePager tr:hover td { background-color: #eeeeff } .imagelist td, .imagelist th { white-space: nowrap } .imagelist .TablePager_col_links { background-color: #eeeeff } .imagelist .TablePager_col_img_description { white-space: normal } .imagelist th.TablePager_sort { background-color: #ccccff } .templatesUsed { margin-top: 1em; } #toolbar { clear: both; } .mw-plusminus-null { color: #aaa; } ------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=arch.css Content-Type: text/css; name=arch.css Content-Location: http://wiki.archlinux.org/skins/common/arch.css?42 Content-Transfer-Encoding: 8bit @import url("common.css"); * { margin:0; padding:0; } body { padding:0 30px; background:url(http://www.archlinux.org/media/title_back.png) repeat-x top left #fbf8f1; } #arch_nav ul { list-style:none; padding-right:10px; padding-top: 48px; } #arch_nav ul li { display:block; float:right; width:67px; height:20px; padding-top:2px; margin-left:3px; background:url(http://www.archlinux.org/media/tab.png) repeat-x bottom left #fbf8f1; text-align:center; font-size:13px; } #arch_nav a { color: #46494d; font-family: Bitstream Vera Sans, Lucinda Grande, Arial, sans-serif; text-decoration: none; font-weight: bold; } #arch_ads { float: right; } #specialform { display: inline; } #content { top: 0; margin: 0; padding: 0; } #topbar { padding: 0px; float: right;} #powersearch { background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px; } #quickbar { width: 140px; top: 25ex; padding: 2px; visibility: visible; z-index: 99; } #article, #article td, #article th, #article p { font-family: Verdana, Arial, sans-serif; font-size: 10pt; color: black; } #article p { padding-top: 0; padding-bottom: 0; margin-top: 1ex; margin-bottom: 0; } p, pre, td, th, li, dd, dt { line-height: 12pt; } textarea { overflow: auto; } ul { padding-left: 30px; list-style: square; } ol { padding-left: 30px; } pre { background: #dddddd; border: 1px dashed #387cbf; padding: 10px; } #footer { padding: 4px; } #footer form { display: inline; } #sitetitle { font-family: Times, serif; color: white; font-weight: normal; font-size: 32pt; line-height: 32pt; } td.top { /*background-color: #6688AA; color: white;*/ margin-top: 4px; margin-bottom: 4px; padding-top: 0; padding-bottom: 0; text-transform: uppercase; font-family: Verdana, Arial, sans-serif; font-size: 8pt; } td.top a { font-family: Verdana, Arial, sans-serif; /*background-color: #6688AA; color: white;*/ text-decoration: underline; font-size: 10pt; } td.bottom { font-family: Verdana, Arial, sans-serif; font-size: 10pt; padding: 0; } #pagestats { font-family: Verdana, Arial, sans-serif; color: black; font-size: 9pt; } #sitesub { font-family: Verdana, Arial, sans-serif; font-size: 9pt; font-weight: bold; color: black; padding-top: 0; } #quickbar { font-family: Verdana, Arial, sans-serif; font-size: 8pt; font-weight: bold; line-height: 9.5pt; text-decoration: none; color: black; padding: 0; margin-top: 0; } #quickbar a { color: #446688; } #quickbar h6 { font-family: Verdana, Arial, sans-serif; font-size: 10pt; font-weight: bold; line-height: 12pt; text-decoration: none; color: #666666; padding: 0; margin-bottom: 2px; margin-top: 6px; } #quickbar form { padding: 0; margin-top: 0; } h1 { color: #666666; font-family: Verdana, Arial, sans-serif; /* font-size: 18pt; font-weight: bold; line-height: 21pt;*/ border-bottom: 1px solid #387cbf; } h1.pagetitle { padding-bottom: 0; margin-bottom: 0; } #article p.subtitle { color: #666666; font-size: 11pt; font-weight: bold; padding-top: 0; margin-top: 0; padding-bottom: 1ex; } a { color: #223366; } a.external { color: #336644; } a:visited { color: #8D0749; } a.printable { text-decoration: underline; } a.stub, #quickbar a.stub { color:#772233; text-decoration:none; } a.new, #quickbar a.new { color: #CC2200; } h1, h2, h3, h4, h5, h6 { margin-bottom: 10px; margin-top: 10px; } h2 { border-bottom: 1px solid #666666; } small { font-size: 75%; } ------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=common.css Content-Type: text/css; name=common.css Content-Location: http://wiki.archlinux.org/skins/common/common.css Content-Transfer-Encoding: 8bit /* * common.css * This file contains CSS settings common to Wikistandard, Nostalgia and CologneBlue */ /* For clarity, explicitly state some recommendations from to make sure the editsection links scale right */ h1 { font-size: 2em; } h2 { font-size: 1.5em; } h3 { font-size: 1.17em; } h5 { font-size: .83em; } h6 { font-size: .75em; } h1, h2, h3, h4, h5, h6 { font-weight: bolder } /* Now the custom parts */ /* Make edit sections (which are inside h# tags) normal-sized */ .editsection { font-weight: normal; float: right; margin-left: 5px; } h1 .editsection { font-size: 50% } h2 .editsection { font-size: 66.7% } h3 .editsection { font-size: 85.5% } h5 .editsection { font-size: 120% } h6 .editsection { font-size: 133% } #footer { clear: both } /* images */ div.floatright { float: right; clear: right; margin: 0 0 1em 1em; } div.floatright p { font-style: italic; } div.floatleft { float: left; clear: left; margin: 0.3em 0.5em 0.5em 0; } div.floatleft p { font-style: italic; } /* Print-specific things to hide */ .printfooter { display: none; } /* table standards */ table.rimage { float:right; margin-left:1em; margin-bottom:1em; text-align:center; font-size:smaller; } /* thumbnails */ div.thumb { margin-bottom: .5em; border-style: solid; border-color: white; width: auto; } div.thumbinner { border: 1px solid #ccc; padding: 3px !important; background-color: #f9f9f9; font-size: 94%; text-align: center; overflow: hidden; } html .thumbimage { border: 1px solid #ccc; } html .thumbcaption { border: none; text-align: left; line-height: 1.4em; padding: 3px !important; font-size: 94%; } div.magnify { float: right; border: none !important; background: none !important; } div.magnify a, div.magnify img { display: block; border: none !important; background: none !important; } div.tright { clear: right; float: right; border-width: .5em 0 .8em 1.4em; } div.tleft { float: left; clear: left; margin-right: .5em; border-width: .5em 1.4em .8em 0; } /* Page history styling */ /* the auto-generated edit comments */ .autocomment { color: #4b4b4b; } #pagehistory span.user { margin-left: 1.4em; margin-right: 0.4em; } #pagehistory span.minor { font-weight: bold; } #pagehistory li { border: 1px solid White; } #pagehistory li.selected { background-color:#f9f9f9; border:1px dashed #aaaaaa; } table.diff { background:white; } td.diff-otitle { background:#cccccc; } td.diff-ntitle { background:#cccccc; } td.diff-addedline { background:#ccffcc; font-size: 94%; } td.diff-deletedline { background:#ffffaa; font-size: 94%; } td.diff-context { background:#eeeeee; font-size: 94%; } span.diffchange { color: red; font-weight: bold; } img { border: none; } img.tex { vertical-align: middle; } span.texhtml { font-family: serif; } #toc, .toc { border: 1px solid #bba; background-color: #f7f8ff; padding: 5px; font-size: 95%; text-align: center; } #toc h2, .toc h2 { display: inline; border: none; padding: 0; font-size: 100%; font-weight: bold; } #toc ul, .toc ul { list-style-type: none; list-style-image: none; margin-left: 0; padding-left: 0; text-align: left; } #toc ul ul, .toc ul ul { margin: 0 0 0 2em; } #toc .toctoggle, .toc .toctoggle { font-size: 94%; } .error { color: red; font-size: larger; } /* preference page with js-genrated toc */ #preftoc { float: left; margin: 1em 1em 1em 1em; width: 13em; } #preftoc li { border: 1px solid White; } #preftoc li.selected { background-color:#f9f9f9; border:1px dashed #aaaaaa; } #preftoc a, #preftoc a:active { display: block; color: #005189; } #prefcontrol { clear: left; float: left; margin-top: 1em; } div.prefsectiontip { font-size: 94%; margin-top: 1em; } fieldset.prefsection { margin-top: 1em } fieldset.operaprefsection { margin-left: 15em } /* emulate center */ .center { width: 100%; text-align: center; } *.center * { margin-left: auto; margin-right: auto; } /* small for tables and similar */ .small, .small * { font-size: 94%; } table.small { font-size: 100% } div.townBox { position:relative; float:right; background:White; margin-left:1em; border: 1px solid gray; padding:0.3em; width: 200px; overflow: hidden; clear: right; } div.townBox dl { padding: 0; margin: 0 0 0.3em 0; font-size: 96%; } div.townBox dl dt { background: none; margin: 0.4em 0 0 0; } div.townBox dl dd { margin: 0.1em 0 0 1.1em; background-color: #f3f3f3; } /* use this instead of #toc for page content */ .toccolours { border:1px solid #aaaaaa; background-color:#f9f9f9; padding:5px; font-size: 95%; } #siteNotice { border:1px solid #aaaaaa; padding-left: 0.5em; padding-right: 0.5em; } .redirectText { font-size:150%; margin:5px; } .searchmatch { color: red; font-weight: bold; } .sharedUploadNotice { font-style: italic; } span.unpatrolled { font-weight:bold; color:red; } span.updatedmarker { color:black; background-color:#00FF00; } span.newpageletter { font-weight:bold; color:black; background-color:yellow; } span.minoreditletter { color:black; background-color:#C5FFE6; } table.gallery { border: 1px solid #cccccc; margin: 2px; padding: 2px; background-color:#ffffff; } table.gallery tr { vertical-align:top; } table.gallery td { vertical-align:top; background-color:#f9f9f9; border: solid 2px white; } div.gallerybox { margin: 2px; width: 150px; } div.gallerybox div.thumb { text-align: center; border: 1px solid #cccccc; margin: 2px; } div.gallerytext { font-size: 94%; padding: 2px 4px; } span.comment { font-style: italic; } span.changedby { font-size: 95%; } .previewnote { text-align: center; color: #cc0000; } .editExternally { border-style:solid; border-width:1px; border-color:gray; background: #ffffff; padding:3px; margin-top:0.5em; float:left; font-size:small; text-align:center; } .editExternallyHelp { font-style:italic; color:gray; } li span.deleted { text-decoration: line-through; color: #888; font-style: italic; } /* Classes for EXIF data display */ table.mw_metadata { margin-left: 0.5em; } table.mw_metadata caption { font-weight: bold; } table.mw_metadata th { font-weight: normal; } table.mw_metadata td { padding: 0.1em; } table.mw_metadata { border: none; border-collapse: collapse; } table.mw_metadata td, table.mw_metadata th { border: 1px solid #aaaaaa; padding-left: 4px; padding-right: 4px; } table.mw_metadata th { background-color: #f9f9f9; } table.mw_metadata td { background-color: #fcfcfc; } table.mw_metadata td.spacer { background: inherit; border-top: none; border-bottom: none; } table.collapsed tr.collapsable { display: none; } .visualClear { clear: both; } #mw_trackbacks { border: solid 1px #bbbbff; background-color: #eeeeff; padding: 0.2em; } /* Allmessages table */ #allmessagestable th { background-color: #b2b2ff; } #allmessagestable tr.orig { background-color: #ffe2e2; } #allmessagestable tr.new { background-color: #e2ffe2; } #allmessagestable tr.def { background-color: #f0f0ff; } #jump-to-nav { display: none; } table.gallery td.galleryheader { text-align: center; font-weight: bold; } div.multipageimagenavbox { border: solid 1px silver; padding: 4px; margin: 1em; -moz-border-radius: 6px; background: #f0f0f0; } div.multipageimagenavbox div.thumb { border: none; margin-left: 2em; margin-right: 2em; } div.multipageimagenavbox hr { margin: 6px; } table.multipageimage td { text-align: center; } /* Table pager (e.g. Special:Imagelist) - remove underlines from the navigation link - collapse borders - set the borders to outsets (similar to Special:Allmessages) - remove line wrapping for all td and th, set background color - restore line wrapping for the last two table cells (description and size) */ .TablePager_nav a { text-decoration: none; } .TablePager { border-collapse: collapse; } .TablePager, .TablePager td, .TablePager th { border: 0.15em solid #777777; padding: 0 0.15em 0 0.15em; } .TablePager th { background-color: #eeeeff } .TablePager td { background-color: #ffffff } .TablePager tr:hover td { background-color: #eeeeff } .imagelist td, .imagelist th { white-space: nowrap } .imagelist .TablePager_col_links { background-color: #eeeeff } .imagelist .TablePager_col_img_description { white-space: normal } .imagelist th.TablePager_sort { background-color: #ccccff } .templatesUsed { margin-top: 1em; } #toolbar { clear: both; } .mw-plusminus-null { color: #aaa; } ------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=index.css Content-Type: text/css; name=index.css Content-Location: http://wiki.archlinux.org/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000 Content-Transfer-Encoding: 8bit /** CSS placed here will be applied to all skins */ ------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=index.css Content-Type: text/css; name=index.css Content-Location: http://wiki.archlinux.org/index.php?title=MediaWiki:Arch.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000 Content-Transfer-Encoding: 8bit ------------OzsRO2YwiP7CblbdpPJmnq Content-Disposition: inline; filename=show_ads.js Content-Type: text/javascript; name=show_ads.js Content-Location: http://pagead2.googlesyndication.com/pagead/show_ads.js Content-Transfer-Encoding: 8bit (function(){ function m(b){return b!=null?'"'+b+'"':'""'}function B(b){if(typeof encodeURIComponent=="function"){return encodeURIComponent(b)}else{return escape(b)}}function c(b,a){if(a){window.google_ad_url+="&"+b+"="+a}}function f(b,a){if(a){c(b,B(a))}}function l(b,a,d){if(a&&typeof a=="object"){a=a[d%a.length]}c("color_"+b,a)}function D(b,a){var d=b.screen,g=navigator.javaEnabled(),e=-a.getTimezoneOffset();if(d){c("u_h",d.height);c("u_w",d.width);c("u_ah",d.availHeight);c("u_aw",d.availWidth);c("u_cd",d.colorDepth)}c("u_tz", e);c("u_his",history.length);c("u_java",g);if(navigator.plugins){c("u_nplug",navigator.plugins.length)}if(navigator.mimeTypes){c("u_nmime",navigator.mimeTypes.length)}}function y(b){b=b.toLowerCase();if(b.substring(0,3)!="ca-"){b="ca-"+b}return b}function G(b,a,d){d=d.substring(0,1000);d=d.replace(/%\w?$/,"");if(b.google_ad_output=="js"&&(b.google_ad_request_done||b.google_radlink_request_done)){a.write('