From 42acee1d418bea6de4fd5f983852bec52e66c05e Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Fri, 29 Jan 2016 06:44:50 -0500 Subject: Update location of the squashfs image. --- scripts/install/install-image-new | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/install/install-image-new') diff --git a/scripts/install/install-image-new b/scripts/install/install-image-new index 7965b939..91cb27fa 100755 --- a/scripts/install/install-image-new +++ b/scripts/install/install-image-new @@ -73,7 +73,7 @@ boot_dir=${CD_SQUASH_ROOT}/boot boot_files=$(find $boot_dir -maxdepth 1 -type f -o -type l 2>/dev/null) if [ ! -f "$squash_img" ] || [ -z "$boot_files" ]; then # maybe installing from a live CD boot? - squash_img=/live/image/live/filesystem.squashfs + squash_img=/lib/live/mount/medium/live/filesystem.squashfs boot_dir=/boot boot_files=$(find $boot_dir -maxdepth 1 -type f -o -type l 2>/dev/null) if [ ! -f "$squash_img" ] || [ -z "$boot_files" ]; then -- cgit v1.2.3 From 47e2c43533abe96eca65f3906528c8654d5839b4 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Fri, 29 Jan 2016 07:41:43 -0500 Subject: Correct overlay mount function. --- scripts/install/install-functions | 7 ++++--- scripts/install/install-image-new | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'scripts/install/install-image-new') diff --git a/scripts/install/install-functions b/scripts/install/install-functions index 720ac28a..d6e38523 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -337,11 +337,12 @@ gen_mopts () local mnttype=$1 local upper=$2 local lower=$3 - local mntpoint=$4 + local work=$4 + local mntpoint=$5 case "$1" in - overlayfs) - echo "-t $mnttype -o noatime,upperdir=$upper,lowerdir=$lower $mnttype $mntpoint" + overlay) + echo "-t $mnttype -o noatime,upperdir=$upper,lowerdir=$lower,workdir=$work $mnttype $mntpoint" ;; *) echo "-t $mnttype -o noatime,dirs=$upper=rw:$lower=ro $mnttype $mntpoint" diff --git a/scripts/install/install-image-new b/scripts/install/install-image-new index 91cb27fa..81ac45e9 100755 --- a/scripts/install/install-image-new +++ b/scripts/install/install-image-new @@ -64,6 +64,8 @@ mkdir -p $WRITE_ROOT/boot/$image_name # make dir for backing store rw_dir=$WRITE_ROOT/boot/$image_name/live-rw mkdir -p $rw_dir +work_dir=$WRITE_ROOT/boot/$image_name/live-work +mkdir -p $work_dir echo Copying squashfs image... # these are the defaults if installing from a specified ISO image file. @@ -94,7 +96,7 @@ if ! try_mount "-o loop,ro -t squashfs $target_squash $READ_ROOT"; then echo 'Exiting...' exit 1 fi -margs=$(gen_mopts "overlayfs" $rw_dir $READ_ROOT $INST_ROOT) +margs=$(gen_mopts "overlay" $rw_dir $READ_ROOT $work_dir $INST_ROOT) if ! try_mount "$margs"; then echo 'Exiting...' exit 1 -- cgit v1.2.3 From f31619dc433d8e955cfe9c7abb6bcddb337e43cd Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Mon, 1 Feb 2016 06:46:10 -0500 Subject: Label disk on format and create persistence.conf file to get live-boot to set the correct persistence. --- scripts/install/install-get-partition | 2 +- scripts/install/install-image-new | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/install/install-image-new') diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index eee0dc73..b238f787 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -652,7 +652,7 @@ make_filesystem () { lecho "Creating filesystem on /dev/$ldrive..." progress_indicator start - output=$(mkfs -t $ROOT_FSTYPE /dev/$ldrive 2>&1) + output=$(mkfs -L persistence -t $ROOT_FSTYPE /dev/$ldrive 2>&1) status=$? if [ "$status" != 0 ]; then echo -e "Error: couldn't create the root filesystem.\nSee $INSTALL_LOG for further details.\nExiting..." diff --git a/scripts/install/install-image-new b/scripts/install/install-image-new index 81ac45e9..32c5f3e4 100755 --- a/scripts/install/install-image-new +++ b/scripts/install/install-image-new @@ -90,6 +90,9 @@ cp -p $squash_img $target_squash echo Copying kernel and initrd images... cp -dp $boot_files $WRITE_ROOT/boot/$image_name/ +# create persistence.conf file +echo "/ union" > $WRITE_ROOT/persistence.conf + # set up union root for postinst mkdir -p $INST_ROOT $READ_ROOT if ! try_mount "-o loop,ro -t squashfs $target_squash $READ_ROOT"; then -- cgit v1.2.3 From 9cd1c2f0b577836043b25dfab4d27f03cf587b83 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Mon, 1 Feb 2016 11:56:44 -0500 Subject: Rename "live-rw" to only "rw". --- scripts/install/install-get-partition | 8 ++++---- scripts/install/install-image-existing | 2 +- scripts/install/install-image-new | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/install/install-image-new') diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index b238f787..b17aa563 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -480,7 +480,7 @@ save_image_config() { rm -fr /mnt/config mkdir /mnt/config - output=$(cp -pR /mnt/tmp/boot/$image_name/live-rw/config/* /mnt/config) + output=$(cp -pR /mnt/tmp/boot/$image_name/rw/config/* /mnt/config) if [ -n "$output" ]; then echo -e "Warning: error in copying the old config partition.\nSee $INSTALL_LOG for more details." @@ -492,7 +492,7 @@ save_image_config() { save_image_keys() { image_name=$1 - if [ ! -d /mnt/tmp/boot/$image_name/live-rw/etc/ssh ]; then + if [ ! -d /mnt/tmp/boot/$image_name/rw/etc/ssh ]; then echo "No SSH keys found on $image_name, so none can be saved." return; fi @@ -506,7 +506,7 @@ save_image_keys() { fi mkdir -p /mnt/ssh - output=$(cp -p /mnt/tmp/boot/$image_name/live-rw/etc/ssh/ssh_host_* /mnt/ssh) + output=$(cp -p /mnt/tmp/boot/$image_name/rw/etc/ssh/ssh_host_* /mnt/ssh) if [ -n "$output" ]; then echo -e "Warning: error in copying the old ssh keys." @@ -552,7 +552,7 @@ save_old_info() { image_dirs=/mnt/tmp/boot/* for dir in $image_dirs; do - if [ -f $dir/live-rw/config/.vyatta_config ]; then + if [ -f $dir/rw/config/.vyatta_config ]; then item=${dir##/mnt/tmp/boot/} images=($item ${images[@]}) diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing index 7d58cd96..454ae749 100755 --- a/scripts/install/install-image-existing +++ b/scripts/install/install-image-existing @@ -155,7 +155,7 @@ echo "Installing \"$NEWNAME\" image." # create the new release directories REL_ROOT=$BOOT_DIR/$NEWNAME -RW_DIR="$REL_ROOT/live-rw" +RW_DIR="$REL_ROOT/rw" if ! mkdir -p "$RW_DIR"; then failure_exit 'Cannot create directory for new release.' fi diff --git a/scripts/install/install-image-new b/scripts/install/install-image-new index 32c5f3e4..d6427500 100755 --- a/scripts/install/install-image-new +++ b/scripts/install/install-image-new @@ -62,9 +62,9 @@ echo "OK. This image will be named: $image_name" # make the dir for the new version mkdir -p $WRITE_ROOT/boot/$image_name # make dir for backing store -rw_dir=$WRITE_ROOT/boot/$image_name/live-rw +rw_dir=$WRITE_ROOT/boot/$image_name/rw mkdir -p $rw_dir -work_dir=$WRITE_ROOT/boot/$image_name/live-work +work_dir=$WRITE_ROOT/boot/$image_name/work mkdir -p $work_dir echo Copying squashfs image... -- cgit v1.2.3