Difference between revisions of "User:Klapmuetz/Install on windows by CoLinux"

From ArchWiki
Jump to: navigation, search
(Typos)
(Tried to make it somewhat more usable)
Line 1: Line 1:
 +
{{stub}}
 
[[Category:Getting and installing Arch (English)]]
 
[[Category:Getting and installing Arch (English)]]
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
Line 7: Line 8:
 
Install method:
 
Install method:
 
  co arch 1  
 
  co arch 1  
+
 
 
Daily usage:
 
Daily usage:
 
  co arch
 
  co arch
Line 16: Line 17:
 
Using [[Remote Arch Linux Install]] and an existing Debian image I built a Arch Linux 0.8.0 base ext3 filesystem. I put the method to build Arch Linux image here. (The newest version have put in co.7z) (Note: arch.cmd is the same as co.cmd which contains in co.7z)
 
Using [[Remote Arch Linux Install]] and an existing Debian image I built a Arch Linux 0.8.0 base ext3 filesystem. I put the method to build Arch Linux image here. (The newest version have put in co.7z) (Note: arch.cmd is the same as co.cmd which contains in co.7z)
  
Build Arch Linux on Colinux From Debian
+
Build Arch Linux on Colinux From Debian
colinux 0.8.0 (devel-coLinux-20080120.exe)
+
*colinux 0.8.0 (devel-coLinux-20080120.exe)
archlinux 2007.08-2 (Archlinux-i686-2007.08-2.ftp.iso)
+
*archlinux 2007.08-2 (Archlinux-i686-2007.08-2.ftp.iso)
Debian 4.0r0 (Debian-4.0r0-etch.ext3.1gb)
+
*Debian 4.0r0 (Debian-4.0r0-etch.ext3.1gb)
  
1. download required files
+
==== 1. Download required files ====
 +
* On sf.net's colinux download page
 +
** colinux 0.8.0
 +
** Debian-4.0r0.ext3-etch.ext3.1gb.bz2
 +
* Install colinux 0.8.0
 +
* Download fs_256Mb.bz2 blank ext3 file system: http://gniarf.nerim.net/colinux/fs       
 +
* Download swap_64Mb.bz2: http://gniarf.nerim.net/colinux/swap/
 +
* Extract all *.bz2 file into colinux's directory (can use 7-zip to extract)
  
    on sf.net's colinux download page
+
PS. This step could complete by following command.(wget & 7-zip required)
        colinux 0.8.0
+
arch.cmd deb 1    
        Debian-4.0r0.ext3-etch.ext3.1gb.bz2
+
        install colinux 0.8.0
+
    http://gniarf.nerim.net/colinux/fs       
+
        download fs_256Mb.bz2 blank ext3 file system
+
    http://gniarf.nerim.net/colinux/swap/
+
        download swap_64Mb.bz2   
+
    extract all *.bz2 file into colinux's directory (can use 7-zip to extract)
+
PS. This step could complete by following command.(wget & 7-zip required)
+
  arch.cmd deb 1    
+
  
2. get newarch script
+
==== 2. Get newarch script ====
 +
Reference: http://wiki.archlinux.org/index.php?title=Quick_Custom_Installation
  
    ref: http://wiki.archlinux.org/index.php?title=Quick_Custom_Installation
+
Use copy & paste method to create pacman.conf, newarch in c:\colinux (Must be unix line feed format)
Use copy & paste method to create pacman.conf, newarch in c:\colinux  
+
(Must be unix line feed format)
+
  
3. run dabian system and mount windows c:\colinux directory as /mnt/win
+
==== 3. Run dabian system and mount windows c:\colinux directory as /mnt/win ====
 +
Run deb.cmd under windows cmd window
 +
C:> arch.cmd deb
  
    run deb.cmd under windows cmd window
+
apt-get install wget
    C> arch.cmd deb
+
mkdir -p /mnt/win /mnt/arch
 +
mount -t cofs cofs1:/ /mnt/win
 +
cd /mnt/win/colinux/
 +
# arch.fs is thd file downloaded from http://gniarf.nerim.net/colinux/fs
 +
# mke2fs -j arch.fs  # using ext3 format, if the arch.fs is not formated by ext3
 +
mount -o loop arch.fs /mnt/arch/
 +
./newarch  # answer y, y, n (don't need to make tar.gz file)
  
    apt-get install wget
+
==== 4. Using the new arch.fs to boot ====
    mkdir -p /mnt/win /mnt/arch
+
Copy deb.cmd to arch.cmd and change every word DEB to ARCH, deb to arch.
    mount -t cofs cofs1:/ /mnt/win
+
colinux-daemon -t nt kernel=vmlinux mem=%MEM% initrd=initrd.gz hda1=arch.fs hda2=arch.swap cofs1=c:\ root=/dev/hda1 eth0=slirp,,tcp:22:22/tcp:5000:5000
    cd /mnt/win/colinux/
+
    # arch.fs is file download from http://gniarf.nerim.net/colinux/fs
+
    # mke2fs -j arch.fs  # using ext3 format, if the arch.fs is not formated by ext3
+
    mount -o loop arch.fs /mnt/arch/
+
    ./newarch  # answer y, y, n(don't need to make tar.gz file)
+
 
+
4. using the new arch.fs to boot
+
 
+
    copy deb.cmd to arch.cmd and change every word DEB to ARCH, deb to arch.
+
    colinux-daemon -t nt kernel=vmlinux mem=%MEM% initrd=initrd.gz hda1=arch.fs hda2=arch.swap cofs1=c:\ root=/dev/hda1 eth0=slirp,,tcp:22:22/tcp:5000:5000
+
 
 
    run arch.cmd under windows cmd window
+
Run arch.cmd under windows cmd window
    c> arch.cmd arch
+
C:> arch.cmd arch
 
 
    under colinux box
+
Under colinux box:
 +
# nano -w /etc/rc.conf
 +
 
 +
Change the 'eth0' line as following:
 +
eth0=dhcp
 
 
    nano -w /etc/rc.conf
+
To access the network via slirp's dhcp method:
    # change the 'eth0' line as following:
+
# /etc/rc.d/network restart
    eth0=dhcp
+
 
 
    /etc/rc.d/network restart # to access the network via slirp's dhcp method
+
==== 5. Modify fstab ====
+
# mkdir -p /mnt/win
5. modify fstab
+
# vi /etc/fstab
  
    mkdir -p /mnt/win
+
Append the following lines:
    vi /etc/fstab, append following lines      
+
/dev/hda1      /        ext3    noatime        1      1
    /dev/hda1      /        ext3    noatime        1      1
+
/dev/hda2      none    swap    defaults        0      0
    /dev/hda2      none    swap    defaults        0      0
+
cofs1:/       /mnt/win cofs    noauto          0      0
    cofs1:/       /mnt/win cofs    noauto          0      0
+
   
+
Here we let /dev/hda1 do auto fsck that may cause first time boot fail.
    # here we let /dev/hda1 do auto fsck that may cause first time boot failed
+
But, just continue, and try booting again, it will success.
    # but, just continue, and try boot again, it will successful.
+
  
== build minial image (optional) ==
+
== Build minial image (optional) ==
1. reduce the disk usage in fs.from by remove useless packages
+
1. Reduce the disk usage in fs.from by removing useless packages
1.1 boot from arch.fs
+
1.1 Boot from arch.fs
1.2 try to remove most BASE packages
+
1.2 Try to remove most BASE packages
    mkdir /mnt/win
+
mkdir /mnt/win
mount -t cofs cofs1:/ /mnt/win
+
mount -t cofs cofs1:/ /mnt/win
cd /mnt/win/colinux
+
cd /mnt/win/colinux
./reduce.sh
+
./reduce.sh
    # edit reqpkg.txt if some dependency failed
+
# edit reqpkg.txt if some dependency failed
1.3 poweroff
+
1.3 Power off
  
2. boot from debian, copy arch.fs to arch_to.fs
+
2. Boot from debian, copy arch.fs to arch_to.fs
2.1 in windows create new empty file system as arch_to.fs
+
2.1 In windows create new empty file system as arch_to.fs
2.2 in debian box
+
2.2 In debian box:
    mkdir -p /mnt/arch /mnt/arch_to
+
mkdir -p /mnt/arch /mnt/arch_to
cd /mnt/win/colinux
+
cd /mnt/win/colinux
mount -o loop arch.fs /mnt/arch
+
mount -o loop arch.fs /mnt/arch
mount -o loop arch_to.fs /mnt/arch_to
+
 mount -o loop arch_to.fs /mnt/arch_to
./clean.sh  # remove some log files in arch.fs
+
./clean.sh  # remove some log files in arch.fs
    cp -rdp /mnt/arch/* /mnt/arch_to
+
cp -rdp /mnt/arch/* /mnt/arch_to

Revision as of 13:00, 13 December 2008

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in User talk:Klapmuetz/Install on windows by CoLinux#)

Arch and coLinux

The previous 0.7.x Arch Linux image can't workable, because Arch Linux changed the repository name from 'current' to 'core'. I've build a new image for CoLinux. All you need to do is download the co.7z batch file. ref: http://web.twpda.com/colinux .

Install method:

co arch 1 

Daily usage:

co arch

Or, you can download the images directly from http://web.twpda.com/colinux.

The image build steps (for expert users)

Using Remote Arch Linux Install and an existing Debian image I built a Arch Linux 0.8.0 base ext3 filesystem. I put the method to build Arch Linux image here. (The newest version have put in co.7z) (Note: arch.cmd is the same as co.cmd which contains in co.7z)

Build Arch Linux on Colinux From Debian

  • colinux 0.8.0 (devel-coLinux-20080120.exe)
  • archlinux 2007.08-2 (Archlinux-i686-2007.08-2.ftp.iso)
  • Debian 4.0r0 (Debian-4.0r0-etch.ext3.1gb)

1. Download required files

PS. This step could complete by following command.(wget & 7-zip required)

arch.cmd deb 1	  

2. Get newarch script

Reference: http://wiki.archlinux.org/index.php?title=Quick_Custom_Installation

Use copy & paste method to create pacman.conf, newarch in c:\colinux (Must be unix line feed format)

3. Run dabian system and mount windows c:\colinux directory as /mnt/win

Run deb.cmd under windows cmd window

C:> arch.cmd deb
apt-get install wget
mkdir -p /mnt/win /mnt/arch
mount -t cofs cofs1:/ /mnt/win
cd /mnt/win/colinux/
# arch.fs is thd file downloaded from http://gniarf.nerim.net/colinux/fs
# mke2fs -j arch.fs  # using ext3 format, if the arch.fs is not formated by ext3
mount -o loop arch.fs /mnt/arch/
./newarch  # answer y, y, n (don't need to make tar.gz file)

4. Using the new arch.fs to boot

Copy deb.cmd to arch.cmd and change every word DEB to ARCH, deb to arch.

colinux-daemon -t nt kernel=vmlinux mem=%MEM% initrd=initrd.gz hda1=arch.fs hda2=arch.swap cofs1=c:\ root=/dev/hda1 eth0=slirp,,tcp:22:22/tcp:5000:5000

Run arch.cmd under windows cmd window

C:> arch.cmd arch

Under colinux box:

# nano -w /etc/rc.conf

Change the 'eth0' line as following:

eth0=dhcp

To access the network via slirp's dhcp method:

# /etc/rc.d/network restart

5. Modify fstab

# mkdir -p /mnt/win
# vi /etc/fstab

Append the following lines:

/dev/hda1      /        ext3     noatime         1       1
/dev/hda2      none     swap     defaults        0       0
cofs1:/	       /mnt/win cofs     noauto          0       0

Here we let /dev/hda1 do auto fsck that may cause first time boot fail. But, just continue, and try booting again, it will success.

Build minial image (optional)

1. Reduce the disk usage in fs.from by removing useless packages 1.1 Boot from arch.fs 1.2 Try to remove most BASE packages

mkdir /mnt/win
mount -t cofs cofs1:/ /mnt/win
cd /mnt/win/colinux
./reduce.sh
# edit reqpkg.txt if some dependency failed

1.3 Power off

2. Boot from debian, copy arch.fs to arch_to.fs 2.1 In windows create new empty file system as arch_to.fs 2.2 In debian box:

mkdir -p /mnt/arch /mnt/arch_to
cd /mnt/win/colinux
mount -o loop arch.fs /mnt/arch

 mount -o loop arch_to.fs /mnt/arch_to

./clean.sh  # remove some log files in arch.fs
cp -rdp /mnt/arch/* /mnt/arch_to