Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
[root@localhost ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/sda5
# initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.21-2950.fc8xen)
root (hd0,1)
kernel /xen.gz-2.6.21-2950.fc8
module /vmlinuz-2.6.21-2950.fc8xen ro root=LABEL=/ rhgb quiet
module /initrd-2.6.21-2950.fc8xen.img
title Fedora-base (2.6.23.1-42.fc8)
root (hd0,1)
kernel /vmlinuz-2.6.23.1-42.fc8 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.23.1-42.fc8.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
[root@localhost ~]#
alan_ri,
You could have led me in danger.I did as u said and while booting I got more errors.
Code:
mount: could not find filesystem /dev/root
setuproot: error mounting /proc: No such file or dir
setuproot: error mounting /sys: No such file or dir
Error opening /dev/console : No such file or dir
Trying to use fd 0 instead.
nash recieved SIGABRT ! Backtrace(8)
/*files and adresses*/
WARNING: cant access (null)
exec of init ((null)) failed !!! Bad address.
then i reset my grub.conf as it was before. I've installed FC-8 several times and every time grub.conf is same and you are saying this is a strange thing.How come?
One more thing, when I'm doing find /etc/passwd grub shell returns the (hd0,4) and for other files also.But for any file in /boot directory it is not able to find.
Well,Mr.Torvalds said that if you're using Linux you better be ready to laugh in the face of danger... . Just kidding.
Quote:
Originally Posted by hifun
and you are saying this is a strange thing.How come?
Now I will say that it's even more strange then before,check out quote below...
Quote:
Originally Posted by hifun
One more thing, when I'm doing find /etc/passwd grub shell returns the (hd0,4) and for other files also.But for any file in /boot directory it is not able to find.
That would mean that Fedora is on /dev/sda5 and it looks like it is,but how come there's no sign of it in the grub.conf?
If you want you can try with /dev/sda5 in the code I posted before.It should work.
Stage1 should be on the MBR.
Run
Code:
find /grub/stage1
You can reinstall with installing GRUB into the directory /boot/boot/grub,so you need to create /boot directory in the /boot directory.As they say:
Quote:
If you have the partition /boot and you install GRUB images into the directory /boot/grub, GRUB recognizes that the images lies under the directory /grub but not /boot/grub.
Or you can try:
Code:
grub-install --root-directory=/boot /dev/hda
Or create a symbolic link before installing GRUB, like
Code:
cd /boot && ln -s . boot
Or install GRUB by specifying the paths of GRUB images:
Code:
grub> root (hd0,1)
grub> install /grub/stage1 d (hd0) /grub/stage2 p /grub/menu.lst [-You'll need grub.conf instead menu.lst -]
But remember,sometimes find /grub/stage1 will work and sometimes find /boot/grub/stage1.It depends.
Another way at solving your boot prob is doing it "outside" grub: try reinstall grub in your linux /boot, then install grub also into the MBR.
The first procedure is booting through your live cd. Chroot to the linux partition install grub package as you would install other software package.
Then at the bash prompt: grub-install /dev/sda
<you wouldn't need use (hd0,0) because you are dealing with bash not with grub prompt.
The second part writes the usual boot image into the mbr; you don't need specify what stage, usually stage 1.5 is enough. (I have a disk containing more than ten partitions yet grub stage 1.5 has no problem loading the systems.)
Please read grub tutorials available on web before using the procedure here, it is wise to get familiar with grub before using it.
alan_ri,
Thanks again. find /grub/stage1 worked.As u said it depends...on what.?
if you are saying root=/dev/sda5 is valid then what does root=LABEL=/ means?
.
malekmustaq,
Thanks you too. I already know steps suggested by you.I've read some tutorials.
Tell me one thing ,how can system loads w/o GRUB stage2, i mean system is booted through grub shell which came into existence at stage2. stage 1.5 can identify file-systems only and can find files by names anywhere in HDD (usually through LBA), main booting is done by stage2.
alan_ri,
Thanks again. find /grub/stage1 worked.As u said it depends...on what.?
if you are saying root=/dev/sda5 is valid then what does root=LABEL=/ means?
It depends on where is Grub installed,maybe on other OSes installed,etc.
What I can tell you based on what I know and what they say > you should install Grub on the MBR always,do not create boot partitions,of course if you have other Linux distros there then they should go on their root partitions,logic.
About root=LABEL=/ >> well,it looks like Fedora specific some kind of labeling things.This is what I've found.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.