qemu에 Linux의 MIPS 포트를 설치했습니다. 그래서 나는 initrd와 vmlinux(커널 4.9.0) 이미지를 다음에서 다운로드했습니다.http://ftp.debian.org/debian/dists/Debian9.5/main/installer-mips/20170615+deb9u4/images/malta/netboot/ 설치가 성공적으로 완료되었으며 qemu를 시작할 수 있습니다.
$ qemu-system-mips -M malta -m 1G -hda ./debian-mips.qcow2 \
-initrd $initrd \
-kernel $vmlinux \
-append "nokaslr root=/dev/sda1" -nographic
$initrd 및 $vmlinux는 위 링크에서 가져온 것입니다.
그러나 4.9.0과 동일한 구성으로 새 커널 4.18.0을 크로스 컴파일한 다음 qemu를 다시 시작하면 다음과 같이 실패합니다.
...
[ 4.019974] serial8250.0: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[ 4.022670] cacheinfo: Failed to find cpu0 device node
[ 4.022950] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 4.024763] mousedev: PS/2 mouse device common for all mice
[ 4.027981] rtc_cmos 70.rtc: registered as rtc0
[ 4.028277] rtc_cmos 70.rtc: alarms up to one day, 242 bytes nvram
[ 4.030893] NET: Registered protocol family 10
[ 4.036155] Segment Routing with IPv6
[ 4.036660] mip6: Mobile IPv6
[ 4.036903] NET: Registered protocol family 17
... [ 4.045894] rtc_cmos 70.rtc: setting system clock to 2018-07-23 02:26:58 UTC (1532312818)
[ 4.076247] Freeing unused kernel memory: 1528K
[ 4.076491] This architecture does not have kernel memory protection.
Loading, please wait...
starting version 232
[ 4.685538] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[ 4.703542] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[ 4.754874] random: udevadm: uninitialized urandom read (16 bytes read)
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Begin: Waiting for suspend/resume device ... Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
...
done.
Gave up waiting for suspend/resume device
done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ...
done.
done.
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/sda1 does not exist. Dropping to a shell!
BusyBox v1.22.1 (Debian 1:1.22.0-19+b3) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
따라서 어떤 이유로 커널이 필요한 모든 지원(파일 시스템, SCSI 드라이버 등)을 갖추고 있음에도 불구하고 /dev/sda1 장치를 마운트할 수 없습니다.
이유는 무엇입니까? 새 커널을 빌드할 때마다 initrd 이미지를 다시 빌드해야 합니까?
감사해요.