13-CURRENT won't boot after switch to sysutils/openzfs

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

13-CURRENT won't boot after switch to sysutils/openzfs

marco-3
I'm running r364030.

 [~] uname -apKU
 FreeBSD harbinger 13.0-CURRENT FreeBSD 13.0-CURRENT #5 r364030: Tue Aug
 11 07:15:59 UTC 2020
 root@harbinger:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64
 amd64 1300105 1300105

When switching from base ZFS to sysutils/openzfs 2020080800 the boot process fails.

These are the steps I took:

- bectl create r364030-OpenZFS
- bectl mount r364030-OpenZFS /mnt
- edit /mnt/boot/loader.conf to use openzfs_load="YES" instead of zfs_load.
- bectl activate r364030-OpenZFS
- bectl umount r364030-OpenZFS
- shutdown -r now

The boot process shows:
Loader variables:
vfs.root.mountfrom=zfs:zroot/ROOT/r364030-OpenZFS

But in the end never boots and drops me to the mountroot prompt
I've tried several options to make it boot but when I just enter (empty
line) I get the following:

panic: mountroot: unable to (re-)mount root

pls see https://bsd.to/C4yL

--
Marco van Lienen -- FreeBSD enthusiast
https://keybase.io/scarcry , GnuPG id: 8580E6CB
"The Tuck Pendleton machine...zero defects."

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 13-CURRENT won't boot after switch to sysutils/openzfs

Ryan Moeller-2

On 8/22/20 7:49 AM, marco wrote:
> I'm running r364030.
>
>   [~] uname -apKU
>   FreeBSD harbinger 13.0-CURRENT FreeBSD 13.0-CURRENT #5 r364030: Tue Aug
>   11 07:15:59 UTC 2020
>   root@harbinger:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64
>   amd64 1300105 1300105
>
> When switching from base ZFS to sysutils/openzfs 2020080800 the boot process fails.

The most recent version (2020081800) fixes this.

-Ryan

> These are the steps I took:
>
> - bectl create r364030-OpenZFS
> - bectl mount r364030-OpenZFS /mnt
> - edit /mnt/boot/loader.conf to use openzfs_load="YES" instead of zfs_load.
> - bectl activate r364030-OpenZFS
> - bectl umount r364030-OpenZFS
> - shutdown -r now
>
> The boot process shows:
> Loader variables:
> vfs.root.mountfrom=zfs:zroot/ROOT/r364030-OpenZFS
>
> But in the end never boots and drops me to the mountroot prompt
> I've tried several options to make it boot but when I just enter (empty
> line) I get the following:
>
> panic: mountroot: unable to (re-)mount root
>
> pls see https://bsd.to/C4yL
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 13-CURRENT won't boot after switch to sysutils/openzfs

Ryan Moeller-2

On 8/22/20 9:29 AM, Ryan Moeller wrote:

>
> On 8/22/20 7:49 AM, marco wrote:
>> I'm running r364030.
>>
>>   [~] uname -apKU
>>   FreeBSD harbinger 13.0-CURRENT FreeBSD 13.0-CURRENT #5 r364030: Tue
>> Aug
>>   11 07:15:59 UTC 2020
>> root@harbinger:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64
>>   amd64 1300105 1300105
>>
>> When switching from base ZFS to sysutils/openzfs 2020080800 the boot
>> process fails.
>
> The most recent version (2020081800) fixes this.
>
> -Ryan
>
Sorry, pre-coffee. I don't think the issue I had in mind there (OpenZFS
uses /etc/zfs/zpool.cache instead of /boot/zfs/zpool.cache, we added a
fallback) explains your problem.

Did you install openzfs from the pkg repo?

-Ryan

>> These are the steps I took:
>>
>> - bectl create r364030-OpenZFS
>> - bectl mount r364030-OpenZFS /mnt
>> - edit /mnt/boot/loader.conf to use openzfs_load="YES" instead of
>> zfs_load.
>> - bectl activate r364030-OpenZFS
>> - bectl umount r364030-OpenZFS
>> - shutdown -r now
>>
>> The boot process shows:
>> Loader variables:
>> vfs.root.mountfrom=zfs:zroot/ROOT/r364030-OpenZFS
>>
>> But in the end never boots and drops me to the mountroot prompt
>> I've tried several options to make it boot but when I just enter (empty
>> line) I get the following:
>>
>> panic: mountroot: unable to (re-)mount root
>>
>> pls see https://bsd.to/C4yL
>>
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to
> "[hidden email]"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 13-CURRENT won't boot after switch to sysutils/openzfs

