LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 08-09-2011, 08:14 AM   #1
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 205

Rep: Reputation: 20
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?
 
Old 08-09-2011, 09:41 PM   #2
flamelord
Member
 
Registered: Jun 2011
Distribution: Arch Linux
Posts: 148

Rep: Reputation: 34
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.
 
0 members found this post helpful.
Old 08-10-2011, 07:38 AM   #3
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Quote:
Originally Posted by flamelord View Post
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.
 
Old 08-10-2011, 07:42 AM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Quote:
Originally Posted by TKH View Post
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).
 
1 members found this post helpful.
Old 08-10-2011, 09:48 AM   #5
flamelord
Member
 
Registered: Jun 2011
Distribution: Arch Linux
Posts: 148

Rep: Reputation: 34
Quote:
Originally Posted by Andrew Benton View Post
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.

Last edited by flamelord; 08-10-2011 at 10:08 AM.
 
Old 08-20-2011, 08:52 AM   #6
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 205

Original Poster
Rep: Reputation: 20
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 21 with LFS 6.3 Chapter 8.4 bines Linux From Scratch 10 12-24-2008 03:18 PM
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM
LFS 6.2 grub boot error 15 problem HedAche Linux From Scratch 1 08-02-2007 01:20 PM
error in 6.34 grub lfs-6 sharmashikha Linux From Scratch 1 07-05-2005 08:22 AM


All times are GMT -5. The time now is 08:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration