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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
03-23-2005, 03:42 PM
|
#1
|
Member
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93
Rep:
|
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
|
|
|
03-24-2005, 06:37 AM
|
#2
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516
|
lots of info.
what's the problem in a sentence or so?
1. what you trying to do?
2. what you seeing?
|
|
|
03-24-2005, 07:00 AM
|
#3
|
Member
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93
Original Poster
Rep:
|
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
|
|
|
03-24-2005, 07:04 AM
|
#4
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516
|
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.
|
|
|
03-24-2005, 07:08 AM
|
#5
|
Member
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93
Original Poster
Rep:
|
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
|
|
|
03-24-2005, 07:13 AM
|
#6
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516
|
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?
|
|
|
03-24-2005, 07:16 AM
|
#7
|
Member
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93
Original Poster
Rep:
|
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
|
|
|
03-26-2005, 07:55 AM
|
#8
|
Member
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93
Original Poster
Rep:
|
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
|
|
|
03-26-2005, 05:21 PM
|
#9
|
LQ Newbie
Registered: Mar 2005
Location: Maryland, US
Distribution: Linux From Scratch; Slackware
Posts: 10
Rep:
|
Can you install grub onto a floppy? See if maybe *something* works.
|
|
|
03-27-2005, 09:44 AM
|
#10
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
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.
|
|
|
03-27-2005, 11:14 AM
|
#11
|
Member
Registered: Mar 2005
Location: Ireland
Distribution: LFS, SuSE, Debian, gentoo
Posts: 93
Original Poster
Rep:
|
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 ?
|
|
|
03-27-2005, 12:39 PM
|
#12
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
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.
|
|
|
03-29-2005, 03:44 AM
|
#13
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516
|
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.
|
|
|
03-29-2005, 03:54 AM
|
#14
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516
|
have you tried using grub interactively?
try it. read the info it's very powerful.
|
|
|
03-29-2005, 06:06 AM
|
#15
|
Senior Member
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516
|
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.
|
|
|
|
All times are GMT -5. The time now is 08:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|