|
我在 Tomas M 的 Blog 里看到,据称支持PAE的Slax 6.1.2 将会被命名为 Slax 6.2.2.
但是我等了巨长时间,也没有等到新版本出来,但是我又想用新版的 2.6.27.27 内核,Slax 6.2.0 的内核还跟 Slax 6.0.9 一样,是 2.6.27.8 的,有点老,呵呵,于是只好自己动手做了,没办法,谁让我的本子是4G内存呢。
下面是我发在官网上的贴子
Build the kernel enable PAE support fro Slax 6.1.2
First
You need download all scripts and sources from ftp://ftp.slax.org/source/slax/kernel/2.6.27.27/
Second
Boot system with Slax 6.1.2 (Kernel 2.6.27.27)
Put all scripts and sources to
/usr/src
open file "/usr/src/config" and edit it
find
-----------------------
# CONFIG_M486=y
CONFIG_M586 is not set
-----------------------
Change it to
-----------------------
# CONFIG_M486=y
CONFIG_M586=y
-----------------------
find
-----------------------
CONFIG_HIGHMEM4G
-----------------------
Change this line and next line like this
-----------------------------
# CONFIG_HIGHMEM4G is not set
CONFIG_HIGHMEM64G=y
-----------------------------
find
-----------------------------
CONFIG_HIGHMEM
-----------------------------
Add next line
-----------------------------
CONFIG_X86_PAE=y
-----------------------------
OK, Save this file, run there's command
cp /usr/src/config /usr/src/linux-2.6.27.27/.config
cp /usr/src/config /boot/.config
(I'm not very sure this is should be do, but I did it)
Next
open a new terminal and run this command:
cd /usr/src
chmod +x build.kernel
chmod +x get-aufs-cvs.sh
chmod +x prepare-crippled-kernel-sources
chmod +x scripts/rc.modules
./build.kernel
The scripts will be ask you a few questions, just answer "Y", But some question's end is (new),you just enter.
At last ,the scripts will be report a error and exit.
Don't be worry it, you just copy this scripts to a new file and chmod it 777.(exp: The file name is build.fix)
build.fix
-----------------------------------------------------------
#!/bin/sh
LZMA=lzma457
AUFS=aufs
KERNEL=linux-2.6.27.27
SQUASHFS=squashfs3.4
TMP=/usr/src
PKG=/tmp/$KERNEL
cd $TMP
mkdir -p $PKG/usr/bin
cp $TMP/$SQUASHFS/squashfs-tools/{mk,un}squashfs $PKG/usr/bin
strip --strip-unneeded $PKG/usr/bin/*
cd $PKG/lib/modules/*
rm -f modules.*
mkdir -p kernel/fs/squashfs/
cp $TMP/$LZMA/C/Compress/Lzma/kmod/{un,sq}lzma.ko kernel/fs/squashfs/
cp $TMP/$KERNEL/fs/squashfs/squashfs.ko kernel/fs/squashfs/
cd $TMP/$KERNEL
mkdir -p $PKG/boot
cp .config $PKG/boot/
cp arch/i386/boot/bzImage $PKG/boot/vmlinuz
mkdir -p $PKG/etc/rc.d/
cp $TMP/scripts/rc.modules $PKG/etc/rc.d/
cd $PKG
cd ..
dir2lzm $KERNEL $KERNEL.lzm
-----------------------------------------------------------
At after, you run this command :
/usr/src/build.fix
OK, A new kernel build was finish, and this kernel was supported PAE.
The new kernel was put in /tmp, name is linux-2.6.27.27.lzm.
/tmp/linux-2.6.27.27.lzm
And new kernel directory is put to /tmp/linux-2.6.27.27
/tmp/linux-2.6.27.27
But! it still can not boot your system.
Now you need remake a new bootable system .
First
Copy two files to /tmp ,
(Path to your boot disk)/slax/modules/1-001.core.lzm
(Path to your boot disk)/boot/initrd.gz
in first step, I try to remake initrd.gz, Open a terminal run these command:
cd /tmp
mkdir i
mknod /dev/loop100 b 7 100
gzip -d initrd.gz
mount initrd i
Then I use two konqueror to find and replace some files in /tmp/i with new files from /tmp/linux-2.6.27.27
Find the files in need initrd , and copy new files from /tmp/linux-2.6.27.27 to replace the old files.
Don't forget these have two lzm file in initrd (usr.lzm and drivers.lzm), you need unpack there's file and replace the files inside to new files from /tmp/linux-2.6.27.27
When you all be down, run this command
cd /tmp
umount i
gzip -9 initrd
OK, A new boot file was maked finish
copy the file initrd.gz to your boot disk /boot replace the old file
the next , you need unpack the 1-001-core.lzm
Same with initrd.gz file, you just copy new files from directory /tmp/linux-2.6.27.27 to directory /tmp/1-001-core to replace the old file.
When you complete, you rebuild 1-001-core.lzm, and copy it to your boot disk to replace the old file.
At this time , the works still not finished, you need copy a new kernel image to your boot disk /boot
this file was puted in(and named)
/tmp/linux-2.6.27.27/boot/vmlinuz
copy it to
(Path to your bootdisk)/boot
replace the old file.
At last time , I think you may want to backup the file: /tmp/linux-2.6.27.27.lzm
Good luck! |
|