LinuxQuestions.org
Help answer threads with 0 replies.
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 03-09-2006, 12:57 AM   #1
an2ny_18
Member
 
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43

Rep: Reputation: 15
how to fix grub problem?


hi guys,

i just wanna ask how to fix my grub problem?

my problem is, when i start my computer and boot to grub i cant see the grub menu and only grub show me the grub command promt.

like this:

Quote:
GNU GRUB version 0.95 (639k lower / 1047488 upper memory)

[ Minimal BASH-like line editing is suported. For the First word, TAB
list the posible command completion. Anywhere else tab list the posible
completions of a device/filename,]

grub>
after that i read the thread from fedora that i can use the native installation using root (hd0,0) but doesnt work. and i also try to install in rescue mode.

i enter the following command:

Quote:
Insert The Fedora Core Disk 1

linux rescue

(loading)

chroot /mnt/sysimage
fdisk -l

/dev/hda1 * 1 13 104391 83 linux
/dev/hda2 14 9729 78843990 8e Linux LVM

grub-install /dev/hda
/dev/mapper/VolGroup00-LogVol00 does not have any corresponding BIOS drive

grub-install /dev/hda1
/dev/mapper/VolGroup00-LogVol00 does not have any corresponding BIOS drive
how can i fix this problem?

thank you all
 
Old 03-09-2006, 01:23 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
There is a file called "/boot/grub/menu.lst". This is the file grub reads to give you a boot menu. If the file exists, with entries in it:

root hd(0,0)
kernel <path to kernel i.e. /boot/kernel-2.6.8>
initrd <path to initrd i.e. /boot/initrd-2.6.8>

If grub can't read /boot/grub/menu.lst there is a problem. You can edit the boot parameters in the grub command prompt by typing them at the prompt. When you have typed them all in(hit enter in between boot parameters), hit "b" and it should boot. If you don't know exactly what to put in the boot parameters, type "root" and hit tab. All the grub partitions that are bootable will show up. You pick the one you want. Then type "kernel", tab and the list of kernels will show up. Pick the one you want to boot with. Then do initrd. When you are done, hit "b".
 
Old 03-09-2006, 02:07 AM   #3
an2ny_18
Member
 
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43

Original Poster
Rep: Reputation: 15
thank for your help but when im using the root

root hd(0,0)
Error 11: Unrecognize device string.

and when im using the kernel and initrd

kernel + tab
Error 1: Filename must be either an absolute pathname or blocklist

kernel /boot/kernel-2.6.8 + tab
Error 12: invalid Device requested

initrd with the same error.
 
Old 03-09-2006, 03:05 AM   #4
an2ny_18
Member
 
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43

Original Poster
Rep: Reputation: 15
i cant find also the /boot/grub/menu.lst

but when i try to find:

find /boot/grub/stage1
/boot/grub/stage1

please help me this is my 4 days trying to recover my files and run my computer.

thank you, a little help for me and a big thank for you.
 
Old 03-09-2006, 07:49 AM   #5
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Quote:
root hd(0,0)
Error 11: Unrecognize device string.

and when im using the kernel and initrd

kernel + tab
Error 1: Filename must be either an absolute pathname or blocklist
you must first set the root correctly - there was a typo...

it is:
root (hd0,0)

then the other commands can also work

and:
kernel (hd0,0)/TAB --> will list what is there (note the slash - you need to write path names...you can omit (hd0,0) but do not omit the slash.)
 
Old 03-09-2006, 08:48 AM   #6
an2ny_18
Member
 
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43

Original Poster
Rep: Reputation: 15
sorry guys didnt work. i think a have a problem.

if im trying to use the command:

root (hd0,0)
Filesystem type is ext2fs, partition type 0x83

about the kernel

kernel (hd0,0)/tab will be automatic change to kernel (hd0,0)/lost+found

i think i deleted all the boot files. there is nothing on this partition.

can i remove and create again my first partition?

and install grub?

if i try to use the rescue command:

fdisk -l

/dev/hda1 * 1 13 104391 83 linux
/dev/hda2 14 9729 78843990 8e Linux LVM

look guys i think i have my boot partition.

and if i try to find my grub settings

find /boot/grub/stage1
/boot/grub/stage1

