Installing Debian¶
Practical 2.4 installing-debian-annex.pdf · PDF
When you set up a new phone, it asks you questions: language, Wi-Fi, an account, a PIN. You answer them half asleep and tap "Next". Ten minutes later the phone is yours. Did any of those answers matter?
Today you install a whole operating system on an empty disk, and this time some answers really do matter. One of them erases a disk. One of them decides whether the machine can start at all. The system you install, Debian 13, becomes your main machine for the rest of the course — so you want to know why you chose each answer, not only what you clicked.
What you will learn
- Build the VM
deb-labfrom your own plan (2 vCPU, 4 GB of RAM, 25 GB of disk) - See an installer as an interview: it asks, it copies, it makes the disk bootable
- Explain four decisions on purpose: the root password, guided partitioning, the software selection and GRUB
- Check the new system from a terminal and update it
- Take the snapshot
clean, your way back for the whole year - Why an empty root password does not leave the system open
Meet Debian¶
Debian is a free operating system built and maintained by volunteers, not by a company.
It was announced on 16 August 1993 by Ian Murdock, a 20-year-old student at Purdue University. The name joins his girlfriend's name and his own: Debra + Ian. It has never belonged to a company: about a thousand volunteer developers maintain it today.
You already use Debian without knowing it. Ubuntu — the system on your classroom PC — is built from Debian.
The current stable release is Debian 13, code name trixie, released on 9 August 2025. Your ISO says 13.7 because fixes are gathered into a point release every couple of months: same system, with the latest corrections included.
The installer is an interview¶
An installer is the program that puts an operating system onto an empty disk.
Every installer, on every system, does three things in the same order:
flowchart LR
A["<b>1 · Asks</b><br>who are you, where are you,<br>which disk?"] --> B["<b>2 · Copies</b><br>the system<br>onto the disk"]
B --> C["<b>3 · Makes it bootable</b><br>writes the bootloader<br>so the firmware finds it"]
Most questions are harmless: language, keyboard, time zone. A wrong answer there is annoying, not dangerous. But four questions cost something if you answer them without thinking:
| Question | Our answer | Why |
|---|---|---|
| Root password | Leave it empty | Root cannot log in; your first user becomes the administrator through sudo |
| Partitioning | Guided – use entire disk, all files in one partition | Your plan. Sizes and separate partitions come in Unit 4 |
| Software selection | Debian desktop environment + GNOME + standard system utilities | The graphical desktop you will work in |
| GRUB | Yes, on the VM's disk (/dev/vda) |
Without a bootloader the firmware finds nothing to start |
Keep a decision log¶
Technicians document their work. Every time the installer offers a choice that is not obvious, write down what you chose and why — at that moment, not at the end. At the end you remember the clicks, not the reasons. The decision log is on the back of the Practical 2.4 sheet, and it becomes half of your report.
Step 1 · Build deb-lab¶
You already know the virt-manager wizard from your first VM. First connect to the class server with today's slip: File → Add Connection → Custom URI... → qemu+ssh://<user>@<server>/session → Connect (the address changes every class, so add the connection again or edit the old one). Select it, then File → New Virtual Machine and check that Connection shows the server. This time the numbers come from your own plan:
| Setting | Value |
|---|---|
| ISO | type /srv/isos/debian-13.7.0-amd64-netinst.iso (not Browse Local: the ISO is on the server) |
| Memory | 4096 MiB |
| CPUs | 2 |
| Disk | 25 GiB |
| Name | deb-lab — exactly like this, it is used all year |
| Network | Bridge device..., Device name virbr0 |
| Firmware | leave the default (BIOS) |
In Debian's boot menu choose Graphical install and press Enter. If virt-manager cannot detect the system from the ISO, untick Automatically detect and type Debian 13.
Step 2 · Answer the interview¶
The whole route is on the Practical 2.4 sheet. Two screens deserve a word.
Root password. Every Linux has one all-powerful user, root: it can read, change and delete anything. Leave both password boxes empty and press Continue.
Careful: an empty root password is not an open door
"Root is the administrator, so I need a root password" sounds logical. But in Debian's installer an empty root password disables root logins and gives administration to your user through sudo. If you do type a root password, your user gets no sudo at all. One account to remember, and every admin action typed on purpose.
Location and locale. English as the language and Spain as the country is not a combination Debian knows, so it asks which locale to use: the rules for dates, decimal points and messages. Choose United States (en_US.UTF-8). Error messages stay in English — the language of every manual and forum you will search.
Step 3 · Cut the disk¶
Partitioning means dividing a disk into separate areas, called partitions, each used for one purpose.
Choose Guided - use entire disk → the only disk → All files in one partition (recommended for new users).
The installer says the disk is about 26.8 GB, but your plan said 25. Is one of them wrong? No — it is the trap of the two rulers from Binary:
virt-manager counts in binary units (GiB), the installer in decimal ones (GB). Same disk.
Then the most dangerous screen of the day: Write the changes to disks? The default answer is No, which sends you back. You must select Yes by hand.
The click that erases a disk
In a VM this disk is empty, so nothing is lost. On a real PC with Windows and your photos, Guided – use entire disk followed by Yes erases everything on that disk. That is why Debian makes you choose Yes yourself.
After that Yes, the base system installs by itself for several minutes.
While it works: packages, mirrors and GRUB¶
Packages. Debian is not one big program. It is tens of thousands of packages — one for the clock, one for the file manager, one for each font. Your ISO is a netinst image: it holds only the smallest set. Everything else is downloaded now from a mirror, one of many servers around the world that hold identical copies.
In the kitchen of Unit 1: the ISO brought the kitchen manager and a notebook. The furniture is being delivered now from the nearest warehouse. That is why the installer needs a network, and why it may look frozen for a while: look at the counter under the progress bar.
Software selection. The screen with tick boxes is the one decision that makes this a desktop PC and not a server. Keep Debian desktop environment, GNOME and standard system utilities ticked. Remember this screen: the next system you install has no desktop at all.
GRUB. The last question: Install the GRUB boot loader to your primary drive? GRUB is the bootloader from the boot relay race in Unit 1: the firmware hands over to GRUB, and GRUB loads the kernel. Answer Yes and choose /dev/vda, the VM's only disk.
What happens if you answer No? The firmware finds an empty disk and says "no bootable device" — exactly the error you met when the VM had no system yet.
flowchart LR
FW["<b>Firmware</b><br>the card by the door"] -->|"hands over to"| G["<b>GRUB</b><br>bootloader on /dev/vda"]
G -->|"loads"| K["<b>Kernel</b><br>Debian starts"]
K --> L["<b>Login screen</b><br>user student"]
After Installation complete → Continue, the VM restarts from its own disk: GRUB's menu for a few seconds, then the login screen.
Step 4 · Check your new system¶
Log in as student. Press Super, type terminal and press Enter. Type each command exactly; you will learn the shell properly in Unit 4.
cat /etc/os-release # which system is this? look at PRETTY_NAME
hostname # the name you typed in the installer
lsblk # the disk and its partitions
df -h / # how full is the root partition?
groups # which groups is my user in? look for "sudo"
sudo apt update # ask the mirror for the list of newer packages
sudo apt upgrade # install them (answer Y)
What you should see:
| Command | Expected answer |
|---|---|
cat /etc/os-release |
PRETTY_NAME="Debian GNU/Linux 13 (trixie)" |
hostname |
deb-lab |
lsblk |
vda with one big partition on / and a small one marked [SWAP] |
df -h / |
a few GB used out of the partition |
groups |
the word sudo in the list |
sudo in one sentence for today: "do this one command as administrator". The full story is on the next page.
Nothing appears when I type my password
The first sudo asks for your password and shows nothing while you type — not even dots. That is on purpose: nobody behind you can count the characters. Type it and press Enter.
Step 5 · The snapshot clean¶
A snapshot is a saved state of a virtual machine that you can go back to.
Shut the VM down: Virtual Machine → Shut Down → Shut Down. When it is off: View → Snapshots → the + button → name clean, description Fresh install, updated → Finish.
From today this machine is yours for the whole course. Break it as much as you like: clean brings it back in seconds. Later in the unit you will break it on purpose.
A snapshot is not a backup
The snapshot lives inside the same file as the VM's disk. If the host's disk dies, both die. Backups are a different tool, with their own pages in Unit 4.
Key takeaways¶
- Debian is a free operating system made by volunteers since 1993; Debian 13 "trixie" is the current stable release, and Ubuntu is built from it.
- An installer is an interview: it asks, it copies, it makes the disk bootable.
- An empty root password disables root logins and makes your user the administrator through
sudo. - Guided – use entire disk plus
Yeserases the whole disk: on a real PC, that is the point of no return. - GRUB is the bootloader: without it the firmware finds "no bootable device".
- The snapshot
cleanis your way back — an undo button, not a backup.
Quick check¶
1. You left the root password empty in Debian's installer. What happens?
- Root login is disabled and your user can use sudo
- Anyone can log in as root without a password
- The installer stops until you type a password
- The root password is set to the word root
An empty root password does not leave the system open. Debian disables root logins and gives your first user administrator rights through sudo, one command at a time.
2. On a real PC with Windows and your photos, what would Guided – use entire disk do after you answer Yes?
- Erase everything on that disk to install Debian
- Install Debian only in the free space left
- Ask Windows for permission before writing
- Copy your photos into the new Debian system
Guided partitioning with the entire disk option deletes every partition on it. That is why Write the changes to disks? defaults to No: you must choose Yes yourself.
3. What is GRUB for?
- It is the bootloader that loads the kernel
- It downloads the packages from the mirror
- It draws the graphical desktop after login
- It checks the ISO's checksum before installing
GRUB is the runner after the firmware in the boot relay: it finds the kernel on the disk and starts it. Without GRUB on /dev/vda, the VM shows "no bootable device".
4. virt-manager says the disk is 25 GiB and the installer says 26.8 GB. Why?
- One counts in binary units and the other in decimal ones
- The installer adds space for the swap partition
- virt-manager hides part of the disk for itself
- The disk grows a little when it is formatted
25 GiB = 25 × 2³⁰ bytes ≈ 26.8 × 10⁹ bytes = 26.8 GB. The same number of bytes, measured with two different rulers.
5. The installer seems frozen during the software selection. What is most likely happening?
- It is downloading the desktop packages from a mirror
- It is waiting for you to remove the ISO
- It is checking the RAM for errors
- It is encrypting the disk before writing
A netinst image carries only the base system. The desktop is many packages downloaded from a mirror, so this step depends on the network. Look at the counter under the bar.
6. Select the two statements about the snapshot clean that are true.
- It is a saved state of the VM you can return to
- It is stored in the same place as the VM's own disk
- It is a backup kept safely on another disk
- It is a copy of the Debian ISO you installed from
A snapshot is an undo button for the whole VM. It lives with the VM's disk file, so it does not protect you if the host's disk fails — that is what a backup is for.
Your desktop machine is ready. Next, a computer with no desktop at all, installed with the keyboard only: Ubuntu Server and first steps.