2016년 1월 8일 금요일

리눅스 커널 컴파일 및 설치 방법

<이것이 리눅스다> 

출처: youtube 강의

* preparations

# yum -y install gcc gcc-c++ qt qt-devel

* compile & install

1. current kernel

# uname -r

2. download kernel source

# cd /usr/src
# wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.19.8.tar.xz

3. extract kernel source

# tar xvfJ linux-3.19.8.tar.xz
# cd linux-3.19.8.tar.xz

4. initialize kernel config

# make mrproper

5. configure kernel environment

# make xconfig

6. clean up

# make clean

7. compile and install kernel

# make
# make modules_install
# make install
-->  # make; make modules_install; make install

# ls -l /boot

8. check out bootloader

# cat /etc/grub2/grub.cfg

9. reboot

# reboot




* another way to compile kernel

1. install packages

wget, gcc, gcc-c++, tar, ncurses-devel, bc, perl

2. download source using wget

ftp.kernel.org/pub/linux/kernel/v3.x/linux-3.17.4.tar.xz

3. configurations

'make menuconfig' instead of 'make xconfig'




* NTFS 

1. install gcc
2. download source
# wget http://www.tuxera.com/community/ntfs-3g-download/ntfs-3g_ntfsprogs-x.x.x.tgz
3. compile source
# ./configure; make; make install
4. mount
# mount -t ntfs-3g <USB device name> <dir name to mount>