Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ZFS on root - almost there



I just noticed - the error message from the sysctl command was that
the string was too long:

# sysctl -w kern.module.path=/a/stand/amd64/9.99.47/modules
sysctl: /a/stand/amd64/9.99.47/modules: string too long

I tried with the shortest possible substitution.

On Sat, 22 Feb 2020 at 20:43, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
>
> On Sat, 22 Feb 2020 at 19:31, Roy Marples <roy%marples.name@localhost> wrote:
> >
> > On 22/02/2020 19:06, Chavdar Ivanov wrote:
> > > On Sat, 22 Feb 2020 at 18:03, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
> > >>
> > >> On Sat, 22 Feb 2020 at 17:03, Roy Marples <roy%marples.name@localhost> wrote:
> > >>>
> > >>> On 22/02/2020 16:56, Chavdar Ivanov wrote:
> > >>>> Surely I have missed and/or misuderstood some of the above, but I am getting:
> > >>>> ...
> > >>>> Starting ZFS on root boot strapper
> > >>>> Copying needed kernel modules from NAME=boot:/stand/amd64/9.99.47/modules
> > >>>> mount: no match for 'boot': No such process
> > >>>> /mnt//stand/amd64/9.99.47/modules/zfs/solaris.kmod not found!
> > >>>> /mnt//stand/amd64/9.99.47/modules/zfs/zfs.kmod not found!
> > >>>> umount: /mnt: not currently mounted
> > >>>>
> > >>>> Importing rpool, mounting and pivoting
> > >>>> internal error: failed to initialize ZFS library
> > >>>> ....
> > >>>>
> > >>>> It seems it tries to mount the small ufs root on /mnt using
> > >>>> 'NAME=boot' label, but the label created by the standard installed is
> > >>>> some GUID.
> > >>>
> > >>> Wups!
> > >>> I missed an instruction step to ensure the label of the FFS partiton is boot.
> > >>> gpt label -i 1 -l boot wd0
> > >>> Replace 1 with the partition index and wd0 with the device.
> > >>
> > >> It worked; the only problem I am still having is adding swap; both for
> > >> a zvol and a gpt partition I get:
> > >>
> > >> ...
> > >>
> > >> nzfs# swapctl -a /dev/zvol/dsk/rpool/SWAP
> > >> swapctl: /dev/zvol/dsk/rpool/SWAP: Device not configured
> > >> nzfs# swapctl -a /dev/dk5
> > >> swapctl: /dev/dk5: Device not configured
> > >>
> > >> Could be something I've screwed during the installation, but can't
> > >> figure it out.
> > >
> > > The next problem is that one can't load any modules; is this by design
> > > or I have again made some mistake? Only the two modules prior to
> > > pivoting are seen - solaris and zfs; after that one gets, e.g.:
> > >
> > > ➜ ~ ls -l /stand/amd64/9.99.47/modules/dtrace/dtrace.kmod
> > > -r--r--r-- 1 root wheel 320120 Feb 20 10:19
> > > /stand/amd64/9.99.47/modules/dtrace/dtrace.kmod
> > > ➜ ~ modload dtrace
> > > modload: dtrace: No such file or directory
> > > ➜ ~ uname -a
> > > NetBSD nzfs 9.99.47 NetBSD 9.99.47 (GENERIC) #10: Sat Feb 22 14:18:50
> > > GMT 2020 sysbuild@ymir:/home/sysbuild/amd64/obj/home/sysbuild/src/sys/arch/amd64/c
> > > ompile/GENERIC amd64
> > >
> > > ....
> > >
> >
> > Does this patch help?
> >
> > Roy
> >
> > Index: zfsroot.rc
> > ===================================================================
> > RCS file: /cvsroot/src/distrib/common/zfsroot.rc,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 zfsroot.rc
> > --- zfsroot.rc  22 Feb 2020 09:53:47 -0000      1.1
> > +++ zfsroot.rc  22 Feb 2020 19:30:43 -0000
> > @@ -51,6 +51,13 @@ done
> >   /sbin/umount "$modmnt"
> >   echo
> >
> > +# Point the modulepath to /altroot
> > +mpath="$(sysctl -n kern.module.path)"
> > +case "$mpath" in
> > +/altroot/\*)   ;;
> > +*)             sysctl -w kern.module.path="/altroot/$mpath";;
> > +esac
> > +
> >   echo "Importing $rpool, mounting and pivoting"
> >   # If we can mount the ZFS root partition to /altroot
> >   # then chroot to it and start /etc/rc
>
> It didn't apply for me; I manually edited the file and rebuilt
> ramdisk-zfsroot.fs, replacing the previous version. It didn't seem to
> make any difference, I still can't modload anything, even if the paths
> after the pivot appear correct:
>
> #  / sysctl kern.module.path
> kern.module.path = /stand/amd64/9.99.47/modules
> #  / ls /stand/amd64/9.99.47/modules/vboxguest
> vboxguest.kmod
> # / modload vboxguest
> modload: vboxguest: No such file or directory
>
> Swap also can't be added.
>
>
>
>
>
> --
> ----



-- 
----


Home | Main Index | Thread Index | Old Index