Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/dev/zfs and /proc/self/mounts are required. on Windows 11 #430

Open
Lipown opened this issue Jan 11, 2025 · 7 comments
Open

/dev/zfs and /proc/self/mounts are required. on Windows 11 #430

Lipown opened this issue Jan 11, 2025 · 7 comments

Comments

@Lipown
Copy link

Lipown commented Jan 11, 2025

Windows 11| Version 10.0.26100 Build 26100

OpenZFS Version | OpenZFSOnWindows-debug-2.2.6rc11.exe

Describe the problem you're observing

When input any zfs command I get

C:\Program Files\OpenZFS On Windows>zfs version
/dev/zfs and /proc/self/mounts are required.
Try running 'udevadm trigger' and 'mount -t proc proc /proc' as root. 

I am in test mode in Windows as found it is suggested, tried few versions of openZFS in months back and no solution.

Any help appreciated.

@lundman
Copy link

lundman commented Jan 11, 2025

Generally, that means the .SYS driver is not loaded. The message is just the standard Linux error, we should change it, but it is cosmetic, and requires upstreaming.

Now why isn't it loading the driver? That is a good question, you only need TestMode if you are building it yourself (and can not codesign it with EV certificate). The releases I put out are codesigned.

You could start a CMD shell as Administrator, CD over to C:/Program Files/OpenZFS on Windows, then run
zfsinstaller.exe install OpenZFS.inf. Perhaps it will give us clues as to why it isn't loaded on your system.

There is "SecureBoot" option, but EV certificate codesigning is supposed to be enough for SecureBoot.

@n0xena
Copy link

n0xena commented Jan 12, 2025

maybe a stupid question but a wild guess in the blue: have you restarted the system after installing zfs?

@Lipown
Copy link
Author

Lipown commented Jan 17, 2025

Image

Image

Re restart - yes I did :)

@mcladams
Copy link

mcladams commented Feb 2, 2025

Hello. I am having the same issue. Fresh windows install (to a VHDX with Native Boot just to play with that capability), and installed a fresh version of 2.3.0 rc.2 and rebooted. Here's a screen cut n paste. I got asked two variations as bellow

PS C:\Users\Mike> zpool stattus
/dev/zfs and /proc/self/mounts are required.
Try running 'udevadm trigger' and 'mount -t proc proc /proc' as root.
P

PS C:\Windows\System32> ` /info
Windows Recovery Environment (Windows RE) and system reset configuration
Information:
    Windows RE status:         Enabled
    Windows RE location:       \\?\GLOBALROOT\device\harddisk1\partition3\Recovery\WindowsRE
    Boot Configuration Data (BCD) identifier: 0a540e5c-e0c2-11ef-9c73-505bc2a2412a
    Recovery image location:
    Recovery image index:      0
    Custom image location:
    Custom image index:        0
REAGENTC.EXE: Operation Successful.
# I only carried out the above command to remind myself of what would be the correct path to my vdev.

PS C:\Windows\System32> zpool create -m none -o ashift=12 -o autotrim=yes -o compatibility=openzfs-2.2 `
-O compression=lz4 -O canmount=off -O overlay=off -O atime=off -O acltype=posix -O xattr=sa `
-O normalization=formD -O dnodesize=auto whippy  \\?\GLOBALROOT\device\harddisk1\partition5
/dev/zfs and /proc/self/mounts are required.
Try running 'udevadm trigger' and 'mount -t proc proc /proc' as root.
# fyi backticks / backquotes are the line continuation and escape symbol in powershell

However, normally with the the OpenZFS.SYS driver installed there is a "safely remove this drive" icon for Openzfs in the bottom right overflow, which is not present. I recall that I applied non-ms drivers from a different windows image on this pc to this partition, which could have included older zfs drivers...

@mcladams
Copy link

mcladams commented Feb 2, 2025

Sure enough, my DriverStore\FileRepository contains four versions of openzfs.inf. I wonder if this is common with other people? The relevant servicing command to get a list of non-microsoft ("oem") drivers in the driver store is dism /online /get-drivers /format table

PS> dism /online /get-drivers /format:table | awk -F "|" '{ print $1 $2 $6 $7 }'
Deployment Image Servicing and Management tool
Version: 10.0.26100.1150
Image Version: 10.0.26100.2033

Obtaining list of 3rd party drivers from the driver store...
Driver packages listing:

--------------  ------------------------------  ----------  ----------------
Published Name  Original File Name              Date        Version
--------------  ------------------------------  ----------  ----------------
oem30.inf       openzfs.inf                     23/11/2024  15.52.13.168
oem31.inf       openzfs.inf                     6/12/2024   19.43.4.575
oem32.inf       openzfs.inf                     22/06/2024  19.51.49.918
oem33.inf       openzfs.inf                     22/08/2023  12.54.41.196

This DOES NOT include the driver than I just (thought I had ) installed and rebooted for which has
DriverVer = 01/31/2025,10.59.8.71
It did make it to the install location of C:\Windows\System32\drivers but is not hard linked back to the File Repository, that step didn't happen.

I know very little about drivers but install to 12 is depreciated as "legacy driver packaging practices", and Microsoft recommend for all drivers, and require for Windows drivers, package isolation and run from the DriverStore (13). This should probably be raised as an issue

To test this, I need to remove all the previous Openzfs drivers from my system and try to run the install again. Dism /image /remove-driver /Driver:oem.inf only works against an offline image so I'll be booting to a different partition before testing here whether have them alll removed makes a difference. Although, I can clean my alternative windows for testing from here.

# Get the oem.inf for all openzfs.inf in offline driver stores &  remove them 
# *nobody* should ever use the below doggerel script

PS> dism /image:E:\ /get-drivers /format:table | grep zfs | awk -F "|" `
  '{ print "dism /image:E: /remove-driver /driver:"$1 }' | invoke-expression

