LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-23-2005, 03:42 PM   #1
vmlinuz101
Member
 
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93

Rep: Reputation: 15
grub configuration problems


hi guys, i having problems with grub for LFS 6.0

My LFS system fstab file is:

#Begin /etc/fstab
#
#Filesystem Mount-Point Type Options Dump fsck-Order
#

/dev/hda7 / ext3 defaults 1 1
/dev/hda6 swap swap pri=42 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
shm /dev/shm tmpfs defaults 0 0
#End of /etc/fstab


and my HOST system fstab file is


/dev/hda2 / reiserfs
acl,user_xattr 1 1
/dev/hda4 /windows/C vfat
users,gid=users,umask=0002,
iocharset=utf8 0 0
devpts /dev/pts devpts
mode=0620,gid=5 0 0
proc /proc proc
defaults 0 0
usbfs /proc/bus/usb usbfs
noauto 0 0
sysfs /sys sysfs
noauto 0 0
/dev/hdb4 /media/zip auto
noauto,user 0 0
/dev/cdrecorder /media/cdrecorder subfs
fs=cdfss,ro,procuid,nosuid,
nodev,exec,iocharset=utf8 0 0
/dev/cdrom /media/cdrom subfs
fs=cdfss,ro,procuid,nosuid,
nodev,exec,iocharset=utf8 0 0
/dev/hda6 swap swap
pri=42 0 0
/dev/hda7 /mnt/lfs ext3 defaults 1 2


when i try to configure grub with root (hd0,6) grub tells me

Error 21: Selected disk does not exist

It did allow me to do this before, but since the system wouldn't boot, i
decided to play around with the bootloader.

my host system menu.lst is
# Modified by YaST2. Last modification on Fri Dec 10 20:19:09 2004


color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd0,1)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SuSE Linux 9.1 Professional
kernel (hd0,1)/boot/vmlinuz root=/dev/hda2 vga=0x31a splash=silent
desktop resume=/dev/hda5 showopts
initrd (hd0,1)/boot/initrd


###Don't change this comment - YaST2 identifier: Original name:
failsafe###
title Failsafe
kernel (hd0,1)/boot/vmlinuz root=/dev/hda2 showopts ide=nodma
apm=off acpi=off vga=normal noresume nosmp noapic maxcpus=0 3
initrd (hd0,1)/boot/initrd

###Don't change this comment - YaST2 identifier: Original name: Fedora
Core III###
title Fedora Core III
root (hd0,4)
kernel /boot/vmlinuz-2.6.9-1.667smp ro root=LABEL=/ quiet
initrd (hd0,4)/boot/initrd-2.6.9-1.667smp.img




whereas my LFS menu.lst is just

title LFS 6.0
root (hd0,6)
kernel /boot/lfskernel-2.6.8.1 root=/dev/hda7


I had the other SuSE and Redhat options in the first LFS attempt, but
now I seem to have broken the chain. Also, if you look at my host fdisk
file,

/dev/hda2 * 96 62523 31463302+ 83 Linux
/dev/hda3 62523 114543 26218080 f W95 Ext'd (LBA)
/dev/hda5 62523 92996 15358108+ 83 Linux
/dev/hda6 92996 95020 1020096 82 Linux swap
/dev/hda7 95021 113744 9436864+ 83 Linux

you'll see that there's a Linux partition on /dev/hda5 which is Fedora
Core 3. The gub/menu.lst entry for this is

title Fedora Core III
root (hd0,4)
kernel /boot/vmlinuz-2.6.9-1.667smp ro root=LABEL=/ quiet
initrd (hd0,4)/boot/initrd-2.6.9-1.667smp.img

whereas for SuSE, the main system I'm using and the system which I'm
using to build LFS, is on /dev/hda2 with grub entry

title SuSE Linux 9.1 Professional
kernel (hd0,1)/boot/vmlinuz root=/dev/hda2 vga=0x31a
splash=silent desktop resume=/dev/hda5 showopts
initrd (hd0,1)/boot/initrd

Has anyone got any suggestions on how I might fix this? (I appreciate
that my whole Linux installation may be screwed up from the start)



Thanks in advance

vmlinuz101
 
Old 03-24-2005, 06:37 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
lots of info.

what's the problem in a sentence or so?
1. what you trying to do?
2. what you seeing?
 
Old 03-24-2005, 07:00 AM   #3
vmlinuz101
Member
 
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93

Original Poster
Rep: Reputation: 15
i'm trying to configure grub for the new LFS, but (1) my host menu.lst does not see LFS, and correspondingly (2) LFS will not see SuSE or FC3 either. Something very wrong indeed
 
Old 03-24-2005, 07:04 AM   #4
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
so, when you put
Code:
title LFS 6.0
root (hd0,6)
kernel /boot/lfskernel-2.6.8.1 root=/dev/hda7
in your suse menu.lst it doesn't work?
you get the no such disk error?

Is that right?

how about...
Code:
title LFS 6.0
(hd0,6)/boot/lfskernel-2.6.8.1 root=/dev/hda7

Last edited by bigearsbilly; 03-24-2005 at 07:06 AM.
 
Old 03-24-2005, 07:08 AM   #5
vmlinuz101
Member
 
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93

Original Poster
Rep: Reputation: 15
no, when i put

-------------------------------------------------------------

title LFS 6.0

root (hd0,6)

kernel /boot/lfskernel-2.6.8.1 root=/dev/hda7

-------------------------------------------------------------

in /etc/grub/menu.lst for the LFS system, (using the cat prompt in chapter 8), i get the Error 21: No such disk.

When I tried to enter the same code in the SuSE menu.lst, I can see the option on the spash screen at boot time, but it won't let me boot it
 
Old 03-24-2005, 07:13 AM   #6
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
how about, try copying your suse kernel and initrd to the LFS
partition and trying to boot that?
Just out of interest.
(turn off all the VGA options especially though, or you'll get a black screen)

or is it a silly idea?
 
Old 03-24-2005, 07:16 AM   #7
vmlinuz101
Member
 
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93

Original Poster
Rep: Reputation: 15
will do bigearsbilly, i'm in college right now using redmond's finest so i'll let you know how i get on later. thanks a million for your help, will let you know what happens later today
 
Old 03-26-2005, 07:55 AM   #8
vmlinuz101
Member
 
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93

Original Poster
Rep: Reputation: 15
sorry bout the late reply, rebuilt LFS TOTALLY and still have the same result. Even when I copied the suse grub to lfs, it wont boot lfs and you just go back to your suse option. also tried a 2.6.4 kernel with the same results
 
Old 03-26-2005, 05:21 PM   #9
Remmis
LQ Newbie
 
Registered: Mar 2005
Location: Maryland, US
Distribution: Linux From Scratch; Slackware
Posts: 10

Rep: Reputation: 0
Can you install grub onto a floppy? See if maybe *something* works.
 
Old 03-27-2005, 09:44 AM   #10
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Also, where did you install grub to? The MBR or on one of your partitions? I'd try installing to the MBR if your not.
 
Old 03-27-2005, 11:14 AM   #11
vmlinuz101
Member
 
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93

Original Poster
Rep: Reputation: 15
as far as i know, suse is installed on the MBR. here's suse's line from both fstab and fdisk

fdisk:

/dev/hda2 * 96 62523 31463302+ 83 Linux


and here's the corresponding LFS

/dev/hda7 95021 113744 9436864+ 83 Linux


fstab entries

suse

/dev/hda2 / reiserfs acl,user_xattr 1 1


LFS

/dev/hda7 /mnt/lfs ext3 defaults 1 2

would putting the LFS entry on the MBR affect suse ?
 
Old 03-27-2005, 12:39 PM   #12
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
would putting the LFS entry on the MBR affect suse ?

Yes, it would. If you do a 'grub-install /dev/hda' from within LFS, then you'll have to add an entry for SuSE on your LFS menu.lst.

This really doesn't make much sense. It should work... It's indicating that LFS isn't on hda6.. Is it a SATA drive? Are you sure it's not /dev/sda6? Make sure with 'cfdisk' from within LFS. Your setup seems to be right...

Try running 'grub-install /dev/hda' from within LFS and then add an entry to your LFS's menu.lst. Thats what I would do. Sounds like it's SuSE's grub that is the problem here. Not anything with LFS per-say. Problems with gub are ussually simple in nature. Just something is misconfigured on your end.
 
Old 03-29-2005, 03:44 AM   #13
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
Is it because Suse is reiserfs and LFS is ext3?
does Grub support ext3? (probably yes)

This is how I think Grub works....
I think, grub starts up, then it loads a stage2 or stage1_5 then stage2.

the stage 2 basically knows how to read a filesystem.
Then it reads the /boot/grub/menu.lst

(look in /boot/grub/ for things like stage2_reiserfs also look in the
grub install directories)

The stage 1 and 2 are loaded onto MBR when you do an initial install.

The suse grub as installed has a stage2 for reiserfs
so maybe when you are pointing at an ext3 partition it
cannot read it, hence the weird message.

Try making the LFS as reiser?
That's what I think may be the cause.


Just a thought.
 
Old 03-29-2005, 03:54 AM   #14
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
have you tried using grub interactively?
try it. read the info it's very powerful.
 
Old 03-29-2005, 06:06 AM   #15
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
in the grub manual it says....

Quote:
21 : Selected disk does not exist
This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.
 
  


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 configuration malaka56 Linux - Software 1 06-02-2005 03:23 AM
GRUB configuration mebrelith Fedora 2 11-29-2004 07:22 AM
Grub configuration unicef2k Red Hat 3 05-12-2004 06:25 AM
GRUB splashimage configuration / update GRUB rudL Linux - Software 1 05-10-2004 07:16 AM
Grub configuration ekoome Red Hat 1 02-14-2004 03:00 AM

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

All times are GMT -5. The time now is 08:29 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