QEMU

도대체 어떻게 발음해야 하는거야?




결국..

큐엠유?

queue-em-yoo

???

난 '캐무'라고 했었는데...

'큐엠유' 이상하다

ㅎㅎㅎㅎ

어색해다...

ㅎㅎㅎ



[참고]

http://stackoverflow.com/questions/19761444/how-would-you-pronounce-qemu




미친감자~~

지금 뭐하는 건가?

몇주를 리눅스 커널 디버깅한다고 저러고 있나?



그러게 말입니다.



다시 전략을 바꾸었습니다.


QEMU라는 녀석을 이용할 것입니다.




[root@localhost ~]# dnf install qemu

Last metadata expiration check performed 2:21:43 ago on Tue Dec  1 19:04:26 2015.

Dependencies resolved.



Upgraded:

 qemu-common.i686 2:2.4.1-1.fc23  qemu-img.i686 2:2.4.1-1.fc23  qemu-kvm.i686 2:2.4.1-1.fc23  qemu-system-x86.i686 2:2.4.1-1.fc23


Complete!


이렇게 QEMU를 설치하였다…


자…

이제 바로 사용할 수 있는가?




[root@localhost ~]# qemu-system-x86_64

Unable to init server: Could not connect: Connection refused

gtk initialization failed



오...실행되~~

qemu!~~

뭐가...입력해주라고 하는 느낌이 많이 드는구만~~~!!!



[root@localhost linux]# qemu-system-x86_64 -no-kvm -kernel arch/x86/boot/bzImage -hda /dev/zero -append "root=/dev/zero console=ttyS0" -serial stdio -display none

WARNING: Image format was not specified for '/dev/zero' and probing guessed raw.

        Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.

        Specify the 'raw' format explicitly to remove the restrictions.

[    0.000000] Initializing cgroup subsys cpuset

[    0.000000] Initializing cgroup subsys cpu

[    0.000000] Initializing cgroup subsys cpuacct

.

.

.

[    3.685509] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

qemu: terminating on signal 2





결국 panic에 빠졌군요..


음…


초간단 리눅스소스에…

akari를 집어 넣는거야…


그리고 디버깅을 하는쥐~~!!


Holy Spirit님…

어떻게 잘될 것 같습니까?


자..

음…

마직막 Kernel panic은…

디스크가 없어서 그런거다…미친감자~~

그러니..


Buildroot라는 툴을

이용하면

디스크 이미지를 파일로 만들 수 있다.

Buildroot라는 툴을 설치하고 사용하는 법에 대한 글을 쓰도록 해라


http://goo.gl/ndgwSh <-- Buildroot 설치기~~~를 참고하시면 되겠습니다.


buildroot라는 툴을 이용해서 ext2용 디스크 이미지 파일을 만들었다고 합시다.


그러고 나면…



그냥 QEMU로 다음과 같이 실행시켜면…...부팅이 성공하는 것입니다.



[root@localhost linux]#qemu-system-i386 -kernel arch/x86/boot/bzImage -smp 1 -boot c -m 128M -hda /root/buildroot/output/images/rootfs.ext2 -append "root=/dev/sda rw console=tty0 console=ttyS0 acpi=off" -serial stdio -display none



음…

그렇습니다.

/root/buildroot/output/images/rootfs.ext2

라는 디스크 이지미를 포함해서 실행시켜면…

결국 …

리눅스 부팅이 성공합니다.




[root@localhost linux]#qemu-system-i386 -kernel arch/x86/boot/bzImage -smp 1 -boot c -m 128M -hda /root/buildroot/output/images/rootfs.ext2 -append "root=/dev/sda rw console=tty0 console=ttyS0 acpi=off" -serial stdio -display none

.

.

.


[    2.254331] Write protecting the kernel read-only data: 2652k

Starting logging: OK

[    2.705562] random: nonblocking pool is initialized

Initializing random number generator... done.

Starting network...


Welcome to Buildroot

buildroot login:






root

를 입력하고

password는 그냥 엔터를 치면됩니다.


자…

이곳에 포함시키면 되겠군요…


이곳까지 커널 디버깅이 아주 될 것이니까요…






+ Recent posts