On Thursday 28 May 2009 15:58:04 Lorenzo Perone wrote:
I tried hard... but without success ;(
the result is, when choosing the disk with the zfs boot
sectors in it (in my case F5, which goes to ad6), the kernel
is not found. the console shows:
forth not found
definitions not found
only not found
(the above repeated several times)
can't load 'kernel'
and I get thrown to the loader prompt.
lsdev does not show any ZFS devices.
Strange thing: if I boot from the other disk, F1, which is my
ad4 containing the normal ufs system I used to make up the other
one, and escape to the loader prompt, lsdev actually sees the
zpool which is on the other disk, and shows:
I tried booting with boot zfs:tank or zfs:tank:/boot/kernel/kernel,
but there I get the panic: free: guard1 fail message.
(would boot zfs:tank:/boot/kernel/kernel be correct, anyways?)
Sure I'm doing something wrong, but what...? Is it a problem that
the pool is made out of the second disk only (ad6)?
Here are my details (note: latest stable and biosdisk.c merged
with changes shown in r185095. no problems in buildworld/kernel):
Machine: p4 4GHz 4 GB RAM (i386)
Note: the pool has actually a different name (heidi
instead of tank, if this can be of any relevance...),
just using tank here as it's one of the conventions...
mount (just to show my starting situation)
/dev/mirror/gm0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/mirror/gm0s1e on /tmp (ufs, local, soft-updates)
/dev/mirror/gm0s1f on /usr (ufs, local, soft-updates)
/dev/mirror/gm0s1d on /var (ufs, local, soft-updates)
mirror/gm0 DEGRADED ad4
(ad6 used to be the second disk...)
echo 'LOADER_ZFS_SUPPORT=yes' /etc/make.conf
make buildworld make buildkernel KERNCONF=HEIDI
make installkernel KERNCONF=HEIDI
shutdown -r now
dd if=/dev/zero of=/dev/ad6 bs=512 count=32
zpool create tank ad6
zfs create tank/usr
zfs create tank/var
zfs create -V 4gb tank/swap
zfs set org.freebsd:swap=on tank/swap
zpool set bootfs=tank tank
rsync -avx / /tank
rsync -avx /usr/ /tank/usr
rsync -avx /var/ /tank/var
make installkernel KERNCONF=HEIDI DESTDIR=/tank
zpool export tank
dd if=/boot/zfsboot of=/dev/ad6 bs=512 count=1
dd if=/boot/zfsboot of=/dev/ad6 bs=512 skip=1 seek=1024
zpool import tank
zfs set mountpoint=legacy tank
zfs set mountpoint=/usr tank/usr
zfs set mountpoint=/var tank/var
shutdown -r now ...
at the 'mbr prompt' I pressed F5 (the second disk, ad6)
.. as written above, loader gets loaded (at this stage
I suppose it's the stuff dd't after block 1024?),
but kernel not found.
(among other things...):
# Device Mountpoint FStype Options DumpPass#
tank / zfs rw 0 0
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
any help is welcome... don't know where to go from here right now.
BTW: I can't stop thanking the team for the incredible
pace at which bugs are fixed these days!
On 26.05.2009, at 18:42, George Hartzell wrote:
Andriy Gapon writes:
on 26/05/2009 19:21 George Hartzell said the following:
Dmitry Morozovsky writes:
On Tue, 26 May 2009, Mickael MAILLOT wrote:
MM i prefere use zfsboot boot sector, an example is better than
a long talk:
MM $ zpool create tank mirror ad4 ad6
MM $ zpool export tank
MM $ dd if=/boot/zfsboot of=/dev/ad4 bs=512 count=1
MM $ dd if=/boot/zfsboot of=/dev/ad6 bs=512 count=1
MM $ dd if=/boot/zfsboot of=/dev/ad4 bs=512 skeep=1 seek=1024
MM $ dd if=/boot/zfsboot of=/dev/ad6 bs=512 skeep=1 seek=1024
s/skeep/skip/ ? ;-)
What is the reason for copying zfsboot one bit at a time, as opposed
dd if=/boot/zfsboot of=/dev/ad4 bs=512 count=2
seek=1024 for the second part? and no 'count=1' for it? :-)
[Just guessing] Apparently the first block of zfsboot is some form
of MBR and the
rest is zfs-specific code that goes to magical sector 1024.
Ok, I managed to read the argument to seek as one block, apparently
my coffee hasn't hit yet.
I'm still confused about the two parts of zfsboot and what's magical
about seeking to 1024.
I obtained the same result with FreeBSD 7 stable.
I installed first a new system in a scsi disk with ufs
I put LOADER_ZFS_SUPPORT=yes in /etc/make.conf, updated src and made
buildworld without trouble.
I built a new kernel, installed it and installed new world.
Until here, that's all right
Then, I tried with a PATA hard drive, ad2
I resetted the mbr and the partition table with dd if=/dev/zero