I'm trying to install CURRENT a single drive ZFS on root setup using
the guide located here:
http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot
This is on an amd64-based Acer 5516 laptop. I'm able to complete the
installation, however, when I boot, the system stops at the boot
loader with several "error 1 lba xxx" (where xxx is some large number)
errors and the "ZFS: i/o error - all block copies unavailable" error.
When I issue the "status" command at the boot loader, I see only the
GPT partition and the ZFS pool. Should I also see any physical
devices? I strongly suspect that the BIOS on this laptop is up to some
sort of chicanery but it's hard to say so definitively since I can
install and boot to a regular UFS-based FreeBSD installation. I've
confirmed this on 8.0-RELEASE and 9.0-CURRENT. I've also made sure to
delete any UFS and GPT partitions as well as any ZFS pools before
installing to be sure that I'm installing on a clean disk. Also, I've
tried building the bootloader (even though the guide said it's
depreciated as of 8.0-STABLE and 9.0-CURRENT) as well as installing
the boot blocks, both to no avail.
Any ideas and/or suggestions would greatly be appreciated!
Thanks,
Chris
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"
On 2010/02/16 18:03, Chris wrote:
> Hi,
>
> I'm trying to install CURRENT a single drive ZFS on root setup using
> the guide located here:
>
> http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot
>
> This is on an amd64-based Acer 5516 laptop. I'm able to complete the
> installation, however, when I boot, the system stops at the boot
> loader with several "error 1 lba xxx" (where xxx is some large number)
> errors and the "ZFS: i/o error - all block copies unavailable" error.
> When I issue the "status" command at the boot loader, I see only the
> GPT partition and the ZFS pool. Should I also see any physical
> devices? I strongly suspect that the BIOS on this laptop is up to some
> sort of chicanery but it's hard to say so definitively since I can
> install and boot to a regular UFS-based FreeBSD installation. I've
> confirmed this on 8.0-RELEASE and 9.0-CURRENT. I've also made sure to
> delete any UFS and GPT partitions as well as any ZFS pools before
> installing to be sure that I'm installing on a clean disk. Also, I've
> tried building the bootloader (even though the guide said it's
> depreciated as of 8.0-STABLE and 9.0-CURRENT) as well as installing
> the boot blocks, both to no avail.
>
> Any ideas and/or suggestions would greatly be appreciated!
Just a wild guess... Did you copied the /boot/zfs folder to the target
file system?
Cheers,
- --
Xin LI <del...@delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)
iQEcBAEBAgAGBQJLe09zAAoJEATO+BI/yjfBZhsH/jX6l3DedCM8EYmsGftpunqL
4FtxmgDMEXd7jvmNmFdHVVf3vrctGB4ldcr8hriNkMvvEy3fuykEfJkBmY3sIhQ0
A4iXWUH6QIiiaakjOocGhk58r3MisUS4u0qhpmSdyEuH6CHF3SBLJubUBmpEQ89W
oilYch+qlkwNZqoGKP0gxMnY9DEttt9hlUo2HwLIBE1ApX8bNyNp18iHd2v61eSD
9elluEokjHqQqD6II7z+rSefODs9AEna+wx7d/BZLEVZMcfDarYPiajS0b0kBFXz
1LRlM8Uxz5YWQkx2irhtcC41aUwf55CnY2MbZ+nobTV+pgXrMkIUvphiplPKMvU=
=1gQ3
-----END PGP SIGNATURE-----
The only thing I copied over was the zpool.cache file, as per the
wiki. Should I have copied over the entire /boot/zfs folder?
Thanks,
Chris
I did, as part of step 7 in section 1:
7. Create ZFS Pool zroot
Fixit# mkdir /boot/zfs
Fixit# zpool create zroot /dev/gpt/disk0
Fixit# zpool set bootfs=zroot zroot
Thanks,
Chris
> On Tue, Feb 16, 2010 at 9:49 PM, Chris<behrne...@gmail.com> wrote:
>> Scot,
>>
If you're following the wiki, then you're using GPT partitions and geom
labels, yes? Have you, by chance, tried the install with different GPT
partition sizes, indexes, or labels?
The reason I ask is I recently had an 8.0-STABLE box on which I
installed ZFS root on RAIDZ1, then I decided to change my GPT and
re-install. I could not get it to boot from ZFS until I dd'd *all* the
drives (completely, not just the first few MB), and started the entire
installation from scratch.
--
Regards,
Doug
Haven't tried with different GPT parameters so I guess I could try
that. It's just odd since that same guide worked for me without a
hitch on my desktop machine. I'll try that as well as dd'ing the drive
completely.
Thanks,
Chris
-----------------------------
BTX loader 1.00 BTX version is 1.02
Consoles: internal video/keyboard
BIOS drive C: is disk0
BIOS 631kB/1832448kB available memory
FreeBSD/i386 bootstrap loader, Revision 1.0
(root@, Wed Feb 17 10:27:40 UTC 2010)
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0x8924d8
-----------------------------
And that's as far as it gets. Per the handbook, that appears to be
stuck somewhere between boot2 and /boot/loader. To me, it looks like
it's having a problem loading the kernel. As far as my suspicion of
the BIOS not correctly reporting the drives, it looks to me like the
bootloader is seeing them so maybe that can be ruled out. I'm glad to
see it get farther this time but this is still weird.
Any ideas on this one?
Thanks,
Chris
> Ok, went back to my 8.0-RELEASE memstick image and after playing with
> the GPT settings a little and dd'ing all zeros to the disk first, I
> get a little farther this time. I'm seeing the following:
>
> -----------------------------
> BTX loader 1.00 BTX version is 1.02
> Consoles: internal video/keyboard
> BIOS drive C: is disk0
> BIOS 631kB/1832448kB available memory
>
> FreeBSD/i386 bootstrap loader, Revision 1.0
> (root@, Wed Feb 17 10:27:40 UTC 2010)
> Loading /boot/defaults/loader.conf
> /boot/kernel/kernel text=0x8924d8
> -----------------------------
>
> And that's as far as it gets. Per the handbook, that appears to be
> stuck somewhere between boot2 and /boot/loader. To me, it looks like
> it's having a problem loading the kernel. As far as my suspicion of
> the BIOS not correctly reporting the drives, it looks to me like the
> bootloader is seeing them so maybe that can be ruled out. I'm glad to
> see it get farther this time but this is still weird.
>
> Any ideas on this one?
>
IIRC the 8.0-RELEASE gptzfsboot/loader lacked some bugfixes. Try using
gptzfsboot and zfsloader from -STABLE.
Matt
> Shouldn't those bug fixes have been included in CURRENT? If so, my
> original post shows the problems there. I've also tried using the
> 8.0-STABLE snapshot dvd1 and got the same errors I got when using
> CURRENT. Again, not sure why this worked on my desktop box and is
> failing on the laptop. I'll try copying over gptzfsboot and zfsloader
> from my 8.0-STABLE machine.
>
My bad, I wasn't reading carefully. -CURRENT has fixes for all the problems
I know of.
I use gptzfsboot on my AMD64 (current) machine all the time and also on
my laptop. I am not sure if this will cause the problem you are seeing but I
know I ran into a lot of trouble depending on what type of pool I was
creating.
I believe this is correct, and if I am not than I apologise in advance,
but....
If you are trying to boot off a linear type pool (A single disk or a
mirror) your bootable filing system has to be a zfs filing system beneath the
root pool (IE: zroot/boot). If you are trying to boot off a zraid pool, your
bootable filing system must be the root filing system of the pool (IE: zroot)
You must also include the appropriate declaration in the
/boot/loader.conf file:
(for a zraid pool)
zfs_load="YES"
vfs.root.mountfrom="zfs:zpool"
(for a linear type)
zfs_load="YES"
vfs.root.mountfrom="zfs:zpool/root"
If I try any other method, zboot explodes in a myriad of different ways.
I hope this helps
Peg
On Wednesday 17 February 2010 02:49:56 Chris wrote:
> Scot,
>
> I did, as part of step 7 in section 1:
>
> 7. Create ZFS Pool zroot
>
> Fixit# mkdir /boot/zfs
> Fixit# zpool create zroot /dev/gpt/disk0
> Fixit# zpool set bootfs=zroot zroot
Thanks for the tip. I'll give it a shot. If it is the case, then the
RootOnZFS wiki guides need to be updated to account for that. They all
currently say to use vfs.root.mountfrom="zfs:zroot" in loader.conf
Thanks,
Chris
On all my machines, I have never used the /dev/gpt/ device.. I have
always used the absolute name /dev/ada0p3, etc..
Peg
Not sure why your zboot explodes, but I use a single disk and only use
the following in /boot/loader.conf:
zfs_load="YES"
vfs.root.mountfrom="zfs:zpool"
it should work with either zfs:zpool or zfs:zpool/root.
Scot
It seems to me that there's a difference in the way the ZFS-enabled
bootloader sees the drives that the BIOS reports as opposed to the
non-ZFS-enabled bootloader. Anyone have any ideas on that? I checked
for any BIOS updates but it looks like I'm current. It sure would be
nice to not have to select my hard drive each time.
Thanks,
Chris
> As a follow-up to this, I rebuilt world and kernel and updated my
> system to the latest 8.0-STABLE. I'm still seeing the problem and I
> can still get around it by choosing my hard drive from the F12 boot
> menu. I did notice that the bootloader now says it's ZFS enabled
> whereas it didn't while on 8.0-RELEASE. I also updated the bootcode
> with: "gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 adX"
> after installing world. No help there.
>
> It seems to me that there's a difference in the way the ZFS-enabled
> bootloader sees the drives that the BIOS reports as opposed to the
> non-ZFS-enabled bootloader. Anyone have any ideas on that? I checked
> for any BIOS updates but it looks like I'm current. It sure would be
> nice to not have to select my hard drive each time.
>
Can you paste the exact error? Are you getting something like:
error 1: lba 32
error 1: lba 1
When I've seen the above sequence, it was due to a stack overflow (IIRC),
with the result that the loader would start a second time and barf out these
errors.
The "large number" in the error might give us a clue as to what's going on.
If the number is really large, it might be an indication that your BIOS
doesn't reliably read past a certain threshold. ZFS writes a sort of label
at the beginning and end of its drives; perhaps the loader is trying to read
the label at the end of the disk and is failing (I don't recall whether it
tries to read both labels).
Matt
Matt,
Here's exactly what I'm seeing after POST:
error 1 lba 179552888
error 1 lba 59243926
ZFS: i/o error - all block copies unavailable
FreeBSD/i386 boot
Default: zroot:/boot/kernel/kernel
boot:
error 1 lba 179552888
error 1 lba 59243926
ZFS: i/o error - all block copies unavailable
FreeBSD/i386 boot
Default: zroot:/boot/kernel/kernel
boot:
It may or may not be related, but I notice that while in this state my
hard drive activity light stays on.
Thanks,
Chris
> > Can you paste the exact error? Are you getting something like:
> > error 1: lba 32
> > error 1: lba 1
> > When I've seen the above sequence, it was due to a stack overflow (IIRC),
> > with the result that the loader would start a second time and barf out
> these
> > errors.
> > The "large number" in the error might give us a clue as to what's going
> on.
> > If the number is really large, it might be an indication that your BIOS
> > doesn't reliably read past a certain threshold. ZFS writes a sort of
> label
> > at the beginning and end of its drives; perhaps the loader is trying to
> read
> > the label at the end of the disk and is failing (I don't recall whether
> it
> > tries to read both labels).
> > Matt
>
> Matt,
>
> Here's exactly what I'm seeing after POST:
>
> error 1 lba 179552888
> error 1 lba 59243926
> ZFS: i/o error - all block copies unavailable
>
Hmm, both those LBAs fit in 28 bits. With a modern BIOS I wouldn't expect
problems with those LBAs.
It may or may not be related, but I notice that while in this state my
> hard drive activity light stays on.
>
I think you're probably right about this being a BIOS problem.
Does the gptzfsboot 'status' command show the same output when you run it
with and without the F12 workaround? Here's what I see from FreeBSD and from
gptzfsboot:
[root ~]# zpool status
pool: glamdring
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
glamdring ONLINE 0 0 0
raidz2 ONLINE 0 0 0
label/glamdring-0 ONLINE 0 0 0
label/glamdring-1 ONLINE 0 0 0
label/glamdring-2 ONLINE 0 0 0
label/glamdring-3 ONLINE 0 0 0
label/glamdring-4 ONLINE 0 0 0
label/glamdring-5 ONLINE 0 0 0
errors: No known data errors
..
/boot.config: -Dh
Default: glamdring:/boot/zfsloader
boot: status pool: glamdring
config:
NAME STATE
glamdring ONLINE
raidz2 ONLINE
label/glamdring-0 ONLINE
label/glamdring-1 ONLINE
label/glamdring-2 ONLINE
label/glamdring-3 ONLINE
label/glamdring-4 ONLINE
label/glamdring-5 ONLINE
Matt
I'm seeing some difference in the bootloader output between using the
F12 workaround or not:
F12 workaround mode:
FreeBSD/i386 boot
Default: zroot:/boot/zfsloader
boot: status
config:
NAME STATE
zroot ONLINE
gpt/disk0 ONLINE
No F12 key pressed:
FreeBSD/i386 boot
Default: zroot:/boot/kernel/kernel
config:
NAME STATE
zroot ONLINE
gpt/disk0 ONLINE
What's up with the differences between the Default boot setting?
Sorry for the spam but I'm seeing something else very interesting....
If I boot to Good Mode (F12) and break to the "boot:" prompt, the
system boots if I type /boot/zfsloader. However, if I type
/boot/kernel/kernel (as was seen in the Default setting when I didn't
hit F12), I get a crash that looks like the following:
-----------------------------------------
FreeBSD/i386 boot
Default: zroot:/boot/zfsloader
boot: /boot/kernel/kernel
int=00000006 err=00000000 efl=00010882 eip=00200000
eax=0018b070 ebx=ed7706bd ecx=c72e2ca8 edx=00000000
esi=00000040 edi=000929d0 ebp=0009279c esp=00009401
cs=0008 ds=0010 es=0010 fs=0010 gs=0010 ss=0010
cs:eip=ff ff ff ff ff ff ff ff 7f-00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
ss:esp=36 80 0d 07 90 00 00 01-e9 c4 fc ff ff aa ac 84
c0 0f 84 86 00 00 00 a8-80 74 f2 88 c5 b0 3d aa
BTX halted
-----------------------------------------
McCoy: "He's dead, Jim."
Kirk: "Bones, do something!"
I'm not sure how well we support booting a kernel from boot2 anymore, much
less from zfsboot. Using /boot/loader (or /boot/zfsloader) is probably the
only tested (and realistically supported) case.
--
John Baldwin
Yeah, the last time I tried this it didn't work, but I didn't hunt down why.
Matt
Does F12 enable PXE booting or some such? I can't really tell from your e-
mails exactly what the difference in the two cases are. The BIOS doesn't
really tell the boot code much of anything. It just loads the first sector of
the disk into RAM at 0x7c00, puts the BIOS drive number (typically 0x80) into
the %dl register, and starts executing the code it just loaded. Unless
hitting F12 is somehow booting from a different physical drive (and thus
either loading different boot code or passing a different value of %dl to
another copy of the same boot code), it shouldn't make any difference.
--
John Baldwin
The only options I have when I press F12 are to either boot from my
hard drive or to boot from my optical drive. Is there
any way to more verbosely see what is happening at the bootloader level?
>I can't really tell from your e-mails exactly what the difference in the two cases are. �The BIOS doesn't
I guess that F12 that you describe is handled by BIOS.
Do you have other HDDs in this system?
What is your default boot order (configured in BIOS)?
--
Andriy Gapon
No. So it sounds like F12 pops up some sort of boot menu, and that in the
broken case you just let the machine boot off of the disk normally?
Right. Upon powering on, to get the system to boot normally, I hit the
F12 key which brings up a box that lets me choose either my hard disk
or my optical drive to boot. When I do not hit F12, I get the LBA
errors and the "ZFS: i/o error - all block copies unavailable" error
shown in previous posts to this thread. If I boot into the non-F12
broken state and leave the system alone, it appears to try and boot
twice and gets the same LBA errors and the same ZFS error.
Again, if I install FreeBSD off an installation CD and use sysinstall
to install a typical UFS-based system it boots without any trouble at
all, F12 or not, leading me to believe that there's some sort of
difference between the plain bootloader and the ZFS-enabled bootloader
with respect to the way they interact with the BIOS.
Another oddity I noticed is that if I change the SATA mode in the BIOS
to "IDE Native" mode, the hard drive activity light stays on, even
when the system is booted and is sitting idle. If I change it to
"AHCI", I do not see this. I doubt this has any relation to ZFS, but
it was just an interesting observation.