[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#844713: ITP: partman-swapfile -- add support for creating swapfiles



On 18 November 2016 at 11:56, Steve McIntyre <steve@einval.com> wrote:
> On Fri, Nov 18, 2016 at 11:44:25AM +0000, Dimitri John Ledkov wrote:
>>Package: wnpp
>>Owner: Dimitri John Ledkov <xnox@ubuntu.com>
>>Severity: wishlist
>>
>>* Package name    : partman-swapfile
>>  Version         : 1
>>  Upstream Author : d-i team
>>* URL or Web page : d-i
>>* License         : GPL
>>  Description     : add support for creating swapfiles
>>
>>I am working on minimising number of partitions used in the default
>>instalations in Ubuntu.
>
> Might I ask why?

Multiple reasons. Mostly surrounding supportability, and flexibility
for migrations / future changes.

There are a lot of people with dedicated /boot partitions, which are
full, preventing security kernel upgrades to succeed. At the same
time, people who are vulnerable to this, have no idea what a /boot
partition is, or how to run $ sudo apt autoremove to remove old
kernels. Booting off LVM, makes /boot part of the rootfs and hopefully
reduces chances of running out of all the disk space, because even
less sophisticated users tend to notice that.

As a side-effect this makes /boot an ext4 filesystem in more cases.
I'm thinking to move /boot to be ext4 by default in Ubuntu. Such that
it is the same regardless of the autopartitioning method.

Similarly with swap. One can dynamically resize/remove swapfile to add
swap or reclaim disk-space. And I am seeing a lot of systems that have
missized swaps. Having a 512GB swap, on a 1TB NVMe hard drive is
obscene when one has 256GB RAM. Other distributions (e.g. RHEL) have
started to limit swap well below the total amount of RAM. Note, in
Ubuntu, hibernation is disabled by default, therefore swap is only
used for the purpose of extreme memory pressure when things balloon
(e.g. during large process start-up before parts of it can be swapped
out).

Backup & restore / migration is simplified if a single partition
represents all of Ubuntu. This has been the case for a long time, on
e.g. cloud images. (UEFI & PReP partitions notwithstanding Har Har
Har)

Hence, it's just a general simplification, to make sure that default
installations are as sensible and as future proof as possible, and are
easier to modify if one realizes that one has miss-sized things.

Given that grub2 can unlock luks partitions, I wish it had some way to
pass the encryption secret to the kernel, such that /boot can be on
encrypted LVM as well, without needing to type the full disk
encryption passphrase twice on boot.

Note, that Debian supports a lot more architectures and a wider range
of machine configurations. I only have insight in a subset of these,
thus I am aware that above goals are potentially unachievable on the
more exotic machine types & bootloaders.

-- 
Regards,

Dimitri.


Reply to: