# FreeBSD-8.0 install won't boot ZFS raid-z



## ffarn (May 28, 2010)

I followed the procedure here for booting 8.0-RELEASE from raid-Z.  The loader fails to find the kernel:

```
BTX loader 1.00  BTX version 1.02
Consoles: internal video/keyboard
BIOS drive A: is disk0
BIOS 637kb/1047488kB available memory

FreeBSD/i386 bootstrap loader, Revision 1.1
(root@, Thu May 27 04:13:07 UTC 2010)
Can't work out which disk we are booting from.
Guessed BIOS device 0x80 not found by probes, defaulting to disk0:

can't load 'kernel'

Type '?' for a list of commands, 'help' for more detailed help.
OK
```

If I do an lsdev, it seems unable to find any of my disks.  There is no floppy installed on this system.

```
OK [color="Blue"]lsdev[/color]
cd devices:
disk devices:
    disk0:    BIOS drive A:
pxe devices:
zfs devices:
OK [color="Blue"]ls[/color]
open '/' failed: input/output error
OK [color="Blue"]lsmod[/color]
OK
```

When I boot the system from the install disk it recognizes the on board disks as ad4, ad6, ad8, ad10, ad12, and ad14.  These are all SATA disks with GPT.

Any ideas?  Please help!

Thanks!


----------



## ffarn (May 29, 2010)

So... does anyone have a better idea than upgrading to STABLE?  I doubt this is a SATA driver issue, the 8.0-RELEASE install disk (memstick) has no problem finding any of the disks or even mounting the raidz, but what else can I try?  I suppose I could just copy the boot loader from STABLE by running


```
Fixit# gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ad6
Fixit# cp /mnt2/boot/*loader /zroot/boot
```

from the 8.0-STABLE-201005 disk.  Is that enough?


----------



## ffarn (May 29, 2010)

Interestingly enough, cmp showed no difference between zfsloader from the 8.1-BETA distribution and the loader I had already built based on this page.  Not surprisingly, using pmbr, gptzfsboot, and zfsloader from the new distribution didn't change anything.

Still looking for ideas for how to even debug this thing.


----------



## ffarn (May 29, 2010)

A difference, anyway.

I had an MBR disk mixed in among the GPT disks.  When I converted it to GPT and resilvered I got pretty much the same behavior as above.  But then when I used the loaders from the 8.1-BETA distribution (see above) I get:

```
error 1 lba 32
error 1 lba 1
No ZFS pools located, can't boot
```

Is that a step forward or backward?


----------



## ffarn (Jun 1, 2010)

*zfsloader device probe fails*

I have tracked the problem to zfsloader and the device probe.

The boot process on my machine is set to go pmbr->gptzfsboot->zfsloader.  (Actually, on 8.0-RELEASE it goes to loader, which I have recompiled to include zfs support.)

If I interrupt gptzfsboot (by pressing any key during the \|/- spinner) and type ?, I get a listing of my root directory, which is a zfs filesystem.  gptzfsboot seems to be working.  It reads and loads the correct loader.

Once zfsloader loads, however, it fails to identify any devices.  So it looks like the device probe in the loader is somehow failing.

1) Why would zfsloader have a problem identifying the zfs pool when gptzfsboot doesn't?  

2) Should lsdev in the zfsloader list the disks attached to my system (/dev/ad4, /dev/ad6, /dev/ad8, ...) in addition to the zfs devices?  Currently it isn't doing either.

3) One disk out of the pool, the smallest, only has one zfs partition on it that goes from the beginning (32) to the end of the disk.  Is this problematic?  Some pages say it can be problematic but they don't explain.

Thanks.


----------

