View previous topic :: View next topic |
Author |
Message |
pacman99 n00b
Joined: 25 Jun 2006 Posts: 14
|
Posted: Fri May 09, 2008 3:18 pm Post subject: Grub: Cannot read grub.conf file |
|
|
Hi,
I just finished installing gentoo using the installation guide. Since I'm using a core2duo, I decided to use grub as the bootloader. The problem is, when I boot the system, grub loads up but I only get a command line. The only msgs I get are "Loading stage 1.5" and "loading grub" (or something similar).
However, if I type:
Code: | configfile /boot/grub/grub.conf |
the graphical interface with options to boot gentoo are displayed like they should. It seems grub just isn't reading the grub.conf file unless I force it to do so.
My partitions are as follows:
Code: | /dev/sda1 = boot
/dev/sda2 = swap
/dev/sda3 = root |
That's the only hdd (sata) that's present although I plan on adding more sata later.
My grub.conf is as follows:
Code: | # Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
# How many seconds to wait before the default listing is booted.
timeout 5
# Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.6.25-r2
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /boot/kernel-2.6.25-gentoo-r2 root=/dev/sda3
title Gentoo Linux 2.6.25-r2 (rescue)
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /boot/kernel-2.6.25-gentoo-r2 root=/dev/sda3 init=/bin/bb
# The next four lines are only if you dualboot with a Windows system.
# In this case, Windows is hosted on /dev/sda6.
#title Windows XP
#rootnoverify (hd0,5)
#makeactive
#chainloader +1 |
Not sure how to make this work.
Thanks~
Made sticky by NeddySeagoon 9 May as this seems to be a common issue now |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54453 Location: 56N 3W
|
Posted: Fri May 09, 2008 3:24 pm Post subject: |
|
|
pacman99,
You have a missing symbolic link.
When grub boots, it looks for a file called menu.lst and you provide grub.conf.
You need to do the following
Code: | mount /boot
cd /boot/grub
ln -s /boot/grub/grub.conf menu.lst | thats a lower case "L" for l(i)st not numeral "1" for First. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pacman99 n00b
Joined: 25 Jun 2006 Posts: 14
|
Posted: Sat May 10, 2008 12:55 am Post subject: |
|
|
thx, that fixed it! |
|
Back to top |
|
|
taiger Tux's lil' helper
Joined: 25 Nov 2003 Posts: 112
|
Posted: Wed May 28, 2008 3:11 pm Post subject: emerge grub |
|
|
I have a problem when I emerge grub, the emerge finish but I read a strange error during the emerging. ( sorry, I will report it...)
Now grub is installed but doesn't locate the kernel inside grub.conf, I must "load" the kernel in command line interface.
Any suggestions?
Thanks in advance
Alessandro _________________ http://www.alessandro.vincelli.name |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54453 Location: 56N 3W
|
Posted: Wed May 28, 2008 6:51 pm Post subject: |
|
|
taiger,
It looks like you have the problem that this thread is about _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
taiger Tux's lil' helper
Joined: 25 Nov 2003 Posts: 112
|
Posted: Tue Jun 03, 2008 2:31 pm Post subject: |
|
|
NeddySeagoon wrote: | taiger,
It looks like you have the problem that this thread is about |
Tnx NeddySeagoon, I posted this problem in "gentoo 2008 post" because I used the 2008-beta2.
Later I will try the solutions proposed in this form.
Ciao _________________ http://www.alessandro.vincelli.name |
|
Back to top |
|
|
irdom n00b
Joined: 16 Jun 2008 Posts: 1
|
Posted: Mon Jun 16, 2008 4:34 pm Post subject: |
|
|
i have same problem |
|
Back to top |
|
|
waldauf Tux's lil' helper
Joined: 20 Sep 2006 Posts: 129 Location: Czech Republic
|
Posted: Mon Jul 28, 2008 6:48 pm Post subject: |
|
|
if you have this partitions:
Code: |
/dev/sda1 = boot
/dev/sda2 = swap
/dev/sda3 = root
|
I think that in your grub.conf (menu.lst) should be:
Code: |
~
~
title Gentoo Linux XXX
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /kernel-XXX root=/dev/sda3
~
~
|
|
|
Back to top |
|
|
darwinux n00b
Joined: 09 Aug 2008 Posts: 1
|
Posted: Sat Aug 09, 2008 4:11 pm Post subject: |
|
|
i have a problem ,when i try to install grub like gentoo HOWTO,but error like this: "df : .... no such file ....". then i try another method:grub-install --no-floppy --> root (hd0,0) --> setuo (hd0) .it's OK ... so, i want to know why the first method is error?
somebody can answer me ? |
|
Back to top |
|
|
Pim n00b
Joined: 30 Oct 2008 Posts: 3 Location: The Netherlands
|
Posted: Fri Oct 31, 2008 10:10 am Post subject: |
|
|
darwinux wrote: | iike gentoo HOWTO,but error |
Not obvious, I admit.
- root (hdN,P) and setup (hdN,P) works: This tells me Grub is working.
- Linux Grub Shell reports an error when using the Linux command "df": Oh ho ...
I reckon you need to "mount /dev/... /boot" to fix this one. You might need to check owner-group/perms on the complete path (chown / chmod). Grub does not bother with these minor details.
If, as it seems, you are using a seperate /boot partition, you would be very highly advised to NOT have a symlink of "boot" pointing to <current directory> (the ubiquitous single DOT) AND avoid prefixing "/boot" on all your kernel/initrd grub menu entries.
I would also always use ".../grub/grub.conf" and never "menu.lst" - This is the default for Grub/1 (google GNU Grub legacy). Some distros (SuSE as it was) use /etc/grub.conf as a grub "shell script" to do the install and they like to avoid any confusion - hence the strange naming.
Hope it helps and take a peek at the [FIXED] Vista item. _________________ Volanteer at WereldVenster (Charity for the education of Asylum seekers) as the Network and Systems Administrator. |
|
Back to top |
|
|
cys.tony n00b
Joined: 11 Dec 2008 Posts: 9 Location: china
|
Posted: Sun Dec 14, 2008 4:55 am Post subject: |
|
|
NeddySeagoon wrote: | pacman99,
You have a missing symbolic link.
When grub boots, it looks for a file called menu.lst and you provide grub.conf.
You need to do the following
Code: | mount /boot
cd /boot/grub
ln -s /boot/grub/grub.conf menu.lst | thats a lower case "L" for l(i)st not numeral "1" for First. |
well
got something here
thanks |
|
Back to top |
|
|
Pim n00b
Joined: 30 Oct 2008 Posts: 3 Location: The Netherlands
|
Posted: Thu Dec 18, 2008 2:35 pm Post subject: |
|
|
[quote="cys.tony"] NeddySeagoon wrote: | pacman99,
You have a missing symbolic link.
When grub boots, it looks for a file called menu.lst and you provide grub.conf.
|
You may think it "nitt-picking", but on booting Grub actually looks for the name you told it to look for. You may not realise that you told it anything at all - but you did.
When Grub is installed, you are usually asked for a "target" to place it on. The sequence
- root (hdN,NN)
- setup (hdN,NN)
does 2 things: Firstly it tells Grub where on the disk it should operate (the "root") and then it runs a "macro" which calls the commands "embed" and "install" (the "setup"). If you check the man page for the fairly hideous "install" command, you will find near the end either (0,0)grub.conf or menu.lst or your own favorite.
I hope it clarifies things a bit.
Please be aware than you canot keep "symlinking" things together forever - in fact the limit is usually about 5 or maybe even 3. This is to prevent "infinite loops" as in A points to B which points to A. _________________ Volanteer at WereldVenster (Charity for the education of Asylum seekers) as the Network and Systems Administrator. |
|
Back to top |
|
|
tetris11 n00b
Joined: 16 Mar 2009 Posts: 51
|
Posted: Tue Mar 17, 2009 12:12 pm Post subject: Almost the exact same problem |
|
|
Hey guys, same problem - almost.
I did a fresh install with all the recommended partitions used in the previous post. But after install all I get is
Quote: |
grub is loading stage 1.5
please wait...
|
then the screen goes blank and all I get is the '_' symbol at the top left of the screen. I can't see what i'm typing, so what it's there for is a mystery to me.
When I hit enter at this blank screen, it starts loading gentoo, but it gets stuck on the 'ultrastor' module.
So like a good noob I boot up with a SystemRescueCd (its faster than the liveCD), and go to edit my grub.conf
Quote: |
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_cha$
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.
default 0
timeout 30
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
#title Gentoo Linux 2.6.24-r5
#root (hd0,0)
#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/sda3
#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5
# vim:ft=conf:
[/bug] |
So I delete the first five lines, get rid of all '#'s, and add:
noload=ultrastor at the end of the kernel line.
I save using CtrlO (writeout) and exit using CtrlX, then I restart.
Same problem. So I boot up the rescueCD again, and find that my grub.cong HASNT CHANGED.
help?
Sorry that I explained everything I[/list] did in tedious detail, but I wanted to make sure that there wasn't something vital that I might have not done. |
|
Back to top |
|
|
Leon_UK Tux's lil' helper
Joined: 06 Dec 2006 Posts: 128 Location: London
|
Posted: Tue Mar 17, 2009 12:21 pm Post subject: |
|
|
in nano after making a change just hit ctrl-X it will ask if you want to save the modifications, press Y for yes, then it will ask for a file name, hitting enter will overwrite the old file, so if changes are being made to grub.conf hitting enter will write these changes to that file _________________ AMD 7750 BE (@3.0ghz) || pci-e 7600GT (@650/800)Nvidia-drivers || 4gb ddr2 || ~amd64(funtoo) ||gentoo-sources-2.6.35-r1 |
|
Back to top |
|
|
tetris11 n00b
Joined: 16 Mar 2009 Posts: 51
|
Posted: Tue Mar 17, 2009 12:58 pm Post subject: |
|
|
i do! trust me i do.
no change.
maybe system rescuecd uses nano on a readonly premise? But then wouldnt it give an error message when i try to save?
maybe I should use a diffferent editor? |
|
Back to top |
|
|
Leon_UK Tux's lil' helper
Joined: 06 Dec 2006 Posts: 128 Location: London
|
Posted: Tue Mar 17, 2009 1:31 pm Post subject: |
|
|
tetris11 wrote: | i do! trust me i do.
no change.
maybe system rescuecd uses nano on a readonly premise? But then wouldnt it give an error message when i try to save?
maybe I should use a diffferent editor? |
Nano normally would alert you if it can not write the file like so.
Quote: | [ Error writing /boot/grub/grub.conf: Permission denied ] |
doing the following should tell you if the file is writable
Code: | ls -l /boot/grub/grub.conf |
I get
Code: | $ ls -l /boot/grub/grub.conf
-rw-r--r-- 1 root root 572 2009-03-15 21:27 /boot/grub/grub.conf
|
and the mount command should tell if the drive is writable
if it has ro where the drive is mounted then it is read only
Code: | /dev/sdb1 on /boot type ext2 (ro,noexec)
|
you could try to unmount the drive then mount it again just to make sure it is mounted as read and write
change /dev/xxxx to what ever your drive is sda1,hda1 ect.. use fdisk -l if you are unusure
Code: | umount /dev/xxxx
mount -o rw,exec /dev/xxxx /boot #change /boot to where boot was mounted /mnt/gentoo/boot ect..
|
mount should then give
Code: | mount
/dev/sdb1 on /boot type ext2 (rw)
|
Of course if you are not in a chroot, change /boot/grub/grub.conf to where ever /boot is mounted
i'm not sure what other editor to use, I've been using nano for at least 5 years now maybe someone else can recommend one
EDIT: If everything reports as being writable, I'm unsure as to what is wrong you can wait for someone else to respond or chroot into your install and try setting up grub from scratch to see if it will fix it's self
if you boot from /dev/sda
run Code: | grub --no-floppy
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)
quit
|
'device (hd0) /dev/xxx' is just my personal preference, I have quite a few harddrives I like to be positive it is installing correctly to the right drive. then double check your grub.conf make sure the kernel listed is the exact same name as the one in /boot then exit the chroot unmount and reboot. if you need help to chroot I responded to another post for that https://forums.gentoo.org/viewtopic-p-5570246.html#5570246 _________________ AMD 7750 BE (@3.0ghz) || pci-e 7600GT (@650/800)Nvidia-drivers || 4gb ddr2 || ~amd64(funtoo) ||gentoo-sources-2.6.35-r1 |
|
Back to top |
|
|
tetris11 n00b
Joined: 16 Mar 2009 Posts: 51
|
Posted: Tue Mar 17, 2009 2:56 pm Post subject: Im quitting.... |
|
|
this is just becoming too much.
I've tried what you said, but it seems that I'm unable to mount. Something about not getting the permission to do so. I've tried using sudo, i've tried gusessing the admin password. But no use.
Its been fun guys, but I guess gentoo is not for me either (ubuntu wouldn't even boot), maybe its just lousy with i386 laptops, maybe its me.
Either way, Im trying Fedora. |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Tue Mar 17, 2009 3:39 pm Post subject: |
|
|
Looks like you skipped reading some portion of the gentoo handbook. _________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
|
tetris11 n00b
Joined: 16 Mar 2009 Posts: 51
|
Posted: Tue Mar 17, 2009 6:45 pm Post subject: |
|
|
I read all the relevant sections. Nothing about configuring grub through livecd that helped. |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Tue Mar 17, 2009 7:48 pm Post subject: |
|
|
tetris11 wrote: | I read all the relevant sections. Nothing about configuring grub through livecd that helped. | I still reiterate that you have not read the entire handbook. People who are new to gentoo are not supposed to read only portions of the handbook. The installation of gentoo is fairly advanced, compared to most other binary distributions. You will fare better if you follow the handbook very closely.
The "installing grub" portion is here:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10
You should have never run into mounting/unmounting problems. The question of using sudo does not even arise. It is clearly mentioned in the introductory portions of the handbook that you will be booted as root by default if you use the livecd. http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=2 wrote: | Once the boot process completes, you will be automatically logged in to the "Live" Gentoo Linux as "root", the super user. |
_________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
|
tetris11 n00b
Joined: 16 Mar 2009 Posts: 51
|
Posted: Wed Mar 18, 2009 7:53 pm Post subject: |
|
|
I just read the entire damn handbook. It helped. A lot.
Sorry for being grouchy earlier, I guess the installation process just really got to me. Anyway I've got it working now, and thanks for all your undeserved support. |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Wed Mar 18, 2009 8:46 pm Post subject: |
|
|
tetris11 wrote: | I just read the entire damn handbook. It helped. A lot.
Sorry for being grouchy earlier, I guess the installation process just really got to me. Anyway I've got it working now, and thanks for all your undeserved support. | Glad you got it working
Enjoy! _________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
|
cessman4life Tux's lil' helper
Joined: 14 Apr 2005 Posts: 141
|
Posted: Thu Mar 19, 2009 12:56 am Post subject: |
|
|
DOn't worry. We all started out in the same shoes. I'm still learning at this point but the guys in these forums are very, very helpful. |
|
Back to top |
|
|
scroo.loose n00b
Joined: 10 Oct 2009 Posts: 12 Location: Every where and no where.
|
Posted: Wed Oct 14, 2009 9:13 pm Post subject: |
|
|
During boot i get the following error
* Checking root filesystem ...
fsck.ext3: No such file or directory while trying to open /dev/ROOT
/dev/ROOT:
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains ext2 dilesystem (and not swap or ufs or something else), the the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b <device>
* Filesystem couldn't be fixed [!!]
sorry im noob and dont know how to correct |
|
Back to top |
|
|
tylerd75 n00b
Joined: 29 Aug 2005 Posts: 52 Location: Norway
|
Posted: Fri Oct 23, 2009 12:05 pm Post subject: |
|
|
scroo.loose wrote: | During boot i get the following error
* Checking root filesystem ...
fsck.ext3: No such file or directory while trying to open /dev/ROOT
/dev/ROOT:
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains ext2 dilesystem (and not swap or ufs or something else), the the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b <device>
* Filesystem couldn't be fixed [!!]
sorry im noob and dont know how to correct |
You need to correct /etc/fstab
There's probably the default settings (i.e. /dev/BOOT and /dev/ROOT) in there.
Change them to your actual partition layout. Example:
Code: |
/dev/sda1 /boot ext2 defaults,noatime 1 1
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext3 noatime 1 2
|
_________________ Martin
Linux User: #158780 @ http://counter.li.org |
|
Back to top |
|
|
|