[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#658265: live-boot doesn't support overlayfs correctly



Package: live-boot
Version: 3.0~a24-1

Dear Colleagues,

I just had to fight with live-boot and overlayfs on Ubuntu Precise.
The Ubuntu Precise Kernel doesn't support the aufs module anymore, but
as a replacement it supports the overlayfs module.

Sadly, live-boot doesn't support overlayfs correctly.

overlayfs doesn't support the dirs=<dir1>=<rw|ro>:<dir2>=<rw|ro> mount
option. So, mounting overlayfs fails.

I tried to fix it for me, and found this solution: (Patch against latest
git head rev)

sadig@t420-sadig:~/live-boot/live-boot$ git diff -p -u
diff --git a/scripts/live b/scripts/live
index 8ffbc20..12d99bd 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1569,7 +1569,10 @@ setup_unionfs ()
                                unionmountopts="-t ${cow_fstype} -o
noatime,union,${cow_mountopt} ${cowdevice}"
                                mount_full $unionmountopts
"${unionmountpoint}"
                                ;;
-
+                       overlayfs)
+                               unionmountopts="-o
noatime,lowerdir=${unionro},upperdir=${unionrw},rw"
+                               mount -t ${UNIONTYPE} ${unionmountopts}
${UNIONTYPE} "${unionmountpoint}"
+                               ;;

                        *)
                                if [ -n "${PERSISTENT_READONLY}" ]

This works for me. Eventually it's also the correct way of using
overlayfs inside live-boot.

As I'm trying to get FAI running on Ubuntu, this works now as expected.
Sadly I'm not able to test anything else then this FAI usecase.

I tested it with using a nfs mount as live filesystem and a squashfs
image. Both ways are working with the mentioned patch.

There is the RFC page http://live.debian.net/devel/rfc/overlayfs/ , but
sadly the patch which was posted on paste.debian.net is gone.


Hope it helps,

\sh

-- 
SysAdmin & OpenSource Enthusiast
Ubuntu Developer


-- 
SysAdmin & OpenSource Enthusiast
Ubuntu Developer




Reply to: