Using the quickinst Script to Install Arch Linux

From ArchWiki

Jump to: navigation, search
Image:Tango-dialog-warning.png This article is out of date.
Please help improve the wiki by updating the article and correcting mistakes.
The quickinst script is an easy, simple way to install Everything You Need(TM) to get an Arch Linux basic system running on your computer. It doesn't force you to perform steps in a certain order, like the default setup script does.

Contents

What You'll Need

  • An Arch Install medium. The Arch Base Install CD is recommended, although you could use Arch boot floppies as well, or the Arch Full Installation CD (which is rather pointless, as it includes packages we'll be installing from FTP later on, and many you might not use at all).
  • Some unpartitioned space on your hard drive. Of course, the easiest thing to do is start from scratch -- although, that's probably not your favourite option. If you're already running Linux and you want to get rid of your previous installation, you can keep your partitions and reformat them, or just repartition. If you want to dual-boot, there are many, many, many options available which are out of the scope of this document. Most people will recommend running Partition Magic to resize. If you're running Windows on an NTFS formatted drive, you can read up about the ntfsresize tool, and find a boot CD that includes it.


Let's Get Started

Boot your computer with the Arch Install medium. If you plan to utilize SCSI, SATA, or USB hardware during the installation process (ie, your hard drive, or the CD drive you're booting from), type arch-scsi to boot the SCSI-enabled installation kernel. Otherwise, simply press Enter to continue with the default kernel.

Partitioning the Drive

You may have decided that this step is not necessary, because you plan on overwriting a previous Linux installation, and you want to keep the current partition structure. In that case, read ahead to the next section.

Run cfdisk, with your hard drive device as the first argument. If you have a scsi or sata drive, replace the "h" with an "s"

cfdisk /dev/hda

or

cfdisk /dev/sda

With cfdisk, you can select partitions with the up and down cursor keys, and select options with left and right. Highlight a partition labelled "Free Space", select "New", and type in the partition size. You should now have a partition with FS Type "Linux". You can create as many partitions as you like for /, /home, /usr, /var, /etc, or whatever you prefer. If you delete a partition you want to keep by mistake, you can simply Quit. You won't save any changes to the partition table unless you Write.

You should also create a swap partition, although this is optional. If you don't know how much swap space to create, 256MB is usually enough. To change a Linux partition to a Linux Swap partition, select the partition, then select Type. cfdisk will list all possible partition types, press any key to continue, and type 82 when prompted.

When you've completed making all your partitions, select Write to save your new partition table to the drive, then select Quit.

Formatting our New Partitions

Decide what filesystem you'd like for your partitions. There isn't an easy way to switch formats later (unless you're going from e2 to e3) without backing up and reformatting, so choose wisely. I suggest ReiserFS, but many people will still want to use e3. I will be documenting the former option here.

You remember the names of your partitions, right? If not, simply run cfdisk again.

When cfdisk reports the name of your partition is "disc3", what it really means is partition 3 of the disc that cfdisk is editing. So if you run cfdisk /dev/hda, then "disc3" means /dev/hda3.

First, let's format the swap partition. In the following example, we changed the partition type of disc2 to Linux Swap.

mkswap /dev/hda2

Let's format the rest of our partitions (disc1 and disc3) to ReiserFS.

mkreiserfs /dev/hda1
mkreiserfs /dev/hda3

Installing the Base Packages

Before we get to installing any packages, we need to mount our new partitions, as well as our install CD. For example's sake, let's say disc1 was to be our / partition, and disc3 is /home. We should always mount our root partition first.

mount /dev/hda1 /mnt

After that, we need to create directories for our other partitions, and then mount them inside of our root partition. Remember, in this example, disc3 is /home.

mkdir /mnt/home
mount /dev/hda3 /mnt/home

Next, let's mount our install medium. If you have multiple CD drives, try each of the devices in /dev/cdroms/. One of them should work.

mount /dev/cdrom /src

Finally, it's time to install our base packages.

/arch/quickinst cd /mnt /src/arch/pkg

All right! We have a base system installed! All we have to do now is follow the instructions given.

Installing a Kernel

The official Arch kernel package is kernel26. There are others available, such as kernel26beyond. We'll stick to the official here.

Let's use pacman to install a kernel to our mounted root directory.

/tmp/usr/bin/pacman.static -r /mnt --config /tmp/pacman.conf -S kernel26

Configuring System Files

We're almost there! It's time to configure our system files. Most importantly, we want to configure our favourite bootloader (grub or lilo), edit our fstab, and edit our rc.conf. There's a lot more you can do right now, also. The Official Install Guide (particularly the System Configuration section) covers this quite extensively. As a note, the Arch Installation medium includes vi and nano to fulfill your editing needs.

Installing a Boot Loader

Well, you've already set up your boot loader, but now it's time to install it. We need to chroot into your fresh installation to do this. But first, we need to also provide chroot with a proper /dev and /proc.

mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
chroot /mnt /bin/bash

For those who aren't familiar with chroot, we just "moved in" temporarily to our new installation, and executed bash to get a prompt.

Now it's time to actually install the boot loader. Let's cover grub installation first. The second argument should be the partition which contains your /boot directory. Unless you create a boot partition, it will be the same as root (part1 in our examples).

install-grub /dev/hda /dev/hda1

Now, the (only slightly) simpler lilo installation:

lilo

If all that went well, it's time to test the installation out. exit out of chroot, and reboot. Remove the installation medium before you get to the boot screen.

Well, the installation is taken care of. I hope you have fun setting things up the way you like. The first things you'll want to do is use passwd to password protect your root user, and also to use adduser to create a regular user for day-to-day use.

Personal tools