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 |
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-09-2006, 12:57 AM
|
#1
|
Member
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43
Rep:
|
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
|
|
|
03-09-2006, 01:23 AM
|
#2
|
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
|
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".
|
|
|
03-09-2006, 02:07 AM
|
#3
|
Member
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43
Original Poster
Rep:
|
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.
|
|
|
03-09-2006, 03:05 AM
|
#4
|
Member
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43
Original Poster
Rep:
|
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.
|
|
|
03-09-2006, 07:49 AM
|
#5
|
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687
Rep:
|
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.)
|
|
|
03-09-2006, 08:48 AM
|
#6
|
Member
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43
Original Poster
Rep:
|
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.
|
|
|
03-09-2006, 09:17 AM
|
#7
|
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687
Rep:
|
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.
|
|
|
03-09-2006, 09:57 AM
|
#8
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187
|
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
|
|
|
03-09-2006, 09:57 AM
|
#9
|
Member
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43
Original Poster
Rep:
|
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.
|
|
|
03-09-2006, 10:26 AM
|
#10
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187
|
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.
|
|
|
03-09-2006, 10:29 AM
|
#11
|
Member
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43
Original Poster
Rep:
|
ok w8 i will search for a floppy drive..
you have an other options?
|
|
|
03-09-2006, 10:50 AM
|
#12
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187
|
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.
|
|
|
03-09-2006, 11:20 AM
|
#13
|
Member
Registered: Mar 2006
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 43
Original Poster
Rep:
|
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.
|
|
|
03-09-2006, 11:44 AM
|
#14
|
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687
Rep:
|
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.
|
|
|
03-09-2006, 12:01 PM
|
#15
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187
|
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.
|
|
|
All times are GMT -5. The time now is 12:28 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
|
|