aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-12-06 15:53:45 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-12-06 15:53:45 +0000
commit93ce697c0075aeb51db9b78c0d47e10213aa1885 (patch)
tree94474e18b9f1fd4820c49549014f9506efc7ff00
parent6bcb2c2b0860779dc44d8dd27259f9edc6c9e6e8 (diff)
downloadalpine-conf-93ce697c0075aeb51db9b78c0d47e10213aa1885.tar.bz2
alpine-conf-93ce697c0075aeb51db9b78c0d47e10213aa1885.tar.xz
setup-disk: let user set ROOT_SIZE
allow user set rootfs size via ROOT_SIZE. For lvm it will be passed directly to lvmcreate. For the sfdisk partitions it will be a number in MiB.
-rw-r--r--setup-disk.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup-disk.in b/setup-disk.in
index 5eb8638..b309919 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -989,7 +989,7 @@ native_disk_install_lvm() {
setup_lvm_volume_group $vgname $@ || return 1
setup_lvm_swap $vgname
- lvcreate --quiet -n ${root_dev##*/} -l 100%FREE $vgname
+ lvcreate --quiet -n ${root_dev##*/} -l ${ROOT_SIZE:-100%FREE} $vgname
rc-update add lvm boot
setup_root $root_dev $BOOT_DEV
}
@@ -1002,7 +1002,7 @@ native_disk_install() {
local prep_size=8
local boot_size=${BOOT_SIZE:-100}
local swap_size=${SWAP_SIZE}
- local root_size=
+ local root_size=${ROOT_SIZE}
local root_dev= boot_dev= swap_dev=
init_progs $(select_bootloader) || return 1
confirm_erase $@ || return 1