On Tue, 26 May 2009 19:57:03 +0300, Andriy Gapon <a...@icyb.net.ua> wrote: > on 26/05/2009 19:42 George Hartzell said the following: >> I'm still confused about the two parts of zfsboot and what's magical >> about seeking to 1024. > > Can't help with answer to this, but cc-ing the one who can (I think). > I am interested too :-)
This is due to the primitive DOS boot sequence. Basically the BIOS loads the first sector of the partition and executes it. For zfsboot, that is the first 512 bytes of /boot/zfsboot. The next stage of the bootstrap is tucked away in a convenient hole in the ZFS on-disk formwat which is located just after the ZFS metadata - this is the seek=1024 part. The first 512 byte part is a tiny assembler program that loads the rest into memory and executes it. The second part is large enough and smart enough to understand the ZFS filesystem format directly and it loads /boot/loader directly from the filesystem and transfers control to that. The third stage (/boot/loader) is what puts up the boot menu and loads the kernel etc. _______________________________________________ firstname.lastname@example.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"