# Can't boot when adding drives

## pactoo

Hello,

I am not sure wether this is a bios thing or a grub thing, I'm afraid its a mainboard thingy, though. I have two IDE (PATA) platters and boot from the first. Nothing spectacular here. 

However, when I attach one ore more SATA drives to a sata controller in a PCI Slot (not onboard), I do get the error message at the end of POST "Boot Disk Failure. Insert Boot Disk ...." and grub does not even get loaded. Disconnecting the sata drives and all is fine again. 

Boot priority is correct, still I tried any possible combination my Bios would offer and even selecting the first ide disk manually via the runtime bios-bootmenu gives the same error. 

I want my bloody briliant boot block back, even with those extra drives.  

Its an Epox EP8-VTAI / Via KT880 Mobo. Anyone ever had a similar problem ? Strange things happen these days ...

----------

## NeddySeagoon

pactoo,

The BIOS is reordering the drives becuse its detecting the off board drives first.

Grub gets its hd0, hd1 etc from the BIOS.

You can either fix the BIOS setting (it may not be possible) or reinstall grub on the MBR of your new (hd0)

----------

## pactoo

Thanks. It seems, I'm caught in a catch 22. I can't boot with those drives, but without those drives I cannot configure grub. 

Any trick, as I do not have a CDRom in this machine, only a floppy disk ? However, there is no grub based Kernel2.6 Floppy Distribution I am aware of, is there ?

----------

## NeddySeagoon

pactoo,

Use a floppy based distro to get your box up with the drives connected than install grub on them.

There are several two floppy, systems that should do that. You may even be able to use your own root on top of a floppy kernel.

Come to think of it, a DOS boot floppy with loadlin and your kernel will probably do. you will need a minimal kernel for it all to fit unless you have a 2.88Mb floppy drive. They were never popular. You can actually spread that over two floppies if you are desperate. command.com must be in the same place (blocks) on both floppies.

----------

## pactoo

That did not word out. I managed to boot from USB, even access and chroot to my driveinsatllation, however, none of those small distributions seem to support sata. So the kernel and also grub did not detect those extra drives and all I was able to do was reinstall on hd(0), which, after booting from harddrive, led to the "Boot disk failure" again

Something fundamental must be wrong here. If grub really would use the BIOS info, I would have known about hd(1), hd(2) and hd(3) 

I have a somewhat hard time to believe that linux will not be able to boot if you add drives. Even windows manages to keep drive c, even if you add exteral drives. At least it did when I was using it and adding scsi drives. Way, way back. Maybe go back to lilo ? Since hda will stay hda, mo matter what dsx drives you add ? hda will even stay hda, if you add other ide drives ?

If this is really a grub problem, than grub has fundamental design problems

----------

## NeddySeagoon

pactoo,

Consider the boot process for a moment.

When you switch on the PC, the processor fetches the first instruction from 0xffff0 and begins to execute the BIOS.

This does POST, initialises all the BIOS extension ROMs found on cards and lastly looks for a disk drive to boot.

Grub is not even loaded yet - its on a hard drive.

If things are moving around so that grub is not found, its a BIOS issue. The BIOS is reordering the drives because the BIOS loads grub into memory

If grub loads, then it breaks, something else is wrong. SATA and IDE drives don't get mixed up by grub.

/deb/hda is always the primary PATA master.

SATA drives can start at /dev/hde od dev/sda, depending on which kernel module you use, again they dont get mixed up.

----------

## pactoo

Thanks for your explanation, even though I wasn't really able to follow. For my simple logic, when I tell the bios to boot from drive x, that drive x should automaticvally become hd(0). Additionally, the driver for the sata controller is not even part of the kernel, and no initrd here. But I got that far, that the kernel is not of any importance at this stage at all. 

However, I tried lilo and did not get any different results. So I am at peace again with grub. 

Maybe it's time to consider contacting Epox support, since, after all, the bootsector is not even found, even if I explicitly choose the drive from which to boot. 

Thats what my error message is all about. 

Nevertheless, thanks very much for your time and effort.

----------

## NeddySeagoon

pactoo,

I've googled for your

```
Epox EP8-VTAI / Via KT880
```

 motherboard to try to read the manual.

Can you check that this is correct please?

----------

## pactoo

Wow. Well, I have the manual, printed as well as pdf file and it's also available on the epox site, too. At least on http://www.epox.com.tw

This direct link may work: 

http://www.epox.com.tw/eng/support.php?ps=330&type=3

Yep, mainboard and chipset are correct, as you wrote them.

----------

## NeddySeagoon

pactoo,

I was only getting 2k/sec so it took a while.

On page 4-3 of the pdf manual, it tells you how to set the boot priority order in the BIOS.

You need to set it to 

```
Pri Master
```

to always boot from /dev/hda

----------

## pactoo

Hello Neddy,

that is exactly what I have been doing all the time. My hda is my first boot device in bios, and has alway been.  Even when using "EZ-Boot", that is pressing Esc during POST to get a bios boot menu and selecting my hprimary ide, it does not see the boot sector. That is my whole problem. 

When the sata drives are connected, my Harddisk Boot priority looks like following:

