LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-02-2009, 08:22 AM   #16
hifun
LQ Newbie
 
Registered: Dec 2008
Distribution: Fedora 8
Posts: 28

Original Poster
Rep: Reputation: 15

Code:
[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 ~]#
.
.
Code:
[root@localhost ~]# ls -l /boot/grub
total 203
-rw-r--r-- 1 root root     63 Feb 18 10:30 device.map
-rw-r--r-- 1 root root   8096 Apr  2 13:53 e2fs_stage1_5
-rw-r--r-- 1 root root   7936 Apr  2 13:53 fat_stage1_5
-rw-r--r-- 1 root root   7200 Apr  2 13:53 ffs_stage1_5
-rw------- 1 root root    819 Feb 18 10:30 grub.conf
-rw-r--r-- 1 root root   7200 Apr  2 13:53 iso9660_stage1_5
-rw-r--r-- 1 root root   8672 Apr  2 13:53 jfs_stage1_5
lrwxrwxrwx 1 root root     11 Feb 18 10:30 menu.lst -> ./grub.conf
-rw-r--r-- 1 root root   7328 Apr  2 13:53 minix_stage1_5
-rw-r--r-- 1 root root   9696 Apr  2 13:53 reiserfs_stage1_5
-rw-r--r-- 1 root root   7459 Oct 29  2007 splash.xpm.gz
-rw-r--r-- 1 root root    512 Apr  2 13:53 stage1
-rw-r--r-- 1 root root 105468 Apr  2 13:53 stage2
-rw-r--r-- 1 root root   7520 Apr  2 13:53 ufs2_stage1_5
-rw-r--r-- 1 root root   6752 Apr  2 13:53 vstafs_stage1_5
-rw-r--r-- 1 root root   9344 Apr  2 13:53 xfs_stage1_5
[root@localhost ~]#
.
.
Code:
[root@localhost ~]# fdisk -l

Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x35fc35fc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        5099    40957686    7  HPFS/NTFS
/dev/sda2            5100        5112      104422+  83  Linux
/dev/sda3            5113        5239     1020127+  82  Linux swap / Solaris
/dev/sda4            5240        7297    16530885    f  W95 Ext'd (LBA)
/dev/sda5            5240        7297    16530853+  83  Linux
[root@localhost ~]#
 
Old 04-02-2009, 08:40 AM   #17
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Well I see some really strange things goin' on here.
Change this:
Code:
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
to look like this
Code:
title Fedora-base (2.6.23.1-42.fc8)
        root (hd0,1)
        kernel /vmlinuz-2.6.23.1-42.fc8 ro root=/dev/sda2 rhgb quiet
        initrd /initrd-2.6.23.1-42.fc8.img
Do the same for xen,save,reboot and try to find stage1 then.
 
Old 04-02-2009, 09:24 AM   #18
hifun
LQ Newbie
 
Registered: Dec 2008
Distribution: Fedora 8
Posts: 28

Original Poster
Rep: Reputation: 15
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.

Last edited by hifun; 04-02-2009 at 09:37 AM.
 
Old 04-02-2009, 11:20 AM   #19
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by hifun View Post
alan_ri,
You could have led me in danger.
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 View Post
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 View Post
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.

Last edited by alan_ri; 04-02-2009 at 11:24 AM.
 
Old 04-02-2009, 12:33 PM   #20
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,616

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
hifun:

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.

Good luck.

Hope this helps.
 
Old 04-02-2009, 03:18 PM   #21
hifun
LQ Newbie
 
Registered: Dec 2008
Distribution: Fedora 8
Posts: 28

Original Poster
Rep: Reputation: 15
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.
 
Old 04-02-2009, 03:57 PM   #22
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by hifun View Post
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.
 
Old 04-02-2009, 05:19 PM   #23
hifun
LQ Newbie
 
Registered: Dec 2008
Distribution: Fedora 8
Posts: 28

Original Poster
Rep: Reputation: 15
alan_ri,
Thank you, your last post helped me. Now I got the thing.
I had 1 problem, but learned solutions to many.
Thank You once again.
 
  


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
how to execute a script file? Have file/directory not found error sirius57 Linux - Software 2 11-22-2007 12:43 AM
Kernel compilation error: Error 15: File not found Niceman2005 Linux - General 9 10-04-2007 04:45 AM
Error 15: File not found capucino Linux - General 1 05-18-2006 12:18 PM
Error 15 file not found PenguinMolester SUSE / openSUSE 5 08-29-2005 08:07 AM
snmpd installed, see file, but get error file not found PCHelper Slackware 0 11-06-2003 01:44 PM


All times are GMT -5. The time now is 03:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration