[arch-releng] [PATCH] Allow using a USB device as read-write branch instead of tmpfs
--- archiso/hooks/archiso | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso index ab55be6..5cbfb44 100644 --- a/archiso/hooks/archiso +++ b/archiso/hooks/archiso @@ -84,7 +84,13 @@ run_hook () /bin/modprobe -q aufs >/dev/null 2>&1 msg ":: Mounting root (aufs) filesystem" - /bin/mount -t aufs -o dirs=/tmpfs=rw none /real_root + if [ "${livesystem}" = "rw" ]; then + /bin/mount -o remount,rw /bootmnt + mkdir -p /bootmnt/livesystem + /bin/mount -t aufs -o dirs=/bootmnt/livesystem=rw none /real_root + else + /bin/mount -t aufs -o dirs=/tmpfs=rw none /real_root + fi export LOOP_NUM="0" msg ":: Mounting images" -- 1.6.4.1
On Mon, 24 Aug 2009 01:02:15 +0200 Thomas Bächler <thomas@archlinux.org> wrote:
--- archiso/hooks/archiso | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso index ab55be6..5cbfb44 100644 --- a/archiso/hooks/archiso +++ b/archiso/hooks/archiso @@ -84,7 +84,13 @@ run_hook () /bin/modprobe -q aufs >/dev/null 2>&1
msg ":: Mounting root (aufs) filesystem" - /bin/mount -t aufs -o dirs=/tmpfs=rw none /real_root + if [ "${livesystem}" = "rw" ]; then + /bin/mount -o remount,rw /bootmnt + mkdir -p /bootmnt/livesystem + /bin/mount -t aufs -o dirs=/bootmnt/livesystem=rw none /real_root + else + /bin/mount -t aufs -o dirs=/tmpfs=rw none /real_root + fi
export LOOP_NUM="0" msg ":: Mounting images"
If this is the patch that enables you to make all your changes persistent on the usb stick, then I love this. Maybe we could go further: do we even need unionning here at all? Dieter
Dieter Plaetinck schrieb:
If this is the patch that enables you to make all your changes persistent on the usb stick, then I love this. Maybe we could go further: do we even need unionning here at all?
We need unioning to keep the image creation consistent with CDs and to severely reduce the download size (remember that squashfs reduces the size considerably). What you are proposing is a normal installed system on a USB disk, we wouldn't need archiso to create that, but much leaner scripts that only create the root and copy it to a new filesystem. Also, I'd like to have a USB image creator in the future, which takes an existing USB device (potentially with files on it) and installs the live system on it. It is much more convenient to just have 3 squashfs files here instead of a whole operating system. The beauty of this approach is that you can simply delete the /livesystem folder from the USB stick and have the image in its original state. We could still offer an option in archiso to just create a filesystem from the workdir instead of squashing and unioning - it has its uses.
On Mon, 24 Aug 2009 11:54:47 +0200 Thomas Bächler <thomas@archlinux.org> wrote:
Dieter Plaetinck schrieb:
If this is the patch that enables you to make all your changes persistent on the usb stick, then I love this. Maybe we could go further: do we even need unionning here at all?
We need unioning to keep the image creation consistent with CDs and to severely reduce the download size (remember that squashfs reduces the size considerably).
- I don't see why it should be a goal to have it the same way as the CD. - squashfs: just found out it cannot be RW. maybe there is a solution to have compression without unioning. the img's are 380 & 400 MB big. I wonder how big they would be without compression. they probably still fit on 1GB usb sticks. but yeah the download would be bigger.. good point.
We could still offer an option in archiso to just create a filesystem from the workdir instead of squashing and unioning - it has its uses.
which uses are you thinking of? Dieter
participants (2)
-
Dieter Plaetinck
-
Thomas Bächler