LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 6.8: Grub Error (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-6-8-grub-error-896351/)

TKH 08-09-2011 09:14 AM

LFS 6.8: Grub Error
 
I have a problem with GRUB. After I ran grub-setup '<device>' --force command (note that I use the --force parameter), I ran into this:
Code:

error: symbol not found: 'grub_putchar'
Entering rescue mode...
grub rescue> _

The story behind is that I finished making the basic LFS, and I replace the old kernel from the host system with the new kernel I just built (don't worry, I also write the change in grub.cfg). FYI, I decided to merge the /boot directory of my brand new LFS with the one the host system, that's why I replaced the old kernel.

What happened next was that I encountered a boot problem in which this text appeared and nothing else did (it can't even be typed, and was still like this after I waited for some time):
Code:

GRUB _
After that, I use a liveUSB (GParted Live) to look at the grub.cfg file and found nothing wrong (I left it be). This led me into chrooting to the host linux partition (mounting all the dev, sys, proc, and stuff; I did it right).

I decided to re-setup the grub from my chroot, typing grub-setup '<device>', which showed me some warning about blocklist, forcing me to type with the --force parameter. Then I rebooted and found this error.

What should I do with it?

flamelord 08-09-2011 10:41 PM

why are you using grub-setup? after changing the configuration you should use grub-mkconfig. And to install grub you should use grub-install. Also, you shouldn't edit grub.cfg directly, but should instead use the files in /etc/grub.d, and I think that grub-mkconfig should detect your new kernel autamatically, so you shouldn't even have to edit those.

Andrew Benton 08-10-2011 08:38 AM

Quote:

Originally Posted by flamelord (Post 4438345)
why are you using grub-setup? after changing the configuration you should use grub-mkconfig. And to install grub you should use grub-install. Also, you shouldn't edit grub.cfg directly, but should instead use the files in /etc/grub.d, and I think that grub-mkconfig should detect your new kernel autamatically, so you shouldn't even have to edit those.

This bulshit has nothing to do with LFS. Ignore it.

Andrew Benton 08-10-2011 08:42 AM

Quote:

Originally Posted by TKH (Post 4437677)
Code:

error: symbol not found: 'grub_putchar'
Entering rescue mode...
grub rescue> _

FYI, I decided to merge the /boot directory of my brand new LFS with the one the host system,

It looks like you've got a mixture of files from 2 slightly different versions of grub. Just install grub on your LFS system the way it says in the book. If you have a problem booting into your LFS system, boot with a live CD and chroot into your LFS partition (Don't forget to mount /dev and /proc and /sys first).

flamelord 08-10-2011 10:48 AM

Quote:

Originally Posted by Andrew Benton (Post 4438669)
This **** has nothing to do with LFS. Ignore it.

I stand corrected, grub-setup is correct according to http://www.linuxfromscratch.org/lfs/...er08/grub.html.

What I originally said came from the grub-setup man pages which state: "You should not normally run this program directly. Use grub-install instead."

However, what I said about grub-mkconfig still applies, although editing editing grub.cfg is an option. Just be aware that if you ever run grub-mkconfig, it will overwrite any changes you made.

If you are merging two partitions on the same /boot directory, you should only have one of the distributions managing it, otherwise the directory will become corrupted, which is probably what happened in your case.

TKH 08-20-2011 09:52 AM

It seemed that a corrupt data was created somehow (i think it was because of a partition editing). Luckily I got a backup of the grub module, and after I replace the one in the /boot partition with it, it worked fine. Thank you everyone :D


All times are GMT -5. The time now is 05:54 PM.