Difference between revisions of "Install Arch from within another distro"

From ArchWiki
Jump to: navigation, search
m (I forgot to update the chrooted commands.)
(Update to the new kernels.)
Line 63: Line 63:
Install your preferred kernel,
Install your preferred kernel,
  pacman -S kernel26
  pacman -S kernel26
  pacman -S kernel26archck
  pacman -S kernel26beyond
pacman -S kernel26mm
If you wish to install extra packages now, you may do so with:
If you wish to install extra packages now, you may do so with:

Revision as of 03:45, 4 September 2006

How to install Arch from within a liveCD or other distro

Setup host system

Install pacman within the host distro. The simplest way is to grab the latest pacman from in: ftp://ftp.archlinux.org/current/os/i686 cd to /, and extract the pacman.pkg.tar.gz you just downloaded.

Configure your /etc/pacman.conf to your liking

Prepare disk for Arch

Prepare the new Arch system's filesystems and then mount them. If your host system has any gui tools for this, such as gparted, cfdisk, or mandrakes diskdrake, feel free to use them.

To format a partition as ext3, you run (where /dev/hdxx is the partition you want to setup):

mkfs.ext3 /dev/hdxx

as reiserfs:

mkreiserfs /dev/hxx


mkswap /dev/hdxx

Most other filesystems can be setup with their own mkfs variant, take a look with tab completion. Available filesystems depend entirely on your host system.

Once you have setup the filesystems, mount them. Throughout this, I have mounted the new Arch /, to /newarch, however you can put it wherever you like.

Install Base System

Update pacman

pacman.static -Sy -r /newarch

At this point, you might get the following error message

$ pacman.static -Sy -r /newarch
:: Synchronizing package databases... 
getservbyname: No such file or directory

TODO: Write out a solution for this problem

pacman.static -S bash -r /newarch
pacman.static -S pacman -r /newarch
pacman.static -S filesystem -r /newarch

Install all of base. I put a list of base packages in a file called 'packages' which is at the end of this page.

pacman.static -S `cat packages` -r /newarch

Prepare System

Mount various filesystems into the new Arch system.

mount /dev/ /newarch/dev/ --bind
mount /sys/ /newarch/sys/ --bind
mount /proc/ /newarch/proc/ --bind

Chroot into the new system

chroot /newarch

Ensure the correct /dev nodes have been made for udev:

cd /dev
mknod -m 660 console c 5 1
mknod -m 660 null c 1 3

Install The Rest

Install your preferred kernel,

pacman -S kernel26
pacman -S kernel26beyond
pacman -S kernel26mm

If you wish to install extra packages now, you may do so with:

pacman -S packagename

Configure System

Edit your /etc/fstab, remembering to add /, swap and any other partitions you may wish to use.

Edit your rc.conf to your liking

Edit /etc/locale.gen, uncommenting any locales you wish to have available, and build the locales


Setup Bootloader

Edit your preferred bootloader's config and install it. I had problems with grub, so I configured and installed lilo.

NOTE: for grub use an old trick from the gentoo handbook

# grep -v rootfs /proc/mounts > /etc/mtab

this allows grub-install to run properly while chrooted

Instructions for GRUB and LILO are available on this wiki.

Install Complete

Reboot to your new system!

Package list

file less nano rp-pppoe autoconf libpcap ncurses sed automake findutils libtool net-tools shadow flex libusb openssl slocate bin86 gawk licenses sysfsutils binutils gcc lilo pam syslog-ng bison gdbm logrotate patch sysvinit bzip2 gettext lshwd pciutils tar coreutils glibc lzo2 pcmciautils tcp_wrappers cpio grep m4 perl udev cracklib groff mailx popt usbutils db grub make ppp util-linux dcron gzip man procinfo vim man-pages procps wget dhcpcd initscripts mawk psmisc which diffutils iputils mkinitrd raidtools wireless_tools e2fsprogs jfsutils mktemp readline xfsprogs ed kbd module-init-tools reiserfsprogs zlib