how come its ok but when i need to boot in my fedora core it loads only the grub command promt.

thank you guys for helping me here.
 
Old 03-09-2006, 09:17 AM   #7
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
could you give the output of these commands, when you are in rescue mode?
Code:
mount
ls -l /boot
ls -l /boot/grub
just a guess:
I'm not familiar with LVM and how it works - but I think you had the /boot (dev/hda1 ?) partition not mounted, when you installed grub - thats why it is empty.
 
Old 03-09-2006, 09:57 AM   #8
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Insert The Fedora Core Disk 1

linux rescue

(loading)

chroot /mnt/sysimage
fdisk -l

/dev/hda1 * 1 13 104391 83 linux
/dev/hda2 14 9729 78843990 8e Linux LVM

grub-install /dev/hda
/dev/mapper/VolGroup00-LogVol00 does not have any corresponding BIOS drive

grub-install /dev/hda1
/dev/mapper/VolGroup00-LogVol00 does not have any corresponding BIOS drive
I'm not sure why /dev/mapper is involved here at all, unless it's trying to tell you that it can't find grub-install because /mnt/sysimage is empty. What happens if you do a ls /mnt/sysimage before you do the chroot? If the sysimage directory is empty, try a lvchange -a to activate your logical volumes.

The comment about BIOS drive makes me wonder if you have a BIOS setting problem. You might want to check that your IDE mode is set (in your BIOS) to "compatable" rather than "enhanced," since Fedora sometimes has problems with "enhanced" mode.

When you get the grub> prompt, you could try to do the install by hand:
Code:
    
# grub grub> root (hd0) grub> setup (hd0,0) grub> exit
 
Old 03-09-2006, 09:57 AM   #9
an2ny_18
Member
 
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43

Original Poster
Rep: Reputation: 15
chroot /mnt/sysimage
mount
/dev/VolGroup/LogVol00 in / type ext3 (rw,defaults)
/dev/proc on /proc type proc (rw,defaults)
/dev/sys in /sys type sysfs (rw,defaults)

ls - /boot
drwxr-xr-x 3 root root 4096 Mar 7 16:42 boot
drwxr-xr-x 3 root root 4096 Mar 10 02:16 grub

chroot /mnt/sysimage
mount
/dev/VolGroup/LogVol00 in / type ext3 (rw,defaults)
/dev/proc on /proc type proc (rw,defaults)
/dev/sys in /sys type sysfs (rw,defaults)

ls - /boot
drwxr-xr-x 3 root root 4096 Mar 7 16:42 boot
drwxr-xr-x 3 root root 4096 Mar 10 02:16 grub

ls -l /boot/grub
drwxr-xr-x 3 root root 4096 Mar 9 06:03 boot
drwxr-xr-x 1 root root 30 Mar 10 02:17 device.map
drwxr-xr-x 1 root root 7476 Mar 10 02:16 e2fs_stage1_5
drwxr-xr-x 1 root root 7300 Mar 10 02:16 fat_stage1_5
drwxr-xr-x 1 root root 6612 Mar 10 02:16 ffs_stage1_5
drwxr-xr-x 1 root root 6612 Mar 10 02:16 iso9660_stage1_5
drwxr-xr-x 1 root root 8096 Mar 10 02:16 jfs_stage1-5
drwxr-xr-x 1 root root 6772 Mar 10 02:16 minix_stage1_5
drwxr-xr-x 1 root root 8980 Mar 10 02:16 reiserfs_stage1_5
drwxr-xr-x 1 root root 512 Mar 10 02:16 stage1
drwxr-xr-x 1 root root 101704 Mar 10 02:16 stage2
drwxr-xr-x 1 root root 6952 Mar 10 02:16 ufs2_stage1_5
drwxr-xr-x 1 root root 6228 Mar 10 02:16 vstafs_stage1_5
drwxr-xr-x 1 root root 8764 Mar 10 02:16 xfs_stage1_5


Quote:
jomen
What happens if you do a ls /mnt/sysimage before you do the chroot?
ls /mnt/sysimage
sbin dev home lost+found misc net proc sbin srv tmp var
boot etc live media mnt opt root selinux sys usr

