Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
Prerequisite for installing Debian GNU/coLinux Edit
This is a step-by-step instruction on how to install ArchLinux 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 the mkFile 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 on Linux 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 Edit
- 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
- http://www.mininova.org/tor/2026525 - filesystem image in ext2fs (with Arch Linux 2008 06 core)
Download the bootstrap files Edit
- Download the list of 'base' packages to install packages.txt
- Using Arch 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 Edit
- Add a *block_device*, for the ArchLinux root image file.
Start ArchLinux install (coLinux variant) Edit
- 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 for ReiserFS 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-build cp usr/bin/pacman.static al-build/pacman cp -a etc/pacman.d /etc cp etc/pacman.conf /etc cp etc/makepkg.conf al-build
- Start the Installation (this will download and install the base packages for ArchLinux):
cd al-build yes "" | ./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:
- Shutdown coLinux.
Edit the coLinux XML file again Edit
- Adjust your *block devices* as necessary.
- Change the *bootparams* to *root=/dev/cobd/0 devfs=mount*. Put nothing else in bootparams.
(We will run into trouble if you do not add *devfs=mount* in the bootparams)
Start ArchLinux coLinux Edit
- 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 Edit
- Enable your swap if you haven't already, ensure it's truely enabled:
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.
Dual Boot System Edit
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 3 mount -o rw,remount / if uname -r | grep -e '-co-' > /dev/null then [ -f /etc/fstab.colinux ] && cp /etc/fstab.colinux /etc/fstab else [ -f /etc/fstab.default ] && cp /etc/fstab.default /etc/fstab fi mount -o ro,remount /
- edit the /etc/fstab.colinux and /etc/fstab.default
Fixing the included ArchLinux ImageEdit
Though the ArchLinux image provided by coLinux is broken, its not hard to fix it, though you must 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
#!/bin/bash #approx 109951KiB used set -e umount /mnt/win mkdir -p /media/win sed -i "s/^#en_US.U/en_US.U/" /etc/locale.gen locale-gen sed -i "1i\Server = http://mirror.rit.edu/archlinux/\$repo/os/i686" /etc/pacman.d/mirrorlist pacman -Syy --noconfirm xz pacman -Sd --noconfirm expat || true xz -dk /var/cache/pacman/pkg/expat*.xz pacman -U /var/cache/pacman/pkg/expat*.tar rm /var/cache/pacman/pkg/expat*.tar pacman -Sd --noconfirm openssl libarchive libfetch pacman mv /etc/pacman.d/mirrorlist.pacsave /etc/pacman.d/mirrorlist pacman-db-upgrade echo http::33: >>/etc/group echo http:x:33:33:http:/:/bin/false >>/etc/passwd pacman -Syu --noconfirm pacman -S --noconfirm readline ca-certificates rm -R /mnt pacman -Sc --noconfirm find /etc -name "*.pacnew" | while read f;do f=`dirname $f`/`basename $f .pacnew`; mv $f $f.pacorig; mv $f.pacnew $f done echo Set password for root passwd echo -e "/dev/hda1 / ext3 noatime 1 1\n/dev/hda2 none swap defaults 0 0\ncofs1: /media/win cofs noauto 0 0" >>/etc/fstab sed -i s/=\"UTC\"/=\"virtual\"/ /etc/rc.conf sed -i "s/Canada\/Pacific/America\/New_York/" /etc/rc.conf sed -i s/^interface=$/interface=eth0/ /etc/rc.conf read -p "Restart?" reboot
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 0 mknod /dev/cobd1 b 177 1 mknod /dev/cobd2 b 177 2 mknod /dev/cobd3 b 177 3
MassTranslated on Sun Apr 23 17:35:32 UTC 2006
ManuallyAdjusted on 20 July 2008