ArchLinuxHowTo
Prerequisite for installing Debian GNU/coLinux[]
This is a step-by-step instruction on how to installArchLinux 0.7(Wombat) under co Linux on Windows (I've done this on Win2k Pro SP4 & WinXP SP2). Mention using *fsutil*, which may not exist on Win2k Pro, there are other programs you can use, I've used themkFile tool mentioned elsewhere on the Wiki. I've heard that simply copying the *fsutil* from WinXP is enough to get it working on Win2k Pro.
There is packed result file onLinux Install_on_windows_by_coLinux for anyone who want quicker.(The image have updated on 2008/02/02 for support archlinux 2007.08-2)
Since this method utilizes only official ArchLinux downloads, it does not rely on preexisting disk images ( if you're even able to find any!) and should be the preferred method for anyone who is planning on deploying *a Arch Linux/coLinux system*.
This article *assumes that you have coLinux installed and running*, as well as knowledge on *how to configure TAP/Bridge*.Proper network access is required to install the base system! ArchLinux is an i686 distro do not attempt this on a non-i686 machine, also, only use 2.6.x based co Linux installs. And now, for the step-by-step:
Create your rootfs and swapfs[]
- Open a *Command Prompt* by going to Start->Programs->Accessories->Command Prompt
- Change to the coLinux data directory (usually C:\co Linux), ie: *cd C:\coLinux*
- Create the rootfs, ie: *fsutil file createnew ArchLinux-0.7-ext3.1.5g 1610612736*
- Create the swapfs, ie: *fsutil file createnew swap.fs 268435456*
(The above two example creates a *1.5GB* root and *256MB* swap)
As an alternative to fsutil, download one of these files :
- http://gniarf.nerim.net/colinux/blank - blank images
- http://gniarf.nerim.net/colinux/fs - filesystem images in ext2fs
- http://gniarf.nerim.net/colinux/swap - swap images
Snapshots :
- http://www.mininova.org/tor/2026525 - filesystem image in ext2fs (with Arch Linux 2008 06 core)
Download the bootstrap files[]
- Download the list of 'base' packages to installpackages.txt
- UsingArch Linux mirrors, download pacman-<version>.tar.gz (PacMan package)
- Transfer these files to the 'image' you are going to make the ArchLinux image from.
Edit the coLinux XML file[]
- Add a *block_device*, for the ArchLinux root image file.
Start ArchLinux install (coLinux variant)[]
- Start coLinux with the above configuration. Please note, for the duration of the install, it might be easier to cut-and-paste if you use the *console-nt* instead.
- First thing you want to do is to get a shell.
- Initialize the rootfs. (adjust your block device number as necessary)
For *Ext3* type:
mke2fs -j /dev/cobd2
or forReiserFS type:
mkreiserfs --format 3.6 /dev/cobd2
- Mount ArchLinux root fs:
mount /dev/cobd2 /target
- Unpack pacman package to some temporary place:
cd ~; mkdir tmp; cd tmp; tar zxf pacman-<version>.tar.gz
- Put pacman, conf files in necessary places:
mkdir al-buildcp usr/bin/pacman.static al-build/pacmancp -a etc/pacman.d /etccp etc/pacman.conf /etccp etc/makepkg.conf al-build
- Start the Installation (this will download and install the base packages for ArchLinux):
cd al-buildyes "" | ./pacman -Sy -r /target `cat packages.txt`
- When installation is finished, chroot /target /bin/bash
- Modify /etc/fstab adding cobd/0 (root fs) and cobd/1 (swap)
- Create /dev/console (If when you boot ArchLinux you get Unable to open inital console, you forget this step):
mknod /dev/console c 1 5
- Edit rc.conf, this has time settings, network settings, boot-up daemons, etc. Not it defaults to having syslog-ng, but the package.txt file install syslog, so make sure you at least change that.
- Leave the chroot and prepare to reboot with ArchLinux:
exit
- Shutdown coLinux.
Edit the coLinux XML file again[]
- Adjust your *block devices* as necessary.
- Change the *bootparams* to *root=/dev/cobd/0 devfs=mount*. Putnothing else in bootparams.
(We will run into trouble if you do not add *devfs=mount* in the bootparams)
Start ArchLinux coLinux[]
- Start coLinux with the updated configuration.
- Configure the rest of your system as desired. Note that X will require additional steps to get around coLinux's lack of actual video devices (see below)
Postrequisite for installing Debian GNU/coLinux[]
- Enable your swap if you haven't already, ensure it's truely enabled:
free
Congratulations, you have installed a brand-new ArchLinux system running under co Linux. Thank you for taking our wonderful wacky tour, enjoy your new small, light, fast ArchLinux.
-- George
Dual Boot System[]
Ref:Converting Distributions, we can boot archlinux either from colinux or normal boot loader.
- modify the /etc/rc.sysinit, after the dmesg line, added following lines.
/bin/dmesg -n 3mount -o rw,remount /if uname -r | grep -e '-co-' > /dev/nullthen [ -f /etc/fstab.colinux ] && cp /etc/fstab.colinux /etc/fstabelse [ -f /etc/fstab.default ] && cp /etc/fstab.default /etc/fstabfimount -o ro,remount /
- edit the /etc/fstab.colinux and /etc/fstab.default
Fixing the included ArchLinux Image[]
Though the ArchLinux image provided by coLinux is broken, its not hard to fix it, though youmust resize the image to 384MiB+ with toporesize. Save the script below as "fixarch.sh", and make sure you have arch.fs and arch.swap (a swap file image) in your coLinux directory, then use a shortcut like:
C:\coLinux\colinux-daemon.exe -t fltk mem=64 kernel=vmlinux initrd=initrd.gz hda1=arch.fs hda2=arch.swap cofs1=c:\ root=/dev/hda1 eth0=ndis-bridge,"Local Area Connection"
login as root then copy fixarch.sh into the image:
mount /mnt/win;cat /mnt/win/colinux/fixarch.sh | tr -d "\r" >/tmp/fixarch.sh;chmod u+x /tmp/fixarch.sh;/tmp/fixarch.sh
fixarch.sh
#!/bin/bash#approx 109951KiB usedset -eumount /mnt/winmkdir -p /media/winsed -i "s/^#en_US.U/en_US.U/" /etc/locale.genlocale-gensed -i "1i\Server = http://mirror.rit.edu/archlinux/\$repo/os/i686" /etc/pacman.d/mirrorlistpacman -Syy --noconfirm xzpacman -Sd --noconfirm expat || truexz -dk /var/cache/pacman/pkg/expat*.xzpacman -U /var/cache/pacman/pkg/expat*.tarrm /var/cache/pacman/pkg/expat*.tarpacman -Sd --noconfirm openssl libarchive libfetch pacmanmv /etc/pacman.d/mirrorlist.pacsave /etc/pacman.d/mirrorlistpacman-db-upgradeecho http::33: >>/etc/groupecho http:x:33:33:http:/:/bin/false >>/etc/passwdpacman -Syu --noconfirmpacman -S --noconfirm readline ca-certificatesrm -R /mntpacman -Sc --noconfirmfind /etc -name "*.pacnew" | while read f;dof=`dirname $f`/`basename $f .pacnew`; mv $f $f.pacorig; mv $f.pacnew $fdoneecho Set password for rootpasswdecho -e "/dev/hda1 / ext3 noatime 1 1\n/dev/hda2 none swap defaults 0 0\ncofs1: /media/win cofs noauto 0 0" >>/etc/fstabsed -i s/=\"UTC\"/=\"virtual\"/ /etc/rc.confsed -i "s/Canada\/Pacific/America\/New_York/" /etc/rc.confsed -i s/^interface=$/interface=eth0/ /etc/rc.confread -p "Restart?"reboot
comments :
I had to add some mknod commands to rc.sysinit, so that fsck doesn't dump you into the recovery console because it can't find /dev/cobdX. Basically i searched for the lines that start the devfs daemon and added the following after it:
mknod /dev/cobd0 b 177 0mknod /dev/cobd1 b 177 1mknod /dev/cobd2 b 177 2mknod /dev/cobd3 b 177 3
MassTranslated on Sun Apr 23 17:35:32 UTC 2006
ManuallyAdjusted on 20 July 2008