1. Pri Master: ST380011A

2. Sec Master ST380011A

3. Promise SATA

4. Bootable Addon Cards

When the sata drives are not connected, my Harddisk Boot priority looks like following:

1. Pri Master: ST380011A

2. Sec Master: ST380011A

4. Bootable Addon Cards

First Boot device is Harddisk, all other boot devices have been disabled. However, since it does not boot, I played around with those settings. 

hda and hdb are identical models. With the bootsector on /dev/hda and /boot on /dev/hdc1

----------

## NeddySeagoon

pactoo,

I have an idea but its a bit convoluted and difficult to explain. It would help if I knew how your PATA drives were partitioned, so let me sumarise what I think I know.

You have Grub stage 1 and stage 1.5 on /dev/hda and /boot somewhere on /dev/hdc. This works OK until you add a couple of SATA drives on a PCI slot card. This is unusual but not difficult. 

We don't yet know where grub breaks. It could be that the BIOS shuffels the drives about, so Grub stage 1 is not found by the BIOS. (Thats what it looks like from the error message) It could be that grub stage 1 and stage 1.5 loads but stage 2 fails because /boot has moved. Its important to try to determine that.

Two things to try. 

If you have a spare partition on /dev/hda (you could sacrifice swap for the test) put grub and /boot on the same drive and see if that works. You will need to reinstall grub so it finds the new /boot on /dev/hda. 

Install grub on /dev/hdc and point it to the /boot on /dev/hdc You should be able to boot from either drive now, until you add in your SATA drives. With boot only needing one drive now, the problem should be halved - maybe.

Why are you using a PCI SATA card. Your motherboard has two SATA interfaces. 

Thats a third thing to try - use your onboard SATA and eliminate the PCI card.

None of the above offers a fix yet - but it may uncover some pointers towards what needs to be done.

----------

## pactoo

Sure. Here is my partition table:

```

# /etc/fstab: static file system information.

#

# <fs>             <mountpoint>    <type>     <opts>            <dump/pass>

/dev/hdc1   /boot       reiserfs    noauto,noatime,notail   1 1

/dev/hdc2   /       reiserfs    defaults,noatime    0 0

/dev/hdc5   /opt       reiserfs    defaults,noatime    0 0

/dev/hdc6   /usr       reiserfs    defaults,noatime    0 0

/dev/hdc7   /var       reiserfs    defaults,noatime    0 0

/dev/hdc8   /home       reiserfs    defaults,noatime    0 0

/dev/hdc10 /tmp       reiserfs    defaults,noatime,nolog    0 0

none          /proc       proc       defaults       0 0

none          /dev/shm    tmpfs       defaults       0 0

#none        /proc/bus/usb    usbfs       defaults       0 0

/dev/hdc11  none       swap       sw          0 0

/dev/hda5   /mnt/exchg    vfat       noauto,gid=users,codepage=850,umask=0000,utf8,iocharset=utf8    0 0

/dev/hdd     /mnt/dvd-ram    udf       noauto,rw,users,gid=users,umask=0000,iocharset=utf8 0 0

/dev/hda6   /data       xfs      defaults,noatime    0 0

/dev/sda1   /mnt/usb    msdos       noauto,users,gid=users,codepage=850,umask=0007

# Done by autofs now:

#

#/dev/cdroms/cdrom0   /mnt/cdrom   iso9660      noauto,ro,users      0 0

#/dev/fd0      /mnt/floppy   auto      noauto         0 0

```

Besides /dev/hda[56], /dev/hda is populated with an ufs filesystem from a now defunct FreeBSD installation. Not sure how I fragged it, however there is still some valuable data on that. So definitely no messing with this one. Isnt it ironic btw. that one has to use an Microsoft file system to exchange data between two free operating systems ? The FreeBSD people warn about using their ext2 driver while the ufs in linux is read only. Just a side note 

The big picture: I am building a new system and all that I am waiting for is some sort of 2005.0 amd64 stage available for a clean no-multilib install and being able to handle my softraid. This is where this machine comes to play. 

Since I havent been able to find any useful mdadm  documentation, I would like to set up a softraid5 on this Epox machine, populate it with some random data and migrate it to my new machine. Seeing, how it behaves, when the drives are associated with different devicenodes and what steps are needed to get it up and running again without data loss.  

Since we are talking about three drives, I need an external card, as the board only has two SATA controllers. 

However, for testing purposes  I  connected a SATA drive to one of the internal SATA controllers. And: the system boots. Well, if I put the sata_via module into modules.autoload.d, the kernel will hang, when I load the module after booting I get an emergency warning that IRQ11 has been disabled and cancelled formatting that drive after ~12h with a hard reset, but the system comes up. 

Not sure, wether this is an kernel or hardrive issue. Will test a different harddrive soon, however, the gentoo livcd on my other machine for amd64 hangs during boot, too, while probing sata drives when invoked with doscsi.

Depending on the experince with the other drive this will be an extra thread. Dunno about the behaviour with the extra promise controller, as the box doesnt come up. Thats after all, why we are here  :Wink: 

Will test the MBR -> /dev/hdc thing later, have been a bit busy lately

----------

