Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: filesystems: convert cifs/cifsroot.txt to ReST

- Add a SPDX header;
- Adjust document title;
- Some whitespace fixes and new line breaks;
- Mark literal blocks as such;
- Add it to filesystems/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/28de01ee52283287e4195cf736d7154f122d30d4.1588021877.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
175cc46f 0e822145

+33 -24
+32 -24
Documentation/filesystems/cifs/cifsroot.txt Documentation/filesystems/cifs/cifsroot.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + =========================================== 1 4 Mounting root file system via SMB (cifs.ko) 2 5 =========================================== 3 6 4 7 Written 2019 by Paulo Alcantara <palcantara@suse.de> 8 + 5 9 Written 2019 by Aurelien Aptel <aaptel@suse.com> 6 10 7 11 The CONFIG_CIFS_ROOT option enables experimental root file system ··· 36 32 ==================== 37 33 38 34 To enable SMB1+UNIX extensions you will need to set these global 39 - settings in Samba smb.conf: 35 + settings in Samba smb.conf:: 40 36 41 37 [global] 42 38 server min protocol = NT1 ··· 45 41 Kernel command line 46 42 =================== 47 43 48 - root=/dev/cifs 44 + :: 45 + 46 + root=/dev/cifs 49 47 50 48 This is just a virtual device that basically tells the kernel to mount 51 49 the root file system via SMB protocol. 52 50 53 - cifsroot=//<server-ip>/<share>[,options] 51 + :: 52 + 53 + cifsroot=//<server-ip>/<share>[,options] 54 54 55 55 Enables the kernel to mount the root file system via SMB that are 56 56 located in the <server-ip> and <share> specified in this option. ··· 73 65 Examples 74 66 ======== 75 67 76 - Export root file system as a Samba share in smb.conf file. 68 + Export root file system as a Samba share in smb.conf file:: 77 69 78 - ... 79 - [linux] 80 - path = /path/to/rootfs 81 - read only = no 82 - guest ok = yes 83 - force user = root 84 - force group = root 85 - browseable = yes 86 - writeable = yes 87 - admin users = root 88 - public = yes 89 - create mask = 0777 90 - directory mask = 0777 91 - ... 70 + ... 71 + [linux] 72 + path = /path/to/rootfs 73 + read only = no 74 + guest ok = yes 75 + force user = root 76 + force group = root 77 + browseable = yes 78 + writeable = yes 79 + admin users = root 80 + public = yes 81 + create mask = 0777 82 + directory mask = 0777 83 + ... 92 84 93 - Restart smb service. 85 + Restart smb service:: 94 86 95 - # systemctl restart smb 87 + # systemctl restart smb 96 88 97 89 Test it under QEMU on a kernel built with CONFIG_CIFS_ROOT and 98 - CONFIG_IP_PNP options enabled. 90 + CONFIG_IP_PNP options enabled:: 99 91 100 - # qemu-system-x86_64 -enable-kvm -cpu host -m 1024 \ 101 - -kernel /path/to/linux/arch/x86/boot/bzImage -nographic \ 102 - -append "root=/dev/cifs rw ip=dhcp cifsroot=//10.0.2.2/linux,username=foo,password=bar console=ttyS0 3" 92 + # qemu-system-x86_64 -enable-kvm -cpu host -m 1024 \ 93 + -kernel /path/to/linux/arch/x86/boot/bzImage -nographic \ 94 + -append "root=/dev/cifs rw ip=dhcp cifsroot=//10.0.2.2/linux,username=foo,password=bar console=ttyS0 3" 103 95 104 96 105 97 1: https://wiki.samba.org/index.php/UNIX_Extensions
+1
Documentation/filesystems/index.rst
··· 59 59 befs 60 60 bfs 61 61 btrfs 62 + cifs/cifsroot 62 63 ceph 63 64 cramfs 64 65 debugfs