€•è7Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ,/translations/zh_CN/filesystems/smb/cifsroot”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/zh_TW/filesystems/smb/cifsroot”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/it_IT/filesystems/smb/cifsroot”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ja_JP/filesystems/smb/cifsroot”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ko_KR/filesystems/smb/cifsroot”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/pt_BR/filesystems/smb/cifsroot”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/sp_SP/filesystems/smb/cifsroot”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒF/var/lib/git/docbuild/linux/Documentation/filesystems/smb/cifsroot.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ+Mounting root file system via SMB (cifs.ko)”h]”hŒ+Mounting root file system via SMB (cifs.ko)”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒ4Written 2019 by Paulo Alcantara ”h]”(hŒ!Written 2019 by Paulo Alcantara <”…””}”(hhßh²hh³Nh´NubhŒ reference”“”)”}”(hŒpalcantara@suse.de”h]”hŒpalcantara@suse.de”…””}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:palcantara@suse.de”uh1hçhhßubhŒ>”…””}”(hhßh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒ0Written 2019 by Aurelien Aptel ”h]”(hŒ Written 2019 by Aurelien Aptel <”…””}”(hjh²hh³Nh´Nubhè)”}”(hŒaaptel@suse.com”h]”hŒaaptel@suse.com”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:aaptel@suse.com”uh1hçhjubhŒ>”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhÊh²hubhÞ)”}”(hŒlThe CONFIG_CIFS_ROOT option enables experimental root file system support over the SMB protocol via cifs.ko.”h]”hŒlThe CONFIG_CIFS_ROOT option enables experimental root file system support over the SMB protocol via cifs.ko.”…””}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhÊh²hubhÞ)”}”(hŒ®It introduces a new kernel command-line option called 'cifsroot=' which will tell the kernel to mount the root file system over the network by utilizing SMB or CIFS protocol.”h]”hŒ²It introduces a new kernel command-line option called ‘cifsroot=’ which will tell the kernel to mount the root file system over the network by utilizing SMB or CIFS protocol.”…””}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒŸIn order to mount, the network stack will also need to be set up by using 'ip=' config option. For more details, see Documentation/admin-guide/nfs/nfsroot.rst.”h]”hŒ£In order to mount, the network stack will also need to be set up by using ‘ip=’ config option. For more details, see Documentation/admin-guide/nfs/nfsroot.rst.”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hXÊA CIFS root mount currently requires the use of SMB1+UNIX Extensions which is only supported by the Samba server. SMB1 is the older deprecated version of the protocol but it has been extended to support POSIX features (See [1]). The equivalent extensions for the newer recommended version of the protocol (SMB3) have not been fully implemented yet which means SMB3 doesn't support some required POSIX file system objects (e.g. block devices, pipes, sockets).”h]”hXÌA CIFS root mount currently requires the use of SMB1+UNIX Extensions which is only supported by the Samba server. SMB1 is the older deprecated version of the protocol but it has been extended to support POSIX features (See [1]). The equivalent extensions for the newer recommended version of the protocol (SMB3) have not been fully implemented yet which means SMB3 doesn’t support some required POSIX file system objects (e.g. block devices, pipes, sockets).”…””}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒÕAs a result, a CIFS root will default to SMB1 for now but the version to use can nonetheless be changed via the 'vers=' mount option. This default will change once the SMB3 POSIX extensions are fully implemented.”h]”hŒÙAs a result, a CIFS root will default to SMB1 for now but the version to use can nonetheless be changed via the ‘vers=’ mount option. This default will change once the SMB3 POSIX extensions are fully implemented.”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒServer configuration”h]”hŒServer configuration”…””}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjkh²hh³hÇh´K$ubhÞ)”}”(hŒ]To enable SMB1+UNIX extensions you will need to set these global settings in Samba smb.conf::”h]”hŒ\To enable SMB1+UNIX extensions you will need to set these global settings in Samba smb.conf:”…””}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K&hjkh²hubhŒ literal_block”“”)”}”(hŒH[global] server min protocol = NT1 unix extension = yes # default”h]”hŒH[global] server min protocol = NT1 unix extension = yes # default”…””}”hjŒsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jŠh³hÇh´K)hjkh²hubeh}”(h]”Œserver-configuration”ah ]”h"]”Œserver configuration”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K$ubhÉ)”}”(hhh]”(hÎ)”}”(hŒKernel command line”h]”hŒKernel command line”…””}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¢h²hh³hÇh´K.ubj‹)”}”(hŒroot=/dev/cifs”h]”hŒroot=/dev/cifs”…””}”hj³sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jŠh³hÇh´K2hj¢h²hubhÞ)”}”(hŒmThis is just a virtual device that basically tells the kernel to mount the root file system via SMB protocol.”h]”hŒmThis is just a virtual device that basically tells the kernel to mount the root file system via SMB protocol.”…””}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K4hj¢h²hubj‹)”}”(hŒ(cifsroot=///[,options]”h]”hŒ(cifsroot=///[,options]”…””}”hjÏsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jŠh³hÇh´K9hj¢h²hubhÞ)”}”(hŒ‚Enables the kernel to mount the root file system via SMB that are located in the and specified in this option.”h]”hŒ‚Enables the kernel to mount the root file system via SMB that are located in the and specified in this option.”…””}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K;hj¢h²hubhÞ)”}”(hŒ>The default mount options are set in fs/smb/client/cifsroot.c.”h]”hŒ>The default mount options are set in fs/smb/client/cifsroot.c.”…””}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K>hj¢h²hubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ&server-ip IPv4 address of the server. ”h]”(hŒterm”“”)”}”(hŒ server-ip”h]”hŒ server-ip”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KAhjubhŒ definition”“”)”}”(hhh]”hÞ)”}”(hŒIPv4 address of the server.”h]”hŒIPv4 address of the server.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KAhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jþh³hÇh´KAhjûubjÿ)”}”(hŒ"share Path to SMB share (rootfs). ”h]”(j)”}”(hŒshare”h]”hŒshare”…””}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KDhj3ubj)”}”(hhh]”hÞ)”}”(hŒPath to SMB share (rootfs).”h]”hŒPath to SMB share (rootfs).”…””}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KDhjEubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj3ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jþh³hÇh´KDhjûh²hubjÿ)”}”(hŒIoptions Optional mount options. For more information, see mount.cifs(8). ”h]”(j)”}”(hŒoptions”h]”hŒoptions”…””}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KGhjbubj)”}”(hhh]”hÞ)”}”(hŒ@Optional mount options. For more information, see mount.cifs(8).”h]”hŒ@Optional mount options. For more information, see mount.cifs(8).”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KGhjtubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjbubeh}”(h]”h ]”h"]”h$]”h&]”uh1jþh³hÇh´KGhjûh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jùhj¢h²hh³hÇh´Nubeh}”(h]”Œkernel-command-line”ah ]”h"]”Œkernel command line”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K.ubhÉ)”}”(hhh]”(hÎ)”}”(hŒExamples”h]”hŒExamples”…””}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjŸh²hh³hÇh´KJubhÞ)”}”(hŒ;Export root file system as a Samba share in smb.conf file::”h]”hŒ:Export root file system as a Samba share in smb.conf file:”…””}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KLhjŸh²hubj‹)”}”(hX+... [linux] path = /path/to/rootfs read only = no guest ok = yes force user = root force group = root browseable = yes writeable = yes admin users = root public = yes create mask = 0777 directory mask = 0777 ...”h]”hX+... [linux] path = /path/to/rootfs read only = no guest ok = yes force user = root force group = root browseable = yes writeable = yes admin users = root public = yes create mask = 0777 directory mask = 0777 ...”…””}”hj¾sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jŠh³hÇh´KNhjŸh²hubhÞ)”}”(hŒRestart smb service::”h]”hŒRestart smb service:”…””}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K]hjŸh²hubj‹)”}”(hŒ# systemctl restart smb”h]”hŒ# systemctl restart smb”…””}”hjÚsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jŠh³hÇh´K_hjŸh²hubhÞ)”}”(hŒ^Test it under QEMU on a kernel built with CONFIG_CIFS_ROOT and CONFIG_IP_PNP options enabled::”h]”hŒ]Test it under QEMU on a kernel built with CONFIG_CIFS_ROOT and CONFIG_IP_PNP options enabled:”…””}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KahjŸh²hubj‹)”}”(hŒÖ# qemu-system-x86_64 -enable-kvm -cpu host -m 1024 \ -kernel /path/to/linux/arch/x86/boot/bzImage -nographic \ -append "root=/dev/cifs rw ip=dhcp cifsroot=//10.0.2.2/linux,username=foo,password=bar console=ttyS0 3"”h]”hŒÖ# qemu-system-x86_64 -enable-kvm -cpu host -m 1024 \ -kernel /path/to/linux/arch/x86/boot/bzImage -nographic \ -append "root=/dev/cifs rw ip=dhcp cifsroot=//10.0.2.2/linux,username=foo,password=bar console=ttyS0 3"”…””}”hjösbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jŠh³hÇh´KdhjŸh²hubhÞ)”}”(hŒ31: https://wiki.samba.org/index.php/UNIX_Extensions”h]”(hŒ1: ”…””}”(hjh²hh³Nh´Nubhè)”}”(hŒ0https://wiki.samba.org/index.php/UNIX_Extensions”h]”hŒ0https://wiki.samba.org/index.php/UNIX_Extensions”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”juh1hçhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KihjŸh²hubeh}”(h]”Œexamples”ah ]”h"]”Œexamples”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KJubeh}”(h]”Œ)mounting-root-file-system-via-smb-cifs-ko”ah ]”h"]”Œ+mounting root file system via smb (cifs.ko)”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jTŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j.j+jŸjœjœj™j&j#uŒ nametypes”}”(j.‰jŸ‰jœ‰j&‰uh}”(j+hÊjœjkj™j¢j#jŸuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.