What is the kernel syntax when booting from ZFS?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I'm trying to write a grub.cfg completely from scratch that will boot one of several FreeBSD systems off of a single ZFS pool named tank with a set of root file systems named root1, root2, root3.



When I look at the official GRUB2 docs, there is one example in 5.3



menuentry "FreeBSD" 
insmod zfs
search --set=root --label freepool --hint hd0,msdos7
kfreebsd /freebsd@/boot/kernel/kernel
kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
set kFreeBSD.hw.psm.synaptics_support=1



I figured that freepool is likely the ZFS pool name which I would replace with tank. I suspect that the x@y syntax is the way to refer to a file y on the file system x of the pool selected by the search. Then I would replace this with /root1@/boot/kernel/kernel. Sadly, the x@y syntax is undocumented and I don't want to just try with fingers crossed, but rather understand and know what I'm doing. Can anyone shed light on this?










share|improve this question















This question has an open bounty worth +50
reputation from Jens ending ending at 2018-10-16 19:43:14Z">in 7 days.


Looking for an answer drawing from credible and/or official sources.


Shine some light onto undocumented grub syntax.















  • Maybe for comparison the menu entry in these last forum posts... the "@" is "alone" there...
    – jus cogens prime
    Feb 17 '14 at 19:54














up vote
2
down vote

favorite












I'm trying to write a grub.cfg completely from scratch that will boot one of several FreeBSD systems off of a single ZFS pool named tank with a set of root file systems named root1, root2, root3.



When I look at the official GRUB2 docs, there is one example in 5.3



menuentry "FreeBSD" 
insmod zfs
search --set=root --label freepool --hint hd0,msdos7
kfreebsd /freebsd@/boot/kernel/kernel
kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
set kFreeBSD.hw.psm.synaptics_support=1



I figured that freepool is likely the ZFS pool name which I would replace with tank. I suspect that the x@y syntax is the way to refer to a file y on the file system x of the pool selected by the search. Then I would replace this with /root1@/boot/kernel/kernel. Sadly, the x@y syntax is undocumented and I don't want to just try with fingers crossed, but rather understand and know what I'm doing. Can anyone shed light on this?










share|improve this question















This question has an open bounty worth +50
reputation from Jens ending ending at 2018-10-16 19:43:14Z">in 7 days.


Looking for an answer drawing from credible and/or official sources.


Shine some light onto undocumented grub syntax.















  • Maybe for comparison the menu entry in these last forum posts... the "@" is "alone" there...
    – jus cogens prime
    Feb 17 '14 at 19:54












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I'm trying to write a grub.cfg completely from scratch that will boot one of several FreeBSD systems off of a single ZFS pool named tank with a set of root file systems named root1, root2, root3.



When I look at the official GRUB2 docs, there is one example in 5.3



menuentry "FreeBSD" 
insmod zfs
search --set=root --label freepool --hint hd0,msdos7
kfreebsd /freebsd@/boot/kernel/kernel
kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
set kFreeBSD.hw.psm.synaptics_support=1



I figured that freepool is likely the ZFS pool name which I would replace with tank. I suspect that the x@y syntax is the way to refer to a file y on the file system x of the pool selected by the search. Then I would replace this with /root1@/boot/kernel/kernel. Sadly, the x@y syntax is undocumented and I don't want to just try with fingers crossed, but rather understand and know what I'm doing. Can anyone shed light on this?










share|improve this question













I'm trying to write a grub.cfg completely from scratch that will boot one of several FreeBSD systems off of a single ZFS pool named tank with a set of root file systems named root1, root2, root3.



When I look at the official GRUB2 docs, there is one example in 5.3



menuentry "FreeBSD" 
insmod zfs
search --set=root --label freepool --hint hd0,msdos7
kfreebsd /freebsd@/boot/kernel/kernel
kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
set kFreeBSD.hw.psm.synaptics_support=1



I figured that freepool is likely the ZFS pool name which I would replace with tank. I suspect that the x@y syntax is the way to refer to a file y on the file system x of the pool selected by the search. Then I would replace this with /root1@/boot/kernel/kernel. Sadly, the x@y syntax is undocumented and I don't want to just try with fingers crossed, but rather understand and know what I'm doing. Can anyone shed light on this?







freebsd grub2 zfs






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 17 '14 at 16:20









Jens

9991128




9991128






This question has an open bounty worth +50
reputation from Jens ending ending at 2018-10-16 19:43:14Z">in 7 days.


Looking for an answer drawing from credible and/or official sources.


Shine some light onto undocumented grub syntax.








This question has an open bounty worth +50
reputation from Jens ending ending at 2018-10-16 19:43:14Z">in 7 days.


Looking for an answer drawing from credible and/or official sources.


Shine some light onto undocumented grub syntax.













  • Maybe for comparison the menu entry in these last forum posts... the "@" is "alone" there...
    – jus cogens prime
    Feb 17 '14 at 19:54
















  • Maybe for comparison the menu entry in these last forum posts... the "@" is "alone" there...
    – jus cogens prime
    Feb 17 '14 at 19:54















Maybe for comparison the menu entry in these last forum posts... the "@" is "alone" there...
– jus cogens prime
Feb 17 '14 at 19:54




Maybe for comparison the menu entry in these last forum posts... the "@" is "alone" there...
– jus cogens prime
Feb 17 '14 at 19:54















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f115566%2fwhat-is-the-kernel-syntax-when-booting-from-zfs%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f115566%2fwhat-is-the-kernel-syntax-when-booting-from-zfs%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?