Skip to content

Commit

Permalink
boot-local: fix detecting 'first Linux filesystem partition'
Browse files Browse the repository at this point in the history
  • Loading branch information
volth authored and Mael-Le-Garrec committed Nov 27, 2018
1 parent 856959c commit b13c614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Linux/tree-common/boot-local
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mountroot() {
root_partition_uuid=$(echo "$devinfo" | cut -d' ' -f2- | grep -x "root .*" | head -1 | cut -d' ' -f3)
# If that doesn't work, use the first Linux filesystem partition
if [ -z "$root_partition_uuid" ]; then
root_partition_uuid=$(echo "$devinfo" | cut -d' ' -f3 | grep -x "$partition_type .*" | head -1 | cut -d' ' -f2)
root_partition_uuid=$(echo "$devinfo" | cut -d' ' -f3- | grep -x "$partition_type .*" | head -1 | cut -d' ' -f2)
fi
# If that didn't work either, give up
[ -z "$root_partition_uuid" ] && die "No root partition found"
Expand Down

0 comments on commit b13c614

Please sign in to comment.