Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 790434
Collapse All | Expand All

(-)a/common.sh (-1 / +12 lines)
Lines 155-160 Link Here
155
	done
155
	done
156
}
156
}
157
157
158
# add forth parameter to pickup btrfs subvol info
158
parsefstab () {
159
parsefstab () {
159
	while read -r line; do
160
	while read -r line; do
160
		case "$line" in
161
		case "$line" in
Lines 165-176 Link Here
165
				set -f
166
				set -f
166
				set -- $line
167
				set -- $line
167
				set +f
168
				set +f
168
				printf '%s %s %s\n' "$1" "$2" "$3"
169
				printf '%s %s %s %s\n' "$1" "$2" "$3" "$4"
169
			;;
170
			;;
170
		esac
171
		esac
171
	done
172
	done
172
}
173
}
173
174
175
#check_btrfs_mounted $bootsv $bootuuid)
176
check_btrfs_mounted () {
177
	bootsv="$1"
178
	bootuuid="$2"
179
	bootdev=$(blkid | grep "$bootuuid" | cut -d ':' -f  1)
180
	bindfrom=$(grep " btrfs " /proc/self/mountinfo |
181
		   grep " $bootdev " | grep " /$bootsv " | cut -d ' ' -f 5)
182
	printf "%s" "$bindfrom"
183
}
184
174
unescape_mount () {
185
unescape_mount () {
175
	printf %s "$1" | \
186
	printf %s "$1" | \
176
		sed 's/\\011/	/g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g'
187
		sed 's/\\011/	/g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g'
(-)a/linux-boot-prober (-3 / +135 lines)
Lines 5-20 Link Here
5
5
6
newns "$@"
6
newns "$@"
7
require_tmpdir
7
require_tmpdir
8
ERR="n"
9
10
tmpmnt=/var/lib/os-prober/mount
11
if [ ! -d "$tmpmnt" ]; then
12
	mkdir "$tmpmnt"
13
fi
14
15
mounted=
16
bootmnt=
17
bootsv=
18
bootuuid=
8
19
9
grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true
20
grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true
10
21
11
partition="$1"
22
if [ -z "$1" ]; then
23
	ERR=y
24
elif [ "$1" = btrfs -a -z "$2" ]; then
25
	ERR=y
26
elif [ "$1" = btrfs -a -z "$3" ]; then
27
	ERR=y
28
elif [ "$1" = btrfs ]; then
29
	type=btrfs
30
	echo "$2" | grep -q "^UUID=" || ERR=y
31
	echo "$3" | grep -q "^subvol=" || ERR=y
32
	export "$2"
33
	export "$3"
34
	partition=$(blkid | grep "$UUID" | cut -d ':' -f 1 | tr '\n' ' ' | cut -d ' ' -f 1)
35
	debug "btrfs: partition=$partition, UUID=$UUID, subvol=$subvol"
36
else
37
	partition="$1"
38
	type=other
39
fi
12
40
13
if [ -z "$partition" ]; then
41
if [ "x$ERR" != xn ]; then
14
	echo "usage: linux-boot-prober partition" >&2
42
	echo "usage: linux-boot-prober partition" >&2
43
	echo "       linux-boot-prober btrfs UUID=<> subvol=<>" >&2
15
	exit 1
44
	exit 1
16
fi
45
fi
17
46
47
if [ "$type" = btrfs ]; then
48
	# handle all of the btrfs stuff here
49
	if [ ! -e "/proc/self/mountinfo" ]; then
50
		warn "/proc/self/mountinfo does not exist, exiting"
51
		umount "$tmpmnt" 2>/dev/null
52
		rmdir "$tmpmnt" 2>/dev/null
53
		exit 1
54
	fi
55
	mpoint=$(grep "btrfs" /proc/self/mountinfo | grep " /$subvol " | grep " $partition " | cut -d ' ' -f 5)
56
	if [ "$mpoint" = "/" ]; then
57
		warn "specifying active root not valid, exiting"
58
		umount "$tmpmnt" 2>/dev/null
59
		rmdir "$tmpmnt" 2>/dev/null
60
		exit 1
61
	fi
62
	if [ "$mpoint" = "$tmpmnt" ]; then
63
		warn "btrfs subvol=$subvool, UUID=$UUID, already mounted on $tmpmnt **ERROR**"
64
		umount "$tmpmnt" 2>/dev/null
65
		rmdir "$tmpmnt" 2>/dev/null
66
		exit 1
67
	fi
68
	if [ -z "$mpoint" ]; then
69
		# mount the btrfs root
70
71
		if [ -n "$subvol" ]; then
72
			opts="-o subvol=$subvol"
73
		fi
74
75
		if ! mount $opts -t btrfs -U $UUID "$tmpmnt" 2>/dev/null; then
76
			warn "error mounting btrfs subvol=$subvol UUID=$UUID"
77
			umount "$tmpmnt/boot" 2>/dev/null
78
			umount "$tmpmnt" 2>/dev/null
79
			rmdir "$tmpmnt" 2>/dev/null
80
			exit 1
81
		fi
82
	else
83
		# bind-mount
84
		if ! mount -o bind "$mpoint" "$tmpmnt" 2>/dev/null; then
85
			warn "error mounting btrfs bindfrom=$mpoint subvol=$subvol UUID=$UUID"
86
			umount "$tmpmnt/boot" 2>/dev/null
87
			umount "$tmpmnt" 2>/dev/null
88
			rmdir "$tmpmnt" 2>/dev/null
89
			exit 1
90
		fi
91
	fi
92
	debug "mounted btrfs $partition, subvol=$subvol on $tmpmnt"
93
	if [ ! -e "$tmpmnt/etc/fstab" ]; then
94
		warn "btrfs subvol=$subvol not root"
95
		umount "$tmpmnt" 2>/dev/null
96
		rmdir "$tmpmnt" 2>/dev/null
97
		exit 1
98
	fi
99
	bootmnt=$(parsefstab < "$tmpmnt/etc/fstab" | grep " /boot ") || true
100
	if [ -z "$bootmnt" ]; then
101
		# /boot is part of the root
102
		bootpart="$partition"
103
		bootsv="$subvol"
104
	elif echo "$bootmnt" | cut -d ' ' -f 3 | grep -q "btrfs"; then
105
		# separate btrfs /boot subvolume
106
		bootsv=$(echo "$bootmnt" | cut -d ' ' -f 4 | grep "^subvol=" | sed "s/subvol=//" )
107
		bootuuid=$(echo "$bootmnt" | cut -d ' ' -f 1 | grep "^UUID=" | sed "s/UUID=//" )
108
		debug "mounting btrfs $tmpmnt/boot UUID=$bootuuid subvol=$bootsv"
109
		bindfrom=$(check_btrfs_mounted $bootsv $bootuuid)
110
		if [ -n "$bindfrom" ]; then
111
			# already mounted some place
112
			if ! mount -o bind $bindfrom "$tmpmnt/boot" 2>/dev/null; then
113
				warn "error bind mounting btrfs boot subvol=$bootsv, from=$bindfrom"
114
				umount "$tmpmnt/boot" 2>/dev/null
115
				umount "$tmpmnt" 2>/dev/null
116
				rmdir "$tmpmnt" 2>/dev/null
117
				exit 1
118
			fi
119
		elif ! mount -o subvol=$bootsv -t btrfs -U $bootuuid "$tmpmnt/boot" 2>/dev/null; then
120
			warn "error mounting btrfs boot partition subvol=$bootsv, UUID=$bootuuid"
121
			umount "$tmpmnt/boot" 2>/dev/null
122
			umount "$tmpmnt" 2>/dev/null
123
			rmdir "$tmpmnt" 2>/dev/null
124
			exit 1
125
		fi
126
		bootpart=$(grep " btrfs " /proc/self/mountinfo | grep " /$bootsv " | cut -d ' ' -f 10)
127
	else
128
		# non-btrfs partition or logical volume
129
		linux_mount_boot $partition $tmpmnt
130
		bootpart="${mountboot%% *}"
131
		bootsv=
132
	fi
133
134
	test="/usr/lib/linux-boot-probes/mounted/40grub2"
135
	if [ -f $test ] && [ -x $test ]; then
136
		debug "running $test $partition $bootpart $tmpmnt $type $subvol $bootsv"
137
		if $test "$partition" "$bootpart" "$tmpmnt" "$type" "$subvol" "$bootsv"; then
138
			debug "$test succeeded"
139
		fi
140
	fi
141
	umount "$tmpmnt/boot" 2>/dev/null || true
142
	if ! umount "$tmpmnt" 2>/dev/null; then
143
		warn "problem umount $tmpmnt"
144
	fi
145
	rmdir "$tmpmnt" 2>/dev/null || true
146
147
	exit 0
148
fi
149
18
if ! mapped="$(mapdevfs "$partition")"; then
150
if ! mapped="$(mapdevfs "$partition")"; then
19
	log "Device '$partition' does not exist; skipping"
151
	log "Device '$partition' does not exist; skipping"
20
	continue
152
	continue
Lines 22-29 Link Here
22
154
23
if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then
155
if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then
24
	for test in /usr/lib/linux-boot-probes/*; do
156
	for test in /usr/lib/linux-boot-probes/*; do
25
		debug "running $test"
26
		if [ -x $test ] && [ -f $test ]; then
157
		if [ -x $test ] && [ -f $test ]; then
158
			debug "running $test"
27
			if $test "$partition"; then
159
			if $test "$partition"; then
28
				debug "linux detected by $test"
160
				debug "linux detected by $test"
29
				break
161
				break
(-)a/linux-boot-probes/mounted/common/40grub2 (-3 / +16 lines)
Lines 2-18 Link Here
2
. /usr/share/os-prober/common.sh
2
. /usr/share/os-prober/common.sh
3
set -e
3
set -e
4
4
5
# add support for btrfs with no separate /boot
6
# that is, rootsv = bootsv
5
partition="$1"
7
partition="$1"
6
bootpart="$2"
8
bootpart="$2"
7
mpoint="$3"
9
mpoint="$3"
8
type="$4"
10
type="$4"
11
rootsv="$5"
12
bootsv="$6"
9
13
10
found_item=0
14
found_item=0
11
15
12
entry_result () {
16
entry_result () {
17
	if [ "x$type" = "xbtrfs" -a "$partition" = "$bootpart" ]; then
18
		# trim off the leading subvol
19
		kernelfile=$(echo "$kernel" | cut -d '/' -f 2- | cut -d '/' -f 2-)
20
		if [ "x$rootsv" != "x$bootsv" ]; then
21
		   kernelfile="/boot/$kernelfile"
22
		fi
23
	else
24
		kernelfile=$kernel
25
	fi
13
	if [ "$ignore_item" = 0 ] && \
26
	if [ "$ignore_item" = 0 ] && \
14
	   [ -n "$kernel" ] && \
27
	   [ -n "$kernel" ] && \
15
	   [ -e "$mpoint/$kernel" ]; then
28
	   [ -e "$mpoint/$kernelfile" ]; then
16
		result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters"
29
		result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters"
17
		found_item=1
30
		found_item=1
18
	fi
31
	fi
Lines 108-116 Link Here
108
    [ "$mpoint/boot/grub/grub.cfg" -nt "$mpoint/boot/grub/menu.lst" ]); then
121
    [ "$mpoint/boot/grub/grub.cfg" -nt "$mpoint/boot/grub/menu.lst" ]); then
109
	debug "parsing grub.cfg"
122
	debug "parsing grub.cfg"
110
	parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub/grub.cfg"
123
	parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub/grub.cfg"
111
elif [ -e "$mpoint/boot/grub2/grub.cfg" ]; then
124
elif [ -e "$mpoint/boot/grub/grub.cfg" ]; then
112
	debug "parsing grub.cfg"
125
	debug "parsing grub.cfg"
113
	parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub2/grub.cfg"
126
	parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub/grub.cfg"
114
fi
127
fi
115
128
116
if [ "$found_item" = 0 ]; then
129
if [ "$found_item" = 0 ]; then
(-)a/os-prober (-2 / +26 lines)
Lines 76-84 Link Here
76
76
77
	# Also detect OSes on LVM volumes (assumes LVM is active)
77
	# Also detect OSes on LVM volumes (assumes LVM is active)
78
	if type lvs >/dev/null 2>&1; then
78
	if type lvs >/dev/null 2>&1; then
79
		echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name |
79
		echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name 2>/dev/null |
80
			sed "s|-|--|g;s|^[[:space:]]*\(.*\):\(.*\)$|/dev/mapper/\1-\2|")"
80
			sed "s|-|--|g;s|^[[:space:]]*\(.*\):\(.*\)$|/dev/mapper/\1-\2|")"
81
	fi
81
	fi
82
83
	# now lets make sure we got all of the btrfs partitions and disks
84
	blkid | grep 'TYPE="btrfs"' | cut -d ':' -f 1
82
}
85
}
83
86
84
parse_proc_swaps () {
87
parse_proc_swaps () {
Lines 136-141 Link Here
136
	grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
139
	grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
137
fi
140
fi
138
141
142
: >"$OS_PROBER_TMP/btrfs-vols"
143
139
for partition in $(partitions); do
144
for partition in $(partitions); do
140
	if ! mapped="$(mapdevfs "$partition")"; then
145
	if ! mapped="$(mapdevfs "$partition")"; then
141
		log "Device '$partition' does not exist; skipping"
146
		log "Device '$partition' does not exist; skipping"
Lines 154-160 Link Here
154
		continue
159
		continue
155
	fi
160
	fi
156
161
157
	if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map" ; then
162
	# do btrfs processing here; both mounted and unmounted will
163
	# be handled by 50mounted-tests so we can do a subvol only once.
164
	type=$(blkid -o value -s TYPE $mapped || true)
165
	if [ "$type" = btrfs ]; then
166
		uuid=$(blkid -o value -s UUID $mapped)
167
		if grep -q "^$uuid" "$OS_PROBER_TMP/btrfs-vols" ; then
168
			continue
169
		fi
170
		debug "btrfs volume uuid=$uuid partition=$partition"
171
		echo "$uuid" >>"$OS_PROBER_TMP/btrfs-vols"
172
		test="/usr/lib/os-probes/50mounted-tests"
173
		if [ -f "$test" ] && [ -x "$test" ]; then
174
			debug "running $test on btrfs $partition"
175
			if "$test" btrfs "$uuid" "$partition"; then
176
				debug "os detected by $test"
177
				continue
178
			fi
179
		fi
180
181
	elif ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map" ; then
158
		for test in /usr/lib/os-probes/*; do
182
		for test in /usr/lib/os-probes/*; do
159
			if [ -f "$test" ] && [ -x "$test" ]; then
183
			if [ -f "$test" ] && [ -x "$test" ]; then
160
				debug "running $test on $partition"
184
				debug "running $test on $partition"
(-)a/os-probes/common/50mounted-tests (-6 / +139 lines)
Lines 14-32 Link Here
14
	rmdir "$tmpmnt" || true
14
	rmdir "$tmpmnt" || true
15
}
15
}
16
16
17
types="$(fs_type "$partition")"
17
if [ "x$1" = xbtrfs ]; then
18
	types=btrfs
19
	if [ -z "$2" -o -z "$3" ]; then
20
		debug "missing btrfs parameters, exiting"
21
		exit 1
22
	fi
23
	UUID="$2"
24
	BTRFSDEV="$3"
25
else
26
	partition="$1"
27
	types="$(fs_type "$partition")" || types=NOT-DETECTED
28
fi
29
18
if [ "$types" = NOT-DETECTED ]; then
30
if [ "$types" = NOT-DETECTED ]; then
19
	debug "$1 type not recognised; skipping"
31
	debug "$1 type not recognised; skipping"
20
	exit 0
32
	exit 1
21
elif [ "$types" = swap ]; then
33
elif [ "$types" = swap ]; then
22
	debug "$1 is a swap partition; skipping"
34
	debug "$1 is a swap partition; skipping"
23
	exit 0
35
	exit 1
24
elif [ "$types" = crypto_LUKS ]; then
36
elif [ "$types" = crypto_LUKS ]; then
25
	debug "$1 is a LUKS partition; skipping"
37
	debug "$1 is a LUKS partition; skipping"
26
	exit 0
38
	exit 1
27
elif [ "$types" = LVM2_member ]; then
39
elif [ "$types" = LVM2_member ]; then
28
	debug "$1 is an LVM member; skipping"
40
	debug "$1 is an LVM member; skipping"
29
	exit 0
41
	exit 1
30
elif [ "$types" = ntfs ]; then
42
elif [ "$types" = ntfs ]; then
31
	if type ntfs-3g >/dev/null 2>&1; then
43
	if type ntfs-3g >/dev/null 2>&1; then
32
		types='ntfs-3g ntfs'
44
		types='ntfs-3g ntfs'
Lines 35-41 Link Here
35
	if type cryptsetup >/dev/null 2>&1 && \
47
	if type cryptsetup >/dev/null 2>&1 && \
36
	   cryptsetup luksDump "$partition" >/dev/null 2>&1; then
48
	   cryptsetup luksDump "$partition" >/dev/null 2>&1; then
37
		debug "$1 is a LUKS partition; skipping"
49
		debug "$1 is a LUKS partition; skipping"
38
		exit 0
50
		exit 1
39
	fi
51
	fi
40
	for type in $(grep -v nodev /proc/filesystems); do
52
	for type in $(grep -v nodev /proc/filesystems); do
41
		# hfsplus filesystems are mountable as hfs. Try hfs last so
53
		# hfsplus filesystems are mountable as hfs. Try hfs last so
Lines 58-63 Link Here
58
fi
70
fi
59
71
60
mounted=
72
mounted=
73
74
probe_subvol ()
75
{
76
	local subvol=$1
77
	local partition=$2
78
	local UUID=$3
79
	local tmpmnt=$4
80
81
	mounted=
82
	mpoint="$(grep btrfs /proc/self/mountinfo | grep "$partition " | grep "/$subvol " | cut -d ' ' -f 5)"
83
	ret=1
84
85
	if [ -n "$subvol" ]; then
86
		opts="-o subvol=$subvol"
87
	fi
88
89
	if [ -n "$mpoint" ]; then
90
		if [ "x$mpoint" = "x/" ]; then
91
			continue # this is the root for the running system
92
  		fi
93
		mounted=1
94
	else
95
		# again, do not mount btrfs ro
96
		mount -t btrfs $opts -U "$UUID" "$tmpmnt"
97
		mpoint="$tmpmnt"
98
	fi
99
	test="/usr/lib/os-probes/mounted/90linux-distro"
100
	if [ -f "$test" ] && [ -x "$test" ]; then
101
		debug "running subtest $test"
102
		if "$test" "$partition" "$mpoint" btrfs "UUID=$UUID" "subvol=$subvol"; then
103
			debug "os found by subtest $test on subvol $subvol"
104
			ret=0
105
		fi
106
	fi
107
	if [ -z "$mounted" ]; then
108
		if ! umount "$tmpmnt"; then
109
			warn "failed to umount $tmpmnt"
110
		fi
111
	fi
112
	return $ret
113
}
114
115
# all btrfs processing here.  Handle both unmounted and
116
# mounted subvolumes.
117
if [ "$types" = btrfs ]; then
118
	partition="$BTRFSDEV"
119
	debug "begin btrfs processing for $UUID"
120
	# note that the btrfs volume must not be mounted ro
121
	if mount -t btrfs -U "$UUID" "$tmpmnt"  2>/dev/null; then
122
		debug "btrfs volume $UUID mounted"
123
	else
124
		warn "cannot mount btrfs volume $UUID, exiting"
125
		rmdir "$tmpmnt" || true
126
		exit 1
127
	fi
128
	# besides regular subvols, get ro and snapshot so thet can be excluded
129
        subvols=$(btrfs subvolume list "$tmpmnt" | cut -d ' ' -f 9)
130
        rosubvols=$(btrfs subvolume list -r "$tmpmnt" | cut -d ' ' -f 9)
131
        sssubvols=$(btrfs subvolume list -s "$tmpmnt" | cut -d ' ' -f 14)
132
        if ! umount "$tmpmnt"; then
133
            warn "failed to umount btrfs volume on $tmpmnt"
134
            rmdir "$tmpmnt" || true
135
            exit 1
136
        fi
137
138
	found=
139
	mounted=
140
141
	mpoint="$(grep btrfs /proc/self/mountinfo | grep "$partition " | cut -d ' ' -f 5)"
142
	if [ -n "$mpoint" -a "x$mpoint" = "x/" ]; then
143
		debug "This is the root for the running system" #running system must be done elsewhere
144
	else
145
	    #partition was not root of running system, so lets look for bootable subvols
146
	    if [ -n "$mpoint" ] ; then
147
		mounted=1  #partition was already mounted,so lets not unmount it when done
148
	    else
149
		# again, do not mount btrfs ro
150
		mount -t btrfs -U "$UUID" "$tmpmnt"
151
		mpoint="$tmpmnt"
152
	    fi
153
154
	    test="/usr/libexec/os-probes/mounted/90linux-distro"
155
	    if [ -f "$test" ] && [ -x "$test" ]; then
156
		debug "running subtest $test"
157
		if "$test" "$partition" "$mpoint" btrfs "UUID=$UUID"; then
158
		    debug "os found by subtest $test on $partition"
159
		    found=1
160
		fi
161
	    fi
162
	    if [ -z "$mounted" ]; then
163
		if ! umount "$tmpmnt"; then
164
		    warn "failed to umount $tmpmnt"
165
		fi
166
	    fi
167
	fi
168
	found=
169
	# Always probe subvol or root set as default
170
	if probe_subvol "$defaultvol" "$partition" "$UUID" "$tmpmnt"; then
171
		found=1
172
	fi
173
174
	# Probe any other OS on subvol
175
	for subvol in $subvols; do
176
		if echo "$rosubvols" | grep -q -x "$subvol" ||
177
		   echo "$sssubvols" | grep -q -x "$subvol" ||
178
		   echo "$defaultvol" | grep -q -x "$subvol"; then
179
			continue
180
		fi
181
		debug "begin btrfs processing for $UUID subvol=$subvol"
182
		if probe_subvol "$subvol" "$partition" "$UUID" "$tmpmnt"; then
183
			found=1
184
		fi
185
	done
186
	rmdir "$tmpmnt" || true
187
	if [ "$found" ]; then
188
		exit 0
189
	else
190
		exit 1
191
	fi
192
fi
193
61
if type grub-mount >/dev/null 2>&1 && \
194
if type grub-mount >/dev/null 2>&1 && \
62
   type grub-probe >/dev/null 2>&1 && \
195
   type grub-probe >/dev/null 2>&1 && \
63
   grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
196
   grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
(-)a/os-probes/mounted/common/90linux-distro (-1 / +7 lines)
Lines 7-12 Link Here
7
partition="$1"
7
partition="$1"
8
dir="$2"
8
dir="$2"
9
type="$3"
9
type="$3"
10
uuid="$4"
11
subvol="$5"
10
12
11
# This test is inaccurate, but given separate / and /boot partitions and the
13
# This test is inaccurate, but given separate / and /boot partitions and the
12
# fact that only some architectures have ld-linux.so, I can't see anything
14
# fact that only some architectures have ld-linux.so, I can't see anything
Lines 143-149 Link Here
143
	fi
145
	fi
144
	
146
	
145
        label="$(count_next_label "$short")"
147
        label="$(count_next_label "$short")"
146
	result "$partition:$long:$label:linux"
148
	if [ "x$type" = "xbtrfs" -a "x$uuid" != "x" -a "x$subvol" != "x" ]; then
149
		result "$partition:$long:$label:linux:$type:$uuid:$subvol"
150
	else
151
		result "$partition:$long:$label:linux"
152
	fi
147
	exit 0
153
	exit 0
148
else
154
else
149
	exit 1
155
	exit 1

Return to bug 790434