-
7.4.2 - Kernel recompilation script / method - what worked for me
Since 2.6.39 (the last kernel I successfully built and included in my K5.3.1 remaster) a lot of things changed.
Back then I still built the cloop and aufs modules separately, whereas now (K7.4.2) I see they are kernel builtin.
It's a lot easier this way, that's true! As far as I understand, the only extra module being built is virtualbox (?).
The main point of interest for me with K7.4.2 is to activate PAE in the 32 bit kernel, so I can use 100% of 4GB RAM or more (for instance I have a few Core2 mainboards with 8GB RAM) without having to use a 64 bit Linux.
So I concocted (by trial and error) the following script, which is to be executed (as root of course) in /usr/src:
Code:
#!/bin/sh
### TEST SCRIPT - REBUILD THE KNOPPIX 7.4.2 KERNEL AFTER MODIFYING THE KERNEL CONFIGURATION.
### THE GOAL IS TO REBUILD THE 32 bit KERNEL AS DEBIAN PACKAGES WHICH CAN BE INSTALLED LATER ON.
### IN THIS PARTICULAR CASE WE AIM FOR PAE ACTIVATION IN THE KERNEL AND DEACTIVATION OF
### CPU MICROCODE UPDATE SUPPORT.
### this was the kernel building command used by Klaus K on Knoppix 6.7.1
# make CONCURRENCY_LEVEL=8 ARCH=i386 bzImage modules && rm -rf debian; CONCURRENCY_LEVEL=8 ARCH=i386 MODULE_LOC=`pwd`/../modules fakeroot make-kpkg --append-to-version=-pae --us --uc kernel_image modules_image kernel_headers kernel_source
### but the second part (make-kpkg) fails with K7.4.2
# run this script in /usr/src
echo -n "extracting K7.4.2 kernel sources... " && tar -xjf linux-source-3.16.3.tar.bz2 && echo "done."
echo -n "extracting virtualbox module sources... " && tar -xjf virtualbox-guest.tar.bz2 && echo "done."
cd linux-source-3.16.3
echo -e "\n\n======================= make kernel clean ============================\n"
make-kpkg clean
echo -e "\n\n======================= make modules clean ===========================\n"
make-kpkg modules_clean
# copy original Knoppix 7.4.2 kernel config here
echo -e "\n\n=============== get original K742 kernel config ======================\n"
cp -fpv /boot/config-3.16.3 ./.config
# change to "EXTRAVERSION = -pae" in Makefile
echo -e "\n\n=========== set custom kernel EXTRAVERSION in Makefile ===============\n"
sed -i -e "s/^EXTRAVERSION \=.*$/EXTRAVERSION = -pae/" Makefile
# modify kernel configuration manually: activate PAE and deactivate CPU microcode support.
# in the config menu set the following:
# Processor type and features:
# Processor family (Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon) --->
# < > CPU microcode loading support
# High Memory Support (64GB) --->
# the first and third setting above will automatically give the next one:
# -*- PAE (Physical Address Extension) Support
make oldconfig menuconfig
# now let's do the actual recompilation:
# make CONCURRENCY_LEVEL=8 ARCH=i386 oldconfig bzImage modules # this works but then make-kpkg fails
make CONCURRENCY_LEVEL=8 ARCH=i386 oldconfig bzImage deb-pkg # THIS WORKED!!!
# now we should have the kernel .deb packages rebuilt in /usr/src
exit 0
I personally tested this script and it successfully rebuilt the 32 bit kernel for me in Knoppix 7.4.2.
I mean it generated 4 debian packages which can be installed anytime beside the already existing 2 kernels in K742, or replace the original 32 bit kernel shipped with the K742 DVD.
Code:
linux-firmware-image-3.16.3-pae_3.16.3-pae-1_i386.deb
linux-headers-3.16.3-pae_3.16.3-pae-1_i386.deb
linux-image-3.16.3-pae_3.16.3-pae-1_i386.deb
linux-libc-dev_3.16.3-pae-1_i386.deb
Then I also tested it (without remastering anything): I unpacked the minirt.gz and modified the /init script so it unpacks the "linux-image-3.16.3-pae_3.16.3-pae-1_i386.deb" in /UNIONFS/ right before /sbin/init is executed.
I named the new miniroot "minirt-pae.gz". And of course I added an extra entry to isolinux.cfg:
Code:
LABEL knoppix-pae
KERNEL vmlinuz-3.16.3-pae
APPEND lang=en apm=power-off initrd=minirt-pae.gz nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 no3d alsa
And I actually started Knoppix 7.4.2 with a PAE-enabled 3.16.3 kernel, rebuilt from the sources shipped with the original K7.4.2 DVD !!
As far as I can tell, everything works fine.
What I would like though is somebody else's opinion (I don't know if Klaus Knopper will have the time for this) who has some recent experience with kernel building.
What do you think? Is this method OK according to the current books or not?
Did I miss anything? Did I do anthing wrong?
And another thing: the "linux-source-3.16.3.tar.bz2" archive shipped with the DVD, is that the kernel source AFTER the K7.4.2 kernel compilation (and then make cleaned), or BEFORE (the original Debian packaged kernel)?
I would think it's the kernel source before compilation but I don't really know. I guess Klaus only can answer that...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
ORICO 5 Bay Raid USB3.0 to SATA External Hard Drive Enclosure for 3.5'' HDD US
$37.49
ORICO 5Bay Raid Hard Drive Enclosure USB3.0 to SATA for 3.5'' HDD SSD 150W Power
$70.12
LSI Logic Mega Raid 9750-24i4e 28-port SAS RAID Controller *USED*
$70.00
DELL X60RX ASR 8805 Adaptec 12GB/s SAS SATA SSD Raid Controller Card PCI E
$42.94
Adaptec - ASR-7805 6Gbs SAS- PCI EXPRESS 3.0 X8 -1GB Cache RAID Controller Card
$24.99
UCSC-MRAID12G 12Gb/s SAS Modular RAID Controller
$7.45
G-Technology G Raid 0G00271 2TB Gen 4 USB FIREWIRE e-SATA External Hard Drive
$22.99
SUN/ ORACLE MegaRAID SAS 9361-8i 12Gb/s SAS /SATA RAID 1G Cache CARD 7085209
$29.99
8 Bay UNAS RAID Array Case mITX 8GB RAM AMD Athlon 5350 ASRock AM1H-ITX Storage
$399.95
Controller Raid intel RS3DC080 SAS 12GB/s with AXXRMFBU4
$150.00