VMware workstaion 5 Linux guest에서 v2.6 커널 컴파일하기

jinyoun의 이미지

커널컴파일을 아래와 같이 수행했습니다.
참고:
RedHat 9 v 2.4.20-8
VMware에서 Typical로 Linux guest 설정

1.
1.1커널다운받기
# ncftp ftp.kernel.org
ncftp> cd pub/linux/kernel/v2.6
ncftp> dir
ncftp> get linux-2.6.14.2.tar.bz2

1.2module-init-tool다운받기
ncftp> cd /pub/linux/kernel/people/rusty/modules
ncftp> get module-init-tools-3.1.tar.bz2
ncftp> quit

2.module-init-tool설치
module-init-tool압축풀기
# tar -xjf module-init-tools-3.1.tar.bz2
# cd module-init-tools-3.1
README 파일 순서대로 설치
리부팅
#depmod -V
module-init-tools-3.1

3.
3.1커널압축풀기
# tar -xjf linux-2.6.14.2.tar.bz2

3.2
# cd linux-2.6.14.2
# make mrproper
# cp /usr/src/linux-2.4.20-8/configs/kernel-2.4.20-i686-smp.config ./.config
# make menuconfig
Load an Alternate Configuration File 선택
Loadable module support --->
[*] Enable loadable module support
[*] Module unloading
[*] Automatic kernel module loading
Device Drivers --->
SCSI device support --->
<*> SCSI devide support
<*> SCSI disk support
<*> SCSI generic support
SCSI low-level drivers --->
<*> BusLogic SCSI support
<*> Serial ATA Support
<*>Intel PIIX/ICH SATA support
File system
[*]Ext3 journalling ...
[*]Kernel automount ...
save한 다음 종료

3.3
# make dep

3.4
# make clean

3.5
# make bzImage
과정중 아래와 같은 경고 메세지가 나왔습니다.

drivers/scsi/BusLogic.c: In function 'BusLogic_InitialiseProbeInfoListISA' :
drivers/scsi/BusLogic.c:583: warning: 'check_region' is deprecated (declare at
include/Linux/ioport.h:124)
.
.
drivers/scsi/BusLogic.c: In function 'BusLogic_InitialiseMultiMasterProbeInfo' :
drivers/scsi/BusLogic.c:799: warning: 'check_region' is deprecated (declare at
include/Linux/ioport.h:124)
.
.

3.6
# make modules

3.7
# make modules_install

3.8
# make install
과정중 아래와 같은 에러가 발생했습니다.

/lib/modules/2.6.14.2 is not a directory.
mkinitrd failed
make[1]: *** [install] Error 1
make: *** [install] Error 2

4
# vi /etc/grub.conf

root (hd0,0)
kernel /boot/vmlinuz-2.6.14.2 ro root=/dev/sda1

리부팅
부팅메세지중에
SCSI device sda: 14680064 512-byte hdwr sectors (7516MB)
sda: asking for cache data failed

Initializing USB controller (usb-uhci): FATAL: Could not load /lib/modules/2.6.
14.2/modules.dep: No such file or directory [FAILED]

Flushing all current rules and user defined chains:iptables v1.2.7a: can't initi
alize iptables table 'filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded. [FAILED]

Try 'iptables-restore -h' or 'iptables-restore --help' for more information. [FAILED]

Bringing up interface eth0: pcnet32 device eth0 does not seem to be present, de
laying initialization. [FAILED]

라고 나왔습니다.

컴파일 과정중 제가 빼먹은 과정이 있는지 그리고,
필요없는 과정은 무엇인지 알고 싶습니다.

그리고, bzImage수행중 나온 경고메세지는 어떤 것인지,
무시해도 괜찮은 건지요?
또, make installt수행중 나온 에러는 어떤 것인지,
/lib/modules/2.6.14.2디렉토리를 미리 만들어줘야하는것인지요? initrd의 경우 필수사항을 커널에 built-in시킨 경우 필요하지 않다고 들어서 grub수정시 아예 inird관련한 내용을 포함시키지 않았습니다만, 괜찮은 건지 알고 싶습니다.

그리고, 부팅중 내용에서
SCSI device sda와 Initializing USB controller 관련한 건은 어떤 내용이고, 어떻게 해줘야 하는 것인지요?
또,
Flushing all current rules and user defined chains:iptables v1.2.7와
Try 'iptables-restore -h'는 iptables를 업그레이드 하면 되는 것인지요?
마지막으로
Bringing up interface eth0는 어떻게 해야 되는 것인지 알고싶습니다.

한꺼번에 너무 많은 내용을 질문한 것 같긴 하지만...ㅠ.ㅠ
제가 2.6커널 컴파일하려고 2일동안 씨름을 했는데,
겨우 성공한 것이 위와같은 경고와 에러들이 발생해버려서...
로그인은 되지만, 왜 이런 현상이 나타나는지 알고 싶습니다.
부탁드리겠습니다.

익명 사용자의 이미지

ifconfig eth0 up

jinyoun의 이미지

Anonymous wrote:
ifconfig eth0 up

Bringing up interface eth0: pcnet32 device eth0 does not seem to be present, de
laying initialization. [FAILED]
의 해결책으로 알려주신 내용을 해보았지만, 안돼는군요.
참고로, 다른 커널 2.4.20-8에서는 연결이 잘 되었습니다.

ifcfg-eth0 내용
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
check_link_down(){
return 1;
}

위와 같은 설정으로 2.4.20-8버전에서는 잘 되었었습니다.

Prentice의 이미지

ls -al /lib/modules/2.6.24.2 하시면 뭐라고 나오나요? 같은 이름의 파일이 혹시 이미 존재하나요?

mkdir /lib/modules/2.6.14.2 해보시고 make modules_install && make install 해보세요.

jinyoun의 이미지

검은해 wrote:
ls -al /lib/modules/2.6.24.2 하시면 뭐라고 나오나요? 같은 이름의 파일이 혹시 이미 존재하나요?

mkdir /lib/modules/2.6.14.2 해보시고 make modules_install && make install 해보세요.

/lib/modules/2.6.14.2 디렉토리가 존재하지 않아 만들어준 다음 말해주신대로 make modules_install && make install 를 실행해봐도 mkinitrd failed가 뜨네요...ㅠ.ㅠ

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.