새로운 시스템을 설치하려고 합니다. zfs를 암호화하고 USB에서 헤더와 부팅을 분리했습니다. 그런데 /sysroot 마운트에 실패해서 부팅이 안되네요.
커널 매개변수와 다른 후크를 변경해 보았습니다. 루트 비밀번호를 설정했는데도 루트가 잠겨 있는 것 같아서 비상 쉘에 들어갈 수 없습니다. 따라서 라이브 iso를 통해서만 액세스할 수 있습니다.
chroot의 Journalctl 응답에는 저널이 없습니다.
이것은 내 설정입니다.
sda
└─luksCont crypt
├─systemVG-rootLV lvm
| └─zfs pool /mnt
└─systemVG-swapLV lvm
sdc (USB)
├─sdc1 /mnt/efi
└─sdc2 /mnt/boot
└─luksheader, keyfile
/etc/mkinitcpio.conf(나는 무엇을 바꿨는가)
FILES=(/boot/header.img /boot/key.img)
HOOKS=(base systemd autodetect modconf keyboard sd-vconsole block mycustomencrypthook lvm2 zfs filesystems)
/etc/initcpio/install/mycustomhook
#!/bin/bash
build() {
local mod
add_module dm-crypt
if [[ $CRYPTO_MODULES ]]; then
for mod in $CRYPTO_MODULES; do
add_module "$mod"
done
else
add_all_modules '/crypto/'
fi
add_binary "cryptsetup"
add_binary "dmsetup"
add_file "/usr/lib/udev/rules.d/10-dm.rules"
add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
add_runscript
}
/etc/initcpio/hooks/mycustomhook
#!/usr/bin/ash
run_hook() {
modprobe -a -q dm-crypt >/dev/null 2>&1
modprobe loop
[ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
echo 'Waiting for USB:'
echo ' /efi '
i=1
sp="/-\|"
echo -n ' '
while [ ! -L '/dev/disk/by-uuid/3EF6-1EDA' ]; do
printf "\b${sp:i++%${#sp}:1}"
sleep 1
done
printf "\bfound!"
echo ' /boot '
i=1
echo -n ' '
while [ ! -L '/dev/disk/by-uuid/1667-253D' ]; do
printf "\b${sp:i++%${#sp}:1}"
sleep 1
done
printf "\bfound!"
#mkdir -p /mnt
#mount /dev/disk/by-uuid/1667-253D /mnt
#cryptsetup open /mnt/key.img lukskey
cryptsetup open /boot/key.img luks-key
cryptsetup open /dev/disk/by-id/ata-SAMSUNG... --header=/boot/header.img --key-file=/dev/mapper/luks-key enc
cryptsetup close luks-key
}
/efi/loader/loader.conf
default archlinux
timeout 3
console-mode max
editor 1
random-seed-mode with-system-token
/boot/loader/entries/archlinux.conf
title Arch Linux
linux /vmlinuz-5.10-x86_64
initrd /intel-ucode.img
initrd /initramfs-5.10-x86_64.img
options root=zfs:AUTO
#options root=zfs:rpool/ROOT/arch
#options root=ZFS=rpool/ROOT/arch
#options zfs=rpool/ROOT/arch
ZFS 마운트
zfs get mountpoint
rpool mountpoint /mnt local
rpool/ROOT mountpoint none local
rpool/ROOT/arch mountpoint /mnt local
rpool/ROOT/opt mountpoint /mnt/opt local
rpool/ROOT/usr mountpoint /mnt/usr local
rpool/ROOT/usr/local mountpoint /mnt/usr/local inherited from rpool/ROOT/usr
rpool/ROOT/var mountpoint /mnt/var local
rpool/ROOT/var/lib mountpoint /mnt/var/lib inherited from rpool/ROOT/var
rpool/ROOT/var/lib/systemd mountpoint /mnt/var/lib/systemd inherited from rpool/ROOT/var
rpool/ROOT/var/lib/systemd/coredump mountpoint /mnt/var/lib/systemd/coredump inherited from rpool/ROOT/var
rpool/ROOT/var/log mountpoint /mnt/var/log inherited from rpool/ROOT/var
rpool/ROOT/var/log/journal mountpoint /mnt/var/log/journal inherited from rpool/ROOT/var
rpool/home mountpoint /mnt/home inherited from rpool
rpool/home/maksim mountpoint /mnt/home/maksim inherited from rpool
rpool/home/root mountpoint /mnt/root local
왜인지 조금 혼란스러워요
zfs mount
chroot에서 다른 출력을 보여줍니다
zfs mount (in chroot)
rpool/ROOT/arch /
(생방송 시스템에서)
zfs mount (in live system)
rpool/ROOT/opt /mnt/opt
rpool/home/root /mnt/root
rpool/ROOT/var/log /mnt/var/log
rpool/home /mnt/home
rpool/ROOT/var/lib/systemd/coredump /mnt/var/lib/systemd/coredump
rpool/ROOT/usr/local /mnt/usr/local
rpool/home/maksim /mnt/home/maksim
rpool/ROOT/var/log/journal /mnt/var/log/journal
rpool/ROOT/arch /mnt
답변1
지난 몇 시간 동안 동일한 오류를 해결하면서 단일 디스크를 설정했습니다. 어쩌면 이것이 도움이 될 것입니다.
컴퓨터에서 LIVE USB/CD를 실행하고 EPS 파티션을 마운트해 보십시오. 거기에서 파일을 확인하세요 loader/entries/arch.conf
. root=PARTUUID=xxxxxxxx...
내가 해야 할 일은 그것을 예상대로 작동하는 것뿐 이었습니다 root=/dev/mapper/<partition label>
. 도움이 되길 바랍니다.