
The 10-Second Mystery:
How Your Computer
Wakes Up
ஒரு பட்டன். பத்து கைமாற்றம்.
TIRUNELVELI TECH COMMUNITYMEETUP #02
THE WHOLE TALK, ONCE
Ten runners, one baton
பேட்டனை கைவிட்டா, கருப்பு திரை.
02THE ONE IDEA
Do one job. Hand over. Vanish.
எல்லாரும் கொஞ்சம் வேலை. அப்புறம் அடுத்த ஆளுக்கு.
03SECTION ONE
01
Electricity
சாஃப்ட்வேர் வர முன்னாடி, கரண்ட்.
04The button is a doorbell
கரண்ட் சரியா இருந்தா தான் CPU கண்ண திறக்கும்.
RAILS COMING UP
PWR_OK"rails steady, you can start" CPU
C
held in reset
fetch 0xFFFFFFF0
HANDS OVER TOCPU, out of reset
05Attendance before anything else
வீட்ல யாரு யாரு இருக்காங்கனு முதல்ல பாத்துக்கும்.
FIRST INSTRUCTION
SPI flash chip
on the motherboard
↓
NOT YET
your SSD
still fully asleep
ROLL CALL
RAMtimings trained, size counted✓
CORESone wakes the rest✓
PCIeevery slot walked and counted✓
ACPItables written for the OS to read✓
→\EFI\ubuntu\grubx64.efi
HANDS OVER TOOne .efi file on the ESP
06The only bouncer in the chain
ஐடி கார்டு காட்டுங்க. இல்லனா உள்ள விடமாட்டாங்க.
db KEYS
✓grubx64.efi
signed · key in db
✕totally-legit.efi
unsigned · no key
Security Violation
mokutil --sb-statesbctl status
HANDS OVER TOA loader it trusts
07Interval
08SECTION TWO
02
The disk
இப்போ தான் அசல் வேலை ஆரம்பம்.
09The menu nobody reads
மூணு செகண்ட் காட்டும். யாரும் படிக்கவே மாட்டாங்க.
ON DISK · /boot
vmlinuz
initramfs.img
grub.cfg
*Ubuntu
Advanced options
Memory test
BOOTING IN31↵ Enter
IN RAM
root=UUID=8f2c.. ro quiet
HANDS OVER TOThe kernel, now in memory
10A zip file that opens itself
தானா திறந்து, தானே வேலை ஆரம்பிக்கும்.
vmlinuz · 13 MB compressed
unpacked itself · 50 MB in RAM
Decompressing Linux... done.
Booting the kernel._
CAN IT READ THE DISK?
nvme0
✕
the driver it needs
is not inside it
HANDS OVER TO/init, inside the initramfs
11A rented room in RAM
வாடகை வீடு. சொந்த வீடு கிடைக்குற வரைக்கும்.
IN RAM · TEMPORARY
tiny userspace + drivers
waiting for root device...
→
ON DISK · REAL, LOCKED
/dev/nvme0n1p3 · luks
/dev/mapper/root · open
passphrase accepted
mount -o ro /dev/mapper/root /sysroot
HANDS OVER TOThe real root, now readable
12Same seat, new person
வீடு மாறுது. ஆனா PID 1 அதே ஆளு.
RAM · THE RENTED ROOM
/init
memory handed back, room empty
DISK · THE REAL HOUSE
/sbin/init → systemd
/ is now the real root
exec switch_root / /sbin/init
HANDS OVER TOsystemd, on the real disk
13Interval, round two
14SECTION THREE
03
Userspace
இப்போ எல்லாமே சாதாரண புரோகிராம் தான்.
15Queue vs everyone at once
ரேஷன் கடை கியூ இல்ல. எல்லாரும் ஒண்ணாவே கிளம்பணும்.
OLD SysV INIT · ONE AFTER ANOTHER
total: everything added up
SYSTEMD · ALL AT ONCE, THEN ONE GOAL
HANDS OVER TOEvery service, together
16The kernel shouts, udev answers
எல்லாரும் எழுந்துட்டாங்களானு பாக்குற வேலை.
KERNEL
uevent
"found something"
add nvme0n1
add usb1
add card0
UDEV RULE
load module
push firmware
make node
/dev/nvme0
/dev/sda
/dev/input/event4
/dev/snd
/dev/dri/card0 · GPU firmware loaded
HANDS OVER TOA screen that can actually draw
1710 / 10 · DISPLAY MANAGER
gdm asks. PAM decides.
இதுக்கு தான் இந்த எல்லா வேலையும்.
nellai
••••••••|
gdm greeter
user + password →
← authenticated ✓
PAM
shadow
fingerprint
ldap
the actual decision
HANDS OVER TOYou
18DEBUGGING, THE SHORT VERSION
Which runner dropped the baton?
Runner 3 · Secure Boot
Unsigned loader. Sign it or turn it off.
Gave up waiting for root device
(initramfs) _|
Runner 6 · initramfs
Wrong root=, or the driver is missing.
Kernel panic - not syncing:
Attempted to kill init!
PID: 1
Runner 7 · switch_root
PID 1 died. Nobody is left to run.
எர்ரர் மெசேஜ் படிங்க. யாரு பேட்டனை கைவிட்டாங்கனு அது சொல்லும்.
19Last interval
20MID-RANGE LAPTOP, NVME DISK
Where the seconds go
நீங்க திட்டுற லினக்ஸ் இல்ல. நேரம் ஃபர்ம்வேர்ல போகுது.
21SAME SHAPE, OTHER NAMES
Windows runs the same relay
LINUX
WINDOWS
grubx64.efi
≡
bootmgfw.efi
vmlinuz
≡
ntoskrnl.exe
initramfs
≡
boot-start drivers
systemd
≡
smss.exe, wininit.exe
gdm greeter
≡
winlogon.exe
பேரு வேறு. வேலை ஒண்ணு தான்.
22THAT IS THE WHOLE TRICK
நீங்க பட்டன் பிரஸ் பண்ணீங்க. பத்து பேரு வேலை முடிச்சாங்க. நன்றி.
TRY IT TONIGHT
systemd-analyze blame