File tree 5 files changed +79
-0
lines changed
5 files changed +79
-0
lines changed Original file line number Diff line number Diff line change @@ -928,6 +928,25 @@ NOTE:
928
928
If "exportname" instead of "port" is given the standard port is used.
929
929
Newer versions of nbd are only supported with "exportname".
930
930
931
+ VIRTIOFS
932
+ ~~~~~~~~
933
+ **root=**virtiofs:__<mount-tag>__::
934
+ mount virtiofs share using the tag <mount-tag>.
935
+ The tag name is arbitrary and must match the tag given in the qemu '-device' command.
936
+
937
+ **rootfstype=**virtiofs **root=**__<mount-tag>__::
938
+ mount virtiofs share using the tag <mount-tag>.
939
+ The tag name is arbitrary and must match the tag given in the qemu '-device' command.
940
+
941
+ Both formats are supported by the 'virtiofs' dracut module.
942
+ See https://gitlab.com/virtio-fs/virtiofsd for more information.
943
+
944
+ [listing]
945
+ .Example
946
+ --
947
+ root=virtiofs:host rw
948
+ --
949
+
931
950
DASD
932
951
~~~~
933
952
**rd.dasd=**....::
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+
3
+ # called by dracut
4
+ check () {
5
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
6
+ is_qemu_virtualized && return 0
7
+
8
+ for fs in " ${host_fs_types[@]} " ; do
9
+ [[ $fs == " virtiofs" ]] && return 0
10
+ done
11
+ return 255
12
+ }
13
+
14
+ return 0
15
+ }
16
+
17
+ # called by dracut
18
+ depends () {
19
+ return 0
20
+ }
21
+
22
+ # called by dracut
23
+ installkernel () {
24
+ instmods virtiofs
25
+ }
26
+
27
+ # called by dracut
28
+ install () {
29
+ inst_hook cmdline 95 " $moddir /parse-virtiofs.sh"
30
+ inst_hook pre-mount 99 " $moddir /mount-virtiofs.sh"
31
+ }
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/sh
2
+
3
+ if [ " ${fstype} " = " virtiofs" -o " ${root%%:* } " = " virtiofs" ]; then
4
+ if ! { modprobe virtiofs || strstr " $( cat /proc/filesystems) " virtiofs; }; then
5
+ die " virtiofs is required but not available."
6
+ fi
7
+
8
+ mount -t virtiofs -o " $rflags " " ${root# virtiofs: } " " $NEWROOT " 2>&1 | vinfo
9
+ if ! ismounted " $NEWROOT " ; then
10
+ die " virtiofs: failed to mount root fs"
11
+ exit 1
12
+ fi
13
+
14
+ info " virtiofs: root fs mounted (options: '${rflags} ')"
15
+
16
+ [ -f " $NEWROOT " /forcefsck ] && rm -f -- " $NEWROOT " /forcefsck 2> /dev/null
17
+ [ -f " $NEWROOT " /.autofsck ] && rm -f -- " $NEWROOT " /.autofsck 2> /dev/null
18
+ fi
19
+ :
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/sh
2
+ # Accepted formats:
3
+ # rootfstype=virtiofs root=<tag>
4
+ # root=virtiofs:<tag>
5
+
6
+ if [ " ${fstype} " = " virtiofs" -o " ${root%%:* } " = " virtiofs" ]; then
7
+ # shellcheck disable=SC2034
8
+ rootok=1
9
+ fi
Original file line number Diff line number Diff line change @@ -386,6 +386,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
386
386
%{dracutlibdir }/modules.d/95terminfo
387
387
%{dracutlibdir }/modules.d/95udev-rules
388
388
%{dracutlibdir }/modules.d/95virtfs
389
+ %{dracutlibdir }/modules.d/95virtiofs
389
390
%ifarch s390 s390x
390
391
%{dracutlibdir }/modules.d/80cms
391
392
%{dracutlibdir }/modules.d/81cio_ignore
You can’t perform that action at this time.
0 commit comments