Project

General

Profile

Feature #8473

Feature #8415: Migrate from aufs to overlayfs

Add support to live-boot to support multiple read-only lower layers with overlayfs

Added by intrigeri about 5 years ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Elevated
Assignee:
-
Category:
-
Target version:
Start date:
12/21/2014
Due date:
% Done:

100%

Feature Branch:
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Related issues

Blocked by Tails - Feature #8472: Wait for overlayfs to support multiple read-only lower layers Resolved 12/21/2014
Blocked by Tails - Bug #8483: Fix overlayfs support in live-boot upstream Resolved 12/24/2014
Blocks Tails - Feature #9373: Make tails-iuk support overlayfs Resolved
Blocks Tails - Feature #16209: Core work: Foundations Team Confirmed

History

#1 Updated by intrigeri about 5 years ago

  • Blocked by Feature #8472: Wait for overlayfs to support multiple read-only lower layers added

#2 Updated by intrigeri about 5 years ago

  • Blocked by Bug #8483: Fix overlayfs support in live-boot upstream added

#3 Updated by intrigeri over 4 years ago

This can be worked on once Linux 4.0.0 has been successfully built for i386 in Debian experimental.

#4 Updated by intrigeri over 4 years ago

I'm told that something like that works:

mount -t overlay overlay -olowerdir=./psu-test2_squashfs:./psu-test_squashfs:filesystem_squashfs,upperdir=./psu_overlay_rw,workdir=./psu_overlay_work ./psu_overlay

#5 Updated by intrigeri over 4 years ago

  • Feature Branch set to feature/8415-overlayfs

intrigeri wrote:

This can be worked on once Linux 4.0.0 has been successfully built for i386 in Debian experimental.

That's not a blocker anymore in the topic branch.

#6 Updated by intrigeri over 4 years ago

  • Target version set to Sustainability_M1

#7 Updated by sajolida over 4 years ago

  • Target version changed from Sustainability_M1 to 2016

#9 Updated by intrigeri about 4 years ago

  • Status changed from Confirmed to In Progress
  • % Done changed from 0 to 10

#11 Updated by intrigeri over 3 years ago

  • Target version deleted (2016)

Given we could do #10298 without migrating to overlayfs, we removed this from our roadmap at the summit this year.

#12 Updated by u about 2 years ago

  • Assignee set to anonym

anonym, I'm reassigning this to you as the parent is part of the roadmap again it seems, and you're the assignee. I let you verify if / how this ticket here is still relevant.

#13 Updated by intrigeri over 1 year ago

  • Assignee changed from anonym to segfault
  • Target version set to Tails_3.11

#14 Updated by intrigeri over 1 year ago

#15 Updated by intrigeri over 1 year ago

#16 Updated by intrigeri about 1 year ago

  • Target version changed from Tails_3.11 to Tails_3.13

#17 Updated by intrigeri about 1 year ago

#18 Updated by intrigeri about 1 year ago

#19 Updated by intrigeri 12 months ago

#20 Updated by intrigeri 12 months ago

#21 Updated by intrigeri 12 months ago

  • Target version changed from Tails_3.13 to 2019

#22 Updated by intrigeri 10 months ago

  • Assignee deleted (segfault)

#23 Updated by intrigeri about 2 months ago

  • Feature Branch deleted (feature/8415-overlayfs)

#24 Updated by intrigeri about 2 months ago

  • Blocked by Feature #17152: Port tails-iuk to a more lightweight set of dependencies added

#25 Updated by intrigeri about 2 months ago

  • Blocked by deleted (Feature #17152: Port tails-iuk to a more lightweight set of dependencies)

#26 Updated by segfault about 2 months ago

live-boot already supports multiple read-only layers. I tested it like this:

  • Create 3 squashfs files:
mkdir 1 2 3
echo 1 > 1/foo
echo 2 > 2/foo
echo 3 > 3/foo
echo 1 > 1/bar
echo 2 > 2/bar
mksqashfs 1 1.squashfs
mksqashfs 2 2.squashfs
mksqashfs 3 3.squashfs
  • Create a disk image and put the squashfs files there:
truncate -s 1M usb
LOOPDEV="$(sudo losetup --find --show usb)" 
// Format the loop device via GNOME Disks
sudo mount "${LOOPDEV}" /mnt
cp *.squashfs /mnt
sudo umount /mnt
  • Boot an image built from the #8415 feature branch (commit 5209e7d757)
  • Add break=premount (and debug) to the kernel command line options
  • Attach the disk image to the VM as a USB
  • Copy the squashfs files to the live directory and add them to Tails.module:
// Mount the root filesystem:
mount -t vfat /dev/sda1 /root

// Mount the USB
mkdir /mnt
mount -t ext4 /dev/sdb /mnt

// Copy the squashfs files to the live directory
cp /mnt/*.squashfs /root/live/

// Add the filenames to Tails.module
echo -e "1.squashfs\n2.squashfs\n3.squashfs" >> /root/live/Tails.module

// Unmount the filesystems
umount /mnt /root

// Continue boot
exit

The booted Tails then contained the following files:

cat /foo
3
cat /bar
2

... which means that the squashfs's were mounted in the correct order (first 1, then 2, then 3).

#27 Updated by intrigeri about 2 months ago

  • Status changed from In Progress to Resolved

Great!

#28 Updated by intrigeri about 2 months ago

  • % Done changed from 10 to 100

Also available in: Atom PDF