Deployment Image Servicing and Management tool
...
Found 1 driver package(s) to remove.
Removing 1 of 1 - oem17.inf: The driver package was successfully removed.
The operation completed successfully.

PS> dism /image:F:\ /get-drivers /format:table | grep zfs | awk -F "|" `
  '{ print "dism /image:F: /remove-driver /driver:"$1 }' | invoke-expression

Deployment Image Servicing and Management tool
Removing 1 of 1 - oem17.inf: The driver package was successfully removed.
...
Deployment Image Servicing and Management tool
Removing 1 of 1 - oem18.inf: The driver package was successfully removed.
...
Deployment Image Servicing and Management tool
Removing 1 of 1 - oem19.inf: The driver package was successfully removed.

Deployment Image Servicing and Management tool
Removing 1 of 1 - oem21.inf: The driver package was successfully removed.

In the case where the driver in System32/drivers was hardlinked to the driver store, as it was on my F:, the driver and OpenZFS.man are gone from \drivers. My E drive install, the files in \drivers were not hardlinked to the driverstore, and are remain after the above dism /remove-driver commands.

@mcladams
Copy link

mcladams commented Feb 2, 2025

Just briefly I can confirm that on the two installs showing this issue, normal uninstall did remove the driver in system32\drivers, but neither was the driver functional. Manual deletion was required, and of the installation folder. On reinstall of 2.3.0 Rc2, zed.d service startec and remains runnning.
I was able to create a zpool out of a partition like such

zpool create -m none -o ashift=12 -o autotrim=on -o compatibility=openzfs-2.2 -O compression=lz4 -O canmount=off -O overlay=off -O atime=off -O acltype=posix -O xattr=sa -O normalization=formD -O dnodesize=auto whippy  \\?\GLOBALROOT\device\harddisk1\partition5
working on dev '\\?\GLOBALROOT\device\harddisk1\partition5'
setting path here '/dev/Harddisk1Partition5'
setting physpath here '\\?\GLOBALROOT\device\harddisk1\partition5'
cannot open '/dev/Harddisk1Partition5': No such file or directory

I also created a zpool a virtual disk no issues. I'll have to find out where zpool.cache gets written and the pools restart automatically. edit: got it, system32\drivers again

@lundman
Copy link

lundman commented Feb 3, 2025

install to 12 is depreciated as "legacy driver packaging practices"

Are we talking about https://github.com/openzfsonwindows/openzfs/blob/development/module/os/windows/OpenZFS.inf#L18-L20
should be 13, for DriverStore? Sounds too easy, but we could certainly try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants