You are not logged in.

#1 2010-08-24 12:47:03

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

PCI SATA disk causes GRUB to fail "loading Stage2..."

Hi,

I'm setting up a small home server using an old PC.  The motherboard is an Aopen MX46U2-GN.  It has a 40GB IDE HDD and an IDE CD-ROM drive.

I have bought a new 1TB SATA HDD for data storage, and a PCI SATA adapter card because this motherboard has no SATA ports.  All of the hardware is working, except it is causing a strange boot problem.


I have a working Arch installation on the IDE drive.  I can boot to this, or to the Arch liveCD or install CDROM in the optical drive.


However, if I power up the system with the SATA drive connected to the PCI card, it detects everything but hangs with the message "GRUB loading stage2...."


Powering up without the SATA drive connected is fine - I can then hotplug the SATA drive into the PCI card and it is detected as /dev/sdb.  However, unplugging and replugging the drive every time the machine is rebooted is impractical.

I believe from Googling that it is related to the order in which the various drives are detected (hd0,0 etc.) and the new PCI card being detected before the IDE devices??

Question:  How do I fix the GRUB installation so I can boot the machine with the SATA drive connected?


Thanks in advance

Offline

#2 2010-08-25 19:38:54

Cape
Member
From: Mogliano Veneto, Italy
Registered: 2008-11-15
Posts: 105

Re: PCI SATA disk causes GRUB to fail "loading Stage2..."

Well... search grub on the wiki.
But basically: grub identifies HDs  following the BIOS detection order. Grub stage 2 error means that grub started from MBR (the first few bytes of an hard disks, which doesn't belong to any partition) and than couldn't find the remaining files where you told him they should be (probably hd (0,1)). So try to augment the hard disk number (e.g.: (1,1) 'till it starts. Of course you have to reinstall it every time.

Last edited by Cape (2010-08-25 19:40:09)

Offline

#3 2010-09-02 13:22:41

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Re: PCI SATA disk causes GRUB to fail "loading Stage2..."

Hmm... thanks for the advice.

I think you are correct that the new disk is recognised first and therefore becomes sda for Linux and hd0 for grub.

Therefore, I changed the Grub menu.lst entries to hd1,0 etc. (from hd0,0).  Booted from CD, chrooted into the partition and reinstalled grub.

Unfortunately it still doesn't work.




Strangely, when the new SATA disk is connected, I can't even boot from the CD-ROM!    I get as far as

Boot from CD : Loading stage2 ....

before the system hangs.

Again, if I hotplug the SATA disk after booting from either the CD or the old HDD, I have no problem.  Weird.

Offline

#4 2010-09-02 13:27:33

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Re: PCI SATA disk causes GRUB to fail "loading Stage2..."

Thinking further - is /boot/menu.lst the only place I need to tell Grub where the partitions are?  Have I missed something obvious here - or does this hardware just not going to work with this motherboard.  I've already updated the MB bios to the latest available.

Offline

#5 2010-09-02 13:54:05

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: PCI SATA disk causes GRUB to fail "loading Stage2..."

/boot/menu.lst is not the correct place for grub OR grub2. You'll want to see /boot/grub/grub.cfg. The preferred method for modifying this file, however, is through the use of some config files fed to grub-mkconfig.

Offline

#6 2010-09-02 19:43:11

Cape
Member
From: Mogliano Veneto, Italy
Registered: 2008-11-15
Posts: 105

Re: PCI SATA disk causes GRUB to fail "loading Stage2..."

Offline

#7 2010-09-05 07:36:57

fdac
Member
From: Brisbane, Australia
Registered: 2005-06-19
Posts: 96

Re: PCI SATA disk causes GRUB to fail "loading Stage2..."

Thanks for the help.  I had already read through the Arch wiki on Grub - the wikipedia link was also useful.

However, regardless of Grub settings on the IDE hard disk, I can't boot from the CD-ROM to edit anything when the new SATA disk is connected.  I get the 'loading stage2...' failure when booting from CD-ROM.   

I've tried disabling all boot devices in the BIOS except CD-ROM but this doesn't fix it .... frustrating!

Maybe the easier solution is to get a second hand motherboard with onboard SATA.

Offline

Board footer

Powered by FluxBB