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

Many problems with live-rw partition



On Wed, Aug 20, 2008 at 10:59:52PM +0200, Marco Amadori wrote:
> Il mercoled? 20 agosto 2008 16:31:54 Andreas Bombe ha scritto:
> > It starts with not booting through and dropping into a shell.  There's
> > two issues.  First, it doesn't use the busybox mount in
> > scripts/live-helper but the normal mount binary, which fails without a
> > filesystem type given.  I fixed that by adding
> > '-t $(get_fstype "${dev}")' but then comes the second issue, remounting
> > ro isn't possible because the filesystem (the live-rw one) is busy.
> 
> The first part will be added, I need to try to figure how to fix the other 
> one.

The question is, is that the correct fix?  I think it is because of the
PATH setting where it prefers binaries from the mounted root instead of
those from the initramfs.  On the other hand busybox appears not to be a
dependency of initramfs-tools so a standard mount might be used anyway
and this fix is required.

> > It is used in the aufs after all, so it doesn't work.  My fix for that
> > one was not triggering the remount ro attempt by commenting the try_snap
> > calls in scripts/live since I do not need snapshot files here.
> 
> I need to think on how to handle that case.

I haven't yet followed the flow in the live scripts, but my idea would
be to note the existence of live-rw without immediately using it.  Make
it part of the root union only at the end.

> > Once I get it to boot without intervention, other issues crop up.  For
> > one, /dev is in /live/cow and therefore saved unnecessarily.  Also,
> > /etc/hosts and /etc/fstab appear to be appended with initial
> > configuration unconditionally, meaning that they grow longer with every
> > boot.  In the case of fstab it leads to tmpfs being mounted on /tmp
> > multiple times.
> 
> That is true, both exclude pattern and avoid unnecessaries appends needs to be 
> applied.

This too might be fixed with a late mount of live-rw.  First a tmpfs
would be made part of the root union for writability, all the
initialization happens (and is thus not persistent) and finally live-rw
is added.  The tmpfs would stay in the middle between live-rw and the
read only image.

It would have the benefit of avoiding error prone special casing.
However, I haven't examined the scripts enough to see if this is
feasible.



Reply to: