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

Kernels with builtin ZFS support lack a way to mount a ZFS dataset as a rootfs without an initramfs #872

Closed
ryao opened this issue Aug 16, 2012 · 11 comments
Labels
Type: Feature Feature request or new feature

Comments

@ryao
Copy link
Contributor

ryao commented Aug 16, 2012

Currently, the only way to do this is with an initramfs. It would be nice to support mounting the rootfs from a ZFS dataset without an initramfs when ZFS is built into the kernel binary.

@behlendorf
Copy link
Contributor

I'm not sure I exactly understand the issue here.

@ryao
Copy link
Contributor Author

ryao commented Aug 19, 2012

On Solaris, GRUB provides the kernel with information on the root pool, which is used to mount the root filesystem:

https://github.com/dajhorn/pkg-zfs/wiki/Dual-booting-Linux-and-Solaris-with-ZFS-aware-GRUB-0.97

On Linux, there is no equivalent. Currently, people circumvent this by using an initramfs image. This made sense when ZFS existed solely as an external module, but it is a hack when ZFS is built into the kernel. It would be nice to have a way to boot without an initramfs when ZFS support is built into the kernel.

This is probably a low priority for all contributors, but I thought it would be worthwhile to have an issue for it so that people know that we are aware of it

@ryao
Copy link
Contributor Author

ryao commented Aug 20, 2012

spa_import_rootpool() in ./module/zfs/spa.c could be used to enable this to work. We just need to provide GRUB with a way to pass the requisite information to the kernel module and have the kernel module run this routine when it sees it during initialization.

@schreiberstein
Copy link

Is there anyone working on this? I would love to see this feature!

@FransUrbo
Copy link
Contributor

@ryao Is this still an issue with latest grub (which have quite extensive zfs support)?

@behlendorf behlendorf removed this from the 0.6.6 milestone Oct 6, 2014
@ryao
Copy link
Contributor Author

ryao commented May 21, 2015

@FransUrbo It is an issue because the module makes upcalls to userspace.

@bunder2015
Copy link
Contributor

I am also interested in this feature as well.

@kernelOfTruth
Copy link
Contributor

+1

@jwezel
Copy link

jwezel commented Sep 17, 2017

It's 2017 and we absolutely need this.

@henglinli
Copy link

initramfs less boot zfs root feature should the advantage against btrfs, we need this feautre

@rlaager
Copy link
Member

rlaager commented Dec 14, 2019

I'm closing this in favor of #4300, which has more notes.

@rlaager rlaager closed this as completed Dec 14, 2019
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this issue Sep 26, 2023
…object_agent/wasm-bindgen-futures-0.4.35

Bump wasm-bindgen-futures from 0.4.34 to 0.4.35 in /cmd/zfs_object_agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

9 participants