March 4, 2013

The Wonderful World of Arch (Part 1)

So I decided today that I was going to try installing Arch Linux. Again.

For anyone interested, I'm installing on an HP Compaq 6910p with 3GiB RAM and a Core 2 Duo

A lot of this is also me making notes so that, if I decide to try again, I won't have to go back to the wiki (found here), so please bear with me.

It's best to start with an empty hard disk, however I was installing over (not alongside) an Ubuntu 12.04 installation.

I used the Linux Live USB Creator (LiLi) to install the arch .iso (2013.03.01 if you're wondering) to a USB key - this is the easiest part (in my opinion). The only thing is that you have to rename the USB label to the the value of archisolabel found at /loader/archiso-x86_64.conf. You can open this with any text editor. You also have to change the value in the autorun.inf to that same value. You're now ready to boot!

To boot from USB, I have to hit F9, but it's different for pretty much every system. Common keys are F2, Del, Esc, F11, and F12.

When the live disk boots, you will be automatically logged in as root. At this point, you have a decision to make - which partitioning scheme to use. Your two options are MBR and GPT. I'm by no means an expert, and you should look elsewhere for more information on MBR vs GPT, but suffice it to say that GPT is newer. I chose to use GPT. You can create GPT partitions using:

cgdisk /dev/sda

The ncurses interface is actually pretty decent, and is fairly self explanatory, so i'm just going to give an overview of what to do:
Step 1:
Delete any and all existing partitions. This WILL delete ANY data on the disk. MAKE A BACKUP!
Step 2:
Create your "/" (root) partition. This should be around 15-20GiB
***NOTE*** This will also create 1007KiB of free space. This is normal.
Step 3:
Create your "/home" and any other partitions you desire - feel free to fill up any remaining space on the disk!

(Q)uit cgdisk, and format the partitions. I used ext4.
If you're having trouble remembering which partition is which, you can use lsblk. sda is your primary hard disk, sda1 is (generally) your root partition, and sda2 is your home partition. If you're still having trouble distinguishing partitions, check the sizes to help you differentiate.
You can format the partitions with:

mkfs.ext4 dev/sda1
mkfs.ext4 dev/sda2


Next, mount the partitions: ***NOTE*** This is different for people with UEFI motherboards

mount /dev/sda1 /mnt
mkdir /mnt/home
mount /dev/sda2 /mnt/home


Next, you may want to check your pacman mirrorlist (but not absolutely necessary):

nano /etc/pacman.d/mirrorlist

Once you're done with that (or if you decided to skip it),
you're ready to install the base system:

pacstrap /mnt base base-devel

This is a script that does the installation for you!
Generate an fstab with:

genfstab -L -p /mnt >> /mnt/etc/fstab

and edit with

nano /mnt/etc/fstab

Like I said, I'm not an expert, so go here for more help. Also, the Arch Beginners' Guide is fantastic!

Part 2 coming soon! is now here!

No comments:

Post a Comment