logoalt Hacker News

hulitulast Wednesday at 6:07 PM1 replyview on HN

> Yes, since /usr and /var are initially of size 0, one can deduce that allocating no space to it will probably make the installer discard them

Why would the installer discard them if you created them ? Do what i mean, not what i say ?


Replies

JdeBPyesterday at 3:43 AM

This is the same question as: Why does changing the number of items to zero in an item line in an order on one's on-line shopping cart delete the entire item line? And the answer lies in the same user expectations from collective experience of this, rightly or no, being the model.

From the perspective of the pure techicalities, disregarding the shared user experience model, a size zero partition will break a lot of stuff, as there's a lot of stuff that assumes that DASD slices have at least one block, a VBR or a superblock of some kind that determines the volume format.

There's probably an enormous amount of code in firmwares, boot loaders, operating systems, and applications programs that does not check that block 0 is legally within the DASD slice limits. Although the ones that look for superblocks in other than block 0 might do such range checks, there's almost always an assumption that of course there is a block 0.

A case in point is the MBR in block 0 of the entire DASD, used by old firmwares to load the VBR of the bootable volume. There's often no check for a non-zero size in such code.

Here's OpenBSD's MBR code, just for starters. It has no range checking for zero size partitions.

* https://github.com/openbsd/src/blob/9213be19d4b9057bbb074ab1...