Quote:
# grub
grub> root (hd0)
grub> setup (hd0,0)
grub> exit
grub
root (hd0)
Filesystem type unknown, using whole disk
setup (hd0,0)
Error 17: Cannot mount selected partition.

thats it.

Last edited by an2ny_18; 03-09-2006 at 10:07 AM.
 
Old 03-09-2006, 10:26 AM   #10
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Try to create a GRUB boot floppy, and see if you can boot your system from it:

1) Boot the rescue CD
2) Place a blank floppy in your floppy drive
3) If the floppy was mounted, unmount it. (e.g., umount /media/floppy.)
Code:
# mke2fs /dev/fd0
# mount /media/floppy
# mkdir /media/floppy/boot
# mkdir /media/floppy/boot/grub
# cp /boot/grub/stage1 /media/floppy/boot/grub/stage1
# cp /boot/grub/stage2 /media/floppy/boot/grub/stage2
# grub
# grub> root (fd0)
# grub> setup (fd0)
# grub> quit
Leave the floppy in the drive and reboot. (Making sure that your BIOS is set to boot from your floppy drive first.)

Last edited by PTrenholme; 03-09-2006 at 10:27 AM.
 
Old 03-09-2006, 10:29 AM   #11
an2ny_18
Member
 
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43

Original Poster
Rep: Reputation: 15
ok w8 i will search for a floppy drive..

you have an other options?
 
Old 03-09-2006, 10:50 AM   #12
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Hopefully, you ment a floppy disk, not drive!

The point is to see if the problem is in the HDs boot sector. If you can boot from a floppy, then I'd suggest looking at your BIOS "virus protection" settings, which may be interfering with GRUB changing the information in the boot sector. (Not, actually, too likely, since you do get the GRUB prompt, whic implies that GRUB was, in fact, installed on the HD.) But a sucessful floppy boot will validate the install.

Oh, you should do the chroot before you make the floppy, so you get the settings for your installiation, not the rescue disk's settings.

Edit: Have to go walk the dog now, back in a hour or so.

Last edited by PTrenholme; 03-09-2006 at 10:55 AM.
 
Old 03-09-2006, 11:20 AM   #13
an2ny_18
Member
 
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43

Original Poster
Rep: Reputation: 15
EDIT: no!, because i never use the floppy, thats why i need to find my floppy drive.


mke2fs /dev/fd0

it is successfull but when im trying to do this next command. got error.

mount /media/floppy
mount cant find /media/floppy in etc/fstab or etc/mtab

Last edited by an2ny_18; 03-09-2006 at 11:33 AM.
 
Old 03-09-2006, 11:44 AM   #14
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
mount -t ext2 /dev/fd0 /media/floppy
the directory /media/floppy needs to exist - and you need to be root for this.

Last edited by jomen; 03-09-2006 at 11:45 AM.
 
Old 03-09-2006, 12:01 PM   #15
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by an2ny_18
[snip]
mount /media/floppy
mount cant find /media/floppy in etc/fstab or etc/mtab
Sorry, I've been assuming that you were installing a Fedora system, since you mentioned a Fedora thread in your first post. Fedora (by default) defines /media/floppy and adds an automount line to /etc/fstab, so I assumed all of that was set-up in my comments.

Edit: If jomen's comment wasn't clear, you need to do (as root)
Code:
# mkdir /media
# mkdir /media/floppy
# mount /dev/fd0 /media/floppy # The -t ext2 won't hurt, but isn't necessary
You can, of course, replace /media with any other directory (/mnt is often used), and /floppy by, again, anything you want to call it. Just be sure to use whatever you chose in all the commands.

Last edited by PTrenholme; 03-09-2006 at 12:13 PM.
 
  


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
what is Grub loading error 21, and how can I fix the problem! logiplex Linux - Software 26 06-30-2009 03:20 PM
Please help me fix GRUB - error13 nyheat Linux - Newbie 8 08-31-2005 05:45 PM
all attempts to fix the problem failed... can someone help me fix partition space? foreverdita Linux - Enterprise 2 05-11-2005 09:02 AM
How to fix GRUB after reformatting Windows? X-Crawler Linux - General 1 05-29-2004 10:18 AM
grub or windows error and how to fix netquest1 General 2 04-30-2004 02:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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