From 47921feae0a5eaa41b18c5d15da9c1f6619b40c5 Mon Sep 17 00:00:00 2001 From: Phil Wise Date: Fri, 21 Apr 2017 09:57:01 +0200 Subject: Mount the root filesystem by label rather than path Support identifying the root filesystem via a kernel command line like 'ostree_root=LABEL=mylabel'. Also make it mount a filesystem labeled 'otaroot' by default. This means it is possible to test the Minnowboard build in Qemu. --- recipes-sota/ostree-initrd/files/init.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'recipes-sota/ostree-initrd/files') diff --git a/recipes-sota/ostree-initrd/files/init.sh b/recipes-sota/ostree-initrd/files/init.sh index 806a7b1..1814ca3 100644 --- a/recipes-sota/ostree-initrd/files/init.sh +++ b/recipes-sota/ostree-initrd/files/init.sh @@ -29,10 +29,11 @@ get_ostree_sysroot() { for opt in `cat /proc/cmdline`; do arg=`echo $opt | cut -d'=' -f1` if [ $arg == "ostree_root" ]; then - echo $opt | cut -d'=' -f2 + echo $opt | cut -d'=' -f2- return fi done + echo "LABEL=otaroot" } export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/ostree -- cgit v1.2.3-54-g00ecf