ECE 440 · Week 7
Modern Computer: Full Stack
A bad update is installed only on spare media.
Week 7 of 10 · Solitude
ECE 440 · Week 7 · In class
A bad update is installed only on spare media.
- Recovery uses the station's spare media and the tools already on the bench.
- A second computer beyond the lab station is not part of the hand-in.
- Before you install anything, write the spare-media label and the first recovery command you plan to use.
- That pair is the homework.
ECE 440 · Week 7 · In class
A bad update is installed only on spare media. (continued)
- These notes do not print the command for you.
ECE 440 · Week 7 · In class
Install the update that does not boot, recover, and log in once more after recovery.
- Then stop.
ECE 440 · Week 7 · Lecture
What makes an update bad
- A kernel that does not start, or starts without the device tree it needs.
- A missing or wrong initramfs, so the root filesystem is never found.
- A boot setting or fstab line that points at something that is not there.
- Each one fails at a different stage, and the console's last line tells you which.
ECE 440 · Week 7 · Lecture
Plan the way back before the way in
- Install the bad update only on the labelled spare; the main card is not part of this lab.
- Before installing, write how the board will boot once the spare fails, and what you will change.
- A broken card is still a filesystem: from a system that boots, it can be read and repaired.
- Keep the last good file you replace; recovery is easier when nothing was deleted.
ECE 440 · Week 7 · Lecture
Know which device you are touching
lsblk -o NAME,SIZE,LABEL,MOUNTPOINT
blkid
- Read the size and label before any write; device letters change with plug order.
- A mounted partition says which system is using it right now.
- If two cards look alike, unplug one and run it again.
ECE 440 · Week 7 · Lecture
Keep a transcript as you go
script -a update-and-recovery.log
# ... every command, install through recovery ...
exit
scriptrecords the terminal, commands and output, to a file.- The hand-in is the install commands, the recovery commands, and a login after recovery.
- Stop after that login; a second experiment belongs in your notes, not the log.
ECE 440 · Week 7 · Lab
Lab
- On spare media, install an update that does not boot.
- Recover with the station's spare media and the tools already on the bench. A second computer beyond the lab station is not part of the hand-in. Second pass: log in once more after recovery and stop.
- Assemble the lab hand-in: The commands that installed the bad update on spare media, the recovery commands, and a login captured after recovery.
ECE 440 · Week 7 · Lab
Hand in
The commands that installed the bad update on spare media, the recovery commands, and a login captured after recovery.
ECE 440 · Week 7 · Homework
Homework
- Before you install anything, write the spare-media label for the bad update and the first recovery command you plan to use.
ECE 440 · Week 7 · Homework
Turn in
The label and that first command.
ECE 440 · Week 7 · Read
Read
On the lab site: Module 12, A whole system, does not grade the bad-update commands, the recovery commands, and the later login. This week does.
ECE 440 · Week 7 · Next
Week 8
One service on the board, one client on the lab network, one saved transcript.