From 76f275e993eec849bd7c03dc42504b6214774a85 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Oct 2012 00:24:24 +0200 Subject: Use tmpfs for /etc/pacman.d/gnupg instead of a symlink to /run This fixes FS#31815 Signed-off-by: Pierre Schmitz --- archiso/initcpio/hooks/archiso | 1 - 1 file changed, 1 deletion(-) (limited to 'archiso') diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 9445498..5b94743 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/hooks/archiso @@ -35,7 +35,6 @@ _mnt_fs() { _mnt_dev "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" "-w" echo $(readlink -f /dev/mapper/${dm_snap_name}) >> /run/archiso/used_block_devices - echo "/dev/mapper/${dm_snap_name} ${mnt} auto defaults 0 0" >> ${newroot}/etc/fstab } # args: /path/to/image_file, mountpoint -- cgit v1.2.2 From 6f68bec907f5fbfdd1e73be8812ea0ff925965aa Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Oct 2012 10:56:05 +0200 Subject: Fix typo in shebang --- archiso/initcpio/script/archiso_shutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archiso') diff --git a/archiso/initcpio/script/archiso_shutdown b/archiso/initcpio/script/archiso_shutdown index 41b3945..e024efe 100644 --- a/archiso/initcpio/script/archiso_shutdown +++ b/archiso/initcpio/script/archiso_shutdown @@ -1,4 +1,4 @@ -#!/bin/ash +#!/bin/bash # /oldroot depends on things inside /oldroot/run/archiso... mkdir /oldrun -- cgit v1.2.2 From a5e942a5c058bce64c7acafbd76a8ae7c8ceaf78 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Oct 2012 11:08:44 +0200 Subject: Revert "Fix typo in shebang" This reverts commit 6f68bec907f5fbfdd1e73be8812ea0ff925965aa. Using ash was actually correct as only this shell is available in initramfs. It was the commit message of 27940c420f01f550f36c3aa25633b43a4f2a2069 that was wrong --- archiso/initcpio/script/archiso_shutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archiso') diff --git a/archiso/initcpio/script/archiso_shutdown b/archiso/initcpio/script/archiso_shutdown index e024efe..41b3945 100644 --- a/archiso/initcpio/script/archiso_shutdown +++ b/archiso/initcpio/script/archiso_shutdown @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/ash # /oldroot depends on things inside /oldroot/run/archiso... mkdir /oldrun -- cgit v1.2.2 From 1746e31049c50fb413cceeefcf21b2bda4e2de48 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 13 Oct 2012 14:40:41 -0300 Subject: [archiso] Introduce cowfile_size= bootparam If not set, nothing is changed in current behaviour. Since dm-snapshot allows to use as "COW" a file with any size, without caring about the the size of "origin", we can avoid creating a "COW" file of the same size as the "origin". This is really useful, when using as cow_device= a filesystem that is VFAT where sparse files are not supported, so if root-image.fs is 1000M, passing cowfile_size=25% will create a root-image.cow of 250M instead of 1000M. Signed-off-by: Gerardo Exequiel Pozzi --- archiso/initcpio/hooks/archiso | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'archiso') diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 5b94743..491ed2f 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/hooks/archiso @@ -11,13 +11,14 @@ _mnt_fs() { ro_dev=$(losetup --find --show --read-only "${img}") echo ${ro_dev} >> /run/archiso/used_block_devices ro_dev_size=$(blockdev --getsz ${ro_dev}) + rw_dev_size=$((ro_dev_size*cowfile_size/100)) if [[ "${cow_persistent}" == "P" ]]; then if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then msg ":: Found '/run/archiso/cowspace/${cow_directory}/${img_name}.cow', using as persistent." else msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as persistent." - dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${ro_dev_size} &> /dev/null + dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${rw_dev_size} &> /dev/null fi else if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then @@ -25,7 +26,7 @@ _mnt_fs() { rm -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" fi msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as non-persistent." - dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${ro_dev_size} &> /dev/null + dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${rw_dev_size} &> /dev/null fi rw_dev=$(losetup --find --show "/run/archiso/cowspace/${cow_directory}/${img_name}.cow") @@ -101,6 +102,11 @@ run_hook() { [[ -z "${archisobasedir}" ]] && archisobasedir="arch" [[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch" [[ -z "${archisodevice}" ]] && archisodevice="/dev/disk/by-label/${archisolabel}" + if [[ -z "${cowfile_size}" ]]; then + cowfile_size="100" + else + cowfile_size=${cowfile_size/%} + fi if [[ -z "${aitab}" ]]; then aitab="/run/archiso/bootmnt/${archisobasedir}/aitab" -- cgit v1.2.2