You are not logged in.

#1 2013-05-09 17:58:50

abhirathb
Member
Registered: 2012-12-20
Posts: 6

GRUB corrupted after custom kernel build

Hi
I have developed my ARCH installation for development purpose.
I am new to linux kernel development.
I compiled the kernel and placed the kernel image in the /boot folder and modified grub.cfg to point at it.
After that I selected my arch installation and it didnt succesfully boot the manually compiled kernel.
Then I rebooted and selected the arch-fallback and it booted succesfully.
After that the book I am referring to suggested to use the 'make modules_install' to load modules and then I rebooted.
After that grub is giving me a "minimum bash like interface"
How can I boot the machine from this interface. (if i can)?

Also i tried to reinstall grub (from an ubuntu live disk) but it said it couldnt' find /boot/grub

Re-installing grub from an Arch live disk was succesful but it didn't fix the problem

Please Help

Thanks in advance!

Offline

#2 2013-05-09 18:12:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,803

Re: GRUB corrupted after custom kernel build

I think you are missing a driver that you need to boot.  Is your kernel still using the initrd, or did you build in all of the modules you need in order to boot?
If you are depending on the initrd to provide modules during boot, then the modules burned into that initrd need to be compatible with your custom kernel -and- (I think) the kernel has to have the same name as the stock kernel.

When I build a custom kernel, I usually do away with the initrd and build the required modules to boot into the kernel.  I only modularize those that I do not need everytime I boot; for example USB based device drivers.

To boot, you need your disk controller, the file systems drivers of the volumes to be mounted at boot, video hardware drivers, keyboard drivers, maybe some real time clock drivers, PCI Drivers, Maybe ISA and LPC bus drivers. 

Take a look at this site.  The guy who runs it is legendary on the Gentoo forums, his site might provide some insight into how to configure your kernel.

tl;dr:  The problem is not Grub.

Edit: You may also want to look at the Gentoo Handbook.  Being Gentoo, they have some pretty good information on how to configure a kernel.

Last edited by ewaller (2013-05-09 18:15:30)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Online

#3 2013-05-09 19:17:17

abhirathb
Member
Registered: 2012-12-20
Posts: 6

Re: GRUB corrupted after custom kernel build

Hi
Thank you very much for the resources. I will have to look into all that to work out the custom kernel well.
However the fact that grub isnt working correctly is still strange...after all i do have ubuntu 13.04 in another partition...im not able to install grub there to atleast boot one os.

Thanks

Offline

Board footer

Powered by FluxBB