Index: usr.sbin/sysinst/bsddisklabel.c =================================================================== RCS file: /cvsroot/src/usr.sbin/sysinst/bsddisklabel.c,v retrieving revision 1.33 diff -u -p -r1.33 bsddisklabel.c --- usr.sbin/sysinst/bsddisklabel.c 13 Dec 2019 22:12:41 -0000 1.33 +++ usr.sbin/sysinst/bsddisklabel.c 18 Dec 2019 09:57:03 -0000 @@ -137,10 +137,18 @@ default_parts_init[] = #endif .type = PT_swap, .fs_type = FS_SWAP }, #ifdef HAVE_TMPFS - { .type = PT_root, .mount = "/tmp", .fs_type = FS_TMPFS, + { +#if DEFTMPSIZE > 0 + .size = DEFTMPSIZE*(MEG/512), +#endif + .type = PT_root, .mount = "/tmp", .fs_type = FS_TMPFS, .flags = PUIFLG_JUST_MOUNTPOINT }, #else - { .type = PT_root, .mount = "/tmp", .fs_type = FS_MFS, + { +#if DEFTMPSIZE > 0 + .size = DEFTMPSIZE*(MEG/512), +#endif + .type = PT_root, .mount = "/tmp", .fs_type = FS_MFS, .flags = PUIFLG_JUST_MOUNTPOINT }, #endif { .def_size = DEFUSRSIZE*(MEG/512), .mount = "/usr", .type = PT_root }, @@ -891,6 +899,13 @@ fill_defaults(struct partition_usage_set if (wanted->infos[i].type == PT_swap) wanted->infos[i].size = get_ramsize() * (MEG / 512); #endif +#if DEFTMPSIZE == -1 + if (wanted->infos[i].type == PT_swap) + wanted->infos[i].size = get_ramsize() * + (MEG / DEFTMPFRAC); +#endif + + if (wanted->infos[i].type == PT_swap && swap > wanted->num) swap = i; #if defined(DEFAULT_UFS2) && !defined(HAVE_UFS2_BOOT) Index: usr.sbin/sysinst/defsizes.h =================================================================== RCS file: /cvsroot/src/usr.sbin/sysinst/defsizes.h,v retrieving revision 1.4 diff -u -p -r1.4 defsizes.h --- usr.sbin/sysinst/defsizes.h 12 Jun 2019 06:20:17 -0000 1.4 +++ usr.sbin/sysinst/defsizes.h 18 Dec 2019 09:57:03 -0000 @@ -54,6 +54,9 @@ #ifndef DEBNEEDMB #define DEBNEEDMB 800 #endif +#ifndef DEFTMPSIZE +#define DEFTMPSIZE 0 +#endif #ifndef MD_SETS_SELECTED #define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11, SET_MD Index: usr.sbin/sysinst/arch/alpha/md.h =================================================================== RCS file: /cvsroot/src/usr.sbin/sysinst/arch/alpha/md.h,v retrieving revision 1.2 diff -u -p -r1.2 md.h --- usr.sbin/sysinst/arch/alpha/md.h 16 Nov 2018 19:54:03 -0000 1.2 +++ usr.sbin/sysinst/arch/alpha/md.h 18 Dec 2019 09:57:03 -0000 @@ -49,6 +49,8 @@ #define DEFROOTSIZE 128 #define DEFUSRSIZE 900 #define DEBNEEDMB 1024 +#define DEFTMPSIZE (-1) +#define DEFTMPFRAC 4 /* 1/4 of RAM size */ /* have support for booting from UFS2 */ #define HAVE_UFS2_BOOT Index: usr.sbin/sysinst/arch/amd64/md.h =================================================================== RCS file: /cvsroot/src/usr.sbin/sysinst/arch/amd64/md.h,v retrieving revision 1.8 diff -u -p -r1.8 md.h --- usr.sbin/sysinst/arch/amd64/md.h 16 Nov 2019 21:25:14 -0000 1.8 +++ usr.sbin/sysinst/arch/amd64/md.h 18 Dec 2019 09:57:03 -0000 @@ -53,6 +53,9 @@ #define DEFSWAPSIZE (-1) +#define DEFTMPSIZE (-1) +#define DEFTMPFRAC 4 /* 1/4 of RAM size */ + /* use UFS2 by default for ffs */ #define DEFAULT_UFS2 Index: usr.sbin/sysinst/arch/i386/md.h =================================================================== RCS file: /cvsroot/src/usr.sbin/sysinst/arch/i386/md.h,v retrieving revision 1.7 diff -u -p -r1.7 md.h --- usr.sbin/sysinst/arch/i386/md.h 2 Oct 2019 11:16:02 -0000 1.7 +++ usr.sbin/sysinst/arch/i386/md.h 18 Dec 2019 09:57:03 -0000 @@ -49,6 +49,8 @@ #define DEFUSRSIZE 0 #define DEFSWAPSIZE (-1) #define DEFROOTSIZE 90 +#define DEFTMPSIZE (-1) +#define DEFTMPFRAC 4 /* 1/4 of RAM size */ /* Megs required for a full X installation. */ #define XNEEDMB 250 Index: usr.sbin/sysinst/arch/sparc64/md.h =================================================================== RCS file: /cvsroot/src/usr.sbin/sysinst/arch/sparc64/md.h,v retrieving revision 1.5 diff -u -p -r1.5 md.h --- usr.sbin/sysinst/arch/sparc64/md.h 20 Jun 2019 18:32:33 -0000 1.5 +++ usr.sbin/sysinst/arch/sparc64/md.h 18 Dec 2019 09:57:03 -0000 @@ -51,6 +51,9 @@ #define DEFROOTSIZE 64 /* Default root size */ #define DEFVARSIZE 32 /* Default /var size, if created */ #define DEFUSRSIZE 1200 /* Default /usr size, if /home */ +#define DEFTMPSIZE (-1) +#define DEFTMPFRAC 4 /* 1/4 of RAM size */ + #define XNEEDMB 300 /* Extra megs for full X installation */ #define DEBNEEDMB 1200 /* Extra megs for debug sets */