This file is indexed.

/lib/partman/finish.d/40fstab_hd_entries is in ubiquity 2.18.7.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/sh

. /usr/share/debconf/confmodule

[ -f /target/etc/fstab ] || exit 0

OS=$(udpkg --print-os)

escape () {
	printf %s "$1" | \
		sed 's/\\/\\134/g; s/ /\\040/g; s/	/\\011/g; s/\n/\\012/g'
}

# dev, mountpoint, type, options, dump, pass
addfstab () {
	printf "%-15s %-15s %-7s %-15s %-7s %s\n" \
		"$(escape "$1")" "$(escape "$2")" \
		"$(escape "$3")" "$(escape "$4")" \
		"$5" "$6"
	if [ "$OS" = hurd ] ;
	then
		if [ -x /target/hurd/"$3" ]
		then
			settrans -pk "/target/$2" /hurd/"$3" "$1"
		elif [ -x /target/hurd/"$3fs" ]
		then
			settrans -pk "/target/$2" /hurd/"$3fs" "$1"
		fi
	fi
}

db_get partman/mount_style
style="$RET"

fstab=$(
	for i in /lib/partman/fstab.d/*; do
		[ -x "$i" ] || continue
		$i
	done |
	while read fs mp type options dump pass; do
		echo $mp $fs $type $options $dump $pass
	done |
	sort |
	while read mp fs type options dump pass; do
		case "$fs" in
		    (/dev/disk/*|/dev/fd[0-9]*|/dev/mapper/*)
			addfstab "$(mapdevfs $fs)" "$mp" "$type" "$options" "$dump" "$pass"
			;;
		    (/*)
			dev="/var/lib/partman/devices/$(echo "$fs" | sed 's:/:=:g')"
			if [ -f "$dev/loop" ]; then
				loop="$(cat "$dev/loop")"
				if [ "$options" = defaults ]; then
					options=loop
				else
					options="loop,$options"
				fi
				addfstab "$loop" "$mp" "$type" "$options" "$dump" "$pass"
			else
				case "$mp" in
				    (/*)	desc="$mp" ;;
				    (*)		desc="$type" ;;
				esac
				if [ "$style" = label ] && \
				   label="$(block-attr --label $fs)" && \
				   [ "$label" ]; then
					printf "# %s was on %s during installation\n" "$desc" "$(mapdevfs $fs)"
					addfstab "LABEL=$label" "$mp" "$type" "$options" "$dump" "$pass"
				elif ([ "$style" = label ] || [ "$style" = uuid ]) && \
				     uuid="$(block-attr --uuid $fs)" && \
				     [ "$uuid" ]; then
					printf "# %s was on %s during installation\n" "$desc" "$(mapdevfs $fs)"
					addfstab "UUID=$uuid" "$mp" "$type" "$options" "$dump" "$pass"
				else
					addfstab "$(mapdevfs $fs)" "$mp" "$type" "$options" "$dump" "$pass"
				fi
			fi
			;;
		esac
	done
)

echo "$fstab" >>/target/etc/fstab