|Note: This page was written for obsolete XML config files and should be updated with current information.|
This is a step-by-step instruction on how to install Debian GNU/Linux 3.0 (Woody) under coLinux on WinXP Pro. I've been told that the *fsutil* utility does not exist on Win2K, so you may have to resort to other methods on creating the rootfs/swapfs to your desired size (which is beyond the scope of this article).
Since this method utilizes only official Debian downloads, it does not rely on preexisting disk images (of which there are quite a few) and should be the preferred method for anyone who is planning on deploying *Debian/coLinux as a production system*.
The following method does not work on Debian GNU/Linux Testing (Sarge). If you want to install *Sarge* continue here.
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!. I also recommend using the 20040417 snapshot, as it seems to be very stable, resolves the SMP issue, and addresses the cursor under fltk. 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 debian.fs 1610612736*
- Create the swapfs, ie: *fsutil file createnew swap.fs 268435456*
(The above two example creates a *1.5GB* root and *256MB* swap)
<Gniarf> 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
Download the Debian Root Image Edit
- Download the bf24 root image and save it as *root.bin.gz*
- Using Win Zip or similar utility, unzip the file to the coLinux data directory as *root.bin* (and ignore the error about Trailing garbage in GZIP file)
(You should have a root.bin that is around *6-7 MB* in size instead of *1.4MB*)
- For *block_device index="0"*, use the rootfs you created above, ie: *path="\DosDevices\c:\colinux\debian.fs"*
- For *block_device index="1"*, use the swapfs you created above, ie: *path="\DosDevices\c:\colinux\swap.fs"*
- For *block_device index="2"*, use the root.bin you unzipped above, ie: *path="\DosDevices\c:\colinux\root.bin"*
- Make changes to the *bootparms* to the following: *root=/dev/cobd2 devfs=mount,dall ramdisk_size=8192*
- Make any other changes, such as *memory size* or *network* as necessary.
(The *bootparms* changes are very important, or else you will not get anywhere with the install!)
- 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.
- You will notice that you will get a flood of *device '/dev/tty2' does not exist.* Ignore it for now and press *Enter*.
- You will see the main installer screen. First thing you want to do is to get a shell. Press the *down arrow* until you see *Execute a Shell*.
- Type the following command to get rid of the flood: cd /dev; for i in 2 3 4; do ln -s null tty$i; done
- Initialize the rootfs. For *Ext3* type: mke2fs -j /dev/cobd/0 or for ReiserFS type: mkreiserfs --format 3.6 /dev/cobd/0
- Initialize the swapfs:
- Mount both fs:
mount /dev/cobd/0 /target; swapon /dev/cobd/1
- Exit the shell:
- Choose *Configure the Network*. Pick a hostname now. Follow the rest of the instructions.
- Choose *Install the Base System*. Select *Network*. Take all the defaults.
- When installation is finished, choose *Execute a Shell* again.
- Add swap manually to fstab:
echo "/dev/cobd/1 swap swap defaults 0 0" >> /target/etc/fstab
- Create the coLinux block devnodes:
mkdir /target/dev/cobd; for i in 0 1 2 3 4 5 6 7 ; do mknod /target/dev/cobd/$i b 117 $i; done
- Return to the menu: exit
- Select *Reboot the System*. coLinux does not "reboot", so it will simply close.
- Remove the *block_device index="2"* line since we no longer need the installer.
- Change the *bootparams* to *root=/dev/cobd/0*. Put nothing else in bootparams.
_(We will run into trouble if you do not remove the *devfs=mount,dall* from bootparams)_
- Start coLinux with the updated configuration.
- Answer the post-install questions. Most of them are straightforward. At this time, coLinux cannot access the hardware clock, so don't be surprised when the time shows up blank.
- *If you are using DHCP:* Sometime before you configure Apt, switch to a console with alt-F2, login as root and type:
cp /sbin/dhclient-2.2.x /sbin/dhclient ifdown eth0 ifup eth0
- 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)
Congratulations, you have installed a brand-new Debian GNU/Linux system running under coLinux. The Captain requests that you put your seat back in its upright position and tray in its locked position. Thank you for flying Debian GNU/coLinux.
-- Starfox (ed. ollinaie)
<Gniarf> nice but I want to point out the main gotcha users can get : starting a local X server trying to use the video card will likely cause Windows display to freeze, forcing you to a reboot and quite likely corrupt the Debian image, or at least make it unbootable. NOTE : this remark is obsolete now (version 0.6.0)
Under Debian, it happens mostly when you install a display manager (checked with gdm, likely too with kdm, xdm). It can also happen any time you dist-upgrade the same package.
The workaround is described in XCoLinux, it mostly involve
echo "null" > /etc/X11/default-display-manager
to temporarily prevent it to start *PRIOR* to installing gdm, then once gdm is installed :
echo "/usr/bin/gdm" > /etc/X11/default-display-manager
and commenting out the line 0=Standard in section [servers].
(this comment is reportedly obsolete with current releases of coLinux)
Although there seem to be no tool to create ext3 filesystems, you can do it as well. Simply run:
- *mke2fs -j /dev/cobd0*
You can even convert an existing ext2 filesystem to ext3 by adding the journal file on it:
- *tune2fs -j /dev/cobd0*
The network didn't work right away. During the apt configuration I switched to another console and edited */etc/network/interfaces* to my needs. see coLinuxASAP for tips about that file.
- my needs: *(echo auto lo eth0 ; echo iface lo inet loopback ; echo iface eth0 inet dhcp) >> /etc/network/interfaces*
The dhcp client */sbin/dhclient* is a nice script that chooses the right client according to the kernel version. Since we're running a 2.6.x, I simply did:
- *mv /sbin/dhclient /sbin/dhclient-chooser ; ln -s /sbin/dhclient-2.2.x /sbin/dhclient*
unable to mount root fs error Edit
Checked my xml config and compared it to the default. The default is "root=/dev/cobd0" From above on this page
"Make changes to the bootparms to the following: root=/dev/*cobd/2* devfs=mount,dall ramdisk_size=8192"
I changed it to the following: root=/dev/cobd2 devfs=mount,dall ramdisk_size=8192</bootparams> AND IT WORKED!
-- jerry freakshow
- "root=/dev/cobd0" is *DEPRECATED* Woody style,
- "root=/dev/cobd/0" is NEW Sarge style.
Which style works depends on the location of the inodes (/dev/cobd0 vs. /dev/cobd/0). You can get around some compatibility problems by creating symbolic links:
for i in 0 1 2 3 4 5 6 7; do ln -s /target/dev/cobd/$i /target/dev/cobd$i; done
In the default Debian install, coLinux thinks the hardware clock is set to UTC, but under Windows it is probably set to the local time zone. If the time is off by several hours, edit /etc/default/rcS and change "UTC = yes" to "UTC = no". Then update the /etc/localtime symlink (which is pointing to /usr/share/zoneinfo/UTC) to point to your correct timezone (which shouldn't be hard to find, they're all under /usr/share/zoneinfo).
MassTranslated on 25 Dec 2004.
MassTranslated on Sun Apr 23 17:35:59 UTC 2006