VMware workstaion 5 Linux guest에서 v2.6 커널 컴파일하기
커널컴파일을 아래와 같이 수행했습니다.
참고:
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
ifconfig eth0 up
ifconfig....
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버전에서는 잘 되었었습니다.
ls -al /lib/modules/2.6.24.2 하시면 뭐라고 나오나
ls -al /lib/modules/2.6.24.2 하시면 뭐라고 나오나요? 같은 이름의 파일이 혹시 이미 존재하나요?
mkdir /lib/modules/2.6.14.2 해보시고 make modules_install && make install 해보세요.
[quote="검은해"]ls -al /lib/modules/2.6.24.
/lib/modules/2.6.14.2 디렉토리가 존재하지 않아 만들어준 다음 말해주신대로 make modules_install && make install 를 실행해봐도 mkinitrd failed가 뜨네요...ㅠ.ㅠ
댓글 달기