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

Bug#822846: Add option to mount /lib/live/mount/medium read-write



Package: live-boot
Version: 1:20151213
Severity: normal
Tags: upstream

Dear Maintainer,

Currently /lib/live/mount/medium is mounted with ro,noatime, which isn't preferable for all use-case.
For my use-case it need to be mounted rw, so I can replace kernel, initrd and squashfs with my update script which run as a cronjob in the image.

Then we get the next problem, when we mount it rw, we need to fsck it at least once in a while.
We can't use the normal initramfs fsck, as it only add fsck.<filesystem> for filesystems listed in /etc/fstab, at least I don't think we can do that.

Reading on Arch Linux wiki (https://wiki.archlinux.org/index.php/fsck) it seems like fsck can do it.
We just need to write /lib/live/mount/medium to /etc/fstab (with pass 2 <=), I think we can do that in the fsck hook with some simple greb.
cat /etc/mtab | awk '{$6=2; print}' >> /etc/fstab

I have created my own branch in live-boot (kristian), and added a "live-media-mount-opts" option.
I think it work, but need to test it. If someone could help review it, I would appreciate that!


- Kristian

Reply to: