devsetup1-1 Exercise 3: A Partition Table for 1 TB, and /tmp in RAM ==================================================================== PARTITION TABLE (1 TB SSD, UEFI) -------------------------------- Partition Size Filesystem Purpose EFI System Partition 1 GB FAT32 Boot files for a UEFI machine / 100 GB ext4 System, apt packages, language runtimes, tools swap 16 GB swap Safety net; rarely used with 64 GB RAM /home ~880 GB ext4 Projects, repositories, downloads, settings JUSTIFICATION ------------- - EFI System Partition: required to boot a UEFI system. 1 GB is generous but costs nothing, and leaves room for extra boot entries. - / at 100 GB: a development machine accumulates compilers, SDKs, container images (if you later use Docker), and several versions of language runtimes. 100 GB is comfortable without being wasteful. It can be smaller on a smaller disk, but running out of space on / is more annoying than wasting some. - swap at 16 GB: with 64 GB of RAM you will rarely swap, but a small swap area still gives the kernel somewhere to put idle memory and stops a runaway process from immediately triggering out-of-memory kills. Make it at least as big as RAM (64 GB) only if you want hibernation to work. - /home takes the rest: this is your work. Keeping it on its own partition means you can reinstall or upgrade the operating system and keep every project. WHAT IN-MEMORY /tmp MEANS ------------------------- In Debian 13, /tmp is a tmpfs by default, stored in RAM, sized at up to 50% of RAM. On this machine that is up to about 32 GB of very fast scratch space. Good: compilers and build tools that write lots of temporary files run quickly, and nothing wears the SSD. Costs: - Files in /tmp are lost on reboot. - Large temporary files consume RAM that other programs might have used. - A build that writes more than the limit to /tmp fails with "No space left on device" even though the SSD has plenty of free space. IF A BUILD RUNS OUT OF SPACE IN /tmp ------------------------------------ 1. Check with: df -h /tmp 2. Point the build at a directory on disk instead, for example: mkdir -p ~/tmp-build TMPDIR=~/tmp-build make (many tools honour TMPDIR) 3. Or raise the limit for /tmp permanently: sudo systemctl edit tmp.mount and set a larger size for the tmpfs, then reboot or remount. 4. Or turn the tmpfs off and use a real /tmp on disk (masking tmp.mount). The first option is the least invasive. Change the system default only if you keep hitting the limit. WHY THIS WORKS AS AN ANSWER --------------------------- Each partition is justified by what will live on it and what would go wrong without it. The /tmp answer names the real trade-off (speed and no SSD wear against a hard, RAM-based limit) and gives a response ordered from least to most disruptive.