A couple weeks ago I attempted to install Centos5 to replace an increasingly decripit Fedora Core 1 installation. Centos went onto an 80GB piece of previously unallocated space on /dev/hda, using the default configuration offered by anaconda. The installation process went smoothly, however, I was unable to boot Centos when it completed due to "Grub failure." IOW, I never even got the boot loader to come up. I've never been a big fan of grub (I've always used lilo) and this hasn't impressed me. I was able to restore Fedora's lilo loader but I cannot persuade lilo to boot Centos, probably because the / filesystem is using LVM which I am not familiar with. It failed with a kernel panic trying to find things in /dev.
I put it on the back shelf for a couple weeks and finally got back to it today. I wiped hda to give it a fresh base on which to install, and it installed fine once again -- no errors. But on reboot grub failed once again, getting as far as GRUB and then locking up, responding only to the RESET button. So I created a bootable grub CD and booted from that, fed it the Centos kernel and initrd and booted.
Lots of "missing module" errors because (as it turns out) the Centos installer neglected to create the proper module tree in /lib/modules. But there was one for the xen kernel. WTF, I'll try that. Boot again and tried to tell grub to load the xen kernel: "invalid file format."
Whatever. Booted the regular kernel and initrd again, gritting my teeth through all the errors and created a sym-link from the xen module tree to what should be the regular module tree. Rebooted again with the regular kernel and initrd. Fewer error messages this time, but still a fair number. I just wanted to get to the point were I could repair the missing modules.
So the system comes up -- sort of. The modules that still couldn't load turned out to include those for my network card, so no network access. Nor could I mount any cds or the xfs file system on the raid array. Useless. Just frickin' useless. My low opinion of grub remains unchanged, and my opinion of Centos is following in the same direction. I spent the rest of the afternoon restoring Fedora off my backup tapes.
Any clues what I did wrong?
Any clues what I did wrong?
Yes. You placed the kernel on an LVM (grub does not support LVM...at least not LVM2 IIRC) and then come to this list where grub and lilo users like me are subscribers. Don't complain about grub. grub gives you far more power than that piece of trash called lilo.
lilo will take on LVM but it is rather hard to tell it where the kernel image starts if you cannot boot up the Centos 5 kernel in the first place...
On 2007-11-07, Christopher Chan christopher@ias.com.hk wrote:
Any clues what I did wrong?
Yes. You placed the kernel on an LVM (grub does not support LVM...at least not LVM2 IIRC) and then come to this list where grub and lilo users like me are subscribers. Don't complain about grub. grub gives you far more power than that piece of trash called lilo.
No; the kernel was in a separate /boot filesystem formated ext3. This was set up by anaconda during the installation.
Any other ideas?
On Thu, Nov 08, 2007 at 09:12:33PM -0600, John Thompson alleged:
On 2007-11-07, Christopher Chan christopher@ias.com.hk wrote:
Any clues what I did wrong?
Yes. You placed the kernel on an LVM (grub does not support LVM...at least not LVM2 IIRC) and then come to this list where grub and lilo users like me are subscribers. Don't complain about grub. grub gives you far more power than that piece of trash called lilo.
No; the kernel was in a separate /boot filesystem formated ext3. This was set up by anaconda during the installation.
Any other ideas?
I think your problem could happen if you installed the boot loader into the active partition and there is a stale boot loader in the mbr.
Garrick Staples wrote:
On Thu, Nov 08, 2007 at 09:12:33PM -0600, John Thompson alleged:
On 2007-11-07, Christopher Chan christopher@ias.com.hk wrote:
Any clues what I did wrong?
Yes. You placed the kernel on an LVM (grub does not support LVM...at least not LVM2 IIRC) and then come to this list where grub and lilo users like me are subscribers. Don't complain about grub. grub gives you far more power than that piece of trash called lilo.
No; the kernel was in a separate /boot filesystem formated ext3. This was set up by anaconda during the installation.
Any other ideas?
I think your problem could happen if you installed the boot loader into the active partition and there is a stale boot loader in the mbr.
I don't know...he did say that he restored lilo to get his FC1 installation working again. grub should not have problems picking up its second stage unless it rests beyond the 1024 cylinder and there is no LBA support. That leads to the question, where is the partition for the /boot for the Centos5 kernels located and is there LBA support in the BIOS?
On 2007-11-09, Christopher Chan christopher@ias.com.hk wrote:
I don't know...he did say that he restored lilo to get his FC1 installation working again. grub should not have problems picking up its second stage unless it rests beyond the 1024 cylinder and there is no LBA support. That leads to the question, where is the partition for the /boot for the Centos5 kernels located and is there LBA support in the BIOS?
On my first installation attempt grub was installed beyond the 1024 cylinder mark, but I assumed that my year 2000 BIOS ought to be able to handle that. On my second unsuccessful install attempt, Centos had the whole drive to itself, /boot was on /dev/hda1 starting at cylinder 1. The rest of the drive anaconda used for the LVM volume.
John Thompson wrote:
On 2007-11-09, Christopher Chan christopher@ias.com.hk wrote:
I don't know...he did say that he restored lilo to get his FC1 installation working again. grub should not have problems picking up its second stage unless it rests beyond the 1024 cylinder and there is no LBA support. That leads to the question, where is the partition for the /boot for the Centos5 kernels located and is there LBA support in the BIOS?
On my first installation attempt grub was installed beyond the 1024 cylinder mark, but I assumed that my year 2000 BIOS ought to be able to handle that. On my second unsuccessful install attempt, Centos had the whole drive to itself, /boot was on /dev/hda1 starting at cylinder 1. The rest of the drive anaconda used for the LVM volume.
I have never had that kind of problem with grub...man, I used pxegrub for the boot process for dozens machines with serial console support.
Ext3 for /boot eh? I am sorry...beyond making a grub floppy or grub cd as you say you have done...I do not know what else to try on your part. LBA support in BIOS?
On 2007-11-09, Garrick Staples garrick@usc.edu wrote:
I think your problem could happen if you installed the boot loader into the active partition and there is a stale boot loader in the mbr.
I told anaconda to write the boot record onto /dev/hda assuming that woul put it in the MBR of the device and overwrite the existing lilo boot record.
Grub came up on reboot, suggesting that it did indeed overwrite the lilo boot record in the MBR, but grub was unable to load completely and required a hard reset to recover.
On Nov 9, 2007 10:55 PM, John Thompson john@vector.os2.dhs.org wrote:
On 2007-11-09, Garrick Staples garrick@usc.edu wrote:
I think your problem could happen if you installed the boot loader into the active partition and there is a stale boot loader in the mbr.
I told anaconda to write the boot record onto /dev/hda assuming that woul put it in the MBR of the device and overwrite the existing lilo boot record.
Grub came up on reboot, suggesting that it did indeed overwrite the lilo boot record in the MBR, but grub was unable to load completely and required a hard reset to recover.
Do you have multiple hard disk ? Is your disk the master on the first controller ?
--
John (john@os2.dhs.org)
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 2007-11-12, Alain Spineux aspineux@gmail.com wrote:
On Nov 9, 2007 10:55 PM, John Thompson john@vector.os2.dhs.org wrote:
Grub came up on reboot, suggesting that it did indeed overwrite the lilo boot record in the MBR, but grub was unable to load completely and required a hard reset to recover.
Do you have multiple hard disk ?
Yes, 2 IDE drives and a 5 device SCSI raid array.
Is your disk the master on the first controller ?
Yup.
John Thompson wrote:
On 2007-11-12, Alain Spineux aspineux@gmail.com wrote:
On Nov 9, 2007 10:55 PM, John Thompson john@vector.os2.dhs.org wrote:
Grub came up on reboot, suggesting that it did indeed overwrite the lilo boot record in the MBR, but grub was unable to load completely and required a hard reset to recover.
Do you have multiple hard disk ?
Yes, 2 IDE drives and a 5 device SCSI raid array.
Is your disk the master on the first controller ?
Yup.
If you want grub to right to MBR on the first drive, you don't have to tell it anything.
If you DO pick a drive, it does not write to MBR, but the first partition on the drive (or another one if you pick that). That is needed sometimes, but not most of the time. Most of the time, you do not want to go into the advanced settings at all (if centos is going to reside on it's own drive).
Johnny Hughes wrote:
John Thompson wrote:
On 2007-11-12, Alain Spineux aspineux@gmail.com wrote:
On Nov 9, 2007 10:55 PM, John Thompson john@vector.os2.dhs.org wrote:
Grub came up on reboot, suggesting that it did indeed overwrite the lilo boot record in the MBR, but grub was unable to load completely and required a hard reset to recover.
Do you have multiple hard disk ?
Yes, 2 IDE drives and a 5 device SCSI raid array.
Is your disk the master on the first controller ?
Yup.
If you want grub to right to MBR on the first drive, you don't have to tell it anything.
If you DO pick a drive, it does not write to MBR, but the first partition on the drive (or another one if you pick that). That is needed sometimes, but not most of the time. Most of the time, you do not want to go into the advanced settings at all (if centos is going to reside on it's own drive).
I don't see how telling it to install on (hd0) aka /dev/hda will make it install on (hd0,0) aka /dev/hda1...
On Nov 13, 2007 5:15 AM, John Thompson john@vector.os2.dhs.org wrote:
On 2007-11-12, Alain Spineux aspineux@gmail.com wrote:
On Nov 9, 2007 10:55 PM, John Thompson john@vector.os2.dhs.org wrote:
Grub came up on reboot, suggesting that it did indeed overwrite the lilo boot record in the MBR, but grub was unable to load completely and required a hard reset to recover.
Do you have multiple hard disk ?
Yes, 2 IDE drives and a 5 device SCSI raid array.
Is your disk the master on the first controller ?
Yup.
When having multiple IDE and/or SCSI controller on the same machine I get similar problems. I had to play with grub to install it to the good MBR and make it load it's second stage part from the good drive. It was longtime ago and always get success using "random" commands.
I used "map" command for sure, to swap both drive something like
map (hd0) (hd1) map (hd1) (hd0)
and/or setup (hd0) or setup (hd1) and/or root(hd1,0)
Good Luke May the force be with you :-)
--
John (john@os2.dhs.org)
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
John Thompson wrote:
A couple weeks ago I attempted to install Centos5 to replace an increasingly decripit Fedora Core 1 installation. Centos went onto an 80GB piece of previously unallocated space on /dev/hda, using the default configuration offered by anaconda. The installation process went smoothly, however, I was unable to boot Centos when it completed due to "Grub failure." IOW, I never even got the boot loader to come up. I've never been a big fan of grub (I've always used lilo) and this hasn't impressed me. I was able to restore Fedora's lilo loader but I cannot persuade lilo to boot Centos, probably because the / filesystem is using LVM which I am not familiar with. It failed with a kernel panic trying to find things in /dev.
I put it on the back shelf for a couple weeks and finally got back to it today. I wiped hda to give it a fresh base on which to install, and it installed fine once again -- no errors. But on reboot grub failed once again, getting as far as GRUB and then locking up, responding only to the RESET button. So I created a bootable grub CD and booted from that, fed it the Centos kernel and initrd and booted.
Lots of "missing module" errors because (as it turns out) the Centos installer neglected to create the proper module tree in /lib/modules. But there was one for the xen kernel. WTF, I'll try that. Boot again and tried to tell grub to load the xen kernel: "invalid file format."
Whatever. Booted the regular kernel and initrd again, gritting my teeth through all the errors and created a sym-link from the xen module tree to what should be the regular module tree. Rebooted again with the regular kernel and initrd. Fewer error messages this time, but still a fair number. I just wanted to get to the point were I could repair the missing modules.
So the system comes up -- sort of. The modules that still couldn't load turned out to include those for my network card, so no network access. Nor could I mount any cds or the xfs file system on the raid array. Useless. Just frickin' useless. My low opinion of grub remains unchanged, and my opinion of Centos is following in the same direction. I spent the rest of the afternoon restoring Fedora off my backup tapes.
Any clues what I did wrong?
Hi I would suggest if possible that you try installing again. Once the installation is complete but before you reboot scp off all the files in /root so you have all the logs and etc that were made during the installation.
Then reboot, if you still find Grub doesn't work then boot from a CentOS boot cd / DVD and type linux rescue. This will ask you for some basic information and then hopefully find you CentOS install
If this occurs then you should be able to chroot into your CentOS Installation and use grub-install to try installing grub manually.
Hope this helps, good luck :)