blob: 72ca9b4fa0f38e4d451f8ce75a98d4dd2a1f1cfe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#+TITLE: Session Context
#+DATE: 2026-01-19
* Current Session: Monday 2026-01-19 17:29 CST
** FIXED: Hostid mismatch bug causing boot failures
*** Problem
ratio wouldn't boot - dropped to emergency mode with "Failed to mount /sysroot"
Root account locked in initramfs, preventing debugging.
*** Root Cause
The install script was generating inconsistent hostids:
- Line 1076: ~hostid~ command returned value X (used for GRUB cmdline)
- Line 1163: ~zgenhostid~ created /etc/hostid with value Y
The ~hostid~ command returns a value even without /etc/hostid, but ~zgenhostid~
generates a DIFFERENT random value. ZFS refused to auto-import the pool because
the hostids didn't match.
*** Fix Applied (custom/install-archzfs)
Move ~zgenhostid~ call to configure_bootloader() BEFORE reading hostid:
#+BEGIN_SRC bash
configure_bootloader() {
# Ensure hostid exists BEFORE reading it
if [[ ! -f /etc/hostid ]]; then
zgenhostid
fi
# Now get the consistent hostid for kernel parameter
local host_id
host_id=$(hostid)
...
}
#+END_SRC
Simplified configure_zfs_services() to just copy /etc/hostid (always exists now).
*** Verification
Tested in VM - after installation:
- GRUB hostid: 073ad2a5
- /etc/hostid: 073ad2a5
- MATCH confirmed
*** For ratio
Needs reinstall with fixed ISO, or manual fix:
#+BEGIN_SRC bash
# From live ISO booted on ratio:
printf '\x56\x19\xc0\xa8' > /mnt/etc/hostid # 0xa8c01956 in little-endian
arch-chroot /mnt mkinitcpio -P
#+END_SRC
** Earlier in Session
- Rebuilt ISO with Avahi/hostname fixes
- Tested: hostname "archzfs", avahi active, mDNS works
- Deployed to ~/Downloads/isos/, TrueNAS, USB drives
- Committed: 0bd172a (Avahi), 4f9eadb (TODO update)
- Added TODO for Avahi on installed systems
- Wrote ISO to new 115G flash drive (/dev/sdb)
** Commits This Session
| Commit | Description |
|--------|-------------|
| 0bd172a | Add Avahi mDNS for easy SSH access, fix ISP firmware path |
| 4f9eadb | Add TODO for Avahi on installed systems, mark live ISO done |
| PENDING | Fix hostid mismatch bug in install-archzfs |
|