- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Trying to Install GRUB Loader
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2006 10:41 PM
тАО09-04-2006 10:41 PM
I am trying to reinstall the GRUB Loader onto my system. I have performed the following but cannot seem to get to run the grub-install at all.
1. boot into rescue mode
2. chroot /mnt/sysimage
3. grub-install /dev/sda
keep getting error "does not have any corresponding BIOS drive".
I have tried running a grub-install --recheck /dev/sda and get probing system for BIOS drive, this may take a long time.
/dev/md0 does not have any corresponding BIOS drive.
I dont know what else to try to get the GRUB reinstalled onto the system.
Please can anyone help.
Kind Regards
Debbie
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2006 11:10 PM
тАО09-04-2006 11:10 PM
Re: Trying to Install GRUB Loader
Type grub at the prompt and then type help at the grub prompt.
if you type:
grub> root (hd
Possible disks are: hd0 hd1 hd2 hd3 hd4
grub should list the possible drives on your system (this is like command-line completion at the bash prompt).
choose the device where grub can find the boot loader stages (Red Hat systems put this in /boot/grub/). e.g.
grub> root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type is ext2fs, partition type 0xfd
Partition num: 1, Filesystem type unknown, partition type 0xfd
I'll choose (hd0,0) as that's where the grub stage files can be found on my system. The syntax (hd0,0) is grub's way of designating the first disk (hd0) and the first partition on that disk (hd0,0).
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
On my system this is a software raid1 (mirror) which I can boot from and want to install the bootloader to.
You can now install the boot loader to the first disk (hd0) by typing:
grub> setup (hd0)
Grub should report that it found the stages it needs to setup the bootloader and give a success message when it's complete. You will probably see about eight to ten lines of output. Read it though carefully and make sure grub is installed correctly.
(you can also type help setup for more information).
t.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2006 11:55 PM
тАО09-04-2006 11:55 PM
Re: Trying to Install GRUB Loader
I did the following but when I am in Grub if I try the tab it doesn't work.
I did a find /grub/grub.conf and got back (hd0,0) and (hd1,0).
I then proceeded and run:-
root (hd0,0)
setup (hd0)
I then got the following back:-
checking if "/boot/grub/stage1" exists ..No
checking if "/grub/stage1" exists ... yes
checking if "/grub/stage2" exists ... yes
running "embed /grub/e2fs_stage1_5 16 sectors are embedded succeeded
running "install /grub/stage1 (hd0) (hd0)1+16 (hd0,0)/grub/stage2 /grub/grub.conf" succeeded
When I reboot the system I get the message
No Operating system found???
Any other ideas....
Thanks for your help
Regards
Debbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 12:24 AM
тАО09-05-2006 12:24 AM
Solutiongrub> root (hd
ignore the '<' and '>' they are only to bracket the word TABKEY. don't type them. You probably did understand that anyway but I'm just checking.
>I did a find /grub/grub.conf and got back (hd0,0) and (hd1,0).
Looks like a mirror. Have you set up software raid on mirrored disks?
>I then proceeded and run:-
>root (hd0,0)
>setup (hd0)
>I then got the following back:-
>checking if "/boot/grub/stage1" exists ..No
Grub can read filesystems and substitutes the designated disk for the mount point. Above it looks first for the configured default location but the directory path (hd0,0)/boot/grub/stage1 doesn't exist. That's ok as below it succeeds.
>checking if "/grub/stage1" exists ... yes
>checking if "/grub/stage2" exists ... yes
Here grub is really saying (hd0,0)/grub/stage1 and (hd0,0)/grub/stage2 and likes what it sees (effecively that maps to /boot/grub/stage{1,2}. It installs the stage1 to the boot sector on (hd0) and references stage2 from there.
>running "embed /grub/e2fs_stage1_5 16 sectors are embedded succeeded
>running "install /grub/stage1 (hd0) (hd0)1+16 (hd0,0)/grub/stage2 /grub/grub.conf" succeeded
All looks good so far.
>When I reboot the system I get the message No Operating system found???
Did this get you further than before? What's in your grub.conf? (I'm assuming you're on a Red Hat/Fedora/CentOS system?).
Can you find the kernel and initrd on the boot device (in the rescue evironment, under chroot /mnt/sysimage, do 'ls /boot').
If you can boot to a grub console you could also try:
grub> root (hd0,0)
grub> cat /grub/grub.conf
and then maybe try to load the kernel and initrd manually to see if it can be found on the disk?
grub> kernel /vmlinuz-
grub> initrd /initrd-
grub> boot
Regards,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 12:43 AM
тАО09-05-2006 12:43 AM
Re: Trying to Install GRUB Loader
I did was able to to enter the kernel but not the initrd.
grub> root (hd0,0)
grub> cat /grub/grub.conf
grub> kernel /vmlinuz
the above went through fine...
grub> initrd /initrd
I get Error 16 inconsistend filesystem structure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 12:58 AM
тАО09-05-2006 12:58 AM
Re: Trying to Install GRUB Loader
Can you please send the output from:
grub> geometry (hd0)
and your boot device?
the contents of grub.conf would also be handy.
Are you using LVM on your system? This may be causing some of the problems.
You could also try do a filesystem check (fsck) on your volumes to see that they are clean. NB: DO NOT run a fsck on a mounted volume. (i.e. do the fsck from the recovery evironment without chroot'ing).
Regards,
t.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 01:25 AM
тАО09-05-2006 01:25 AM
Re: Trying to Install GRUB Loader
grub> geometry (hd0)
drive 0x80 C/H/S = 4427/255/63. The number of sectors = 71132000, /dev/sda
partition num 0 filesystem type is ext2fs, fartition 0xfs
partition num 1 filesystem type is unknown.
The boot device was configured to boot from the san - device /dev/sda
CONTENTS OF GRUB:-
# 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,0)
# kernel /vmlinuz-version ro root=/dev/vg00/lvol00
# initrd /initrd-version.img
#boot=/dev/sdc1
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.9-22.0.2.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-22.0.2.EL ro root=/dev/vg00/lvol00 acpi=off
initrd /initrd-2.6.9-22.0.2.EL.img
title Red Hat Enterprise Linux ES (2.6.9-5.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-5.EL ro root=/dev/vg00/lvol00 acpi=off
initrd /initrd-2.6.9-5.EL.img
ARE WE USING LVM? Yes
Thanks for all your help Tom...
Regards
Debbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 02:05 AM
тАО09-05-2006 02:05 AM
Re: Trying to Install GRUB Loader
>partition num 0 filesystem type is ext2fs, fartition 0xfs
>partition num 1 filesystem type is unknown.
I have to assume you made a typo copying the lines above in. partition type 0xfs is invalid and I'll assume that it's 0xfd - or 'Linux Raid Autodetect'
Are you using 'partition num 1' from above? It appears to be unrecognised and may be part of the problem. If it is an LVM volume it should show up with a hex code of 0x8e. In the rescue environment can you access this volume via mount? Any other way? (Actually you can show me 'cat /proc/partitions' as well and/or 'fdisk -l').
As far as I know a SAN device /dev/sda should be fine for booting.
>CONTENTS OF GRUB:-
>default=0
>timeout=5
>splashimage=(hd0,0)/grub/splash.xpm.gz
>hiddenmenu
>title Red Hat Enterprise Linux ES >(2.6.9-22.0.2.EL)
>root (hd0,0)
>kernel /vmlinuz-2.6.9-22.0.2.EL ro >root=/dev/vg00/lvol00 acpi=off
>initrd /initrd-2.6.9-22.0.2.EL.img
>title Red Hat Enterprise Linux ES >(2.6.9-5.EL)
>root (hd0,0)
>kernel /vmlinuz-2.6.9-5.EL ro >root=/dev/vg00/lvol00 acpi=off
>initrd /initrd-2.6.9-5.EL.img
Have you tried manually booting your older kernel and initrd combination. If this works, maybe you have a corrupted initrd? You can rebuild the initrd in the rescue environment using the mkinitrd command.
When booting manually, try using the 'root=/dev/vg00/lvol00' device, not 'root=/dev/sda'. This is the 'root' filesystem. If this is an LVM volume, LVM needs to be activated before the kernel can mount it. Normally the drivers are loaded by the kernel from the initrd so if it's corrupted you need to rebuild it (see above). The grub error is more concerning though and I think that the partition type may need resetting via a partitioning tool such as fdisk (to type 0x8e). (Please be careful when partitioning and make a backup of your data).
I've assumed a few things here. A) that you've managed to re-install grub to the MBR of your boot disk and that it loads correctly then fails with 'error 16...'. B) You can get to the grub console from grub after loading. C) you want the kernel to mount 'partition num 1' above (i.e. the second partition on the disk) and that the disk is a SAN device. D) you have no local disks on the system. Please tell me if incorrect.
t.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2006 03:51 AM
тАО09-05-2006 03:51 AM
Re: Trying to Install GRUB Loader
partion you are installing grub to.
Note: if you have /boot as a mounted partition then you need /boot/boot/grub in
the directory structure of the boot drive.
If you use this structure then boot needs to
be somewhere between 256k and 512k depening
on the kernels you install there.
Also if your are installing in the default
location of (hd?,0) then don't maximize that
drive. Grub will overwrite the first 16k or
so of the first track depending on the stage1
loader it is using.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2006 08:04 PM
тАО09-06-2006 08:04 PM
Re: Trying to Install GRUB Loader
I would just like to say thanks for all your help...
After discussion with my manager we felt the easier way would just to rebuild the server and boot it off the internal drive rather than the SAN.
So thanks again.
Regards
Debbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2006 09:40 PM
тАО09-06-2006 09:40 PM
Re: Trying to Install GRUB Loader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2006 05:38 AM
тАО09-07-2006 05:38 AM
Re: Trying to Install GRUB Loader
Booted into rescue
ran grub
installed and setup grub on each disk
Once grub was loaded onto each of the devices in the raid /dev/md0 the system would boot.