LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   grub problem (http://www.linuxquestions.org/questions/linux-newbie-8/grub-problem-932157/)

saman_artorious 03-01-2012 09:42 AM

grub problem
 
Let's open a discussion here:

I am tryin to install a Real Time kernel on my Ubuntu 11.04 Server machine with size 4GB. Before this, I am tryin to install a minimal kernel required in my Ubuntu 11.4 Desktop, but you know, the boot loader cannot load my new kernel. I have also tried the instruction on my Red Hat (CentOS 6) machine and ... again the same problem. boot loader stucks in loading my kernel, (i recall it was saying error with image number)

Here were the instructions:

1. tar xzf linux-2.6.31.6.tar
2. gunzip patch-2.6.31.6-rt19
3. cd linux-2.6.31.6 && patch p1 < ../patch-.6.31.6-rt19
4. make menuconfig (as I need a minimal kernel, I create .config using cat >> .config first)
5. make
6. make modules
7. make modules_install
8. make install (though this give the below output n finishes, but a window prompts n says that fglrx-8.840 cannot be installed or upgraded)

Code:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found linux image: /boot/vmlinuz-2.6.31.6-rt192.6.31.6-rt19
Found initrd image: /boot/initrd.img-2.6.31.6-rt192.6.31.6-rt19
Found linux image: /boot/vmlinuz-2.6.31.6-rt192.6.31.6-rt19.old
Found initrd image: /boot/initrd.img-2.6.31.6-rt192.6.31.6-rt19
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done

9. I use update-initramfs and five the module folder in /lib/modules as the parameter:
Code:

sudo update-initramfs -c -k 2.6.31.6-rt19
10.
Code:

update-grub
You know, I have also tried compiling this kernel using other methods like:

Code:

cd linux-2.6.31.6 && patch p1 < ../patch-.6.31.6-rt19
make
make modules
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-version &&
cp Systems.map /boot/Systems.map-version

then running initramfs and giving the /lib/modules/2.6.... as the parameter. Finally updating grub.

but again it cannot load my kernel. Could anyone help me please to compile my new kernel.

Quote:

I would also thank if you mention how I can transfer my compiled kernel in my laptop to the 4GB machine. I think if I copy the compiled bzImage on my laptop there. But don't know about the compiled modules and... I'd thank if you mention everything precisely.
Regards

colorpurple21859 03-01-2012 10:38 AM

what do you mean cannot load kernel? are you getting any error messages or just a black screen. the problem could be that the fglrx module still has to be built against the new kernel with maybe a newer fglxr driver. Try removing you /etc/X11/xorg.conf and add nomodeset to the linux line in grub

saman_artorious 03-01-2012 12:11 PM

Quote:

Originally Posted by colorpurple21859 (Post 4616013)
what do you mean cannot load kernel? are you getting any error messages or just a black screen. the problem could be that the fglrx module still has to be built against the new kernel with maybe a newer fglxr driver. Try removing you /etc/X11/xorg.conf and add nomodeset to the linux line in grub

when I select the new kernel in the boot loader pop-up menu, the screen stays pink (the original ubuntu screen) n it doesn't load the kernel. if i choose the recovery mode, it write loading kernel x, n it stucks there, I need to reboot.

I check /etc/X11/xorg.conf, it exists, but I don't know how to add nomodeset to the linux line in grub. can you plz be more precise?

colorpurple21859 03-01-2012 12:22 PM

at the grub boot menu go to the entry you want to boot hit the "e" key, go to the linux line, go out past the root=uuid=??? add nomodeset and hit ctrl-x, in recovery mode what is the message on the screen when it gets stuck,

saman_artorious 03-01-2012 12:48 PM

Quote:

Originally Posted by colorpurple21859 (Post 4616137)
at the grub boot menu go to the entry you want to boot hit the "e" key, go to the linux line, go out past the root=uuid=??? add nomodeset and hit ctrl-x, in recovery mode what is the message on the screen when it gets stuck,

I added nomodeset at the end of linux line, nothing happens, stucks again.

in Recovery mode it writes:

loading linux 2.6.31.6-rt19 ...
loading initial ramdisk ...

(it stucks here)

I did the following:

patch -p1 < ../patch-file
make menuconfig
make
make bzImage
make modules
make modules_install
cp arch/x86/boot/bzImage /boot/vmlilnuz-2.6.31.6-rt19
cp System.map /boot/Systems.map-2.6.31.6-rt19
update-initramfs -c -k 2.6.31.6-rt19 (it failed at the first time, error asked me for the config file in boot. then I did this) cp /usr/src/linux2.6.31.6/.config /boot/config-2.6.31.6-rt19
then it worked fine.
and finally

update-grub

colorpurple21859 03-01-2012 01:33 PM

It is possible that you don't have all the drivers/modules needed compiled into your kernel to access hard drives and file systems on the system you are trying to boot. That usually causes booting problems with a newly compiled kernel booting. Without knowing anything about the hardware you have and your menuconfig options, I can't help you there. This may help if it is just a initramfs problem.
http://ubuntugenius.wordpress.com/20...re-you-reboot/

EDDY1 03-01-2012 04:10 PM

Are you sure that u are compiling the right kernel
U name -a
I think 11.04 comes with 2.6.37 kerenel
http://news.softpedia.com/news/Ubunt...4-170228.shtml

saman_artorious 03-01-2012 04:48 PM

well, my kernel is 2.6.38, 2.6.38-8-generic
but that's not relevant, i can install any version of kernels as custom. I've never heard anything like I can only install a particular kernel.

m tryin to install another kernel, this time 3.0.22, i'l let you know bout the result/


All times are GMT -5. The time now is 03:39 AM.