keeler1
February 3rd, 2008, 07:00 PM
I am taking a course in Operating Systems. The first basic assignment was to install Ubuntu 6.06 (which went good) and then install a custom kernel. By custom kernel I mean the 2.6.24 kernel with a new Name.
All I did was change the EXTRAVERSION field in the Makefile of the kernel sources. Here are the steps I went through.
sudo apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev initrd-tools
It couldnt find initrd-tools so I downloaded initrd-tools_0.1.84ubuntu1_all.deb from an Ubuntu site.
http://packages.ubuntu.com/cgi-bin/download.pl?arch=all&file=pool%2Funiverse%2Fi%2Finitrd-tools%2Finitrd-tools_0.1.84ubuntu1_all.deb&md5sum=14829bcaf192fc74a3b6c6d37f63040d&arch=all&type=main
After that was Installed I then took the following steps which all seemed to complete successfully.
cd /usr/src/
sudo chmod 775 .
sudo adduser `whoami` src
sudo wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2
md5sum linux-2.6.24.tar.bz2
The md5sum check out.
I then unpacked the kernels source and copied it to two directories one I wont touch and the other for the project.
tar -xjvf linux-2.6.24.tar.bz2
cp -ra linux-2.6.24 pristine-linux
cp -ra linux-2.6.24 project0
ln -s project0 linux
After changing the EXTRAVERSION field in the Makefile I executed the following
cd /usr/src/linux
make V=1 mrproper
cp /boot/config-2.6.15-26-386 /usr/src/linux/.config
make V=1 xconfig
make V=1 bzImage
make V=1 modules
sudo make V=1 modules_install
sudo mkinitrd -o /usr/src/linux/initrd.img 2.6.24-GLUSERNAME-FIRSTNAME-cs421project0
sudo -s
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-2.6.24
cp /usr/src/linux/initrd.img /boot/initrd.img-2.6.24
cp /usr/src/linux/System.map /boot/System.map-2.6.24
ln -s /boot/System.map-2.6.24 /boot/System.map
Then I added the following to my grubs menu.lst
title Project 0 421 Kernel (2.6.24)
root (hd0,0)
kernel /boot/bzImage-2.6.24 ro root=/dev/sda3
initrd /boot/initrd.img-2.6.24
boot
I restarted and tried to boot into the new but unchanged kernel. I saw a lot of output go by and then at the end I got the following error.
mount: mount point dev does not exist
pivot_root: No such file or directory
/sbin/init: 426: cannot open dev/console: No such file
Kernel panic: Attempted to kill init!
Can anyone help to explain this. I contacted my TA about it and he told me it was a hardware issue and to use VMWare to run it instead of booting directly into it.
Is it something I did that screwed it up or something I didnt do?
All I did was change the EXTRAVERSION field in the Makefile of the kernel sources. Here are the steps I went through.
sudo apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev initrd-tools
It couldnt find initrd-tools so I downloaded initrd-tools_0.1.84ubuntu1_all.deb from an Ubuntu site.
http://packages.ubuntu.com/cgi-bin/download.pl?arch=all&file=pool%2Funiverse%2Fi%2Finitrd-tools%2Finitrd-tools_0.1.84ubuntu1_all.deb&md5sum=14829bcaf192fc74a3b6c6d37f63040d&arch=all&type=main
After that was Installed I then took the following steps which all seemed to complete successfully.
cd /usr/src/
sudo chmod 775 .
sudo adduser `whoami` src
sudo wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2
md5sum linux-2.6.24.tar.bz2
The md5sum check out.
I then unpacked the kernels source and copied it to two directories one I wont touch and the other for the project.
tar -xjvf linux-2.6.24.tar.bz2
cp -ra linux-2.6.24 pristine-linux
cp -ra linux-2.6.24 project0
ln -s project0 linux
After changing the EXTRAVERSION field in the Makefile I executed the following
cd /usr/src/linux
make V=1 mrproper
cp /boot/config-2.6.15-26-386 /usr/src/linux/.config
make V=1 xconfig
make V=1 bzImage
make V=1 modules
sudo make V=1 modules_install
sudo mkinitrd -o /usr/src/linux/initrd.img 2.6.24-GLUSERNAME-FIRSTNAME-cs421project0
sudo -s
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-2.6.24
cp /usr/src/linux/initrd.img /boot/initrd.img-2.6.24
cp /usr/src/linux/System.map /boot/System.map-2.6.24
ln -s /boot/System.map-2.6.24 /boot/System.map
Then I added the following to my grubs menu.lst
title Project 0 421 Kernel (2.6.24)
root (hd0,0)
kernel /boot/bzImage-2.6.24 ro root=/dev/sda3
initrd /boot/initrd.img-2.6.24
boot
I restarted and tried to boot into the new but unchanged kernel. I saw a lot of output go by and then at the end I got the following error.
mount: mount point dev does not exist
pivot_root: No such file or directory
/sbin/init: 426: cannot open dev/console: No such file
Kernel panic: Attempted to kill init!
Can anyone help to explain this. I contacted my TA about it and he told me it was a hardware issue and to use VMWare to run it instead of booting directly into it.
Is it something I did that screwed it up or something I didnt do?