Kugutsumen
2007-Sep-28 11:17 UTC
[zfs-discuss] ZFS Boot Won''t work with a straight or mirror zfsroot
Using build 70, I followed the zfsboot instructions at http:// www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/ to the letter. I tried first with a mirror zfsroot, when I try to boot to zfsboot the screen is flooded with "init(1M) exited on fatal signal 9" Than I tried with a simple zfs pool (not mirrored) and it just reboots right away. If I try to setup grub manually, it has no problem in both cases finding the root_archive, etc...: grub> root (hd0,0,a) Filesystem type is zfs, partition type 0xbf grub> /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS loading ''platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS cpu: ''AuthenticAMD'' family 15 model 47 step 0 [BIOS accepted mixed-mode target setting!] [Multiboot-kluge, loadaddr=0xbffe38, text-and-data=0x161958, bss=0x0, entry=0xc00000] ''/platform/i86pc/kernel/amd64/unix -B zfs-bootfs=rootpool/21'' is loaded grub> boot Any idea what I am doing wrong? Thanks and regards Kugutsumen .... This is everything I did: # root is about 350 megs ... so it should fit nicely on our flash disk. # let''s make separate partition for /, /var, /opt, /usr and /export/home # Later we''ll move / to the separate disk (in this case a zfs mirror pool) # and we will create a raidz2 pool for /var, /opt, /usr and /export/ home... so we won''t have to worry much about the size # of these volumes. # finally we''ll create a zvol for swap this machine has really a lot of ram so I don''t really worry about swapping. # So we Modify c0t0d0... and create: # 0 / 1024M # 1 swap 518M # 2 /usr 10240M # 3 /var 10240M # 4 /opt 10240M # 7 /export/home ... whatever is left formatted my flashdisks with 2 identical unamed slices (s0) of 969M Installed everything on that temporary install disk (c0t0d0) zpool create -f datapool raidz2 /dev/dsk/c4d0 /dev/dsk/c5d0 /dev/ dsk/c6d0 /dev/dsk/c7d0 zfs create datapool/usr zfs create datapool/opt zfs create datapool/var zfs create datapool/home zfs set mountpoint=legacy datapool/usr zfs set mountpoint=legacy datapool/opt zfs set mountpoint=legacy datapool/var zfs set mountpoint=legacy datapool/home zfs create -V 2g datapool/swap # http://www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/ zpool create -f rootpool c1t0d0s0 zfs create rootpool/rootfs zfs set mountpoint=legacy rootpool/rootfs mkdir /zfsroot mount -F zfs rootpool/rootfs /zfsroot cd /zfsroot ; mkdir -p usr opt var home export/home mount -F zfs datapool/usr /zfsroot/usr mount -F zfs datapool/opt /zfsroot/opt mount -F zfs datapool/var /zfsroot/var mount -F zfs datapool/home /zfsroot/export/home Added the following to /etc/vfstab rootpool/rootfs - /zfsroot zfs - yes - datapool/usr - /zfsroot/usr zfs - yes - datapool/var - /zfsroot/var zfs - yes - datapool/opt - /zfsroot/opt zfs - yes - datapool/home - /zfsroot/export/home zfs - yes - /dev/zvol/dsk/datapool/swap - - swap - no - cd / ; find . -xdev -depth -print | cpio -pvdm /zfsroot cd / ; find usr -xdev -depth -print | cpio -pvdm /zfsroot cd / ; find var -xdev -depth -print | cpio -pvdm /zfsroot cd / ; find opt -xdev -depth -print | cpio -pvdm /zfsroot cd / ; find export/home -xdev -depth -print | cpio -pvdm /zfsroot # ran this script: http://www.opensolaris.org/os/community/zfs/boot/ zfsboot-manual/create_dirs/ mount -F lofs -o nosub / /mnt (cd /mnt; tar cvf - devices dev ) | (cd /zfsroot; tar xvf -) umount /mnt # edit /zfsroot/etc/vfstab zpool set bootfs=rootpool/rootfs rootpool echo etc/zfs/zpool.cache >>/zfsroot/boot/solaris/filelist.ramdisk /usr/sbin/bootadm update-archive -R /zfsroot mkdir -p /rootpool/boot/grub # Since we are using a mirror .. we need grub on both disk mbr # also disable splash since it will not work well with mirror setup cat >/rootpool/boot/grub/menu.lst default 0 fallback 1 title Solaris ZFS mirror 1 root (hd0,0,a) bootfs rootpool/rootfs kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot_archive title Solaris ZFS mirror 2 root (hd1,0,a) bootfs rootpool/rootfs kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot_archive title Solaris Failsafe kernel /boot/platform/i86pc/kernel/unix -B console=ttya module /boot/x86.miniroot # install grub on both harddisk installgrub /zfsroot/boot/grub/stage1 /zfsroot/boot/grub/stage2 /dev/ rdsk/c1t0d0s0 installgrub /zfsroot/boot/grub/stage1 /zfsroot/boot/grub/stage2 /dev/ rdsk/c2t0d0s0 swap -a /dev/zvol/dsk/datapool/swap
Kugutsumen
2007-Sep-28 13:38 UTC
[zfs-discuss] ZFS Boot Won''t work with a straight or mirror zfsroot
I just tried again with Tim Foster''s script ( http:// mediacast.sun.com/share/timf/zfs-actual-root-install.sh ) and I get the same negative results... with mirror c1t0d0s0 c2t0d0s0, I get "init(1M) exited on fatal signal 9" spam. with a straight c1t0d0s0, I get the same problem... I tried with 2 Sandisk U3 Cruser USB drive (in mirror mode and single disk )... I also tried with a Kingston because I was worried the U3 and emulated cd was causing problem... but got same result If I remove the original UFS boot disk, there is a panic message after the Solaris Version header... but it just flashes and reboot before I have the time to read it... Otherwise if I keep the original UFS boot disk, I get the init(1M) existed on fatal signal 9 crap. I am going to try one more time with a real harddisk instead of a UFS boot disk. Lori told me in a private e-mail that the mount root was a hack.. well I prefer a hack that worked than this nightmare. I would really prefer having a minimal ufs boot and mount my raidz2 rootfs than wasting days to make zfs boot work as expected! That''s the thing, zfs mountroot worked perfect any support for it was taken out in build 62... great backward compatibility here! On 28/09/2007, at 6:17 PM, Kugutsumen wrote:> > Using build 70, I followed the zfsboot instructions at http:// > www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/ to the > letter. > > I tried first with a mirror zfsroot, when I try to boot to zfsboot > the screen is flooded with "init(1M) exited on fatal signal 9" > > Than I tried with a simple zfs pool (not mirrored) and it just > reboots right away. > > If I try to setup grub manually, it has no problem in both cases > finding the root_archive, etc...: > > grub> root (hd0,0,a) > Filesystem type is zfs, partition type 0xbf > > grub> /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS > loading ''platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS > cpu: ''AuthenticAMD'' family 15 model 47 step 0 > [BIOS accepted mixed-mode target setting!] > [Multiboot-kluge, loadaddr=0xbffe38, text-and-data=0x161958, > bss=0x0, entry=0xc00000] > ''/platform/i86pc/kernel/amd64/unix -B zfs-bootfs=rootpool/21'' is > loaded > > grub> boot > > Any idea what I am doing wrong? > > Thanks and regards > Kugutsumen > > .... > > This is everything I did: > > # root is about 350 megs ... so it should fit nicely on our flash > disk. > > # let''s make separate partition for /, /var, /opt, /usr and /export/ > home > > # Later we''ll move / to the separate disk (in this case a zfs > mirror pool) > # and we will create a raidz2 pool for /var, /opt, /usr and /export/ > home... so we won''t have to worry much about the size > # of these volumes. > # finally we''ll create a zvol for swap this machine has really a > lot of ram so I don''t really worry about swapping. > > # So we Modify c0t0d0... and create: > > # 0 / 1024M > # 1 swap 518M > # 2 /usr 10240M > # 3 /var 10240M > # 4 /opt 10240M > # 7 /export/home ... whatever is left > > formatted my flashdisks with 2 identical unamed slices (s0) of 969M > > Installed everything on that temporary install disk (c0t0d0) > > zpool create -f datapool raidz2 /dev/dsk/c4d0 /dev/dsk/c5d0 /dev/ > dsk/c6d0 /dev/dsk/c7d0 > zfs create datapool/usr > zfs create datapool/opt > zfs create datapool/var > zfs create datapool/home > zfs set mountpoint=legacy datapool/usr > zfs set mountpoint=legacy datapool/opt > zfs set mountpoint=legacy datapool/var > zfs set mountpoint=legacy datapool/home > > zfs create -V 2g datapool/swap > > > # http://www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/ > > zpool create -f rootpool c1t0d0s0 > zfs create rootpool/rootfs > > zfs set mountpoint=legacy rootpool/rootfs > mkdir /zfsroot > mount -F zfs rootpool/rootfs /zfsroot > > cd /zfsroot ; mkdir -p usr opt var home export/home > > mount -F zfs datapool/usr /zfsroot/usr > mount -F zfs datapool/opt /zfsroot/opt > mount -F zfs datapool/var /zfsroot/var > mount -F zfs datapool/home /zfsroot/export/home > > Added the following to /etc/vfstab > rootpool/rootfs - /zfsroot zfs - yes - > datapool/usr - /zfsroot/usr zfs - yes - > datapool/var - /zfsroot/var zfs - yes - > datapool/opt - /zfsroot/opt zfs - yes - > datapool/home - /zfsroot/export/home zfs - yes - > /dev/zvol/dsk/datapool/swap - - swap - > no - > > cd / ; find . -xdev -depth -print | cpio -pvdm /zfsroot > cd / ; find usr -xdev -depth -print | cpio -pvdm /zfsroot > cd / ; find var -xdev -depth -print | cpio -pvdm /zfsroot > cd / ; find opt -xdev -depth -print | cpio -pvdm /zfsroot > cd / ; find export/home -xdev -depth -print | cpio -pvdm /zfsroot > > # ran this script: http://www.opensolaris.org/os/community/zfs/boot/ > zfsboot-manual/create_dirs/ > > mount -F lofs -o nosub / /mnt > (cd /mnt; tar cvf - devices dev ) | (cd /zfsroot; tar xvf -) > umount /mnt > > # edit /zfsroot/etc/vfstab > zpool set bootfs=rootpool/rootfs rootpool > echo etc/zfs/zpool.cache >>/zfsroot/boot/solaris/filelist.ramdisk > > /usr/sbin/bootadm update-archive -R /zfsroot > mkdir -p /rootpool/boot/grub > > # Since we are using a mirror .. we need grub on both disk mbr > # also disable splash since it will not work well with mirror setup > > cat >/rootpool/boot/grub/menu.lst > default 0 > fallback 1 > > title Solaris ZFS mirror 1 > root (hd0,0,a) > bootfs rootpool/rootfs > kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS > module$ /platform/i86pc/$ISADIR/boot_archive > > title Solaris ZFS mirror 2 > root (hd1,0,a) > bootfs rootpool/rootfs > kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS > module$ /platform/i86pc/$ISADIR/boot_archive > > title Solaris Failsafe > kernel /boot/platform/i86pc/kernel/unix -B console=ttya > module /boot/x86.miniroot > > # install grub on both harddisk > installgrub /zfsroot/boot/grub/stage1 /zfsroot/boot/grub/stage2 / > dev/rdsk/c1t0d0s0 > installgrub /zfsroot/boot/grub/stage1 /zfsroot/boot/grub/stage2 / > dev/rdsk/c2t0d0s0 > > swap -a /dev/zvol/dsk/datapool/swap >
Al Hopper
2007-Sep-28 16:48 UTC
[zfs-discuss] ZFS Boot Won''t work with a straight or mirror zfsroot
On Fri, 28 Sep 2007, Kugutsumen wrote:> > Using build 70, I followed the zfsboot instructions at http:// > www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/ to the > letter. > > I tried first with a mirror zfsroot, when I try to boot to zfsboot > the screen is flooded with "init(1M) exited on fatal signal 9" > > Than I tried with a simple zfs pool (not mirrored) and it just > reboots right away. > > If I try to setup grub manually, it has no problem in both cases > finding the root_archive, etc...: > > grub> root (hd0,0,a) > Filesystem type is zfs, partition type 0xbf > > grub> /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS > loading ''platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS > cpu: ''AuthenticAMD'' family 15 model 47 step 0 > [BIOS accepted mixed-mode target setting!] > [Multiboot-kluge, loadaddr=0xbffe38, text-and-data=0x161958, > bss=0x0, entry=0xc00000] > ''/platform/i86pc/kernel/amd64/unix -B zfs-bootfs=rootpool/21'' is loaded > > grub> boot > > Any idea what I am doing wrong?No - but I''ll post my (very ugly) ZFS boot "cheat sheet" that''ll get you up and running, from scratch, in less than one hour. Apologies for the nastiness of this cheat sheet - I''ll pretty it up and post it later. # this "cheat sheet" makes the following assumptions: # The install server is at 192.168.80.18 # The install server is using a ZFS based filesystem with # a pool called tanku. The users home directory is also # in this pool at /tanku/home/al # the target machine has ethernet address: 00:e0:81:2f:e1:4f # verify that your ethernet interface supports PXE boot # most systems do - except for low-end ethernet cards that # don''t have an option RAM # verify that you know which two disks you''ll be loading the # OS to. If need be, you''ll have to boot the box off a DVD # and run format to determine the available disk drives # determine the ethernet address of the interface you''ll be # using for PXE boot. See more notes below. Make a note # of it. # next: download Lori Alts/Dave Miners ZFS boot tools: wget http://www.opensolaris.org/os/community/install/files/zfsboot-kit-20060418.i386.tar.bz2 # Yes - the date should be 20070418 # unzip and untar them - in this case they''ll end up in # /tanku/home/al/zfsboot/20070418 (aka ~al/zfsboot/20070418) # Find and read the README file. But don''t spend too much # time studying it. The cheat sheet will tell you what to do. # on the install server setup a ZFS bootable netinstall image for b72 mkdir /mnt72 chown root:sys /mnt72 chmod 755 /mnt72 # FYI only: /solimages is an NFS mount lofiadm -a /solimages/sol-nv-b72-x86-dvd.iso # assumes that lofiadm returned "/dev/lofi/2" mount -F hsfs -o ro /dev/lofi/2 /mnt72 zfs create tanku/b72installzfs zfs set sharenfs=''ro,anon=0'' tanku/b72installzfs cd /mnt72/Solaris_11/Tools ./setup_install_server /tanku/b72installzfs cd /tanku/home/al/zfsboot/20070418 # next step takes around 13 minutes (why?) ptime ./patch_image_for_zfsboot /tanku/b72installzfs # remove the DVD image mount and cleanup umount /mnt72 lofiadm -d /dev/lofi/2 # verify that you can mount /tanku/b72installzfs on another machine # as a quick test. Best to check this _now_ than try to figure it # out later. # mount -F nfs -o ro,vers=3,proto=tcp 192.168.80.18:/tanku/b72installzfs /mnt # go to the prepared zfs boot area (in this case /tanku/b72zfsinstall cd /tanku/b72installzfs/Solaris_11/Tools # add the install server files ./add_install_client -d -e 00:e0:81:2f:e1:4f -s 192.168.80.18:/tanku/b72installzfs i86pc # you''ll see instructions to add the client macros (something) like: If not already configured, enable PXE boot by creating a macro named 0100E0812FE14F with: Boot server IP (BootSrvA) : 192.168.80.18 Boot file (BootFile) : 0100E0812FE14F # using: the screen-by-screen guide at: # http://www.sun.com/bigadmin/features/articles/jumpstart_x86_x64.jsp # starting at step 5: # ^^^^^^ # 5. Configure and Run the DHCP Server # # add the two macros and use the name 0100E0812FE14F # NB: Ignore *all* the stuff up to step 5. You don''t need any of it! # NB: the macro must have the correct name # verify that the tftp based files are available df |grep tftp # it should look something *like* this: #/tanku/b72installzfs/boot # 260129046 3564877 256564169 2% /tftpboot/I86PC.Solaris_11-2 # test that the tftp files can be retrieved via tftp: cd /tmp tftp> connect 192.168.80.18 > get 0100E0812FE14F > quit# enable FTP on your boot server to allow snagging the zfs boot profile file: svcadm enable ftp # change your password before you dare use ftp. Remember to use a disposable # password - because it can be sniffed on the LAN. After we''re done with FTP, # restore your original password. # enable the PXE boot on the target systems BIOS # boot the target machine # during the early phases of booting press F12 ASAP # you should see the machine contact the DHCP server and start downloading # the required files within a couple of seconds. NB: verify that the ethernet address displayed by the PXE code is the same one you expected and is associated with the physical interface in use. Some machines pick the ethernet port that will be used for PXE boot for you - you don''t have a choice. Newer BIOSes allow you to enable PXE separately for each supported interface. expect to see a GRUB prompt for the release you''re installing (i.e., b72) Select 4 (Console install) - its the least likely to cause you issues. If you''re using bge0 as the PXE boot interface, ensure that you leave the bge0 interface enabled for networking "[x] bge0" - otherwise you won''t be able to "see" the install server. Fill in the minimum required config details, and take the first EXIT option as soon as you see one. Now you''ll have a command line prompt. # the following assumes you''ve setup a profile file called (simply) # profile.zfs on your boot server. See samples below. # At the prompt: cd /tmp ftp 192.168.80.18 user: password: (use the dummy password you setup earlier) get profile.zfs quit # Now load the system with pfinstall pfinstall /tmp/profile.zfs # the system should begin loading Solaris within a couple of Seconds. # Sample ZFS boot profile file 1 (simple): # You may wish to change the cluster type (see next sample) install_type initial_install cluster SUNWCall filesys c1t0d0s1 auto swap pool mypool free / mirror c1t0d0s0 c2t1d0s0 dataset mypool/be1 auto / dataset mypool/be1/usr auto /usr dataset mypool/be1/opt auto /opt dataset mypool/be1/var auto /var dataset mypool/be1/export auto /export # Note the (subtle) changed cluster name in the next sample. # Also *all* the locales are loaded. This will # almost double the required install disk space requirement install_type initial_install cluster SUNWCXall system_locale en_US.UTF-8 geo N_Africa geo C_America geo N_America geo S_America geo Asia geo Ausi geo C_Europe geo E_Europe geo N_Europe geo S_Europe geo W_Europe geo M_East filesys c1t0d0s1 auto swap pool tanks free / mirror c1t0d0s0 c2t0d0s0 dataset tanks/be1 auto / dataset tanks/be1/usr auto /usr dataset tanks/be1/opt auto /opt dataset tanks/be1/var auto /var dataset tanks/be1/export auto /export # With cluster SUNWCXall and no additional geo regions, you # should be ready to reboot in 7 to 10 minutes # reboot nicely: init 6 ----- end of story ----- Al Hopper Logical Approach Inc, Plano, TX. al at logical-approach.com Voice: 972.379.2133 Fax: 972.379.2134 Timezone: US CDT OpenSolaris Governing Board (OGB) Member - Apr 2005 to Mar 2007 http://www.opensolaris.org/os/community/ogb/ogb_2005-2007/
Jürgen Keil
2007-Sep-28 16:53 UTC
[zfs-discuss] ZFS Boot Won''t work with a straight or mirror zfsroot
> > Using build 70, I followed the zfsboot instructions > at http://www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/ > to the letter. > > I tried first with a mirror zfsroot, when I try to boot to zfsboot > the screen is flooded with "init(1M) exited on fatal signal 9"Could be this problem: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6423745> This is everything I did:> zpool create -f rootpool c1t0d0s0 > zfs create rootpool/rootfs > > zfs set mountpoint=legacy rootpool/rootfs > mkdir /zfsroot > mount -F zfs rootpool/rootfs /zfsrootOk.> cd /zfsroot ; mkdir -p usr opt var home export/home > > mount -F zfs datapool/usr /zfsroot/usr > mount -F zfs datapool/opt /zfsroot/opt > mount -F zfs datapool/var /zfsroot/var > mount -F zfs datapool/home /zfsroot/export/home > > Added the following to /etc/vfstab > rootpool/rootfs - /zfsroot zfs - yes - > datapool/usr - /zfsroot/usr zfs - yes - > datapool/var - /zfsroot/var zfs - yes - > datapool/opt - /zfsroot/opt zfs - yes - > datapool/home - /zfsroot/export/home zfs - yes > - > /zvol/dsk/datapool/swap - - swap - > > - > cd / ; find . -xdev -depth -print | cpio -pvdm /zfsroot > cd / ; find usr -xdev -depth -print | cpio -pvdm /zfsroot > cd / ; find var -xdev -depth -print | cpio -pvdm /zfsroot > cd / ; find opt -xdev -depth -print | cpio -pvdm /zfsroot > cd / ; find export/home -xdev -depth -print | cpio -pvdm /zfsroot > > # ran this script: > http://www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/create_dirs/ > > mount -F lofs -o nosub / /mnt > (cd /mnt; tar cvf - devices dev ) | (cd /zfsroot; tar xvf -) > umount /mntYour source root filesystem is on UFS? I think much of the above steps could be simplified by populating the zfs root filesystem like this: mount -F zfs rootpool/rootfs /zfsroot ufsdump 0f - / | (cd /zfsroot; ufsrestore xf -) umount /zfsroot That way, you don''t have to use the "create_dirs" script, or mess with the /devices and /dev device tree and the lofs mount. Using ufsdump/ufsrestore also gets the lib/libc.so.1 file correct in the rootfs zfs, which typically has some lofs file mounted on top of it. This message posted from opensolaris.org
Kugutsumen
2007-Sep-30 00:45 UTC
[zfs-discuss] ZFS Boot Won''t work with a straight or mirror zfsroot
Thanks J?rgen, I was hit by 6423745 (see below) but the main problem is that /sbin/ zpool is linked to /usr/lib/libdiskmgt.so.1 and since /usr was on my datapool, it failed systematically. I don''t think it makes sense that an executable in /sbin be linked to a lib in /usr/lib. The only binaries in /sbin linking to /usr/lib are zpool and zonename. Shall I move libdiskmgt.so.1 to /lib ? or will that break something else? On 28/09/2007, at 11:53 PM, J?rgen Keil wrote:>> >> Using build 70, I followed the zfsboot instructions >> at http://www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/ >> to the letter. >> >> I tried first with a mirror zfsroot, when I try to boot to zfsboot >> the screen is flooded with "init(1M) exited on fatal signal 9" > > Could be this problem: > > http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6423745 >Thanks ... It seems one of the problem was bug 6423745, thanks for pointing that. The first time I created the zpool it was during install and for some reason the installation is done in 32 bit mode. Someone should also correct the zfs boot manual ( http:// www.opensolaris.org/os/community/zfs/boot/zfsboot- manual/;jsessionid=DE41DAFDD945D813FDD8FBAEC669BD11 ) because the grub entry is missing $ISADIR and will cause to always boot in 32 bit mode.>> This is everything I did: > >> zpool create -f rootpool c1t0d0s0 >> zfs create rootpool/rootfs >> >> zfs set mountpoint=legacy rootpool/rootfs >> mkdir /zfsroot >> mount -F zfs rootpool/rootfs /zfsroot > > Ok. > >> cd /zfsroot ; mkdir -p usr opt var home export/home >> >> mount -F zfs datapool/usr /zfsroot/usr >> mount -F zfs datapool/opt /zfsroot/opt >> mount -F zfs datapool/var /zfsroot/var >> mount -F zfs datapool/home /zfsroot/export/home >> >> Added the following to /etc/vfstab >> rootpool/rootfs - /zfsroot zfs - yes - >> datapool/usr - /zfsroot/usr zfs - yes - >> datapool/var - /zfsroot/var zfs - yes - >> datapool/opt - /zfsroot/opt zfs - yes - >> datapool/home - /zfsroot/export/home zfs - yes >> - >> /zvol/dsk/datapool/swap - - swap - >> >> - >> cd / ; find . -xdev -depth -print | cpio -pvdm /zfsroot >> cd / ; find usr -xdev -depth -print | cpio -pvdm /zfsroot >> cd / ; find var -xdev -depth -print | cpio -pvdm /zfsroot >> cd / ; find opt -xdev -depth -print | cpio -pvdm /zfsroot >> cd / ; find export/home -xdev -depth -print | cpio -pvdm /zfsroot >> >> # ran this script: >> http://www.opensolaris.org/os/community/zfs/boot/zfsboot-manual/ >> create_dirs/ >> >> mount -F lofs -o nosub / /mnt >> (cd /mnt; tar cvf - devices dev ) | (cd /zfsroot; tar xvf -) >> umount /mnt > > Your source root filesystem is on UFS? > > I think much of the above steps could be simplified by populating > the zfs root filesystem like this: > > mount -F zfs rootpool/rootfs /zfsroot > ufsdump 0f - / | (cd /zfsroot; ufsrestore xf -) > umount /zfsroot > > That way, you don''t have to use the "create_dirs" script, > or mess with the /devices and /dev device tree and the > lofs mount. > > Using ufsdump/ufsrestore also gets the lib/libc.so.1 file correct > in the rootfs zfs, which typically has some lofs file mounted on > top of it.using ufsrestore works for /var and /opt but failed for /usr, nothing was copied when> This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Kugutsumen
2007-Sep-30 00:55 UTC
[zfs-discuss] ZFS Boot Won''t work with a straight or mirror zfsroot
On 30/09/2007, at 7:45 AM, Kugutsumen wrote:> Thanks J?rgen, > > I was hit by 6423745 (see below) but the main problem is that /sbin/ > zpool is linked to /usr/lib/libdiskmgt.so.1 and since /usr was on > my datapool, it failed systematically. > > I don''t think it makes sense that an executable in /sbin be linked > to a lib in /usr/lib. The only binaries in /sbin linking to /usr/ > lib are zpool and zonename. >Creating a usr/lib directory and copying the libdiskmgt.so.1 there would probably provide a temporary fix... I''ll try it tomorrow... if it works I can finally boot my zfs root partition two mirrored USB flash drives instead of these 2 slow and ugly 10G IDE drives I grabbed from some old xboxes.