Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 02-15-2013, 04:38 AM   #1
Registered: Mar 2005
Posts: 135

Rep: Reputation: 17
GRUB won't install

I guess this must be just another thread within thousands of others with the same problem:

1) I've just "cloned" a RHEL5 system using rsync;
2) I've modified /etc/fstab and /boot/grub/menu.lst to match the new system;
3) /dev/sda1 is mounted as / and /dev/sda3 is mounted as /boot (n-checked with mount, fdisk and any other possible way to confirm this);
4) Booted the new system with RHEL5 DVD in rescue mode;
5) The rescue mode recognizes and mounts the entire system (/, /boot, /var and so on) in /mnt/sysimage;
6) chroot /mnt/sysimage;
7) "grub-install --root-directory=/ /dev/sda" or "grub-install /dev/sda" returns the same error: The file /boot/grub/stage1 not read correctly;
8) grub (shell) > find /boot/grub/stage1 or find /grub/stage1 returns the same error: File not found;
9) grub (shell) > root (hd0,0) identifies the partition correctly, but setup (hd0) or setup (hd0,0) returns the same error: it cannot find "/boot/grub/stage1" or "/grub/stage1";
10) Already tried copying the entire /boot from a working system with the same kernel version: didn't solve it;
11) The same procedure was done in two other systems with the same kernel version and both worked with grub-install right from the start.

12) The only difference between this system and the other is that:
12.1) The other had /dev/sda1 as /boot and /dev/sda3 as /;
12.2) This one has /dev/sda1 as / and /dev/sda3 as /boot.

As you people can see I've already tried a lot of different things. The last one is actually invert the partition order, but that I think it's very weird (and I'm gonna need some time to move data between disks).

Anyone has any idea about what is happening, please?
Old 02-16-2013, 02:25 PM   #2
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,332

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
as i recall the older RHEL5 ( 5.9 is current)
required the /boot partition to be formatted to "ext2" for the now legacy grub install

also the older RHEL5 needed the "boot" flag set IF /boot was NOT the very first partition on the disk

use a GParted live cd to set the boot flag to sda3
Old 02-17-2013, 03:48 AM   #3
Senior Member
Registered: Aug 2011
Posts: 1,077

Rep: Reputation: 43
What is(are) the exact rsync command(s) that you used to "clone" your system? That may have a bearing on why grub is not working.
Old 02-17-2013, 08:42 AM   #4
Registered: Mar 2005
Posts: 135

Original Poster
Rep: Reputation: 17
Hey people.

I guess John was the closest. I managed to switch the / and /boot partitions and then Grub installed normally.
Perhaps one thing I should've tried was setting the boot flag (noted for next time).

RNG, about the rsync command, I went through the man page and came up with the following:

rsync varlHEAXog --exclude-from=<file> <source> <destination>

The exclude file has /dev, /proc and /sys in it.

So far this command worked wonders for 9 different systems.


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
Edit Grub when XP install won't boot jhinds Linux - Newbie 16 04-06-2009 04:44 PM
Grub won't install in MBR PB0711 Linux - Software 4 05-02-2007 01:12 AM
weird problem - grub won't install slashams Debian 2 09-22-2006 10:49 PM
FC1: GRUB won't load after install screwage Fedora 4 03-19-2005 12:59 PM
GRUB won't load after install realityescapear Fedora - Installation 4 01-16-2005 02:59 AM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration