PDA

View Full Version : [ubuntu] unable to boot an new kernel



shariefbe
November 23rd, 2008, 08:30 AM
Hi..i am using ubuntu 7.10 distro...in that the preinstalled kernel is "linux-2.6.22-14 generic"...after that i planned to compile an new kernel...so i downloaded from kernel.org....the new kernel which i download is "linux-2.6.22.14"...so i compiled that new kernel an d\tried to install...so that i followed the below steps

#cd /usr/src/linux-2.6.22.14
#make menuconfig
#make
#make modules
#make modules_install
#make install

after this commands i opened this /boot/grub/menu.lst and i added the below lines extra which i given in the block letters...

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=7ef4f8ec-7dd3-4c02-9f24-c9438e6b8bce ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=7ef4f8ec-7dd3-4c02-9f24-c9438e6b8bce ro single
initrd /boot/initrd.img-2.6.22-14-generic

title My Custom Kernel
root (hd0,0)
kernel /boot/vmlinuz-2.6.22.14 root=/dev/hda1 ro

title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

but now i am unable to boot from new kernel..when i select the new kernel means i am getting the following error

starting up.....
uncompressing linux...ok,booting the kernel
[ 53.987716]kernel panic - not syncing: VFS : unable to mount root fs on unknown -block(0.0)

so i dont know what to do...can any one suggest me what to do and how to do...cause i am new to linux...

cdtech
November 23rd, 2008, 08:51 AM
Did you run:

update-initramfs -c -k $(uname -r)
"uname -r" being the new kernel you compiled....
Then add the image below your new kernel line:

initrd /boot/initrd.img-2.6.22-14

Hope this helps.......

shariefbe
November 23rd, 2008, 09:17 AM
when i put update-initramfs -c -k $(linux-2.6.22.14) i am getting this below error

root@sharief-desktop:/usr/src/linux-2.6.22.14# update-initramfs -c -k $(linux-2.6.22.14)
bash: linux-2.6.22.14: command not found
No arg for -k option
Usage: /usr/sbin/update-initramfs [OPTION]...

Options:
-k [version] Specify kernel version or 'all'
-c Create a new initramfs
-u Update an existing initramfs
-d Remove an existing initramfs
-t Take over a custom initramfs with this one
-b Set alternate boot directory
-v Be verbose
-h This message

cdtech
November 23rd, 2008, 09:35 AM
Don't put your kernel in a variable state (no $ parenth)...

shariefbe
November 23rd, 2008, 10:05 AM
sorry i cant understand...variable state means?how to do that command?suggest me

cdtech
November 23rd, 2008, 10:11 AM
Like such:

sudo update-initramfs -c -k linux-2.6.22.14

shariefbe
November 23rd, 2008, 10:38 AM
see when i type this comand which you gave in last post..

sharief@sharief-desktop:/usr/src/linux-2.6.22.14$ sudo update-initramfs -c -k linux-2.6.22.14
[sudo] password for sharief:
update-initramfs: Generating /boot/initrd.img-linux-2.6.22.14
Cannot find /lib/modules/linux-2.6.22.14
update-initramfs: failed for /boot/initrd.img-linux-2.6.22.14

it is telling that cannot find linux-2.6.22.14 but see the below

sharief@sharief-desktop:/usr/src/linux-2.6.22.14$ cd /
sharief@sharief-desktop:/$ cd /lib/modules/
sharief@sharief-desktop:/lib/modules$ ls
2.6.22.14 2.6.22-14-generic
sharief@sharief-desktop:/lib/modules$

what to do now?

cdtech
November 23rd, 2008, 10:48 AM
When you compiled your kernel you didn't do “make modules_install” after compilation.

shariefbe
November 23rd, 2008, 11:09 AM
No..i done that steps....i didnt miss that step...see in my first post...i have typed what are all things i done....

shariefbe
November 23rd, 2008, 11:28 AM
No..i done that steps....i didnt miss that step...see in my first post...i have typed what are all things i done....

shariefbe
November 27th, 2008, 04:43 PM
For the sake i installed the new kervel version 2.6.26..i will tell the steps which i done here..

step 1)tar -xzvf linux-2.6.26.tar.gz

step 2)cd linux-2.6.26

step 3)make menuconfig
(I didnt do any changes)

step 4)make

step 5)make modules_install

step 6)make install

After i typed this i got the following things

sh /home/sharief/Desktop/linux/linux-2.6.26/arch/x86/boot/install.sh 2.6.26 arch/x86/boot/bzImage System.map "/boot"
In order to use the new kernel image you have just installed, you
will need to reboot the machine. First, however, you will need to
either make a bootable floppy diskette, re-run LILO, or have GRUB
installed.

