Date: Thu, 28 May 2009 19:46:38 +0000 From: Mickael MAILLOT <mickael.maillot@gmail.com> To: Lorenzo Perone <lopez.on.the.lists@yellowspace.net> Cc: FreeBSD Stable Mailing List <freebsd-stable@freebsd.org> Subject: Re: ZFS booting without partitions (was: ZFS boot on zfs mirror) Message-ID: <ea7b7b810905281246l26e798a1h65100635c1b2cb5b@mail.gmail.com> In-Reply-To: <A1B19FAF-B574-484F-9434-17F5AF754B88@yellowspace.net> References: <29579856-69F7-4CDC-A52A-B414A40180ED@yellowspace.net> <4A1B0B4F.1020106@h3q.com> <ea7b7b810905260226g29e8cbf5ic75a59b979f6cd42@mail.gmail.com> <alpine.BSF.2.00.0905261353140.8940@woozle.rinet.ru> <18972.5870.795005.186542@already.dhcp.gene.com> <4A1C18CC.7080902@icyb.net.ua> <18972.7173.216763.407615@already.dhcp.gene.com> <A1B19FAF-B574-484F-9434-17F5AF754B88@yellowspace.net>
next in thread | previous in thread | raw e-mail | index | archive | help
hi, did you erase gmirror meta ? (on the last sector) with: gmirror clear ad6 2009/5/28 Lorenzo Perone <lopez.on.the.lists@yellowspace.net>: > Hi, > > 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: > zfs0: tank > > 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): > > <snip> > > 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) > > gmirror status > =A0 =A0 =A0Name =A0 =A0Status =A0Components > mirror/gm0 =A0DEGRADED =A0ad4 > (ad6 used to be the second disk...) > > echo 'LOADER_ZFS_SUPPORT=3Dyes' >> /etc/make.conf > > cd /usr/src > make buildworld && make buildkernel KERNCONF=3DHEIDI > make installkernel KERNCONF=3DHEIDI > mergemaster > make installworld > shutdown -r now > > dd if=3D/dev/zero of=3D/dev/ad6 bs=3D512 count=3D32 > > zpool create tank ad6 > zfs create tank/usr > zfs create tank/var > zfs create -V 4gb tank/swap > zfs set org.freebsd:swap=3Don tank/swap > zpool set bootfs=3Dtank tank > > rsync -avx / /tank > rsync -avx /usr/ /tank/usr > rsync -avx /var/ /tank/var > cd /usr/src > make installkernel KERNCONF=3DHEIDI DESTDIR=3D/tank > > zpool export tank > > dd if=3D/boot/zfsboot of=3D/dev/ad6 bs=3D512 count=3D1 > dd if=3D/boot/zfsboot of=3D/dev/ad6 bs=3D512 skip=3D1 seek=3D1024 > > zpool import tank > > zfs set mountpoint=3Dlegacy tank > zfs set mountpoint=3D/usr tank/usr > zfs set mountpoint=3D/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. > > /usr/src/sys/i386/conf/HEIDI: > (among other things...): > options KVA_PAGES=3D512 > > (/tank)/boot/loader.conf: > vm.kmem_size=3D"1024M" > vm.kmem_size_max=3D"1024M" > vfs.zfs.arc_max=3D"128M" > vfs.zfs.vdev.cache.size=3D"8M" > vfs.root.mountfrom=3D"zfs:tank" > > (/tank)/etc/fstab: > # Device =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Mountpoint =A0 =A0 =A0FStype =A0O= ptions =A0 =A0 =A0 =A0 Dump > =A0Pass# > tank =A0 =A0 =A0 =A0 =A0 =A0/ =A0 =A0 =A0 =A0 =A0 =A0 =A0 zfs =A0 =A0 rw = =A0 =A0 =A0 =A0 =A0 =A0 =A00 =A0 =A0 =A0 0 > /dev/acd0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /cdrom =A0 =A0 =A0 =A0 =A0cd9660 = =A0ro,noauto =A0 =A0 =A0 0 =A0 =A0 =A0 0 > > </snap> > > 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! > > > Regards, > > Lorenzo > > > > 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> Hi, >>>>> MM> >>>>> MM> i prefere use zfsboot boot sector, an example is better than a lo= ng >>>>> talk: >>>>> MM> >>>>> MM> $ zpool create tank mirror ad4 ad6 >>>>> MM> $ zpool export tank >>>>> MM> $ dd if=3D/boot/zfsboot of=3D/dev/ad4 bs=3D512 count=3D1 >>>>> MM> $ dd if=3D/boot/zfsboot of=3D/dev/ad6 bs=3D512 count=3D1 >>>>> MM> $ dd if=3D/boot/zfsboot of=3D/dev/ad4 bs=3D512 skeep=3D1 =A0seek= =3D1024 >>>>> MM> $ dd if=3D/boot/zfsboot of=3D/dev/ad6 bs=3D512 skeep=3D1 =A0seek= =3D1024 >>>>> >>>>> s/skeep/skip/ ? ;-) >>>> >>>> What is the reason for copying zfsboot one bit at a time, as opposed >>>> to >>>> >>>> =A0dd if=3D/boot/zfsboot of=3D/dev/ad4 bs=3D512 count=3D2 >>> >>> seek=3D1024 for the second part? and no 'count=3D1' for it? :-) >>> >>> [Just guessing] Apparently the first block of zfsboot is some form of M= BR >>> 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. >> >> g. >> >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org= " > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ea7b7b810905281246l26e798a1h65100635c1b2cb5b>