Install Alpine on coLinux
coLinux provides a virtualized Linux environment under Windows, much like Virtual Box or vmware. However there is much less overhead.
This is a from-scratch instruction on how to install Alpine Linux under coLinux on Windows.
Get the necessary files from colinux.org - download latest version of coLinux installer.
Run the installer (just go through the installation). I installed everything to c:\Program Files\coLinux , and will refer to it as if you do it the same way.
Download the latest version of Alpine Linux: alpinelinux.org/downloads. I recommend mini edition. coLinux supports only 32-bit platform, so we don't have much choice - pick up x86 version.
Copy Alpine Linux ISO e.g. alpine-mini-2.2.2-x86.iso to coLinux directory. We need also initrd image from CD, so extract grsec.gz (it's in boot directory) using 7-zip or other tool.
Right now we are messing few thing, mainly disk images. You can create them using fsutil. Launch Command Prompt, switch to coLinux directory, create alpine-root.fs and alpine-swap.fs.
This will create 1.5GB image for root file system and 258MB file for swap. Values are in bytes, you can use bit calculator to calculate different sizes.
Now create some files. Start with alpine.bat, which should look like this:
Next one will be alpine-bootstrap.conf - our configuration file for coLinux. You can use this as skeleton:
# Configuration to run Alpine Linux under coLinux # Standard coLinux kernel kernel=vmlinux # Alpine Linux boot initrd file # This option *MUST* be removed after Linux was installed to boot from hda1 ! initrd=grsec.gz alpine_dev=hdc:iso9660 # Root file system (Empty file, 700MB...1GB) hda1=alpine-root.fs #root=/dev/hda1 # Swap file (Empty file, 64MB...256MB) #hda2=alpine-swap.fs # Downloaded ISO file (unchanged) hdc=alpine-mini-2.2.2-x86.iso # Windows directory with kernel modules #cofs0=cofs0 # Optional settings (memory and network) mem=256 eth0=tuntap,"coLinux" # Terminal size #cocon=140x60
Now we're ready to launch Alpine coLinux for first time, use apline.bat for that. Alpine should load, login as root and start configuration.
Next we will create ext3 partition on alpine-root.fs, we need e2fsprogs for that.
Mount newly created partition and start disk installation, switch off Alpine after installation.
Some fixes in alpine-bootstrap.conf are needed. Comment out ISO and initrd images. Uncomment root path, alpine-swap.fs and cofs0. Create folder cofs0 and copy there kernel modules from coLinux e.g. vmlinux-modules.tar.gz. Start Alpine coLinux once again.
First thing you will notice is lack of console at boot time, fix this:
Get rid of other boot warnings:
Add swap service and remove acpid:
Copy kernel modules from cofs0:
Last step to enjoying Apline coLinux is simple: