Skip to content.

Scientific Linux

Sections
Personal tools
You are here: Home » Documentation » How To » Scientific Linux on coLinux

Scientific Linux on coLinux

This is a tale of how to make Scientific Linux (SL) and Cooperative Linux (coLinux) work together.

Scientific Linux on coLinux

Morten Siebuhr, msiebuhr@diku.dk

The install

This is a tale of how to make Scientific Linux (SL) and Cooperative Linux (coLinux) work together.

  1. Downloads:
    • Download coLinux and install.
    • Download coLinux Debian image (renamed to image_debian_1GB).
    • Download SL 4.0 ISO image (disc 1).
    I've installed coLinux in d:\coLinux\ (including Debian-image) and put all SL-relevant files in d:\coLinux\SL-test3\ (test3 = this is my third attempt ;-)).
  2. Setup of environment:
    • Create blank 1GB file for SL-install with fsutil file createnew image_SL3_1GB 1073741824 .
    • Create two files for booting coLinux with Debian (debian-config.xml) and SL (sl-config.xml), which looks like this (change for local differences).
      
      <?xml version="1.0" encoding="UTF-8" ?>
      
      <colinux>
      	<block_device index="0" path="\DosDevices\d:\coLinux\image_debian_1GB" enabled="true" />
      	<block_device index="1" path="\DosDevices\d:\coLinux\SL-test3\image_SL3_1GB" enabled="true" />
      	<block_device index="2" path="\DosDevices\d:\coLinux\SL-test3\SL.40.042505.i386.disc1.iso" enabled="true" />
      
      	<bootparams>root=/dev/cobd0</bootparams>
      
      	<initrd path="..\initrd.gz" />
      	<image path="..\vmlinux" />
      	<memory size="128" />
      	<network index="0" type="tap" />
      </colinux>
      
      <?xml version="1.0" encoding="UTF-8" ?>
      
      <colinux>
      	<block_device index="0" path="\DosDevices\d:\coLinux\SL-test3\image_SL3_1GB" enabled="true" />
      	<block_device index="1" path="\DosDevices\d:\coLinux\SL-test3\SL.40.042505.i386.disc1.iso" enabled="true" />
      	<block_device index="2" path="\DosDevices\d:\coLinux\image_debian_1GB" enabled="true" />
      
      	<bootparams>root=/dev/cobd0</bootparams>
      
      	<initrd path="..\initrd.gz" />
      	<image path="..\vmlinux" />
      	<memory size="128" />
      	<network index="0" type="tap" />
      </colinux>
    • To make the whole process a bit less painfull, I've created two shortcuts for booting the two linux-machines. The actual creation of these are left as a trivial exercise for the reader...
    • Also note that this requres networking. I know it's a pain in the ass for newcomers to coLinux, but you need it to install packages later on.
  3. Boot the Debian-machine (use the shortcut from above or have a shell in d:\coLinux\SL-test3, type ..\colinux-deamon.exe -c debian-config.xml). Log in as root.
  4. Install RPM in Debian with apt-get install rpm.
  5. Mount the SL-image and SL-disc in Debian:
    mke2fs -j /dev/cobd1
    mkdir sl disc
    mount /dev/cobd1 sl
    mount /dev/cobd2 disc
    ln -s disc/SL/RPMS
  6. Initialize new RPM database:
    
    mkdir -p sl/var/lib/rpm
    rpm --root /root/sl/ --initdb
  7. Create the devices the new machine needs:
    mkdir sl/dev
    for i in `seq 0 7`; do
    mknod sl/dev/cobd$i b 117 $i;
    mknod sl/dev/pty$i c 2 $i;
    mknod sl/dev/ttyp$i c 3 $i;
    mknod sl/dev/tty$i c 4 $i;
    done
    
    mknod sl/dev/mem c 1 1
    mknod sl/dev/kmem c 1 2
    mknod sl/dev/null c 1 3
    mknod sl/dev/port c 1 4
    mknod sl/dev/zero c 1 5
    mknod sl/dev/full c 1 7
    mknod sl/dev/random c 1 8
    mknod sl/dev/urandom c 1 9
    mknod sl/dev/aio c 1 10
    mknod sl/dev/kmsg c 1 11
    
    mknod sl/dev/tty c 5 0
    mknod sl/dev/console c 5 1
    
    cd sl/dev
    ln -s /proc/self/fd
    ln -s fd/0 stdin
    ln -s fd/1 stdout
    ln -s fd/2 stderr
    cd
  8. And then we install RPM's. A few notes on installation:
    • All installations are done with the command rpm --root /root/sl/ -i packagename. Hence, I will not write all commands, only package-names.
    • I will refer to packages by name only, not version. And as we made a RPMS-symlink, the actual install will be pretty much rpm --root /root/sl/ -i RPMS/packagename. Press tab to make the shell find the full filename.
    • Some packages has cyclic dependencies, for which I write package1+package2 to inducate simultanious install. Simply put both packages in the same command-line in rpm; rpm --root /root/sl/ -i RPMS/package1 RPMS/package2.
    • Some packages cannot be installed with full dependencies, which I inducate by suffixing a --nodeps to the package. Simply give rpm the same flag, and it will be OK.
  9. Here goes:
    setup
    filesystem
    basesystem
    libgcc
    tzdata
    glibc-common
    glibc
    zlib
    mktemp
    termcap
    libtermcap
    bash
    
    pcre
    ncurses
    info
    grep
    bzip2-libs
    bzip2
    
    gdbm
    libstdc++
    db4
    perl-5.8 + perl-Filter
    perl-DBI
    
    binutils
    
    gawk
    vim-common
    libselinux
    libattr
    libacl
    acl
    vim-minimal
    
    gmp
    readline
    findutils
    sed
    cracklib + cracklib-dicts
    glib2
    coreutils + pam --nodeps
    
    hwdata
    indexhtml
    redhat-logos
    rootfiles
    selinux-doc
    audit
    beecrypt
    chkconfig
    device-mapper
    dmraid
    e2fsprogs
    elfutils-libelf
    ethtool
    expat
    libsepol
    checkpolicy
    mingetty
    less
    popt
    psmisc
    setserial
    sl-release
    slang
    shadow-utils
    MAKEDEV
    SysVinit
    
    usbutils
    lvm2
    hotplug
    udev
    net-tools
    sysklogd
    util-linux
    iputils
    iproute
    tar
    gzip
    cpio
    module-init-tools
    procps
    mkinitrd
    initscripts + kernel-2.6
    rpm-libs
    rpm
  10. Some startup-initialization goes wrong in rc.sysinit, why you have to move it; mv sl/etc/rc.d/rc.sysinit sl/etc/rc.sysinit.backup. Not a pretty solution, but it makes the thing boot.
  11. Correct the mounting of file-systems. The /etc/fstab is missing, so fire up vi (or the likes) and create it;
    #[file system] [mount] [type] [options]         [dump] [pass]
    /dev/cobd0     /       ext3   errors=remount-ro 0      1
    proc           /proc   proc   defaults          0      0
    sys            /sys    sysfs  defaults          0      0
    Lastly, /etc/mtab has to be corrected by rm -f /etc/mtab; mount -a (perhaps a reboot is needed).
  12. Networking: install the following packages;
    
    iptables
    iptstate
    tcp_wrappers
    xinetd
    newt
    netconfig
    krb5-libs
    openssl
    bind-libs
    bind-utils
    openssh
    openssh-clients
    wget
    Create the file /etc/sysconfig/network-scripts/ifcfg-eth0 with the below syntax (adapt for local use)
    DEVICE=eth0
    BOOTPROTO=static
    BROADCAST=192.168.0.255
    IPADDR=192.168.0.40
    GATEWAY=192.168.0.1
    NETMASK=255.255.255.0
    NETWORK=192.168.0.0
    ONBOOT=yes
    Then a file for DNS-lookups is needed, /etc/resolv.conf (again, adapt for local setup):
    
    nameserver 137.138.16.5
    nameserver 137.138.17.5
    Lastly, tell SL we have a network by creating /etc/sysconfig/network:
    NETWORKING=yes
    HOSTNAME=colinux
    GATEWAY=192.168.0.1
    Lastly, the proc-filesystem seems not to mount at it should; Basically puch in following command in the prompt:
    umount /proc
    mount -a
    ifup eth0
    ifup lo

Current problems

  • The proc-filesystem (/proc) does not mount at boot-time. It has to be un-mounted and re-mounted every time the system boots

A few tips

  • Get hold of a "real" SL installation and have a look at the /root/install.log-file. It contains all rpm's installed by the installer. I'ts a good reference (I was about midways in digging-around-in-dependency-hell before Jaroslaw Polok told me. :-()
  • RPMfind.net is brilliant! It does not cover SL, but is usually gives some good hints about what packages contains what.
  • You can create your own mini-rpmfind by extracting what files each RPM will install into a textfile, and grep this file;
    tcsh
    touch rpm-files
    foreach rpm (`ls RPMS/*`)
        foreach file (`rpm -qpl $rpm`)
    	    echo $rpm $file >> rpm-files
        end
    end
    exit
    And search the files with grep filename rpm-files.

Revisions

Rev. Date Name What
0.1 15/8 2005 Siebuhr - Initial page
0.2 16/8 2005 Siebuhr - Added "A few tips"
- Minor corrections
1.0 17/8 2005 Siebuhr - Minor corrections.
- Solved some of the init-magick.
1.1 18/8 2005 Siebuhr - Fixed fstab/mtab-probem (I think)
- Begun working on network.
1.2 19/8 2005 Siebuhr - Fixed error in fstab
1.3 19/8 2005 Siebuhr - Finished networking, but found new bugs with mtab/fstab.
1.4 22/8 2005 Siebuhr - Added mount of /sys to fstab, more work is needed.
- rc.sysinit now works.
- Added Current problems-section.
1.5 24/8 2005 Siebuhr - Corrected use of mke3fs to mke2fs for correctness, thanks to Juan.
1.6 25/8 2005 Siebuhr - Corrections from Juan.
Created by dawson
Contributors : Morten Siebuhr, msiebuhr@diku.dk
Last modified 2005-10-05 02:39 PM
 

Powered by Plone

This site conforms to the following standards: