Затем я собрал собственное ядро (с поддержкой отладки) из исходного кода. Также собрал initramfs с помощью dracut. Я пытаюсь загрузить собственное ядро, используя:
Код: Выделить всё
qemu-system-x86_64 -kernel ~/work/linux/arch/x86_64/boot/bzImage -initrd ~/work/linux/initramfs-6.19.0+.img -append "root=/dev/sda3 rw console=ttyS0 nokaslr" -drive file=~/work/vms/fedora.qcow2,format=qcow2 -m 2G -s -S -nographicКод: Выделить всё
(gdb) target remote :1234
Remote debugging using :1234
0x000000000000fff0 in ?? ()
(gdb) c
Код: Выделить всё
[ OK ] Reached target initrd-switch-root.target - Switch Root.
Starting initrd-switch-root.service - Switch Root...
[FAILED] Failed to start initrd-switch-root.service - Switch Root.
See 'systemctl status initrd-switch-root.service' for details.
Generating "/run/initramfs/rdsosreport.txt"
Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.
Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.
Press Enter to continue.
Кроме того, есть ли способ создать пустой файл qcow2 и использовать мой файл bzImage и initramfs для загрузки и отладки ядра? Я не хочу устанавливать дистрибутив Linux внутри виртуальной машины.
Подробнее здесь: https://stackoverflow.com/questions/798 ... ot-process
Мобильная версия