Checking for ELILO...No

GRUB is installed. To automatically switch to new kernels, point your
default entry in menu.lst to /boot/vmlinuz-2.6.26
root@sharief-desktop:/home/sharief/Desktop/linux/linux-2.6.26#

After that i did

step 7)# cp arch/i386/boot/bzImage /boot/bzImage-2.6.26

step 8)# cp System.map /boot/System.map-2.6.26

step 9)vi /boot/grub/menu.lst

in that i edited as

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=7ef4f8ec-7dd3-4c02-9f24-c9438e6b8bce ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=7ef4f8ec-7dd3-4c02-9f24-c9438e6b8bce ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, kernel 2.6.26 ie new one
root (hd0,0)
kernel /boot/vmlinuz-2.6.26 root=UUID=7ef4f8ec-7dd3-4c02-9f24-c9438e6b8bce ro quiet splash

title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

when i reboot the system i entered in to new kernel i am getting this error

starting up.....
uncompressing linux...ok,booting the kernel
[ some number]kernel panic : not syncing; VFS; Unable to mount root fs on unknown-block (0,0)

for your kind information the content of /boot is

abi-2.6.22-14-generic memtest86+.bin
bzImage-2.6.26 sarge.bmp
coffee.bmp sid.bmp
config Syatem.map-2.6.26
config-2.6.22.14 System.map
config-2.6.22-14-generic System.map-2.6.22.14
config-2.6.26 System.map-2.6.22-14-generic
config.old System.map-2.6.26
debian.bmp System.map.old
debianlilo.bmp vmlinuz
grub vmlinuz-2.6.22.14
initrd.img-2.6.22-14-generic vmlinuz-2.6.22-14-generic
initrd.img-2.6.22-14-generic.bak vmlinuz-2.6.26
initrd.img-linux-2.6.22.14 vmlinuz.old

what to do now?

cdtech
November 27th, 2008, 05:13 PM
You need to make initrd:

mkinitrd -o /boot/initrd.img-2.6.26 vmlinuz-2.6.26
Then you need to add that to your menu.lst file:

title Ubuntu 7.10, kernel 2.6.26 ie new one
root (hd0,0)
kernel /boot/vmlinuz-2.6.26 root=UUID=7ef4f8ec-7dd3-4c02-9f24-c9438e6b8bce ro quiet splash
initrd /boot/initrd.img-2.6.26

UPDATE::.
An initrd image is needed for loading your SCSI module at boot time or if you are compiling the kernel with ext3 support as a module.

shariefbe
November 27th, 2008, 06:50 PM
when i typed the command mkinitrd -o /boot/initrd.img-2.6.26 vmlinuz-2.6.26 i am getting the below error...

bash: mkinitrd: command not found

cdtech
November 27th, 2008, 07:07 PM
Sorry, try this command:

sudo update-initramfs -c -k all

shariefbe
November 27th, 2008, 07:26 PM
see what happened....

sharief@sharief-desktop:~$ sudo update-initramfs -c -k all
[sudo] password for sharief:
update-initramfs: Generating /boot/initrd.img-2.6.22-14-generic
sharief@sharief-desktop:~$ mkinitrd -o /boot/initrd.img-2.6.26 vmlinuz-2.6.26
bash: mkinitrd: command not found
sharief@sharief-desktop:~$

forcumang
November 27th, 2008, 07:54 PM
see what happened....

sharief@sharief-desktop:~$ sudo update-initramfs -c -k all
[sudo] password for sharief:
update-initramfs: Generating /boot/initrd.img-2.6.22-14-generic
sharief@sharief-desktop:~$ mkinitrd -o /boot/initrd.img-2.6.26 vmlinuz-2.6.26
bash: mkinitrd: command not found
sharief@sharief-desktop:~$

he told you to run 'sudo update-initramfs -c -k all', as a correction to 'mkinitrd ...', using that second command has no reason. your top update worked flawless.

shariefbe
November 28th, 2008, 04:43 AM
yes i done that...yet i didnt get any initrd image for new kernel...

cdtech
November 28th, 2008, 04:46 AM
Try to run it with your kernel version instead of "all" and see what errors if gives you, something is wrong here, it should have givin you the initrd.

shariefbe
November 28th, 2008, 05:04 AM
yes got it cdtech....Thanks a lot...Thank you very much.......regards

cdtech
November 28th, 2008, 05:07 AM
Your welcome.

Good luck....

shariefbe
November 28th, 2008, 05:11 AM
now i got the new kernel compiled...can you tell me how to set time for menu.?cause every time i am pressing escape to enter in kernel m

cdtech
November 28th, 2008, 05:17 AM
I sent it to you.

Good luck........