LinuxQuestions.org
Visit Jeremy's Blog.
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 03-13-2009, 02:38 AM   #1
cluelessme
Member
 
Registered: Mar 2009
Location: USA
Posts: 33

Rep: Reputation: 15
grub install problem


I made it to the end of LFS with no problems at all this time til now. Stuck at 8.4 the grub install. My hdd is sda, sda1 is linuxmint,sda3 is lfs, sda4 is swap and sda 2 is just empty space.I enter root hd0,0 and can get stage 1 but can't figure out the the setup xxxx is suppose to be to get stage 2. I tried hd0 and every combation I can think of.
 
Old 03-13-2009, 05:48 AM   #2
bhaslinux
Member
 
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Bullseye
Posts: 357

Rep: Reputation: 49
the partition in which the boot files (grub + kernel ) are present need to be a file system which the grub can understand
If this is not the case then grub hangs when loading stage 1.5 or stage 2.

Make sure you are using ext3/ext2 etc., ...
 
Old 03-13-2009, 06:12 AM   #3
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
cluelessme:

At your given setup there is no need for Grub to load Stage 2. Your Mint kernel at sda1 (hd0,0) should load at stage 1.5 as long as your grub is properly configured. Try reinstall grub at linuxmint, its automated to write the mbr. or if you want to boot try hit Esc at bootloader initiation hit e then edit your grub entries this way:

root (hd0,0)
kernel /root/vmlinuz root=/dev/sda1 ro quiet splash
boot

read some tutorials for grub available at gnu.org.

hope this helps.
 
Old 03-13-2009, 10:48 AM   #4
cluelessme
Member
 
Registered: Mar 2009
Location: USA
Posts: 33

Original Poster
Rep: Reputation: 15
I hate to be such an idiot but I'm still not sure how to do the grub install. afraid if I do the install it will mess lfs up, Is it safe to type quit and do the rest of the few steps and then install grub?
 
Old 03-13-2009, 02:04 PM   #5
cluelessme
Member
 
Registered: Mar 2009
Location: USA
Posts: 33

Original Poster
Rep: Reputation: 15
I was able to get LFS on the boot menu but when I select LFS it says it can't read the partition so I guess I shoud change (hd0,3) to (hd0,0) maybe?I'm not sure

title LFS 6.3
root (hd0,3)
kernel /boot/lfskernel-2.6.22.5 root=/dev/hda4
 
Old 03-13-2009, 05:07 PM   #6
cluelessme
Member
 
Registered: Mar 2009
Location: USA
Posts: 33

Original Poster
Rep: Reputation: 15
I got it trying to load now but it is asking for a boot froppy which my pc doesn't have one.I think I know what happened but I can't chroot back into lfs to fix it,error says `/usr/bin/env': No such file or directory tools is not there either
 
Old 03-14-2009, 08:16 PM   #7
cluelessme
Member
 
Registered: Mar 2009
Location: USA
Posts: 33

Original Poster
Rep: Reputation: 15
So far I'be got it to where when it tries to boot it says Panic error cannot mount fs unknown blocks 8.1
 
Old 03-15-2009, 04:34 AM   #8
Mystican
Member
 
Registered: May 2007
Location: San Diego, CA
Distribution: LFS, Xubuntu, others
Posts: 59

Rep: Reputation: 17
From what I can tell in your posts here, you seem to have followed the instructions in 8.4 too literally. That is, you've copy & pasted the menu and command examples without changing the designator for the root partition to what it should be. Did you read the following paragraphs?
Quote:
GRUB uses its own naming structure for drives and partitions in the form of (hdn,m), where n is the hard drive number and m is the partition number, both starting from zero. For example, partition hda1 is (hd0,0) to GRUB and hdb3 is (hd1,2). In contrast to Linux, GRUB does not consider CD-ROM drives to be hard drives. For example, if using a CD on hdb and a second hard drive on hdc, that second hard drive would still be (hd1).

Using the above information, determine the appropriate designator for the root partition (or boot partition, if a separate one is used). For the following example, it is assumed that the root (or separate boot) partition is hda4.
In your case, since you said you have LFS on sda3 - which in GRUB's naming structure would be (hd0,2), b/c it counts from zero - your menu entry would be as follows:

Code:
title LFS 6.3
root (hd0,2)
kernel /boot/lfskernel-2.6.22.5 root=/dev/sda3
 
Old 03-16-2009, 11:59 AM   #9
cluelessme
Member
 
Registered: Mar 2009
Location: USA
Posts: 33

Original Poster
Rep: Reputation: 15
Sorry for the late response but the problem was grub was saying that is was hda3 instead of sda3 I finally got it right.Just for the heck of it I put in a blank hdd and installed lfs 6.4 over the weekend.To my surprise I had no errors.What's your suggetion of installing next.i was thinking maybe apt-get or some sort of software management.
 
Old 03-16-2009, 07:53 PM   #10
Mystican
Member
 
Registered: May 2007
Location: San Diego, CA
Distribution: LFS, Xubuntu, others
Posts: 59

Rep: Reputation: 17
Glad you got the GRUB problem sorted out. As for your next step, that depends on your goals, whether you want to continue learning more about the "LFS Way" or start using the system on a daily basis.

If the former, then manually installing some of the BLFS packages (including the more challenging ones, like Xorg) is a good exercise, or you could try going back and doing an automated install of LFS using jhalfs, if you haven't already. If the latter, on the other hand, then as you said some kind of package management tool is handy to have, and setting one up can be a good educational experience in and of itself. There are plenty of hints available with information on different methods; if you choose to go the apt-get route, you may also want to take a look at this thread.

My own preferred method of package management is with package users. It's not for everyone, but it does have definite advantages. If you do decide to give it a go, you should check out the FreeSA Package Users project, where a couple of LFSers have created a modified/updated version of the package users tools.
 
Old 03-17-2009, 12:46 AM   #11
cluelessme
Member
 
Registered: Mar 2009
Location: USA
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks Mystican I'm going to look into these and give it a little thought lol
 
  


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 Install Problem tehkaao Linux - Software 6 07-04-2007 06:59 PM
Problem with GRUB (does not install) winterhunter Linux - General 5 03-20-2007 02:09 AM
installing GRUB 2, grub-install problem r00tb33r Linux - Software 1 02-26-2007 10:42 PM
GRUB install problem PC Wizard Linux - Newbie 2 09-19-2004 05:04 PM
problem with GRUB after install viperkt400 Linux - Newbie 2 09-18-2004 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 07:12 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration