March 4, 2013

The Wonderful World of Arch (Part 2)

This is a continuation of my previous post found here. Enjoy!

We left off looking at /mnt/etc/fstab in nano. We have the base system installed to sda and now we're going to configure the installation with

arch-chroot /mnt

I highly suggest following the Arch Beninners' Guide whilst doing this.
Now that you're in chroot, there are some files that need to be edited, locale.gen and locale.conf.
First, do

nano /etc/locale.gen

...and uncomment the line(s) with UTF-8 of the locale(s) you desire, in my case en_US.UTF-8 UTF-8. Then exit nano, saving the edited file.
Next, run


The next file, locale.conf doesn't exist yet, so we're going to make it with:

echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8

***NOTE*** Replace en_US.UTF-8 with the locale you chose if using a locale other than English
Next, we will set the time zone.

ls /usr/share/zoneinfo

to see all available countries, then list the directory with your country, for example:

ls /usr/share/zoneinfo/America/

Choose the city nearest you (New York for me), and create a symlink:

ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

Then set the hardware clock:

hwclock --systohc --utc

Now, I'm going to set a hostname by doing

echo EXAMPLE_HOSTNAME > /etc/hostname

Next, we're going to configure the wired network interface to start at boot.

***NOTE*** The following section has been FIXED. This is now unnecessary.

***NOTE*** The Arch Beginners' Guide points out that there is currently a bug in the install .iso that sets the interface name to something different after a reboot than the one used during installation. They have provided a script that will act as a workaround for now. That script follows here:

for i in /sys/class/net/*; do
echo "==$i"
udevadm test-builtin net_id "$i";
done 2>/dev/null

In the following configuration, the value of ID_NET_NAME_PATH will be used in place of [interface]
We will be using netcfg for wired connections.
Install ifplugd with

pacman -S ifplugd

...and change the value for WIRED_INTERFACE to the value of ID_NET_NAME_PATH like so:

nano /etc/conf.d/netcfg

and change




...and finally enable the service:

systemctl enable net-auto-wired.service

Also, enable dhcpcd to run at boot:

systemctl enable dhcpcd

***NOTE*** I am intentionally skipping wireless for now, as that it a BEAST to configure on the 6910p (If anyone's curious why, check Arch's wiki on Broadcom Wireless [yes, they have an entire section of the wiki specifically for Broadcom])

Next we're going to configure pacman (no, not the game, the [pac]kage [man]ager).
There are tons of articles on using pacman, but for now we're just going to be very basic and simply configure it.
***NOTE*** This only applies if installing x86_64 (a 64-bit system)
Selecting repositories:

nano /etc/pacman.conf

...and scroll down to the line that reads #[multilib].
Uncomment that line and the two line following it and run

pacman -Sy

Next, set a root password with


Please make sure that this is a strong password as it is your root password. If you don't know what root is, this is a good explanation.
Next, we will create a normal user with useradd, like so:

useradd -m -g users -G wheel -s /bin/bash [username]
passwd [username]

Let's break that down:
useradd - add user command.
-m - makes the user's home folder at /home/[username]
-g users - the user's primary group, in this case, users
-G wheel - any supplementary groups, wheel for this user
-s /bin/bash - the user's login shell
[username] - username, must be alphanumeric (letters and numbers) and all lower case
passwd [username] allows you to set the password for [username]

In my next post, we'll be installing the bootloader and rebooting! Coming Soon! Here!

No comments:

Post a Comment