bootovani s grubem a ZFS BE
Miroslav Lachman
000.fbsd at quip.cz
Tue Mar 31 12:30:55 CEST 2020
Snazim se ted upgradovat jeden prehistoricky stroj, na kterem puvodne
bylo PC-BSD. Po upgrade by tam melo byt ciste FreeBSD 11.3 amd64 s
oficialnima balikama.
Pro upgrade jsem vytvoril novy Boot Environment (coz je klon puvodniho
root filesystemu) a v nem provedl upgrade OS i balicku.
PC-BSD jako bootmanager pouziva grub2.
Po rebootu si v menu grubu vyberu ten novy BE, system zacne bootovat a
pak to zacne vyhazovat chyby u pokusu o loadovani modulu:
KLD ipfw.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
Podobnych chyb se tam vyskytuje vice a system bootovani nedokonci.
Vim, co takova chyba znamena za normalnich okolnosti - ze mam jinou
verzi kernelu, nez moduly. Zkratka out of sync. Jenze kdyz nabootuju
predchozi funkcni verzi, primountuju si tento Boot Environment a
zkontroluju, co je v jeho /boot/kernel, tak je tam kernel i moduly te
nove verze 11.3-p7 (overoval jsem i checksumy).
Znovu jsem zkusil nabootovat do noveho BE, ale jako single user, coz jde
(nenacitaji se dalsi moduly). Znovu se podivam do /boot/kernel a opet
vse v poradku - novy kernel, nove moduly.
(rikal jsem si, jestli se mi tam tim grubem nemichaji pres sebe
mountovani dvou verzi rootu z ruznych BE, ale nevypada to tak)
Kontroloval jsem i kenv vfs.root.mountfrom a i tam je cesta ke spravnemu
(novemu) BE.
Grub je pro me tak trochu magie, tak nevim, k cemu by tam jeste mohlo
dojit, ze se nejakym zpusobem pomichaji ruzne verze kernelu a modulu.
Nebo co dalsiho tam jeste muze byt za problem, co zpusoby vyse popsanou
chybu?
Asi nejlepsim resenim bude, zrusit grub a pouzit standardni FreeBSD boot
manager
gpart bootcode -p /boot/gptzfsboot -i 1 ada1
Mirek
Ukazka jedne polozky z /boot/grub/grub.cfg pro ten novy BE
submenu "PC-BSD (sysUpgrade_11_3_20200328_001110) - 2020-03-28 00:11" {
menuentry "Normal Bootup" {
insmod zfs
search --no-floppy -s -l tank2
kfreebsd /ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/kernel
kfreebsd_loadenv
/ROOT/sysUpgrade_11_3_20200328_001110@/boot/device.hints
kfreebsd_module
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/zfs/zpool.cache
type=/boot/zfs/zpool.cache
set
kFreeBSD.vfs.root.mountfrom=zfs:tank2/ROOT/sysUpgrade_11_3_20200328_001110
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/modules/nvidia.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/drm.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/drm2.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/iicbus.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/modules/vboxdrv.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/crypto.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/aesni.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/geom_eli.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/zfs.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/modules/nvidia-modeset.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/opensolaris.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/tmpfs.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/linux.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/linux_common.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/geom_journal.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/geom_mirror.ko
kfreebsd_module_elf
/ROOT/sysUpgrade_11_3_20200328_001110/@/boot/kernel/ums.ko
set kFreeBSD.bootfile="kernel"
set kFreeBSD.kernel="kernel"
set kFreeBSD.kernel_options=""
set kFreeBSD.kernelname="/boot/kernel/kernel"
set kFreeBSD.module_path="/boot/kernel;/boot/modules"
set kFreeBSD.vfs.zfs.arc_max="1024M"
set kFreeBSD.kern.ipc.shmseg="1024"
set kFreeBSD.kern.ipc.shmmni="1024"
set kFreeBSD.kern.maxproc="10000"
set kFreeBSD.legal.intel_ipw.license_ack="1"
set kFreeBSD.legal.intel_iwi.license_ack="1"
set kFreeBSD.legal.realtek.license_ack="1"
set kFreeBSD.hint.acpi_throttle.0.disabled="1"
set kFreeBSD.machdep.disable_mtrrs="1"
set kFreeBSD.kern.geom.eli.visible_passphrase="2"
set kFreeBSD.kern.cam.scsi_delay="500"
set kFreeBSD.hw.memtest.tests="0"
set kFreeBSD.kern.vty="vt"
set kFreeBSD.kern.geom.label.gptid.enable="0"
set kFreeBSD.kern.geom.label.disk_ident.enable="0"
set kFreeBSD.kern.geom.label.ufsid.enable="0"
set kFreeBSD.hw.pci.do_power_nodriver="3"
set kFreeBSD.net.inet.ip.fw.default_to_accept="1"
set kFreeBSD.net.inet.ip.fw.one_pass="0"
set kFreeBSD.net.graph.maxdata="65536"
set kFreeBSD.grub.platform="$grub_platform"
set kFreeBSD.kern.geom.eli.passphrase="$pass"
}
More information about the Users-l
mailing list