grub-install: The file /boot/grub/stage1 not read correctly.

I had to deal with this error while converting an old CentOS 4 install to a virtual machine.
I used a CentOS 6 disk in rescue mode to create a partition scheme similar to the one on the physical machine and then copied the files from the live system, but once chrooted in the newly created install, I couldn’t install grub. grub-install was failing with the message

The file /boot/grub/stage1 not read correctly.

and I had weird error messages about the partition format using the grub command line.

After a bit of poking around (usual stuff, check permissions, md5sum, I even restarted the system to make sure the partition table was read correctly and checked grub config and device.map files), I resorted to the Internet and thankfully I found out this knowledgebase that documents this exact issue: turns out, the mkfs.ext3 command from CentOS 6 created a partition with 256bit inodes and the old grub couldn’t deal with that. I formatted the filesystem again from inside the chroot, using CentOS 4 mkfs.ext3, copied the files again and the grub installation completed successfully.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s