우주
DAC Discretionary Access Control
DAC
Discretionary Access Control
discretionary
디스크래서내리
/dɪˈskrɛʃ əˌnɛr i/
자유재량...
dis·cre·tion·ar·y
dis·cre·tion
디스~크레~션~
1250년 정도에 사용하기 시작한 단어이군요..
Late Latin 후기 라틴?
Middle English 중세 영어?
Anglo-Frech 안글로 프랑스?
라틴, 영국, 프랑스 동시에 사용했던 언어라... (아니~~~~~이럴 수가~~~)
라틴어 영어 프랑스에서 동시에 사용할 수 있는 단어가 있단 말인가?
noun 1. the power or right to decide or act according to one's own judgment; freedom of judgment or choice: It is entirely within my discretion whether I will go or stay. 2. the quality of being discreet, especially with reference to one's own actions or speech;prudence or decorum: Throwing all discretion to the winds, he blurted out the truth. |
자유로운 결정인데..
점잔하고 신중하게..
재량이란 한자가 가장 잘 어울리는 단어인것 같다.
재량2 (裁量) [재량] [명사] 1. 자기의 생각과 판단에 따라 일을 처리함. 2. <법률> [같은 말] 자유재량(2. 행정청이 공익이나 행정의 목적에 보다 적합한 것이 무엇인지를 판단하는 행위). |
디스크레셔네리~~
인터넷에서 뒤져서 나온 그림
discretionary 관련 그림;;;
Link : https://c1.staticflickr.com/1/569/22196166203_dd812d92b2_b.jpg
음...
리눅스에서는 파일에 권한을 설정할 수 있어요^^
[root@localhost ~]# ls -la total 127648 dr-xr-x---. 27 root root 4096 Dec 18 11:01 . dr-xr-xr-x. 20 root root 4096 Dec 7 20:40 .. -rw-------. 1 root root 1351 Dec 4 14:35 anaconda-ks.cfg -rw-------. 1 root root 18599 Dec 23 15:18 .bash_history -rw-r--r--. 1 root root 18 Jun 19 2015 .bash_logout -rw-r--r--. 1 root root 176 Jun 19 2015 .bash_profile -rw-r--r--. 1 root root 176 Jun 19 2015 .bashrc drwxr-xr-x. 16 root root 4096 Dec 4 19:21 buildroot drwx------. 13 root root 4096 Dec 11 16:42 .cache drwxr-xr-x. 8 root root 4096 Nov 11 09:00 ccs-tools drwx------. 15 root root 4096 Dec 11 16:41 .config -rw-r--r--. 1 root root 100 Jun 19 2015 .cshrc drwx------. 4 root root 4096 Dec 18 20:07 .ddd |
ls -la
라는 명령을 내리면
리눅스는
현재 디렉토리의 모든 파일의 권한을 표시해주죠~~
[root@localhost ~]# ls -la total 127648 dr-xr-x---. 27 root root 4096 Dec 18 11:01 . |
dr-xr-x---
이게 파일이 속성과 권한을 나타내는 거죠~~
[속성]
d : 디렉토리 속성
[권한]
r : 읽기권한 가지고 있음(read)
x : 실행권한 가지고 있음(execution)
w : 쓰기권한 가지고 있음(write)
이렇게 파일에 대해서만.......위 3가지권한을 지정하는 것을
DAC라고 말해요
D
D
D
Discretionary
디스크래션래리...재량..
접근제어(Access Control)
이라고 하죠~!
파일 소유자권한/그룹권한/다른사용자 권한
을 지정 하는 것입니다.
이런데 이것만 가지고는 헛점이 생기는게 문제이니다.
예를 들면,
root 이면...
모든 것을 다할 수 있는데
DAC로는 root의 권한을
제어할 수 없는게 문제죠~~!
그래서, 이 파일에 대해서만 접근제어를 하는 것 보다
더 엄격한 접근제어를 할 수 있는 기능인
MAC(Mandatory Access Control)이
나오게 된 것입니다.
MAC는 보통 Kernel Object에 대한 접근 제어를 할 수 있어요
그래서 Kernel Object가 생성되는
시점에..
제어를 할 수 있는 기회를 준답니다.
SELinux
TOMOYO
AppAmor
등...
다양한
MAC방법이 있습니다.
하지만
복잡합니다.
;;;;
[참고]
https://en.wikipedia.org/wiki/Discretionary_access_control
http://dictionary.reference.com/browse/prudence
터밍메카드~리눅스 계정 추가해봐~~!
터닝메카드...
리눅스에
계정을 추가해~~
계정~~
계정을 말이다~~!!
흐흐흐
웃기는 꼬마구나....
그게 그렇게 쉬운줄 아냐?~~~
쉽지...
어디서 어렵다고
구라냐~~
자..
내가 보여주겠다...
리눅스에 계정을 추가하는 모습을~~~!!!
자 그냥
useradd
를 치면된다고~~!!
유저에드 |
[root@localhost ~]# useradd test2 [root@localhost ~]# cat /etc/passwd | grep test2 test2:x:1002:1002::/home/test2:/bin/bash |
test2 라는 계정을 추가했습니다.
그랬더니
/etc/passwd라는 파일에
test2라고 하는 항목이 추가되었어요~~!!
이렇게요~~!!
test2:x:1002:1002::/home/test2:/bin/bash 아~ 봐도 모르겠다~~!! 1002는 또 뭐야? /home/test2는 사용자 홈 디렉토리 같군~~!! /bin/bash 는 또 뭐야? 아..머리 아파.. 오늘은 여기까지~~!! |
busybox너는 누구니?
너는 뭐냐?
busybox~~
~~
비즈박스는 뭐죠?
대대체...비즈박스만 나와요..
심지어 init도..
exe의 경로는
/bin/busybox
로만 나옵니다..
왜그러는거죠?
# pwd /proc/1 # ls -la exe lrwxrwxrwx 1 root root 0 Dec 15 05:39 exe -> /bin/busybox |
음...
그래서 /sbin/init의
실체를 확인해보았습니다.
# ls -la /sbin/init lrwxrwxrwx 1 root root 14 Dec 4 08:44 /sbin/init -> ../bin/busybox |
아니 이런;;;
/sbin/init은~~
‘../bin/busybox’
의 링크였군요~~!!
이런 이런
심지어
모든 파일이 다...
busybox에 링크되어 있었습니다.
;;;;
# cd /bin
# ls -la
total 550
drwxr-xr-x 2 root root 2048 Dec 4 10:22 .
drwxr-xr-x 18 root root 1024 Dec 4 10:22 ..
lrwxrwxrwx 1 root root 7 Dec 4 08:44 ash -> busybox
-rwsr-xr-x 1 root root 555868 Dec 4 10:22 busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 cat -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 catv -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 chattr -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 chgrp -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 chmod -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 chown -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 cp -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 cpio -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 date -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 dd -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 df -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 dmesg -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 dnsdomainname -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 dumpkmap -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 echo -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 egrep -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 false -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 fdflush -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 fgrep -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 getopt -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 grep -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 gunzip -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 gzip -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 hostname -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 kill -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 linux32 -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 linux64 -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 ln -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 login -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 ls -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 lsattr -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 mkdir -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 mknod -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 mktemp -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 more -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 mount -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 mountpoint -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 mt -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 mv -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 netstat -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 nice -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 pidof -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 ping -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 pipe_progress -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 printenv -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 ps -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 pwd -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 rm -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 rmdir -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 run-parts -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 sed -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 setarch -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 setserial -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 10:22 sh -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 sleep -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 stty -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 su -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 sync -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 tar -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 touch -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 true -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 umount -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 uname -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 usleep -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 vi -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 watch -> busybox
lrwxrwxrwx 1 root root 7 Dec 4 08:44 zcat -> busybox
[참고]
http://manpages.ubuntu.com/manpages/precise/man1/busybox.1.html
야훼 하나님 입장에서 보는것이 믿음?!
vi에게 명령하기- 'J' 아래행 합치기~~!
명령한다...
사진출처는 : http://cs.kumoh.ac.kr/fb/61776
이곳이라고 합니다.
이 사진을 보고
Vi를 공부합니다.
저자권 주장하시면 바로 내리겠습니다.^^
명령모드로 바꿔...
ESC를 누르면..명령모드로 변경...
오늘 익힐 Vi 명령은
대문자 ‘J’
J
를 누르면..
밑에 있는 행과 한줄이 됩니다..
--------
genext2fs 빌드하기....
리눅스에서
qemu를 실행시킬려면..
root file system 이미지를 어떻게든 만들어줘야 합니다.
그런데
root file system을 만드는 방법은
이세상에 아주 많을 것입니다.
그 중 현재까지 제가 알아낸 방법중...
genext2fs 라는 녀석을 이용하는 방법에 대해서
설명해 볼까 해요~~
일단.
소스를 받아 옵니다.
어디에서?
여기에서요^^
http://sourceforge.net/projects/genext2fs/files/latest/download?source=typ_redirect
자. 리눅스에서는
wget명령어로
다음과 같이 받아와 버렸습니다.^^
그리고
성공하면..다음과 같이 파일이 생기고요~~
[root@localhost tmp]# ls -la total 116 drwxr-xr-x. 3 root root 4096 Dec 7 17:04 . dr-xr-x---. 12 root root 4096 Dec 7 17:04 .. drwxrwsrwx. 3 test test 4096 Apr 20 2007 genext2fs-1.4.1 |
[root@localhost tmp]# tar xvzf genext2fs-1.4.1.tar.gz |
압축을 풀어주고요~~~
이제 컴파일을 하면 됩니다.~~~!!!
[root@localhost genext2fs-1.4.1]# ls -la total 464 drwxrwsrwx. 3 test test 4096 Apr 20 2007 . drwxr-xr-x. 3 root root 4096 Dec 7 17:04 .. -rw-rw-r--. 1 test test 31120 Apr 20 2007 aclocal.m4 -rw-r--r--. 1 test test 38 May 3 2001 AUTHORS -rw-r--r--. 1 test test 82 Nov 22 2004 ChangeLog -rw-rw-r--. 1 test test 3782 Apr 20 2007 config.h.in -rwxrwxr-x. 1 test test 206164 Apr 20 2007 configure -rw-r--r--. 1 test test 1040 Apr 20 2007 configure.in -rw-r--r--. 1 test test 17992 May 3 2001 COPYING -rwxr-xr-x. 1 test test 15936 Jan 7 2007 depcomp -rw-r--r--. 1 test test 2979 May 13 2005 device_table.txt -rw-r--r--. 1 test test 5179 Dec 1 2006 genext2fs.8 -rw-r--r--. 1 test test 72491 Mar 26 2007 genext2fs.c -rw-r--r--. 1 test test 180 Jan 2 2007 INSTALL -rwxr-xr-x. 1 test test 9233 Jan 7 2007 install-sh drwxrwsrwx. 2 test test 4096 Apr 20 2007 m4 -rw-r--r--. 1 test test 227 Feb 1 2007 Makefile.am -rw-rw-r--. 1 test test 21436 Apr 20 2007 Makefile.in -rwxr-xr-x. 1 test test 11014 Jan 7 2007 missing -rw-r--r--. 1 test test 182 Apr 20 2007 NEWS -rw-r--r--. 1 test test 430 May 18 2005 README -rw-r--r--. 1 test test 1377 Jan 2 2007 test-gen.lib -rwxr-xr-x. 1 test test 2175 Jan 2 2007 test-mount.sh -rwxr-xr-x. 1 test test 1939 Dec 1 2006 test.sh -rw-r--r--. 1 test test 183 Dec 1 2006 TODO |
소스의 압축을 풀면 ...
저런 것들(^^)이 보일 것입니다.^^
이중에
./configure
를 실행시켜줘야 합니당~~!
[root@localhost genext2fs-1.4.1]# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for a BSD-compatible install... /usr/bin/install -c checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether sys/types.h defines makedev... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for inttypes.h... (cached) yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for memory.h... (cached) yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdint.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking for unistd.h... (cached) yes checking libgen.h usability... yes checking libgen.h presence... yes checking for libgen.h... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking for an ANSI C-conforming const... yes checking for uid_t in sys/types.h... yes checking for inline... inline checking for size_t... yes checking for ssize_t... yes checking for struct stat.st_rdev... yes checking for getopt_long... yes checking for getline... yes checking for strtof... yes checking for snprintf... yes checking for vsnprintf... yes checking for working snprintf... yes checking for working vsnprintf... yes checking for stdlib.h... (cached) yes checking whether scanf can malloc... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing default commands |
이렇게 하면...
./config.status
라는 녀석(파일)이 생깁니다.
이것을 다시 실행해면 ~~~
[root@localhost genext2fs-1.4.1]# ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing default commands |
Makefile을
만듭니다...
그러면 이제 make를 하면 되겠죠^^!!!
이걸 몰랐네요...
ㅋㅋㅋㅋㅋ
리눅스 무식자여~~~;;;흐흐흐
[root@localhost genext2fs-1.4.1]# make make all-am make[1]: Entering directory '/root/tmp/genext2fs-1.4.1' if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT genext2fs.o -MD -MP -MF ".deps/genext2fs.Tpo" -c -o genext2fs.o genext2fs.c; \ then mv -f ".deps/genext2fs.Tpo" ".deps/genext2fs.Po"; else rm -f ".deps/genext2fs.Tpo"; exit 1; fi gcc -g -O2 -o genext2fs genext2fs.o make[1]: Leaving directory '/root/tmp/genext2fs-1.4.1' |
자 make까지 성공!!!
이제 genext2fs 라는 파일이 생겼겠죠^^?
[root@localhost genext2fs-1.4.1]# ls -la total 844 drwxrwsrwx. 4 test test 4096 Dec 7 17:10 . drwxr-xr-x. 3 root root 4096 Dec 7 17:04 .. -rw-rw-r--. 1 test test 31120 Apr 20 2007 aclocal.m4 -rw-r--r--. 1 test test 38 May 3 2001 AUTHORS -rw-r--r--. 1 test test 82 Nov 22 2004 ChangeLog -rw-r--r--. 1 root test 4027 Dec 7 17:06 config.h -rw-rw-r--. 1 test test 3782 Apr 20 2007 config.h.in -rw-r--r--. 1 root test 20670 Dec 7 17:08 config.log -rwxr-xr-x. 1 root test 30687 Dec 7 17:06 config.status -rwxrwxr-x. 1 test test 206164 Apr 20 2007 configure -rw-r--r--. 1 test test 1040 Apr 20 2007 configure.in -rw-r--r--. 1 test test 17992 May 3 2001 COPYING -rwxr-xr-x. 1 test test 15936 Jan 7 2007 depcomp drwxr-sr-x. 2 root test 4096 Dec 7 17:10 .deps -rw-r--r--. 1 test test 2979 May 13 2005 device_table.txt -rwxr-xr-x. 1 root test 114860 Dec 7 17:10 genext2fs -rw-r--r--. 1 test test 5179 Dec 1 2006 genext2fs.8 -rw-r--r--. 1 test test 72491 Mar 26 2007 genext2fs.c -rw-r--r--. 1 root test 174080 Dec 7 17:10 genext2fs.o -rw-r--r--. 1 test test 180 Jan 2 2007 INSTALL -rwxr-xr-x. 1 test test 9233 Jan 7 2007 install-sh drwxrwsrwx. 2 test test 4096 Apr 20 2007 m4 -rw-r--r--. 1 root test 21165 Dec 7 17:08 Makefile -rw-r--r--. 1 test test 227 Feb 1 2007 Makefile.am -rw-rw-r--. 1 test test 21436 Apr 20 2007 Makefile.in -rwxr-xr-x. 1 test test 11014 Jan 7 2007 missing -rw-r--r--. 1 test test 182 Apr 20 2007 NEWS -rw-r--r--. 1 test test 430 May 18 2005 README -rw-r--r--. 1 root test 23 Dec 7 17:08 stamp-h1 -rw-r--r--. 1 test test 1377 Jan 2 2007 test-gen.lib -rwxr-xr-x. 1 test test 2175 Jan 2 2007 test-mount.sh -rwxr-xr-x. 1 test test 1939 Dec 1 2006 test.sh -rw-r--r--. 1 test test 183 Dec 1 2006 TODO |
흐...생겼네요~~~
genext2fs!!!!
이런 이런...
왜 난 몰랐을까?
./configure -->./config.status --> make
를 하면 된다는 것을~~~
흐흐흐
리눅스 초보 미친감자여~~
화이팅
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는 그냥 엔터를 치면됩니다.
자…
이곳에 포함시키면 되겠군요…
이곳까지 커널 디버깅이 아주 될 것이니까요…