marco-3
On Sat, Aug 22, 2020 at 09:47:49AM -0400, you (Ryan Moeller) sent the following to [freebsd-current] :

>
> On 8/22/20 9:29 AM, Ryan Moeller wrote:
> >>
> >> When switching from base ZFS to sysutils/openzfs 2020080800 the boot
> >> process fails.
> >
> > The most recent version (2020081800) fixes this.
> >
> > -Ryan
> >
> Sorry, pre-coffee. I don't think the issue I had in mind there (OpenZFS
> uses /etc/zfs/zpool.cache instead of /boot/zfs/zpool.cache, we added a
> fallback) explains your problem.
>
> Did you install openzfs from the pkg repo?
I installed openzfs from the latest FreeBSD repo
(pkg+http://pkg.FreeBSD.org/${ABI}/latest)

current BEs

 [~] bectl list -aDs
BE/Dataset/Snapshot                          Active Mountpoint Space Created

r364030
  zroot/ROOT/r364030                         NR     /          15.2G 2020-08-11 08:25
  r364030@2020-08-22-15:52:19-0              -      -          31.4M 2020-08-22 15:52

r364030-OpenZFS
  zroot/ROOT/r364030-OpenZFS                 -      /mnt       419M  2020-08-22 15:52
    zroot/ROOT/r364030@2020-08-22-15:52:19-0 -      -          31.4M 2020-08-22 15:52

Just did a 'pkg update' on my active BE.
I don't know what is happening here, can't seem to upgrade openzfs:

 [~] pkg version | grep openzfs
openzfs-2020080800                 <
openzfs-kmod-2020080800            <

So there should be an update for sysutils/openzfs and openzfs-kmod but running a 'pkg upgrade' doesn't list openzfs for an upgrade.

After creating and mounting the new BE I've also tried:

 [~] d bectl mount r364030-OpenZFS /mnt
 [~] d pkg -r /mnt update -f
 [~] d pkg -r /mnt upgrade

Openzfs isn't listed for an upgrade.
After the pkg upgrade, running pkg version claims :

 [~] pkg -r /mnt version | grep openzfs
openzfs-2020080800                 =
openzfs-kmod-2020080800            =

 [~] d pkg -r /mnt upgrade -f openzfs
 [~] d pkg -r /mnt upgrade -f openzfs
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
        openzfs-2020080800

Number of packages to be reinstalled: 1

2 MiB to be downloaded.

Proceed with this action? [y/N]:

So besides not being able to boot from the openzfs 2020080800 package install, I can't figure out why I can't upgrade the openzfs pkg to 2020081800 (which is the latest one in ports so I presume a package also exists of that same version)

--
Marco van Lienen -- FreeBSD enthusiast
https://keybase.io/scarcry , GnuPG id: 8580E6CB
"The Tuck Pendleton machine...zero defects."

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 13-CURRENT won't boot after switch to sysutils/openzfs

Ryan Moeller-2

On 8/22/20 12:27 PM, marco wrote:

> On Sat, Aug 22, 2020 at 09:47:49AM -0400, you (Ryan Moeller) sent the following to [freebsd-current] :
>> On 8/22/20 9:29 AM, Ryan Moeller wrote:
>>>> When switching from base ZFS to sysutils/openzfs 2020080800 the boot
>>>> process fails.
>>> The most recent version (2020081800) fixes this.
>>>
>>> -Ryan
>>>
>> Sorry, pre-coffee. I don't think the issue I had in mind there (OpenZFS
>> uses /etc/zfs/zpool.cache instead of /boot/zfs/zpool.cache, we added a
>> fallback) explains your problem.
>>
>> Did you install openzfs from the pkg repo?
> I installed openzfs from the latest FreeBSD repo
> (pkg+http://pkg.FreeBSD.org/${ABI}/latest)
>
> current BEs
>
>   [~] bectl list -aDs
> BE/Dataset/Snapshot                          Active Mountpoint Space Created
>
> r364030
>    zroot/ROOT/r364030                         NR     /          15.2G 2020-08-11 08:25
>    r364030@2020-08-22-15:52:19-0              -      -          31.4M 2020-08-22 15:52
>
> r364030-OpenZFS
>    zroot/ROOT/r364030-OpenZFS                 -      /mnt       419M  2020-08-22 15:52
>      zroot/ROOT/r364030@2020-08-22-15:52:19-0 -      -          31.4M 2020-08-22 15:52
>
> Just did a 'pkg update' on my active BE.
> I don't know what is happening here, can't seem to upgrade openzfs:
>
>   [~] pkg version | grep openzfs
> openzfs-2020080800                 <
> openzfs-kmod-2020080800            <
>
> So there should be an update for sysutils/openzfs and openzfs-kmod but running a 'pkg upgrade' doesn't list openzfs for an upgrade.
>
> After creating and mounting the new BE I've also tried:
>
>   [~] d bectl mount r364030-OpenZFS /mnt
>   [~] d pkg -r /mnt update -f
>   [~] d pkg -r /mnt upgrade
>
> Openzfs isn't listed for an upgrade.
> After the pkg upgrade, running pkg version claims :
>
>   [~] pkg -r /mnt version | grep openzfs
> openzfs-2020080800                 =
> openzfs-kmod-2020080800            =
>
>   [~] d pkg -r /mnt upgrade -f openzfs
>   [~] d pkg -r /mnt upgrade -f openzfs
> Updating FreeBSD repository catalogue...
> FreeBSD repository is up to date.
> All repositories are up to date.
> The following 1 package(s) will be affected (of 0 checked):
>
> Installed packages to be REINSTALLED:
>          openzfs-2020080800
>
> Number of packages to be reinstalled: 1
>
> 2 MiB to be downloaded.
>
> Proceed with this action? [y/N]:
>
> So besides not being able to boot from the openzfs 2020080800 package install, I can't figure out why I can't upgrade the openzfs pkg to 2020081800 (which is the latest one in ports so I presume a package also exists of that same version)


Ok the pkg repo may not be updated with the new version yet, the latest
I see is still 08. I think the problem though is you aren't using the
GENERIC kernel, so the module from the pkg repo is failing to load at
boot. You should build the module from ports instead, or use the GENERIC
kernel. Let me know if that works for you!

-Ryan

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: 13-CURRENT won't boot after switch to sysutils/openzfs

marco-3
On Sat, Aug 22, 2020 at 12:31:24PM -0400, you (Ryan Moeller) sent the following to [freebsd-current] :
>
> > So besides not being able to boot from the openzfs 2020080800 package install, I can't figure out why I can't upgrade the openzfs pkg to 2020081800 (which is the latest one in ports so I presume a package also exists of that same version)
>
>
> Ok the pkg repo may not be updated with the new version yet, the latest
> I see is still 08. I think the problem though is you aren't using the
> GENERIC kernel, so the module from the pkg repo is failing to load at
> boot. You should build the module from ports instead, or use the GENERIC
> kernel. Let me know if that works for you!

Okay, currently running a buildkernel which I'll install into
r364030-OpenZFS.
I'm running GENERIC-NODEBUG to see if I can squeeze a bit more
performnce out of this ThinkPad X230
But I'll build and install GENERIC into the new BE to see if that'll make a difference.

These will be my steps:

cd /usr/src (currently at r364030)
make -DMALLOC_PRODUCTION -j4 buildkernel
bectl mount r364030-OpenZFS /mnt
set openzfs_load="YES" in /mnt/boot/loader.conf and comment out zfs_load for Base ZFS
make -DMALLOC_PRODUCTION -j4 installkernel DESTDIR=/mnt
mergemaster -Fp -D /mnt /* don't think is needed since I haven't buildworld from updated sources beyond r364030
mergemaster -Fi -D /mnt /* don't think is needed since I haven't buildworld from updated sources beyond r364030
make -DBATCH_DELETE_OLD_FILES delete-old DESTDIR=/mnt
bectl umount r364030-OpenZFS
bectl activate r364030-OpenZFS
shutdown -r now

If that won't work either I'll see if I can build sysutils/openzfs from ports but I'd rather not mix packages and ports.

--
Marco van Lienen -- FreeBSD enthusiast
https://keybase.io/scarcry , GnuPG id: 8580E6CB
"The Tuck Pendleton machine...zero defects."

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 13-CURRENT won't boot after switch to sysutils/openzfs

marco-3
On Sat, Aug 22, 2020 at 04:48:48PM +0000, you (marco) sent the following to [freebsd-current] :

> On Sat, Aug 22, 2020 at 12:31:24PM -0400, you (Ryan Moeller) sent the following to [freebsd-current] : > > > > > So besides not being able to boot from the openzfs 2020080800 package install, I can't figure out why I can't upgrade the openzfs pkg to 2020081800 (which is the latest one in ports so I presume a package also exists of that same version)
> >
> >
> > Ok the pkg repo may not be updated with the new version yet, the latest
> > I see is still 08. I think the problem though is you aren't using the
> > GENERIC kernel, so the module from the pkg repo is failing to load at
> > boot. You should build the module from ports instead, or use the GENERIC
> > kernel. Let me know if that works for you!
>
> Okay, currently running a buildkernel which I'll install into
> r364030-OpenZFS.
> I'm running GENERIC-NODEBUG to see if I can squeeze a bit more
> performnce out of this ThinkPad X230
> But I'll build and install GENERIC into the new BE to see if that'll make a difference.
>
> These will be my steps:
>
> cd /usr/src (currently at r364030)
> make -DMALLOC_PRODUCTION -j4 buildkernel
> bectl mount r364030-OpenZFS /mnt
> set openzfs_load="YES" in /mnt/boot/loader.conf and comment out zfs_load for Base ZFS
> make -DMALLOC_PRODUCTION -j4 installkernel DESTDIR=/mnt
> mergemaster -Fp -D /mnt /* don't think is needed since I haven't buildworld from updated sources beyond r364030
> mergemaster -Fi -D /mnt /* don't think is needed since I haven't buildworld from updated sources beyond r364030
> make -DBATCH_DELETE_OLD_FILES delete-old DESTDIR=/mnt
> bectl umount r364030-OpenZFS
> bectl activate r364030-OpenZFS
> shutdown -r now
>
> If that won't work either I'll see if I can build sysutils/openzfs from ports but I'd rather not mix packages and ports.
building and installing the GENERIC kernel did not do anything.
I can confirm BE r364030-OpenZFS booted with GENERIC but I got dropped
into the mountroot prompt again.
Before I got there I saw:

Trying to mount root from zfs:zroot/ROOT/r364030-OpenZFS failed with
error 2: unknown file system.

Guess I'll try to install sysutils/openzfs from ports next.

--
Marco van Lienen -- FreeBSD enthusiast
https://keybase.io/scarcry , GnuPG id: 8580E6CB
"The Tuck Pendleton machine...zero defects."

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 13-CURRENT won't boot after switch to sysutils/openzfs

marco-3
On Sat, Aug 22, 2020 at 10:10:14PM +0000, you (marco) sent the following to [freebsd-current] :

> On Sat, Aug 22, 2020 at 04:48:48PM +0000, you (marco) sent the following to [freebsd-current] :
> > On Sat, Aug 22, 2020 at 12:31:24PM -0400, you (Ryan Moeller) sent the following to [freebsd-current] : > > > > > So besides not being able to boot from the openzfs 2020080800 package install, I can't figure out why I can't upgrade the openzfs pkg to 2020081800 (which is the latest one in ports so I presume a package also exists of that same version)
> >
> > If that won't work either I'll see if I can build sysutils/openzfs from ports but I'd rather not mix packages and ports.
>
> building and installing the GENERIC kernel did not do anything.
> I can confirm BE r364030-OpenZFS booted with GENERIC but I got dropped
> into the mountroot prompt again.
> Before I got there I saw:
>
> Trying to mount root from zfs:zroot/ROOT/r364030-OpenZFS failed with
> error 2: unknown file system.
>
> Guess I'll try to install sysutils/openzfs from ports next.
Not happy with having to install the port but that worked.
I removed openzfs and openzfs-kmod via pkg remove.
Then  did a 'make install clean' from sysutils/openzfs (2020081800) with r364030 BE
active.
Once I confirmed the port installed a newer /boot/modules/openzfs.ko I
destroyed r364030-OpenZFS and created it again so it would be in sync
with r364030 and it would have the latest openzfs.ko.

When I imported my backup pool (single drive, 1 vdev)
/etc/zfs/zpool.cache was automatically created.

So now I have 2 zpool cache files

 [~] ls -l /boot/zfs/zpool.cache /etc/zfs/zpool.cache
 -rw-r--r--  1 root  wheel  1456 Aug 22 22:04 /boot/zfs/zpool.cache
 -rw-r--r--  1 root  wheel  3088 Aug 22 22:54 /etc/zfs/zpool.cache

 [~] zpool get cachefile zroot backup
NAME    PROPERTY   VALUE      SOURCE
backup  cachefile  -          default
zroot   cachefile  -          default

So the port does work even with running the GENERIC-NODEBUG kernel.

Is it even possible to build a port only into a new BE and not the
current one given how /usr is not mounted?
Now I had to polute the active BE which could get me into trouble.
I was hoping using BEs I could experiment by installing a port straight into the mounted BE.
If that is possible I wouldn't mind getting some pointers on how to make that work.

--
Marco van Lienen -- FreeBSD enthusiast
https://keybase.io/scarcry , GnuPG id: 8580E6CB
"The Tuck Pendleton machine...zero defects."

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 13-CURRENT won't boot after switch to sysutils/openzfs

Ryan Moeller-2

On 8/22/20 7:39 PM, marco wrote:

> On Sat, Aug 22, 2020 at 10:10:14PM +0000, you (marco) sent the following to [freebsd-current] :
>> On Sat, Aug 22, 2020 at 04:48:48PM +0000, you (marco) sent the following to [freebsd-current] :
>>> On Sat, Aug 22, 2020 at 12:31:24PM -0400, you (Ryan Moeller) sent the following to [freebsd-current] : > > > > > So besides not being able to boot from the openzfs 2020080800 package install, I can't figure out why I can't upgrade the openzfs pkg to 2020081800 (which is the latest one in ports so I presume a package also exists of that same version)
>>>
>>> If that won't work either I'll see if I can build sysutils/openzfs from ports but I'd rather not mix packages and ports.
>> building and installing the GENERIC kernel did not do anything.
>> I can confirm BE r364030-OpenZFS booted with GENERIC but I got dropped
>> into the mountroot prompt again.
>> Before I got there I saw:
>>
>> Trying to mount root from zfs:zroot/ROOT/r364030-OpenZFS failed with
>> error 2: unknown file system.
>>
>> Guess I'll try to install sysutils/openzfs from ports next.
> Not happy with having to install the port but that worked.


Kernel modules are very dependent on the built module being in sync with
the kernel you're running. Ports that provide kernel modules are prone
to this sort of breakage on -CURRENT because the kernel changes so
frequently break compatibility.


> I removed openzfs and openzfs-kmod via pkg remove.
> Then  did a 'make install clean' from sysutils/openzfs (2020081800) with r364030 BE
> active.
> Once I confirmed the port installed a newer /boot/modules/openzfs.ko I
> destroyed r364030-OpenZFS and created it again so it would be in sync
> with r364030 and it would have the latest openzfs.ko.
>
> When I imported my backup pool (single drive, 1 vdev)
> /etc/zfs/zpool.cache was automatically created.
>
> So now I have 2 zpool cache files
>
>   [~] ls -l /boot/zfs/zpool.cache /etc/zfs/zpool.cache
>   -rw-r--r--  1 root  wheel  1456 Aug 22 22:04 /boot/zfs/zpool.cache
>   -rw-r--r--  1 root  wheel  3088 Aug 22 22:54 /etc/zfs/zpool.cache
>
>   [~] zpool get cachefile zroot backup
> NAME    PROPERTY   VALUE      SOURCE
> backup  cachefile  -          default
> zroot   cachefile  -          default
>
> So the port does work even with running the GENERIC-NODEBUG kernel.
>
> Is it even possible to build a port only into a new BE and not the
> current one given how /usr is not mounted?


The port will build in a jail for sure, maybe also a chroot. So `bectl
jail` should do the trick.


> Now I had to polute the active BE which could get me into trouble.
> I was hoping using BEs I could experiment by installing a port straight into the mounted BE.
> If that is possible I wouldn't mind getting some pointers on how to make that work.
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"