https://wiki.archlinux.org/api.php?action=feedcontributions&user=Coz&feedformat=atomArchWiki - User contributions [en]2024-03-29T15:33:18ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:Fonts&diff=264401Talk:Fonts2013-06-26T23:17:29Z<p>Coz: /* Is xset fp rehash required? */ new section</p>
<hr />
<div>== &lsquo;Set the proper key map&rsquo;? ==<br />
<br />
FONT_MAP does not set the key map. <br />
<br />
I put the following code into <TT >/etc/profile.d/locale.sh</TT >:<br />
(case "${LANG}" in<br />
pl_*) FONT=lat2-16;;<br />
*) let 0;;<br />
esac && setfont $FONT)<br />
<br />
This allows the user to use a different locale than the system default. Of course, the list of supported languages must be extended.<br />
<br />
--[[User:Yecril71pl|Yecril71pl]] ([[User talk:Yecril71pl|talk]]) 13:50, 11 May 2013 (UTC)<br />
<br />
== Is xset fp rehash required? ==<br />
<br />
When installing local fonts, this page suggests adding the following the <TT >.xinitrc</TT > file:<br />
<br />
xset +fp /usr/share/fonts/local <br />
xset fp rehash<br />
<br />
My understanding is that <TT >xset fp rehash</TT > is only required to reload the font path on an active X session, therefore not needed in the <TT >.xinitrc</TT > file.</div>Cozhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_from_existing_Linux&diff=101925Install Arch Linux from existing Linux2010-04-05T05:54:22Z<p>Coz: </p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Install from Existing Linux}}<br />
<br />
This guide is intended to combine and update the three previously existing and highly similar alternative install guides on this wiki. This guide is intended for anybody who wants to install Arch Linux from any other running Linux -- be it off a LiveCD or a pre-existing install of a different distro.<br />
<br />
==Overview==<br />
Arch Linux's [[pacman]] can be configured (-r) to perform operations in any directory you like, using that as the context of "root" while running. <br />
<br />
The pacman package available from the mirrors includes a static-linked version of the binary (pacman.static) which should run in most any modern linux environment, without the need of dependencies. <br />
<br />
This is useful for building up new Arch Linux systems from scratch from another distro's LiveCD or existing installation. It's also useful for creating new chroot environments on a "host" system, maintaining a "golden-master" for development & distribution, or other fun topics like rootfs-over-NFS for diskless machines. <br />
<br />
In the case of an x86_64 host, it is even possible to use i686-pacman to build a 32-bit chroot environment. See [[Arch64 Install bundled 32bit system]]. <br />
<br />
Throughout this guide, we will refer to partitions as /dev/hdxx or /dev/sdxx. This refers to whatever dev entry you have on your system for the partition in question. The convention is:<br />
Drive 1, Partition 1: /dev/hda1 or /dev/sda1<br />
Drive 1, Partition 2: /dev/hda2 or /dev/sda2<br />
Drive 2, Partition 1: /dev/hdb1 or /dev/sdb1<br />
etc...<br />
<br />
We will refer to it as /dev/sdxx whenever possible, but realize depending on your system it could be /dev/hdxx.<br />
<br />
If you have a broadband connection available through the installation process and just want to do a basic install, [http://unetbootin.sourceforge.net/ UNetBootin] may also be an easy solution worth taking a look at. (Also [[Putting_installation_media_on_a_USB_key#UNetBootin|discussed here]].)<br />
<br />
In this article, "host" refers to the computer which is used to perform the installation, and "target" refers to the computer where you want to install Arch. These may be one and the same computer. The host does not need to be an Arch system -- it can be a Debian or Redhat system. The section entitled "Setup the host system" explains how to install pacman on the host. The following section entitle "Setup the target system" explains how to use pacman from the host system to install Arch on the target system. Therefore if the host system is already running Arch, you can skip to "Setup the target system".<br />
<br />
==Setup the host system== <br />
<br />
You need to install the archlinux package manager pacman on your host linux environment. In addition you will need a list of pacman mirrors sites which is used to download data on available packages as well as the packages themselves.<br />
<br />
===Get the required packages===<br />
<br />
You need to get the required packages for your host linux environment. The examples given here assume you are using a i686 environment. '''If you are running on an 64bit linux instead you should replace each occurance of "i686" with "x86_64".'''<br />
<br />
All version numbers given here may change. Please check the version numbers the packages are at first and note them down. The version numbers can be found [http://www.archlinux.org/packages/core/i686/pacman/ here for pacman] and [http://www.archlinux.org/packages/core/i686/pacman-mirrorlist/ here for pacman-mirrorlist]. Once you are sure of the version numbers download the required packages:<br />
mkdir /tmp/archlinux<br />
cd /tmp/archlinux<br />
wget ftp://ftp.archlinux.org/core/os/i686/pacman-\*.pkg.tar.gz<br />
tar xzvf pacman-*.pkg.tar.gz<br />
<br />
In addition to the dynamically linked pacman there is a statically linked version available. This does integrate better into all the different host linux systems possible. This static version is not part of the normal archlinux setup anymore but can be found at http://repo.archlinux.fr/i686/. Use the following command to get it:<br />
cd /tmp/archlinux<br />
wget http://repo.archlinux.fr/i686/pacman-static-3.2.2-1.pkg.tar.gz<br />
tar xzvf pacman-static-3.2.2-1.pkg.tar.gz<br />
<br />
===Install the required files onto the host system===<br />
<br />
<ol><br />
<li><div>If you use pacman.static for the initial setup, you only need a few files installed into the host. This can be done by running the following commands as root:<br />
cp /tmp/archlinux/etc/pacman.conf /etc<br />
mkdir /etc/pacman.d<br />
cp /tmp/archlinux/etc/pacman.d/* /etc/pacman.d<br />
cp /tmp/archlinux/usr/bin/pacman.static /usr/bin<br />
</div><br />
<li><div>Alternatively, if you do not mind littering your install host, you can extract all the downloaded tar balls into your root directory by running as root:<br />
cd /<br />
for f in /tmp/archlinux/pacman-*pkg.tar.gz<br />
tar xzf $f<br />
done<br />
</div><br />
<li><div>Alternatively, you can instead turn these tarballs into packages for your distribution with the [http://kitenet.net/~joey/code/alien/ alien] tool. See the man page of the tool for instructions. The packages created that way may be installed into your host distribution using the usual package management tools available there. This approach offers the best integration into the host linux environment. For a debian package based system this is done with the following commands:<br />
cd /tmp/archlinux<br />
alien -d pacman-3.3.3-1-i686.pkg.tar.gz<br />
alien -d pacman-mirrorlist-20100131-1-i686.pkg.tar.gz<br />
alien -d pacman-static-3.2.2-1-i686.pkg.tar.gz<br />
<br />
RPM based systems will need to replace the parameter "-d" with "-r".<br />
<br />
These distribution packages can then get installed using the normal package management tools of the host linux environment.<br />
</div><br />
<li><div><br />
Under Fedora 12, I wasn't able to install pacman with any of the other methods, but with the nice script at http://bbs.archlinux.org/viewtopic.php?pid=734336#p734336 it will download and install it for you. Worked wonderfully for me.<br />
</div><br />
<li><div><br />
An older method is [[Quick Custom Installation|discussed here]].<br />
</div><br />
</ol><br />
<br />
===Configure the host system===<br />
<br />
Configure your /etc/pacman.conf to your liking, and remove unnecessary mirrors from /etc/pacman.d/mirrorlist. Also, enabling at least a few mirrors might become necessary, as you may experience errors during syncing if you have no mirror set. You may want to manually resolve DNS in the /etc/pacman.d/mirrorlist, because pacman-static for i686 may not be able to get address information on x86_64 systems.<br />
<br />
If you're installing from a LiveCD, and you have a system with a low amount of combined RAM and swap (< 1 GB), be sure to set the cachedir in /etc/pacman.conf to be in the new Arch partition (e.g. {{Filename|/newarch/var/cache/pacman/pkg}}). Otherwise you could exhaust memory between the overhead of the existing distro and downloading necessary packages to install.<br />
<br />
==Setup the target system==<br />
<br />
===Prepare a partition for Arch===<br />
<br />
You don't ''have to'' install Arch on a separate partition. You could instead build up a root filesystem in a normal directory, and then create a master tarball from it, or transfer it across the network.<br />
<br />
However, most users will want to be installing Arch onto its own partition.<br />
<br />
Prepare any partitions and filesystems you need for your installation. If your host system has any gui tools for this, such as gparted, cfdisk, or mandrakes diskdrake, feel free to use them. <br />
<br />
To format a partition as ext3, you run (where /dev/sdxx is the partition you want to setup): <br />
# mkfs.ext3 /dev/sdxx <br />
To format it as ext3 with journaling and dir_index: <br />
# mkfs.ext3 -j -O dir_index /dev/sdxx <br />
To format it as reiserfs: <br />
# mkreiserfs /dev/sdxx <br />
To format a partition as swap, and to start using it: <br />
# mkswap /dev/sdxx <br />
# swapon /dev/sdxx<br />
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. <br />
<br />
Once you have your filesystems setup, mount them. Throughout this guide, we will refer to the new Arch root directory as /newarch, however you can put it wherever you like. <br />
# mkdir /newarch <br />
# mount /dev/sdxx /newarch<br />
<br />
===Install the core===<br />
<br />
Update pacman. You may have to create the {{Filename|/newarch/var/lib/pacman}} folder for it to work (see "Setup the host system" above):<br />
# mkdir -p /newarch/var/lib/pacman <br />
# pacman.static -Sy -r /newarch<br />
<br />
Install the 'base' group of packages:<br />
# pacman.static -S base -r /newarch<br />
<br />
'''NOTE:''' The -r parameter doesn't change the location of Pacman's cache directory. If you don't want Pacman's cache to be created in your host distro, supply another location with --cachedir, or modify pacman.conf as described [[#Configure_the_host_system|above]].<br />
<br />
===Prepare /dev nodes===<br />
<br />
First, ensure the correct /dev nodes have been made for udev:<br />
ls -alF /newarch/dev<br />
<br />
This result in a list containing lines similar to the following (the dates will differ for you):<br />
crw------- 1 root root 5, 1 2008-12-27 21:40 console<br />
crw-rw-rw- 1 root root 1, 3 2008-12-27 21:42 null<br />
crw-rw-rw- 1 root root 1, 5 2008-12-27 21:40 zero<br />
<br />
Delete and recreate any device which has a different set of permissions (the crw-... stuff plus the two root entries) and major/minor numbers (the two before the date).<br />
<br />
cd /newarch/dev <br />
rm console ; mknod -m 600 console c 5 1 <br />
rm null ; mknod -m 666 null c 1 3 <br />
rm zero ; mknod -m 666 zero c 1 5<br />
<br />
All device nodes should have been created for you already with the right permissions and you should not need to recreate any of them.<br />
<br />
===Chroot===<br />
Now we will [[Change Root|chroot into the new Arch system]].<br />
<br />
In order for DNS to work properly you need to edit {{Filename|/newarch/etc/resolv.conf}} or replace it with the resolv.conf from your running distribution <br />
cp /etc/resolv.conf /newarch/etc/ <br />
<br />
Also, you need to copy a correctly setup mirrorlist into the new system:<br />
cp /etc/pacman.d/mirrorlist /newarch/etc/pacman.d<br />
<br />
Mount various filesystems into the new Arch system: <br />
mount -t proc proc /newarch/proc<br />
mount -t sysfs sys /newarch/sys<br />
mount -o bind /dev /newarch/dev<br />
<br />
If you have a separate {{Filename|/boot}} partition, you'll probably need to mount that too. See [[Change Root]] for more details.<br />
<br />
When everything is prepared, chroot into the new filesystem: <br />
<br />
chroot /newarch /bin/bash<br />
<br />
===Install the rest===<br />
Install your preferred kernel, and any other packages you may wish to install. <br />
For the default kernel (which is already installed!):<br />
pacman -S kernel26 <br />
<br />
If you wish to install extra packages now, you may do so with: <br />
pacman -S packagename<br />
<br />
===Configure the target system===<br />
Edit your {{Filename|/etc/fstab}}, remembering to add /, swap and any other partitions you may wish to use. Be sure to use the /dev/sd* (sda1, sda2, sdb1, etc) for the partitions instead of /dev/hd*, as Arch uses the sdxx convention for all drives.<br />
<br />
Edit your {{Filename|/etc/rc.conf}}, {{Filename|/etc/hosts}} and {{Filename|/etc/mkinitcpio.conf}} to your needs. Then rebuild your initcpio image: <br />
mkinitcpio -p kernel26<br />
<br />
Edit {{Filename|/etc/locale.gen}}, uncommenting any locales you wish to have available, and build the locales: <br />
locale-gen<br />
<br />
===Setup Grub=== <br />
To use [[GRUB]] when chrooted, you need to ensure that {{Filename|/etc/mtab}} is up-to-date:<br />
grep -v rootfs /proc/mounts > /etc/mtab <br />
<br />
You can now run: <br />
grub-install /dev/sdx<br />
<br />
If grub-install fails, you can manually install:<br />
grub <br />
grub> find /boot/grub/stage1 (You should see some results here if you have done everything right so far. If not, back up and retrace your steps.)<br />
grub> root (hd0,X) <br />
grub> setup (hd0) <br />
grub> quit <br />
<br />
Double-check your {{Filename|/boot/grub/menu.lst}}. Depending on the host, it could need correcting from hda to sda, and a prefix of /boot as well in the paths. <br />
<br />
Detailed instructions for [[GRUB]] and [[LILO]] are available elsewhere on this wiki.<br />
<br />
===Finishing touches===<br />
See [[Beginners_Guide#Configure_the_System|Beginners Guide:Configure your System]]. You can ignore 2.11, but the rest of that guide should be of use to you in post-installation configuration of your system.<br />
<br />
[[Change_Root#Cleaning_up|Exit your chroot]]:<br />
exit<br />
umount /newarch/boot # if you mounted this or any other separate partitions<br />
umount /newarch/{proc,sys,dev}<br />
umount /newarch<br />
<br />
Reboot to your new Arch system!<br />
<br />
==Troubleshooting== <br />
<br />
===Kernel Panic===<br />
If when you reboot into your new system you get a kernel panic saying console couldn't open: <br />
kinit: couldn't open console, no such file... <br />
<br />
This means you didn't follow the instructions above. Follow the steps to create basic device nodes at the beginning of preparation.<br />
<br />
===Root device '/dev/sd??' doesn't exist=== <br />
If when you reboot into your new system you get a error messages like this: <br />
Root device '/dev/sda1' doesn't exist, attempting to create it... etc. <br />
<br />
This means the drives are showing up as "hda1" instead of "sda1" In which case change your GRUB or LILO settings to use "hd??" or try the following. <br />
<br />
Edit /etc/mkinitcpio.conf and change "ide" to "pata" in the "HOOKS=" line. Then regenerate your initrd. (Make sure you have chroot'ed into the new system first.) <br />
mkinitcpio -p kernel26<br />
<br />
If you are using LVM make sure you add "lvm2" in the HOOKS line. Regenerate your initrd as above.<br />
<br />
If you're installing to a device that needs PATA hook make sure it's located before autodetect hook in mkinitcpio.conf.<br />
<!-- vim: set ft=Wikipedia: --><br />
<br />
= Another Method: Installing from Existing Linux with Arch's Image = <br />
=== Preparing the Installation Environment ===<br />
<br />
You can grab whatever image from Arch's Download Page and get the content of image by mount loopback:<br />
<br />
CD Image: <br />
$ mount -o loop archlinux-2009.08-core-i686.iso /mnt/loop<br />
<br />
with USB Image:<br />
$ losetup -f archlinux-2009.08-core-i686.img<br />
$ losetup -fo 32256 /dev/loop0<br />
$ mount /dev/loop0 /mnt/loop<br />
<br />
and the content of image:<br />
$ ls /mnt/loop <br />
boot core-pkgs.sqfs isomounts lost+found overlay.sqfs root-image.sqfs<br />
<br />
extract the root image:<br />
$ cd /mnt<br />
$ unsquashfs loop/root-image.sqfs<br />
<br />
after this step, you will have a new squashfs-root directory which contain new Arch system.<br />
<br />
=== Install from New Environment ===<br />
If you have Core Arch installation media, and want to install the core packages from it, just copy core-pkgs.sqfs to new squashfs-root directory:<br />
$ cp loop/core-pkgs.sqfs squashfs-root<br />
<br />
Now [[Change Root|chroot into the new Arch system]]: <br />
<br />
$ mount -t proc proc /mnt/squashfs-root/proc<br />
$ mount -t sysfs sys /mnt/squashfs-root/sys<br />
$ mount -o bind /dev /mnt/squashfs-root/dev <br />
$ chroot /mnt/squashfs-root /bin/bash<br />
<br />
Now you're inside the new installation's filesystem. If you're going to use core-pkgs.sqfs, mount it now:<br />
$ mkdir -p /src/core/pkg<br />
$ mount -o loop -t squashfs core-pkgs.sqfs /src/core/pkg <br />
<br />
At this point, go ahead and launch Arch's aif installer!<br />
$ aif -p interactive<br />
<br />
and you can install Arch as normal (from CD or Internet) with the notice:<br />
* Your target partition must not using by host system<br />
<br />
<br />
After installing Arch from chroot's environment, you can remove any squashfs-root directory and exit the chroot:<br />
$ umount /src/core/pkg<br />
$ exit<br />
$ umount /mnt/squashfs-root/dev <br />
$ umount /mnt/squashfs-root/sys <br />
$ umount /mnt/squashfs-root/proc<br />
$ rm -rf /mnt/squashfs-root<br />
<br />
=== Update and Install packages from host system via chroot ===<br />
Add an entry to your existing Grub bootloader's menu.lst, or if you installed a new Grub during the Arch installation process, add it to the /boot/grub/menu.lst on your Arch filesystem.<br />
<br />
Now either reboot or [[Change Root|chroot]] into the new Arch's partition to install further packages:<br />
$ mkdir /mnt/arch<br />
$ mount /dev/sdxx /mnt/arch<br />
$ mount -t proc proc /mnt/arch/proc<br />
$ mount -t sysfs sys /mnt/arch/sys<br />
$ mount -o bind /dev /mnt/arch/dev <br />
$ chroot /mnt/arch /bin/bash<br />
<br />
Update and install new packages:<br />
$ pacman -Syu <br />
$ pacman -S gnome</div>Cozhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_from_existing_Linux&diff=101923Install Arch Linux from existing Linux2010-04-05T04:22:48Z<p>Coz: </p>
<hr />
<div>[[Category:Getting and installing Arch (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Install from Existing Linux}}<br />
<br />
This guide is intended to combine and update the three previously existing and highly similar alternative install guides on this wiki. This guide is intended for anybody who wants to install Arch Linux from any other running Linux -- be it off a LiveCD or a pre-existing install of a different distro.<br />
<br />
==Overview==<br />
Arch Linux's [[pacman]] can be configured (-r) to perform operations in any directory you like, using that as the context of "root" while running. <br />
<br />
The pacman package available from the mirrors includes a static-linked version of the binary (pacman.static) which should run in most any modern linux environment, without the need of dependencies. <br />
<br />
This is useful for building up new Arch Linux systems from scratch from another distro's LiveCD or existing installation. It's also useful for creating new chroot environments on a "host" system, maintaining a "golden-master" for development & distribution, or other fun topics like rootfs-over-NFS for diskless machines. <br />
<br />
In the case of an x86_64 host, it is even possible to use i686-pacman to build a 32-bit chroot environment. See [[Arch64 Install bundled 32bit system]]. <br />
<br />
Throughout this guide, we will refer to partitions as /dev/hdxx or /dev/sdxx. This refers to whatever dev entry you have on your system for the partition in question. The convention is:<br />
Drive 1, Partition 1: /dev/hda1 or /dev/sda1<br />
Drive 1, Partition 2: /dev/hda2 or /dev/sda2<br />
Drive 2, Partition 1: /dev/hdb1 or /dev/sdb1<br />
etc...<br />
<br />
We will refer to it as /dev/sdxx whenever possible, but realize depending on your system it could be /dev/hdxx.<br />
<br />
If you have a broadband connection available through the installation process and just want to do a basic install, [http://unetbootin.sourceforge.net/ UNetBootin] may also be an easy solution worth taking a look at. (Also [[Putting_installation_media_on_a_USB_key#UNetBootin|discussed here]].)<br />
<br />
In this article, "host" refers to the computer which is used to perform the installation, and "target" refers to the computer where you want to install Arch. These may be one and the same computer. The host does not need to be an Arch system -- it can be a Debian or Redhat system. The section entitled "Setup the host system" explains how to install pacman on the host. The following section entitle "Setup the target system" explains how to use pacman from the host system to install Arch on the target system. Therefore if the host system is already running Arch, you can skip to "Setup the target system".<br />
<br />
==Setup the host system== <br />
<br />
You need to install the archlinux package manager pacman on your host linux environment. In addition you will need a list of pacman mirrors sites which is used to download data on available packages as well as the packages themselves.<br />
<br />
===Get the required packages===<br />
<br />
You need to get the required packages for your host linux environment. The examples given here assume you are using a i686 environment. '''If you are running on an 64bit linux instead you should replace each occurance of "i686" with "x86_64".'''<br />
<br />
All version numbers given here may change. Please check the version numbers the packages are at first and note them down. The version numbers can be found [http://www.archlinux.org/packages/core/i686/pacman/ here for pacman] and [http://www.archlinux.org/packages/core/i686/pacman-mirrorlist/ here for pacman-mirrorlist]. Once you are sure of the version numbers download the required packages:<br />
mkdir /tmp/archlinux<br />
cd /tmp/archlinux<br />
wget ftp://ftp.archlinux.org/core/os/i686/pacman-\*.pkg.tar.gz<br />
tar xzvf pacman-*.pkg.tar.gz<br />
<br />
In addition to the dynamically linked pacman there is a statically linked version available. This does integrate better into all the different host linux systems possible. This static version is not part of the normal archlinux setup anymore but can be found at http://repo.archlinux.fr/i686/. Use the following command to get it:<br />
cd /tmp/archlinux<br />
wget http://repo.archlinux.fr/i686/pacman-static-3.2.2-1.pkg.tar.gz<br />
tar xzvf pacman-static-3.2.2-1.pkg.tar.gz<br />
<br />
===Install the required files onto the host system===<br />
<br />
<ol><br />
<li><div>If you use pacman.static for the initial setup, you only need a few files installed into the host. This can be done by running the following commands as root:<br />
cp /tmp/archlinux/etc/pacman.conf /etc<br />
mkdir /etc/pacman.d<br />
cp /tmp/archlinux/etc/pacman.d/* /etc/pacman.d<br />
cp /tmp/archlinux/usr/bin/pacman.static /usr/bin<br />
</div><br />
<li><div>Alternatively, if you do not mind littering your install host, you can extract all the downloaded tar balls into your root directory by running as root:<br />
cd /<br />
for f in /tmp/archlinux/pacman-*pkg.tar.gz<br />
tar xzf $f<br />
done<br />
</div><br />
<li><div>Alternatively, you can instead turn these tarballs into packages for your distribution with the [http://kitenet.net/~joey/code/alien/ alien] tool. See the man page of the tool for instructions. The packages created that way may be installed into your host distribution using the usual package management tools available there. This approach offers the best integration into the host linux environment. For a debian package based system this is done with the following commands:<br />
cd /tmp/archlinux<br />
alien -d pacman-3.3.3-1-i686.pkg.tar.gz<br />
alien -d pacman-mirrorlist-20100131-1-i686.pkg.tar.gz<br />
alien -d pacman-static-3.2.2-1-i686.pkg.tar.gz<br />
<br />
RPM based systems will need to replace the parameter "-d" with "-r".<br />
<br />
These distribution packages can then get installed using the normal package management tools of the host linux environment.<br />
</div><br />
<li><div><br />
Under Fedora 12, I wasn't able to install pacman with any of the other methods, but with the nice script at http://bbs.archlinux.org/viewtopic.php?pid=734336#p734336 it will download and install it for you. Worked wonderfully for me.<br />
</div><br />
<li><div><br />
An older method is [[Quick Custom Installation|discussed here]].<br />
</div><br />
</ol><br />
<br />
===Configure the host system===<br />
<br />
Configure your /etc/pacman.conf to your liking, and remove unnecessary mirrors from /etc/pacman.d/mirrorlist. Also, enabling at least a few mirrors might become necessary, as you may experience errors during syncing if you have no mirror set. You may want to manually resolve DNS in the /etc/pacman.d/mirrorlist, because pacman-static for i686 may not be able to get address information on x86_64 systems.<br />
<br />
If you're installing from a LiveCD, and you have a system with a low amount of combined RAM and swap (< 1 GB), be sure to set the cachedir in /etc/pacman.conf to be in the new Arch partition (e.g. {{Filename|/newarch/var/cache/pacman/pkg}}). Otherwise you could exhaust memory between the overhead of the existing distro and downloading necessary packages to install.<br />
<br />
==Setup the target system==<br />
<br />
===Prepare a partition for Arch===<br />
<br />
You don't ''have to'' install Arch on a separate partition. You could instead build up a root filesystem in a normal directory, and then create a master tarball from it, or transfer it across the network.<br />
<br />
However, most users will want to be installing Arch onto its own partition.<br />
<br />
Prepare any partitions and filesystems you need for your installation. If your host system has any gui tools for this, such as gparted, cfdisk, or mandrakes diskdrake, feel free to use them. <br />
<br />
To format a partition as ext3, you run (where /dev/sdxx is the partition you want to setup): <br />
# mkfs.ext3 /dev/sdxx <br />
To format it as ext3 with journaling and dir_index: <br />
# mkfs.ext3 -j -O dir_index /dev/sdxx <br />
To format it as reiserfs: <br />
# mkreiserfs /dev/sdxx <br />
To format a partition as swap, and to start using it: <br />
# mkswap /dev/sdxx <br />
# swapon /dev/sdxx<br />
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. <br />
<br />
Once you have your filesystems setup, mount them. Throughout this guide, we will refer to the new Arch root directory as /newarch, however you can put it wherever you like. <br />
# mkdir /newarch <br />
# mount /dev/sdxx /newarch<br />
<br />
===Install the core===<br />
<br />
Update pacman. You may have to create the {{Filename|/newarch/var/lib/pacman}} folder for it to work (see "Setup the host system" above):<br />
# mkdir -p /newarch/var/lib/pacman <br />
# pacman.static -Sy -r /newarch<br />
<br />
Install the 'base' group of packages:<br />
# pacman.static -S base -r /newarch<br />
<br />
'''NOTE:''' The -r parameter doesn't change the location of Pacman's cache directory. If you don't want Pacman's cache to be created in your host distro, supply another location with --cachedir, or modify pacman.conf as described [[#Configure_the_host_system|above]].<br />
<br />
===Prepare /dev nodes===<br />
<br />
First, ensure the correct /dev nodes have been made for udev:<br />
ls -alF /newarch/dev<br />
<br />
This result in a list containing lines similar to the following (the dates will differ for you):<br />
crw------- 1 root root 5, 1 2008-12-27 21:40 console<br />
crw-rw-rw- 1 root root 1, 3 2008-12-27 21:42 null<br />
crw-rw-rw- 1 root root 1, 5 2008-12-27 21:40 zero<br />
<br />
Delete and recreate any device which has a different set of permissions (the crw-... stuff plus the two root entries) and major/minor numbers (the two before the date).<br />
<br />
cd /newarch/dev <br />
rm console ; mknod -m 600 console c 5 1 <br />
rm null ; mknod -m 666 null c 1 3 <br />
rm zero ; mknod -m 666 zero c 1 5<br />
<br />
All device nodes should have been created for you already with the right permissions and you should not need to recreate any of them.<br />
<br />
===Chroot===<br />
Now we will [[Change Root|chroot into the new Arch system]].<br />
<br />
In order for DNS to work properly you need to edit {{Filename|/newarch/etc/resolv.conf}} or replace it with the resolv.conf from your running distribution <br />
cp /etc/resolv.conf /newarch/etc/ <br />
<br />
Also, you need to copy a correctly setup mirrorlist into the new system:<br />
cp /etc/pacman.d/mirrorlist /newarch/etc/pacman.d<br />
<br />
Mount various filesystems into the new Arch system: <br />
mount -t proc proc /newarch/proc<br />
mount -t sysfs sys /newarch/sys<br />
mount -o bind /dev /newarch/dev<br />
<br />
If you have a separate {{Filename|/boot}} partition, you'll probably need to mount that too. See [[Change Root]] for more details.<br />
<br />
When everything is prepared, chroot into the new filesystem: <br />
<br />
chroot /newarch /bin/bash<br />
<br />
===Install the rest===<br />
Install your preferred kernel, and any other packages you may wish to install. <br />
For the default kernel (which is already installed!):<br />
pacman -S kernel26 <br />
<br />
If you wish to install extra packages now, you may do so with: <br />
pacman -S packagename<br />
<br />
===Configure the target system===<br />
Edit your {{Filename|/etc/fstab}}, remembering to add /, swap and any other partitions you may wish to use. Be sure to use the /dev/sd* (sda1, sda2, sdb1, etc) for the partitions instead of /dev/hd*, as Arch uses the sdxx convention for all drives.<br />
<br />
Edit your {{Filename|/etc/rc.conf}} and {{Filename|/etc/mkinitcpio.conf}} to your needs. Then rebuild your initcpio image: <br />
mkinitcpio -p kernel26<br />
<br />
Edit {{Filename|/etc/locale.gen}}, uncommenting any locales you wish to have available, and build the locales: <br />
locale-gen<br />
<br />
===Setup Grub=== <br />
To use [[GRUB]] when chrooted, you need to ensure that {{Filename|/etc/mtab}} is up-to-date:<br />
grep -v rootfs /proc/mounts > /etc/mtab <br />
<br />
You can now run: <br />
grub-install /dev/sdx<br />
<br />
If grub-install fails, you can manually install:<br />
grub <br />
grub> find /boot/grub/stage1 (You should see some results here if you have done everything right so far. If not, back up and retrace your steps.)<br />
grub> root (hd0,X) <br />
grub> setup (hd0) <br />
grub> quit <br />
<br />
Double-check your {{Filename|/boot/grub/menu.lst}}. Depending on the host, it could need correcting from hda to sda, and a prefix of /boot as well in the paths. <br />
<br />
Detailed instructions for [[GRUB]] and [[LILO]] are available elsewhere on this wiki.<br />
<br />
===Finishing touches===<br />
See [[Beginners_Guide#Configure_the_System|Beginners Guide:Configure your System]]. You can ignore 2.11, but the rest of that guide should be of use to you in post-installation configuration of your system.<br />
<br />
[[Change_Root#Cleaning_up|Exit your chroot]]:<br />
exit<br />
umount /newarch/boot # if you mounted this or any other separate partitions<br />
umount /newarch/{proc,sys,dev}<br />
umount /newarch<br />
<br />
Reboot to your new Arch system!<br />
<br />
==Troubleshooting== <br />
<br />
===Kernel Panic===<br />
If when you reboot into your new system you get a kernel panic saying console couldn't open: <br />
kinit: couldn't open console, no such file... <br />
<br />
This means you didn't follow the instructions above. Follow the steps to create basic device nodes at the beginning of preparation.<br />
<br />
===Root device '/dev/sd??' doesn't exist=== <br />
If when you reboot into your new system you get a error messages like this: <br />
Root device '/dev/sda1' doesn't exist, attempting to create it... etc. <br />
<br />
This means the drives are showing up as "hda1" instead of "sda1" In which case change your GRUB or LILO settings to use "hd??" or try the following. <br />
<br />
Edit /etc/mkinitcpio.conf and change "ide" to "pata" in the "HOOKS=" line. Then regenerate your initrd. (Make sure you have chroot'ed into the new system first.) <br />
mkinitcpio -p kernel26<br />
<br />
If you are using LVM make sure you add "lvm2" in the HOOKS line. Regenerate your initrd as above.<br />
<br />
If you're installing to a device that needs PATA hook make sure it's located before autodetect hook in mkinitcpio.conf.<br />
<!-- vim: set ft=Wikipedia: --><br />
<br />
= Another Method: Installing from Existing Linux with Arch's Image = <br />
=== Preparing the Installation Environment ===<br />
<br />
You can grab whatever image from Arch's Download Page and get the content of image by mount loopback:<br />
<br />
CD Image: <br />
$ mount -o loop archlinux-2009.08-core-i686.iso /mnt/loop<br />
<br />
with USB Image:<br />
$ losetup -f archlinux-2009.08-core-i686.img<br />
$ losetup -fo 32256 /dev/loop0<br />
$ mount /dev/loop0 /mnt/loop<br />
<br />
and the content of image:<br />
$ ls /mnt/loop <br />
boot core-pkgs.sqfs isomounts lost+found overlay.sqfs root-image.sqfs<br />
<br />
extract the root image:<br />
$ cd /mnt<br />
$ unsquashfs loop/root-image.sqfs<br />
<br />
after this step, you will have a new squashfs-root directory which contain new Arch system.<br />
<br />
=== Install from New Environment ===<br />
If you have Core Arch installation media, and want to install the core packages from it, just copy core-pkgs.sqfs to new squashfs-root directory:<br />
$ cp loop/core-pkgs.sqfs squashfs-root<br />
<br />
Now [[Change Root|chroot into the new Arch system]]: <br />
<br />
$ mount -t proc proc /mnt/squashfs-root/proc<br />
$ mount -t sysfs sys /mnt/squashfs-root/sys<br />
$ mount -o bind /dev /mnt/squashfs-root/dev <br />
$ chroot /mnt/squashfs-root /bin/bash<br />
<br />
Now you're inside the new installation's filesystem. If you're going to use core-pkgs.sqfs, mount it now:<br />
$ mkdir -p /src/core/pkg<br />
$ mount -o loop -t squashfs core-pkgs.sqfs /src/core/pkg <br />
<br />
At this point, go ahead and launch Arch's aif installer!<br />
$ aif -p interactive<br />
<br />
and you can install Arch as normal (from CD or Internet) with the notice:<br />
* Your target partition must not using by host system<br />
<br />
<br />
After installing Arch from chroot's environment, you can remove any squashfs-root directory and exit the chroot:<br />
$ umount /src/core/pkg<br />
$ exit<br />
$ umount /mnt/squashfs-root/dev <br />
$ umount /mnt/squashfs-root/sys <br />
$ umount /mnt/squashfs-root/proc<br />
$ rm -rf /mnt/squashfs-root<br />
<br />
=== Update and Install packages from host system via chroot ===<br />
Add an entry to your existing Grub bootloader's menu.lst, or if you installed a new Grub during the Arch installation process, add it to the /boot/grub/menu.lst on your Arch filesystem.<br />
<br />
Now either reboot or [[Change Root|chroot]] into the new Arch's partition to install further packages:<br />
$ mkdir /mnt/arch<br />
$ mount /dev/sdxx /mnt/arch<br />
$ mount -t proc proc /mnt/arch/proc<br />
$ mount -t sysfs sys /mnt/arch/sys<br />
$ mount -o bind /dev /mnt/arch/dev <br />
$ chroot /mnt/arch /bin/bash<br />
<br />
Update and install new packages:<br />
$ pacman -Syu <br />
$ pacman -S gnome</div>Coz