summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts/files/init-live.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/initrdscripts/files/init-live.sh')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-live.sh23
1 files changed, 19 insertions, 4 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index eb5ab5b7a5..737dae4cbc 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -7,6 +7,7 @@ ROOT_IMAGE="rootfs.img"
7MOUNT="/bin/mount" 7MOUNT="/bin/mount"
8UMOUNT="/bin/umount" 8UMOUNT="/bin/umount"
9ISOLINUX="" 9ISOLINUX=""
10UNIONFS="no"
10 11
11early_setup() { 12early_setup() {
12 mkdir /proc 13 mkdir /proc
@@ -89,17 +90,31 @@ case $label in
89 mkdir $ROOT_MOUNT 90 mkdir $ROOT_MOUNT
90 mknod /dev/loop0 b 7 0 2>/dev/null 91 mknod /dev/loop0 b 7 0 2>/dev/null
91 92
92 if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then 93
93 fatal "Couldnt mount rootfs image" 94 if [ "$UNIONFS" = "yes" ]; then
95 mkdir /rootfs-tmp
96
97 if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE /rootfs-tmp ; then
98 fatal "Could not mount rootfs image"
99 else
100 mkdir /cow
101 mount -t tmpfs -o rw,noatime,mode=755 tmpfs /cow
102 mount -t unionfs -o dirs=/cow:/rootfs-tmp=ro unionfs $ROOT_MOUNT
103 boot_live_root
104 fi
94 else 105 else
95 boot_live_root 106 if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
107 fatal "Could not mount rootfs image"
108 else
109 boot_live_root
110 fi
96 fi 111 fi
97 ;; 112 ;;
98 install) 113 install)
99 if [ -f /media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then 114 if [ -f /media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then
100 ./install.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode 115 ./install.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode
101 else 116 else
102 fatal "Couldnt find install script" 117 fatal "Could not find install script"
103 fi 118 fi
104 119
105 # If we're getting here, we failed... 120 # If we're getting here, we failed...