summaryrefslogtreecommitdiffstats
path: root/liveinit
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-03-29 01:01:21 +0200
committer Eric Hameleers <alien@slackware.com>2016-03-29 01:01:21 +0200
commit9ad5099f0b3b48e706851996fdb34cd932db5b03 (patch)
treefb5c065d9b27bb504430c1e0bf5944cac423466f /liveinit
parentaeb66655c1883044d07f173570ef3f523fce4f57 (diff)
downloadliveslak-9ad5099f0b3b48e706851996fdb34cd932db5b03.tar.gz
liveslak-9ad5099f0b3b48e706851996fdb34cd932db5b03.tar.xz
Fix the 'setup2hd' script's method of Live content installation.
In the original version of the script, the squashfs modules' contents would be extracted one after the other. However this disregards any package or file deletions inbetween modules. As a result, e.g. a PLASMA5 installation to disk using 'setup2hd' would leave several artefacts in removed_scripts and removed_packages and probably in other locations too. The overlay is now constructed somewhat differently, so that 'setup2hd' can access the full read-only filesystem properly; it will copy this content to the harddisk using rsync. A progress indicator will show the stats of files that are actually being transferred. At the same time, the 'setup2hd' script's language settings are now hard-coded by setting 'LC_ALL' and LANG to "C". Slackware's setup scripts parse command output and expect english texts there, but when you selected a different language when booting your Live OS, this would confuse e.g. 'liloconfig' to the extent that it failed to find the Linux partitions.
Diffstat (limited to 'liveinit')
-rwxr-xr-xliveinit12
1 files changed, 9 insertions, 3 deletions
diff --git a/liveinit b/liveinit
index 21bf588..e761e44 100755
--- a/liveinit
+++ b/liveinit
@@ -555,9 +555,13 @@ if [ "$RESCUE" = "" ]; then
[ ! -d ${UPPERDIR} ] && mkdir -p ${UPPERDIR}
[ ! -d ${OVLWORK} ] && mkdir -p ${OVLWORK}
- # Create the overlay of readonly and writable directories:
+ # Create the overlays of readonly and writable directories:
+ mkdir -p /mnt/${LIVEMAIN}fs
mkdir -p /mnt/overlay
- mount -t overlay -o workdir=${OVLWORK},upperdir=${UPPERDIR},lowerdir=${RODIRS} overlay /mnt/overlay
+ # We are going to use the readonly overlay as source for 'setup2hd':
+ mount -t overlay -o lowerdir=${RODIRS} overlay /mnt/${LIVEMAIN}fs
+ # Now add the writable upper layer:
+ mount -t overlay -o workdir=${OVLWORK},upperdir=${UPPERDIR},lowerdir=/mnt/${LIVEMAIN}fs overlay /mnt/overlay
if [ $? -ne 0 -a "$VIRGIN" = "0" ]; then
# Failed to create the persistent overlay - try without persistence:
echo "${MARKER}: Failed to create persistent overlay, attempting to continue in RAM."
@@ -565,7 +569,7 @@ if [ "$RESCUE" = "" ]; then
OVLWORK=/mnt/live/.ovlwork
mkdir -p ${UPPERDIR}
mkdir -p ${OVLWORK}
- mount -t overlay -o workdir=${OVLWORK},upperdir=${UPPERDIR},lowerdir=${RODIRS} overlay /mnt/overlay
+ mount -t overlay -o workdir=${OVLWORK},upperdir=${UPPERDIR},lowerdir=/mnt/${LIVEMAIN}fs overlay /mnt/overlay
fi
debugit
@@ -573,6 +577,8 @@ if [ "$RESCUE" = "" ]; then
# Make the underpinning RAM fs accessible in the live system (for fun):
mkdir -p /mnt/overlay/mnt/live
mount --bind /mnt/live /mnt/overlay/mnt/live
+ mkdir -p /mnt/overlay/mnt/${LIVEMAIN}fs
+ mount --bind /mnt/${LIVEMAIN}fs /mnt/overlay/mnt/${LIVEMAIN}fs
if [ $TORAM -eq 0 ]; then
# Same for the Linux filesystem on the USB stick: