coLinux
Advertisement

Debian 2.6.7-custom and reiser4[]

I may have made some mistakes here, I typed the whole thing up and the wiki timed out, losing all of my edits so I kinda rushed through the 2nd time.

  • Note: You should not mix versions. That is you shouldn't use an snapshot to build a kernel, then use stable *.exes with it... This is very-likely to cause an reboot or plain not work. If you build a kernel from a version's source, be sure to use that versions binaries.

Download the following[]

  1. Kernel source http://www.kernel.org or use apt-get
  2. coLinux snapshot http://www.colinux.org/snapshots
  3. Reiser4 Vanilla http://kem.p.lodz.pl/~peter/cko/reiser4/

Test snapshot[]

  1. stop any colinux instances that are running.
  2. backup your .xml config file
  3. backup your vmlinux file
  4. (Optional) backup your vmlinux-modules.tar.gz file
  5. install the exe from the snapshot to a different directory than your working version
  6. copy your xml config over and make appropriate changes as needed.
  7. make sure you can boot from the snapshot vmlinux.


Configure Apt, and prep system[]

  1. edit /etc/apt/sources.list change stable to sarge
  2. run: apt-get update
  3. run: apt-cache search kernel ||grep 2.6.7
  4. run: apt-get install kernel-source-2.6.7
  5. run: gcc –-version
    • If your version is 2.9xx run: apt-get install gcc-3.3
  6. run: cd /usr/src; tar –jxvf <kernel source>
    • this will be in the /usr/src dir if you grabbed it with apt
    • check to see if you have kernel headers for the kernel version your trying to compile. something like dpkg -S kernel-head||wc -l
  7. run: bunzip2 <reiser4 archive>
  8. copy the <colinux snapshot *from .tar.gz*>\patch\linux file some where on your colinux instance.
  9. run: ln –s kernel-source-2.6.7 linux
  10. run: cd /usr/src/linux
  11. run: patch –p1 < colinux snapshot\patch\linux
  12. run: patch –p1 < <reiser4 vanilla kernel patch>

Build the kernel[]

  1. make mrproper
  2. copy the <colinux snapshot\conf\linux-config from .tar.gz> to /usr/src/linux/.config
  3. run: make menuconfig
    • tweak here at your own risk, you really just want to check for reiser4 support.
    • you can edit the Makefile and add your custom kernel extension if you like here as well.
  4. run: make vmlinux
    • go get some coffee, check for make errors when done. If you get them one of us has done something wrong. You should have a vmlinux file 2.9MB at the top level directory (e.g: /usr/src/linux/vmlinux). Files with the name "vmlinux" in directories /usr/src/linux/arch/i386/boot or /usr/src/linux/arch/i386/boot/compressed are the wrong ones.
  5. run: make modules modules_install
    • If you want to create an vmlinux-modules.tar.gz, do INSTALL_MOD_PATH=<some path>, then tar/gzip the modules installed in that path into vmlinux-modules.tar.gz. Note that you need to tar inside that path (e.g. ./lib in /usr/src/modules/, and not /usr/src/modules/ itself).
    • get more coffee if you need it.

Get it running[]

  1. make sure you’ve backed things up.
  2. copy the vmlinux file from /usr/src/linux to your windows partition (* not good to overwrite the running copy *).
  3. run: shutdown –h now
    • this will bring your instance to powerdown state. If you didn’t know that, you should think twice about kernel hacking.
  4. run: colinux-daemon.exe --remove-driver && colinux-daemon.exe --install-driver
    • Sometimes I have found that running the --remove-driver && --install-driver twice in a row prevents a reboot.
    • You can, also, use colinux-daemon --status-driver to see if the driver is up and functioning correctly.
  5. wait for your disks to sync, I had 3 reboots before I had a working kernel to boot.
  6. try to start it up, if it boots you need to make the reiser4 fs tools and you're off to the races.

Known incompatibilities[]

  1. Do not set CONFIG_REGPARM (this will make your host system reboot immediately when trying to start such a kernel).

Building for Fedora Core 4[]

If you want to be able to boot a native/non-customized FC4 installation, you'll need a few features enabled that aren't in the default kernel:

  1. Enable CONFIG_HOTPLUG (under "General setup", called "Support for hot-pluggable devices")
  2. Enable CONFIG_MD (under "Device Drivers", "Multi-device support", top option) if using LVM (also see CoLinuxNativeRAID)
  3. Enable CONFIG_EXT3_FS_XATTR (under "File Systems", "Ext3 extended attributs")
  4. Enable CONFIG_EXT3_FS_SECURITY (just below)
  5. Enable CONFIG_SECURITY_SELINUX (under "Security options", called "NSA SELinux support") and all sub-options

You'll also need to use the Fedora mkinitrd tool to make an initrd.gz file (use all the --no-whatever options) and set up coLinux to use that.

Related Pages[]

Rebuilding co Linux with fuse-compatibility Explains how to rebuild the coLinux kernel to be compatible with fuse.


MassTranslated on Sun Apr 23 17:35:37 UTC 2006

Advertisement