-
problem building/booting w/custom kernel
Hello all,
(I thought I already posted this but I don't see it anywhere ---- apologies if this is a dup.)
I went through several HowTos and read many posts/responses and was eventually successful in creating a custom
Knoppix with a custom kernel. Now I'm trying to reproduce this success and get the "CANNOT UNITE" error. I think this
indicates unionfs and kernel incompatibility but I don't know how to fix it. Perhaps the problem is that I'm building unionfs
outside the chroot environment, but I thought I did this the first time. Also, I'm not sure whether I need cloop.o or just
cloop.ko will be sufficient.
I'll post my whole remastering process below. I would appreciate any pointers on how to fix this problem, as well as how
to streamline the whole process.
Code:
# I'm working on my /mnt/sda6 partition which has about 5.5GB,
# and doing pretty much everything as root
#
# Boot Knoppix 4.0.2
# edit /etc/fstab to add ",dev" to the /mnt/sda6 entry
#
mount -rw /dev/sda6 /mnt/sda6
mkdir /mnt/sda6/knx
mkdir -p /mnt/sda6/knx/master/KNOPPIX
mkdir -p /mnt/sda6/knx/source/KNOPPIX
cp -dpR /KNOPPIX/* /mnt/sda6/knx/source/KNOPPIX
cp -ar /cdrom/boot /mnt/sda6/knx/master/boot
cp /cdrom/index.html /mnt/sda6/knx/master/
cd /cdrom && find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/sda6/knx/master/ \;
cd /mnt/sda6/knx/source/KNOPPIX/usr/src
# I get errors I don't understand when I install the same
# kernel that's running, so I install a different kernel
wget http://www.kernel.org/pub/linux/kern...-2.6.13.tar.gz
gunzip linux-2.6.13.tar.gz
tar xf linux-2.6.13.tar
rm -f linux-2.6.13.tar
rm -f linux
ln -s linux-2.6.13 linux
cp /KNOPPIX/usr/src/linux/.config /mnt/sda6/knx/source/KNOPPIX/usr/src/linux
chroot /mnt/sda6/knx/source/KNOPPIX
mount -t proc /proc proc
# I ignore "warning: can't open /etc/fstab: No such file or directory"
echo "nameserver a.b.c.d" >> /etc/resolv.conf
# There's an actual IP addr above
# Now start making some room...
rm -rf /usr/games
rm -rf /usr/share/games
cd /usr/src
# Find out what packages are installed, and how big they are:
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n
# Because somebody somewhere said to:
apt-get update
# remove some packages to make room:
apt-get remove --purge -y kernel-image-2.6.12
# Remove some large packages here with a bunch of apt-get remove's
#
# Seems like I might need the following:
apt-get install uuid-dev
apt-get install ctags
apt-get clean
cd /usr/src/modules
wget http://debian-knoppix.alioth.debian...._2.02-1.tar.gz
gunzip cloop_2.02-1.tar.gz
tar xf cloop_2.02-1.tar
cd /usr/src/linux/include
ln -s asm-i386 asm
cd /usr/src/linux
# I take all defaults on next step
make oldconfig
make
# Not sure exactly what I'm doing around here
make-kpkg kernel-image
dpkg -i ../kernel-image*deb
make modules
make modules_install
cd /usr/src/modules/cloop-2.02
make KERNEL_DIR=/usr/src/linux
cd /usr/src/modules
wget ftp://ftp.fsl.cs.sunysb.edu/pub/unio...-1.0.14.tar.gz
gunzip unionfs-1.0.14.tar.gz
tar xf unionfs-1.0.14.tar
cd /usr/src/modules/unionfs-1.0.14
make LINUXSRC=/usr/src/linux TOPINC=-I/usr/src/linux/include
cd /usr/src/linux
rm -f /boot/vmlinuz
rm -f /boot/System.map
ln -s /boot/vmlinuz-2.6.13 /boot/vmlinuz
ln -s /boot/System.map-2.6.13 /boot/System.map
umount /proc
exit
# No longer in the chroot environment
cd /mnt/sda6/knx/source/KNOPPIX/usr/src/modules
cd /mnt/sda6/knx/master/boot/isolinux
mkdir miniroot-initrd
mkdir miniroot-initramfs
gunzip minirt.gz
mount -o loop minirt miniroot-initrd
cp -Rp miniroot-initrd/* miniroot-initramfs/
umount ./miniroot-initrd
rmdir ./miniroot-initrd
cd miniroot-initramfs
touch init
chmod +x init
echo '#!/static/ash' >> init
echo '/linuxrc' >> init
echo 'exec /etc/init "$@" </dev/console >/dev/console 2>&1' >> init
cp -f /mnt/sda6/knx/source/KNOPPIX/usr/src/modules/unionfs-1.0.14/unionfs.ko \
modules
cp -f /mnt/sda6/knx/source/KNOPPIX/usr/src/modules/cloop-2.02/cloop.ko \
modules
cd modules
strip unionfs.ko
cd ..
find . | cpio --quiet -o -H newc | gzip -9 > ../minirt.gz
cd ..
rm -rf miniroot-initramfs
rm -f minirt
rm -rf /mnt/sda6/knx/source/KNOPPIX/.rr_moved
sed 's/nomce /nomce noeject noprompt /g' \
/mnt/sda6/knx/master/boot/isolinux/isolinux.cfg > \
/mnt/sda6/knx/master/boot/isolinux/isolinux.new
mv /mnt/sda6/knx/master/boot/isolinux/isolinux.new \
/mnt/sda6/knx/master/boot/isolinux/isolinux.cfg
cp /mnt/sda6/knx/source/KNOPPIX/usr/src/linux/arch/i386/boot/bzImage \
/mnt/sda6/knx/master/boot/isolinux/linux
cd /mnt/sda6/knx/source/KNOPPIX/usr/src/linux/
make clean
mkisofs -R -U -V "KNOPPIX.net filesystem" -publisher "KNOPPIX www.knoppix.net" \ -hide-rr-moved -cache-inodes -no-bak -pad /mnt/sda6/knx/source/KNOPPIX \
| /usr/bin/create_compressed_fs - 65536 > /mnt/sda6/knx/master/KNOPPIX/KNOPPIXcd /mnt/sda6/knx/master
find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin \
-exec md5sum '{}' \; > KNOPPIX/md5sums
mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 \
-boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
-hide-rr-moved -o /mnt/sda6/knx/knoppix.iso /mnt/sda6/knx/master
qemu -m 128 -cdrom /mnt/sda6/knx/knoppix.iso -boot d -user-net
-
Senior Member
registered user
Re: problem building/booting w/custom kernel

Originally Posted by
Wisler
I went through several HowTos and read many posts/responses and was eventually successful in creating a custom
Knoppix with a custom kernel. Now I'm trying to reproduce this success and get the "CANNOT UNITE" error. I think this
indicates unionfs and kernel incompatibility but I don't know how to fix it. Perhaps the problem is that I'm building unionfs
outside the chroot environment, but I thought I did this the first time. Also, I'm not sure whether I need cloop.o or just
cloop.ko will be sufficient.
New modules in 2.6 kernel are with .ko ending. I think that in Knoppix 4.0,2 modules were renamed to .o which is not the way to do things. Just copy unionfs.ko and cloop.ko files (no need to change even permissions) to /modules inside your minirt.gz. Then make sure linuxrc had cloop.ko and not cloop.o in line 431 (at least in my linuxrc):
Code:
$INSMOD -f /modules/cloop.ko file="$1/$KNOPPIX_DIR/$KNOPPIX_NAME"
The same with unionfs:
Code:
$INSMOD /modules/unionfs.ko 2>/dev/null && UNIONFS="yes"
Be sure you really have copied unionfs.ko and cloop.ko of the right kernel version and copied them in minirt.gz /modules directory. There seems to be some modification in Knoppix 5.0 but I'm not having it, so I can't say anything more. But I think in new Knoppix those modules are in new /cdrom/boot/modules directory.
If you can't get your unionfs to work, perhaps you would like to use some of my kernel versions (.deb packages) from http://tapsa.terae.net/linux/knoppix/suomiknoppix/
That new 2.6.16-beyond1 has unionfs module compiled with the kernel - so you need only linux-image and cloop-modules package. Other .deb packages are extra modules and you can use them if you need them.
-tapsa-
-
Be sure you really have copied unionfs.ko and cloop.ko of the right kernel version and copied them in minirt.gz /modules directory.
That was the problem. I thought that I was building unionfs.ko properly, but the fistdev.mk was missing. I added the following and this seems to have done the trick:
Code:
echo 'LINUXSRC=/usr/src/linux' >> fistdev.mk
echo 'TOPINC=-I/usr/src/linux/include' >> fistdev.mk
echo 'MODDIR=/lib/modules/2.6.13' >> fistdev.mk
Thanks for the sanity check.
Similar Threads
-
By calacode in forum Customising & Remastering
Replies: 0
Last Post: 07-29-2005, 02:27 PM
-
By fabioxa in forum Customising & Remastering
Replies: 0
Last Post: 07-05-2004, 08:16 PM
-
By andrewtayloruk in forum Customising & Remastering
Replies: 9
Last Post: 01-29-2004, 07:05 PM
-
By garyng in forum General Support
Replies: 2
Last Post: 04-21-2003, 09:54 PM
-
By garyng in forum Customising & Remastering
Replies: 1
Last Post: 04-11-2003, 03:27 PM
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

AMD Ryzen 5 5500 Processor ( read Description)
$59.00

INTEL CORE I7-870 SLBJG 2.93GHZ LGA1156 4 CORE CPU PROCESSOR
$23.00

(LOT OF 20) Intel Core i5-8400 CPU 2.80GHz Desktop Processor (SR3QT)
$700.00

INTEL CORE I9-10940X X-SERIES PROCESSOR | 3.30GHZ | SRGSH
$179.99

Intel Core i7-3770K 3.5 GHz Processor
$39.00

Intel Core i7-9700 Octa-Core 3 GHz Desktop Processor LGA 1151
$79.99

Intel Core i5-12500T SRL5W 2GHz 18MB 6 Core Socket LGA1700 Desktop CPU Processor
$114.99

Intel i7-8700 Coffee Lake 3.2GHz 6-Core Max Turbo 4.6GHz Processor
$67.99

Intel Core i7-10700 8-Core 16-Thread 2.9GHz Desktop CPU LGA1200 SRH6Y Z490 Z590
$129.00

AMD Ryzen 7 5800X Desktop Processor (4.7GHz, 8 Cores, Socket AM4)
$150.00