Build Debian Packages And Create an ISO

데비안 패키지 안에있는 드라이버를 최신버전으로 업데이트 후 해당 패키지를 가진 ISO를 만든다.

내 개발 VM(debian stretch) 의 i40e버전을 확인했다.

root@devpython3:~/test# modinfo i40e
filename:       /lib/modules/4.9.0-7-amd64/kernel/drivers/net/ethernet/intel/i40e/i40e.ko
version:        1.6.16-k
license:        GPL
description:    Intel(R) Ethernet Connection XL710 Network Driver
author:         Intel Corporation, <e1000-devel@lists.sourceforge.net>
srcversion:     6A2F1CCADEAF07D132536A0
alias:          pci:v00008086d00001588sv*sd*bc*sc*i*
alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D3sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D2sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D1sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D0sv*sd*bc*sc*i*
alias:          pci:v00008086d000037CFsv*sd*bc*sc*i*
alias:          pci:v00008086d000037CEsv*sd*bc*sc*i*
alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
alias:          pci:v00008086d00001589sv*sd*bc*sc*i*
alias:          pci:v00008086d00001586sv*sd*bc*sc*i*
alias:          pci:v00008086d00001585sv*sd*bc*sc*i*
alias:          pci:v00008086d00001584sv*sd*bc*sc*i*
alias:          pci:v00008086d00001583sv*sd*bc*sc*i*
alias:          pci:v00008086d00001581sv*sd*bc*sc*i*
alias:          pci:v00008086d00001580sv*sd*bc*sc*i*
alias:          pci:v00008086d00001574sv*sd*bc*sc*i*
alias:          pci:v00008086d00001572sv*sd*bc*sc*i*
depends:        ptp
retpoline:      Y
intree:         Y
vermagic:       4.9.0-7-amd64 SMP mod_unload modversions
parm:           debug:Debug level (0=none,...,16=all) (int)

해당 드라이버의 버전은 Intel adapter X722을 지원하지 안는다.

지원하는 최신 드라이를 다운받아 업그레이드 시킨다.

root@devpython3:~/test/i40e-2.7.29/src# make
make[1]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-common' 들어감
make[2]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-amd64' 들어감
  CC [M]  /root/test/i40e-2.7.29/src/i40e_main.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_ethtool.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_adminq.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_common.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_hmc.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_lan_hmc.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_nvm.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_debugfs.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_diag.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_txrx.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_ptp.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_filters.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_ddp.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_client.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_virtchnl_pf.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_dcb.o
  CC [M]  /root/test/i40e-2.7.29/src/i40e_dcb_nl.o
  CC [M]  /root/test/i40e-2.7.29/src/kcompat.o
  CC [M]  /root/test/i40e-2.7.29/src/kcompat_vfd.o
  LD [M]  /root/test/i40e-2.7.29/src/i40e.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/test/i40e-2.7.29/src/i40e.mod.o
  LD [M]  /root/test/i40e-2.7.29/src/i40e.ko
make[2]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-amd64' 나감
make[1]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-common' 나감
root@devpython3:~/test/i40e-2.7.29/src# make install
make[1]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-common' 들어감
make[2]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-amd64' 들어감
  Building modules, stage 2.
  MODPOST 1 modules
make[2]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-amd64' 나감
make[1]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-common' 나감
Installing modules...
make[1]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-common' 들어감
make[2]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-amd64' 들어감
  INSTALL /root/test/i40e-2.7.29/src/i40e.ko
  DEPMOD  4.9.0-7-amd64
make[2]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-amd64' 나감
make[1]: 디렉터리 '/usr/src/linux-headers-4.9.0-7-common' 나감
/sbin/depmod -e -F /boot/System.map-4.9.0-7-amd64  -a 4.9.0-7-amd64
Updating initramfs...

다시 i40e의 정보를 확인.

root@devpython3:~/test/i40e-2.7.29/src# modinfo i40e
filename:       /lib/modules/4.9.0-7-amd64/updates/drivers/net/ethernet/intel/i40e/i40e.ko
version:        2.7.29
license:        GPL
description:    Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
author:         Intel Corporation, <e1000-devel@lists.sourceforge.net>
srcversion:     2212C8D31172FBDBC9A1647
alias:          pci:v00008086d0000158Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000158Asv*sd*bc*sc*i*
alias:          pci:v00008086d000037D3sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D2sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D1sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D0sv*sd*bc*sc*i*
alias:          pci:v00008086d000037CFsv*sd*bc*sc*i*
alias:          pci:v00008086d000037CEsv*sd*bc*sc*i*
alias:          pci:v00008086d00001588sv*sd*bc*sc*i*
alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
alias:          pci:v00008086d000015FFsv*sd*bc*sc*i*
alias:          pci:v00008086d00001589sv*sd*bc*sc*i*
alias:          pci:v00008086d00001586sv*sd*bc*sc*i*
alias:          pci:v00008086d00001585sv*sd*bc*sc*i*
alias:          pci:v00008086d00001584sv*sd*bc*sc*i*
alias:          pci:v00008086d00001583sv*sd*bc*sc*i*
alias:          pci:v00008086d00001581sv*sd*bc*sc*i*
alias:          pci:v00008086d00001580sv*sd*bc*sc*i*
alias:          pci:v00008086d00001574sv*sd*bc*sc*i*
alias:          pci:v00008086d00001572sv*sd*bc*sc*i*
depends:        ptp
retpoline:      Y
vermagic:       4.9.0-7-amd64 SMP mod_unload modversions
parm:           debug:Debug level (0=none,...,16=all) (int)

최신드라이버로 설치되었다.

[실험1]

현재 상태에서 커널업데이트 시에 설치한 최신 드라이버가 유지될까?

이론대로라면 당연히 유지되면 안된다.

커널을 업데이트 시키고 리부팅한다.

root@devpython3:/home/orchard# apt install linux-image-4.9.0-8-amd64

orchard@devpython3:~$ uname -a
Linux devpython3 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux

정상적으로 업데이트된 버전으로 부팅되었다.

i40e의 드라이버 버전을 확인

orchard@devpython3:~$ sudo su
root@devpython3:/home/orchard# modinfo i40e
filename:       /lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/intel/i40e/i40e.ko
version:        1.6.16-k
license:        GPL
description:    Intel(R) Ethernet Connection XL710 Network Driver
author:         Intel Corporation, <[email protected]>
srcversion:     6A2F1CCADEAF07D132536A0
alias:          pci:v00008086d00001588sv*sd*bc*sc*i*
alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D3sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D2sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D1sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D0sv*sd*bc*sc*i*
alias:          pci:v00008086d000037CFsv*sd*bc*sc*i*
alias:          pci:v00008086d000037CEsv*sd*bc*sc*i*
alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
alias:          pci:v00008086d00001589sv*sd*bc*sc*i*
alias:          pci:v00008086d00001586sv*sd*bc*sc*i*
alias:          pci:v00008086d00001585sv*sd*bc*sc*i*
alias:          pci:v00008086d00001584sv*sd*bc*sc*i*
alias:          pci:v00008086d00001583sv*sd*bc*sc*i*
alias:          pci:v00008086d00001581sv*sd*bc*sc*i*
alias:          pci:v00008086d00001580sv*sd*bc*sc*i*
alias:          pci:v00008086d00001574sv*sd*bc*sc*i*
alias:          pci:v00008086d00001572sv*sd*bc*sc*i*
depends:        ptp
retpoline:      Y
intree:         Y
vermagic:       4.9.0-8-amd64 SMP mod_unload modversions
parm:           debug:Debug level (0=none,...,16=all) (int)

업데이트 되어있지 않음을 확인.

그렇다면 해당 방법이 유효할 수 있겠다.

  1. 커널 패키지를 풀어 i40e 최신버전 컴파일 버전으로 바꿔주고 다시 패키지 빌드하여 커스텀 커널 패키지를 만든다.
  2. 해당 커스텀 커널 패키지를 simple-cdd 로컬 패키지에 추가시켜 ISO 빌드시 로컬패키지에서 커스텀 커널 패키지를 가져오게 한다.

[시험2]

해당 커널 이미지를 받아서 패키지를 커스텀해보자.

3.16.0-6커널이 필요하므로 jessie를 소스리스트에 추가하였다.

orchard@devpython3:~$ sudo vi /etc/apt/sources.list

deb http://ftp.daumkakao.com/debian jessie main non-free
deb-src http://ftp.daumkakao.com/debian jessie main non-free

추가한 후에 같은 버전의 커널이미지를 다운.

root@devpython3:/home/orchard# apt download linux-image-3.16.0-6-amd64

다운받은 이미지를 임의의 폴더에 풀었다.

root@devpython3:/home/orchard# dpkg-deb -R linux-image-3.16.0-6-amd64_3.16.56-1+deb8u1_amd64.deb test

root@devpython3:/home/orchard/test# ls
DEBIAN  boot  lib  usr

같은 경로에 존재하는 i40e드라이버를 최신버전 컴파일된 버전으로 변경한다.

개발머신 i40e드라이버 최신버전 업데이트 완료

root@devpython3:/home/orchard/i40e-2.7.29/src# modinfo i40e
filename:       /lib/modules/4.9.0-8-amd64/updates/drivers/net/ethernet/intel/i40e/i40e.ko
version:        2.7.29
license:        GPL
description:    Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
author:         Intel Corporation, <e1000-devel@lists.sourceforge.net>
srcversion:     2212C8D31172FBDBC9A1647
alias:          pci:v00008086d0000158Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000158Asv*sd*bc*sc*i*
alias:          pci:v00008086d000037D3sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D2sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D1sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D0sv*sd*bc*sc*i*
alias:          pci:v00008086d000037CFsv*sd*bc*sc*i*
alias:          pci:v00008086d000037CEsv*sd*bc*sc*i*
alias:          pci:v00008086d00001588sv*sd*bc*sc*i*
alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
alias:          pci:v00008086d000015FFsv*sd*bc*sc*i*
alias:          pci:v00008086d00001589sv*sd*bc*sc*i*
alias:          pci:v00008086d00001586sv*sd*bc*sc*i*
alias:          pci:v00008086d00001585sv*sd*bc*sc*i*
alias:          pci:v00008086d00001584sv*sd*bc*sc*i*
alias:          pci:v00008086d00001583sv*sd*bc*sc*i*
alias:          pci:v00008086d00001581sv*sd*bc*sc*i*
alias:          pci:v00008086d00001580sv*sd*bc*sc*i*
alias:          pci:v00008086d00001574sv*sd*bc*sc*i*
alias:          pci:v00008086d00001572sv*sd*bc*sc*i*
depends:        ptp
retpoline:      Y
vermagic:       4.9.0-8-amd64 SMP mod_unload modversions
parm:           debug:Debug level (0=none,...,16=all) (int)

i40e.ko 파일을 이미지파일의 경로에 복사.

root@devpython3:/home/orchard/i40e-2.7.29/src# cp /lib/modules/4.9.0-8-amd64/updates/drivers/net/ethernet/intel/i40e/i40e.ko /home/orchard/test/lib/modules/3.16.0-6-amd64/kernel/drivers/

복사된 이미지를 다시 패키징

root@devpython3:/home/orchard# dpkg-deb -b test linux-image-3.16.0-6-amd64_3.16.56-1+deb8u1_amd64.deb
dpkg-deb: building package 'linux-image-3.16.0-6-amd64' in 'linux-image-3.16.0-6-amd64_3.16.56-1+deb8u1_amd64.deb'.
root@devpython3:/home/orchard#

이제 커스텀 커널 패키지가 완성되었다.

해당 커널로 부팅시에 i40e가 최신 드라이버면 된다.

[시험3]

debian8.11(jessie) VM을 생성하고 해당 VM의 커널을 만든 커스텀 커널로 변경한다.

변경 후에 i40e 최신 버전인지 확인한다.

vm의 커널버전 확인.

orchard@hostname:~$ uname -a
Linux hostname 3.16.0-6-amd64 #1 SMP Debian 3.16.57-2 (2018-07-14) x86_64 GNU/Linux

설치한 패키지 커널버전 확인.

rchard@hostname:~$ ls
linux-image-3.16.0-6-amd64_3.16.56-1+deb8u1_amd64.deb

설치.

root@hostname:/home/orchard# dpkg -i linux-image-3.16.0-6-amd64_3.16.56-1+deb8u1_amd64.deb
dpkg: 경고: downgrading linux-image-3.16.0-6-amd64 from 3.16.57-2 to 3.16.56-1+deb8u1
(데이터베이스 읽는중 ...현재 21028개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack linux-image-3.16.0-6-amd64_3.16.56-1+deb8u1_amd64.deb ...
Unpacking linux-image-3.16.0-6-amd64 (3.16.56-1+deb8u1) over (3.16.57-2) ...
linux-image-3.16.0-6-amd64 (3.16.56-1+deb8u1) 설정하는 중입니다 ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-6-amd64
/etc/kernel/postinst.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.16.0-6-amd64
Found initrd image: /boot/initrd.img-3.16.0-6-amd64
done

신기하게도 같은 버전의 커널상태에서 커스텀 패키지를 설치하니

root@hostname:/home/orchard# modinfo i40e
filename:       /lib/modules/3.16.0-6-amd64/kernel/drivers/net/ethernet/intel/i40e/i40e.ko
version:        2.7.29
license:        GPL
description:    Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
author:         Intel Corporation, <e1000-devel@lists.sourceforge.net>
srcversion:     2212C8D31172FBDBC9A1647
alias:          pci:v00008086d0000158Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000158Asv*sd*bc*sc*i*
alias:          pci:v00008086d000037D3sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D2sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D1sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D0sv*sd*bc*sc*i*
alias:          pci:v00008086d000037CFsv*sd*bc*sc*i*
alias:          pci:v00008086d000037CEsv*sd*bc*sc*i*
alias:          pci:v00008086d00001588sv*sd*bc*sc*i*
alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
alias:          pci:v00008086d000015FFsv*sd*bc*sc*i*
alias:          pci:v00008086d00001589sv*sd*bc*sc*i*
alias:          pci:v00008086d00001586sv*sd*bc*sc*i*
alias:          pci:v00008086d00001585sv*sd*bc*sc*i*
alias:          pci:v00008086d00001584sv*sd*bc*sc*i*
alias:          pci:v00008086d00001583sv*sd*bc*sc*i*
alias:          pci:v00008086d00001581sv*sd*bc*sc*i*
alias:          pci:v00008086d00001580sv*sd*bc*sc*i*
alias:          pci:v00008086d00001574sv*sd*bc*sc*i*
alias:          pci:v00008086d00001572sv*sd*bc*sc*i*
depends:        ptp
retpoline:      Y
vermagic:       4.9.0-8-amd64 SMP mod_unload modversions
parm:           debug:Debug level (0=none,...,16=all) (int)

최신버전의 드라이버가 설치되었다.

즉, 해당 커널에 덮어씌어진것이다.

실제로 menuentry에서 확인해도 커널이 더 추가되어 있지 않았다.

less /boot/grub/grub.cfg

submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-8a7ff91c-4fdf-48e4-801b-63d634a36a36' {
        menuentry 'Debian GNU/Linux, with Linux 3.16.0-6-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-6-amd64-advanced-8a7ff91c-4fdf-48e4-801b-63d634a36a36' {
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  8a7ff91c-4fdf-48e4-801b-63d634a36a36
                else
                  search --no-floppy --fs-uuid --set=root 8a7ff91c-4fdf-48e4-801b-63d634a36a36
                fi
                echo    'Loading Linux 3.16.0-6-amd64 ...'
                linux   /boot/vmlinuz-3.16.0-6-amd64 root=UUID=8a7ff91c-4fdf-48e4-801b-63d634a36a36 ro  quiet
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-3.16.0-6-amd64
        }
        menuentry 'Debian GNU/Linux, with Linux 3.16.0-6-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-6-amd64-recovery-8a7ff91c-4fdf-48e4-801b-63d634a36a36' {
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  8a7ff91c-4fdf-48e4-801b-63d634a36a36
                else
                  search --no-floppy --fs-uuid --set=root 8a7ff91c-4fdf-48e4-801b-63d634a36a36
                fi
                echo    'Loading Linux 3.16.0-6-amd64 ...'
                linux   /boot/vmlinuz-3.16.0-6-amd64 root=UUID=8a7ff91c-4fdf-48e4-801b-63d634a36a36 ro single
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-3.16.0-6-amd64
        }
}

결론은 커스텀한 패키지로 설치하니 최신버전의 드라이버가 되었다!

이제 이 커스텀 커널 패키지를 이용해서 ISO를 만드는 일만 남았다.

해당 커스텀 패키지는 스트래치 기반인 내 개발 VM에서 만들었다.

이게 문제가 될수도 있다는 전광석 연구원님의 말을 들어 jessie머신에서 다시 패키징한다.

최신 드라이버 다운.

root@hostname:~# wget https://downloadmirror.intel.com/24411/eng/i40e-2.7.29.tar.gz
--2019-01-31 22:29:05--  https://downloadmirror.intel.com/24411/eng/i40e-2.7.29.tar.gz
Resolving downloadmirror.intel.com (downloadmirror.intel.com)... 23.212.12.6
Connecting to downloadmirror.intel.com (downloadmirror.intel.com)|23.212.12.6|:443... connected.
ERROR: The certificate of ‘downloadmirror.intel.com’ is not trusted.
ERROR: The certificate of ‘downloadmirror.intel.com’ hasn't got a known issuer.

인증서를 신뢰할수 없다구요?

인증서를 체크하지 않는 옵션을 넣어서 받았다.

root@hostname:~# wget --no-check-certificate  https://downloadmirror.intel.com/24411/eng/i40e-2.7.29.tar.gz
--2019-01-31 22:31:37--  https://downloadmirror.intel.com/24411/eng/i40e-2.7.29.tar.gz
Resolving downloadmirror.intel.com (downloadmirror.intel.com)... 23.212.12.6
Connecting to downloadmirror.intel.com (downloadmirror.intel.com)|23.212.12.6|:443... connected.
WARNING: The certificate of ‘downloadmirror.intel.com’ is not trusted.
WARNING: The certificate of ‘downloadmirror.intel.com’ hasn't got a known issuer.
HTTP request sent, awaiting response... 200 OK
Length: 543977 (531K) [application/x-gzip]
Saving to: ‘i40e-2.7.29.tar.gz’

i40e-2.7.29.tar.gz            100%[================================================>] 531.23K  --.-KB/s   in 0.1s

2019-01-31 22:31:38 (5.42 MB/s) - ‘i40e-2.7.29.tar.gz’ saved [543977/543977]

컴파일한다.

root@hostname:~/i40e-2.7.29/src# make install
bash: make: command not found

make라는 명령어를 찾을 수 없다.

어떤 패키지가 누락되어 있을것이다.

root@hostname:~/i40e-2.7.29/src# apt install build-essential

설치 후 다시 컴파일 시도.

root@hostname:~/i40e-2.7.29/src# make install
common.mk:81: *** Kernel header files not in any of the expected locations.
common.mk:82: *** Install the appropriate kernel development package, e.g.
common.mk:83: *** kernel-devel, for building kernel modules and try again.  멈춤.

이번엔 헤더를 찾을 수 없다.

헤더를 설치.

::
root@hostname:~/i40e-2.7.29/src# apt install linux-headers-3.16.0-6-amd64

컴파일.

root@hostname:~/i40e-2.7.29/src# make install
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-6-common'
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-6-amd64'
  CC [M]  /root/i40e-2.7.29/src/i40e_main.o
  CC [M]  /root/i40e-2.7.29/src/i40e_ethtool.o
  CC [M]  /root/i40e-2.7.29/src/i40e_adminq.o
  CC [M]  /root/i40e-2.7.29/src/i40e_common.o
  CC [M]  /root/i40e-2.7.29/src/i40e_hmc.o
  CC [M]  /root/i40e-2.7.29/src/i40e_lan_hmc.o
  CC [M]  /root/i40e-2.7.29/src/i40e_nvm.o
  CC [M]  /root/i40e-2.7.29/src/i40e_debugfs.o
  CC [M]  /root/i40e-2.7.29/src/i40e_diag.o
  CC [M]  /root/i40e-2.7.29/src/i40e_txrx.o
  CC [M]  /root/i40e-2.7.29/src/i40e_ptp.o
  CC [M]  /root/i40e-2.7.29/src/i40e_filters.o
  CC [M]  /root/i40e-2.7.29/src/i40e_ddp.o
  CC [M]  /root/i40e-2.7.29/src/i40e_client.o
  CC [M]  /root/i40e-2.7.29/src/i40e_virtchnl_pf.o
  CC [M]  /root/i40e-2.7.29/src/i40e_dcb.o
  CC [M]  /root/i40e-2.7.29/src/i40e_dcb_nl.o
  CC [M]  /root/i40e-2.7.29/src/kcompat.o
  CC [M]  /root/i40e-2.7.29/src/kcompat_vfd.o
  LD [M]  /root/i40e-2.7.29/src/i40e.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/i40e-2.7.29/src/i40e.mod.o
  LD [M]  /root/i40e-2.7.29/src/i40e.ko
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-6-common'
Installing modules...
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-6-common'
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-6-amd64'
  INSTALL /root/i40e-2.7.29/src/i40e.ko
  DEPMOD  3.16.0-6-amd64
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-6-common'
/sbin/depmod -e -F /boot/System.map-3.16.0-6-amd64  -a 3.16.0-6-amd64
Updating initramfs...
update-initramfs: Generating /boot/initrd.img-3.16.0-6-amd64
make mandocs_install
make[1]: Entering directory '/root/i40e-2.7.29/src'
Copying manpages...
make[1]: Leaving directory '/root/i40e-2.7.29/src'

컴파일 완료되었다. VM을 한번 리부팅 해주자.

드라이버의 버전을 확인.

root@hostname:/home/orchard# modinfo i40e
filename:       /lib/modules/3.16.0-6-amd64/updates/drivers/net/ethernet/intel/i40e/i40e.ko
version:        2.7.29
license:        GPL
description:    Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
author:         Intel Corporation, <e1000-devel@lists.sourceforge.net>
srcversion:     2212C8D31172FBDBC9A1647
alias:          pci:v00008086d0000158Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000158Asv*sd*bc*sc*i*
alias:          pci:v00008086d000037D3sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D2sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D1sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D0sv*sd*bc*sc*i*
alias:          pci:v00008086d000037CFsv*sd*bc*sc*i*
alias:          pci:v00008086d000037CEsv*sd*bc*sc*i*
alias:          pci:v00008086d00001588sv*sd*bc*sc*i*
alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
alias:          pci:v00008086d000015FFsv*sd*bc*sc*i*
alias:          pci:v00008086d00001589sv*sd*bc*sc*i*
alias:          pci:v00008086d00001586sv*sd*bc*sc*i*
alias:          pci:v00008086d00001585sv*sd*bc*sc*i*
alias:          pci:v00008086d00001584sv*sd*bc*sc*i*
alias:          pci:v00008086d00001583sv*sd*bc*sc*i*
alias:          pci:v00008086d00001581sv*sd*bc*sc*i*
alias:          pci:v00008086d00001580sv*sd*bc*sc*i*
alias:          pci:v00008086d00001574sv*sd*bc*sc*i*
alias:          pci:v00008086d00001572sv*sd*bc*sc*i*
depends:        ptp,vxlan
retpoline:      Y
vermagic:       3.16.0-6-amd64 SMP mod_unload modversions
parm:           debug:Debug level (0=none,...,16=all) (int)

어제와 같은 방법으로 드라이버를 바꾸고 패키징한다.

root@hostname:~# mkdir test
root@hostname:~# dpkg-deb -R linux-image-3.16.0-6-amd64_3.16.57-2_amd64.deb test
root@hostname:~# cd test
root@hostname:~/test# cp /lib/modules/3.16.0-6-amd64/updates/drivers/net/ethernet/intel/i40e/i40e.ko lib/modules/3.16.0-6-amd64/kernel/drivers/net/ethernet/intel/i40e/i40e.ko
root@hostname:~# dpkg-deb -b test linux-image-3.16.0-6-amd64_3.16.57-2_amd64.deb

이러면 이제 제시의 제시에 의한 제시를 위한 최신커널을 탑재한 커스텀 커널 패키지가 완성되었다.

curry에서 구동중인 custom-jessie VM으로 이동한다.

[ISO 생성]

custom-jessie VM의 로컬패키지 폴더를 확인했다.

orchard@customcd-jessie:~/custom-cd/jessie/profiles/pengx3_localpkg$ ls
libxen-4.6_4.6.0-1+nmu2_amd64.deb        splash.png
libxen-dev_4.6.0-1+nmu2_amd64.deb        uxenapi.deb
libxenstore3.0_4.6.0-1+nmu2_amd64.deb    xen-hypervisor-4.6-amd64_4.6.0-1+nmu2_amd64.deb
pengxconf.deb                            xenstore-utils_4.6.0-1+nmu2_amd64.deb
qemu-system-common_2.5+dfsg-5_amd64.deb  xen-system-amd64_4.6.0-1+nmu2_amd64.deb
qemu-system-x86_2.5+dfsg-5_amd64.deb     xen-utils-4.6_4.6.0-1+nmu2_amd64.deb
qemu-utils_2.5+dfsg-5_amd64.deb          xen-utils-common_4.6.0-1+nmu2_all.deb

이론대로라면 여기에 해당 커널이미지를 넣어두면 미러가아닌 이곳에서 커널패키지를 가져와야 한다.

먼저 이곳에 커스텀 커널 패키지를 이동시키자.

root@hostname:~# scp -P 42544 linux-image-3.16.0-6-amd64_3.16.57-2_amd64.deb 110.45.238.92:/home/orchard/custom-cd/jessie/profiles/pengx3_localpkg

잘 도착한 것을 확인했다.

orchard@customcd-jessie:~/custom-cd/jessie/profiles/pengx3_localpkg$ ls
libxen-4.6_4.6.0-1+nmu2_amd64.deb               splash.png
libxen-dev_4.6.0-1+nmu2_amd64.deb               uxenapi.deb
libxenstore3.0_4.6.0-1+nmu2_amd64.deb           xen-hypervisor-4.6-amd64_4.6.0-1+nmu2_amd64.deb
linux-image-3.16.0-6-amd64_3.16.57-2_amd64.deb  xenstore-utils_4.6.0-1+nmu2_amd64.deb
pengxconf.deb                                   xen-system-amd64_4.6.0-1+nmu2_amd64.deb
qemu-system-common_2.5+dfsg-5_amd64.deb         xen-utils-4.6_4.6.0-1+nmu2_amd64.deb
qemu-system-x86_2.5+dfsg-5_amd64.deb            xen-utils-common_4.6.0-1+nmu2_all.deb
qemu-utils_2.5+dfsg-5_amd64.deb

이제 만들기만 하면 되는건가??

받아올 패키지를 저장하는 uxen3.package파이을 봤다.

orchard@customcd-jessie:~/custom-cd/jessie/profiles$ less uxen3.packages

# Kernel related packages. (kernel version 3.16.0-6-amd64)
linux-headers-amd64
linux-kbuild-3.16
initramfs-tools

# Xen essential packages. (Xen Version 4.6)
linux-image-amd64
xen-hypervisor-4.6-amd64
libxenstore3.0
xenstore-utils
libxen-4.6
libxen-dev
xen-utils-4.6
xen-system-amd64

커스텀 커널의 이름을 바꿔서 혼동되지 않도록 해보자.

이름변경.

orchard@customcd-jessie:~/custom-cd/jessie/profiles/pengx3_localpkg$ mv linux-image-3.16.0-6-amd64_3.16.57-2_amd64.deb linux-image-custom-3.16.0-6-amd64_3.16.57-2_amd64.deb

그룹과 소유자가 root root이다 혹시모르니 이것도 맞춰두자.

orchard@customcd-jessie:~/custom-cd/jessie/profiles/pengx3_localpkg$ ls -al
total 52956
drwxr-xr-x 2 orchard orchard     4096 Jan 31 14:35 .
drwxr-xr-x 4 orchard orchard     4096 Oct  8 14:48 ..
-rw-r--r-- 1 orchard orchard   362856 Sep  6 19:22 libxen-4.6_4.6.0-1+nmu2_amd64.deb
-rw-r--r-- 1 orchard orchard   574588 Sep  6 19:23 libxen-dev_4.6.0-1+nmu2_amd64.deb
-rw-r--r-- 1 orchard orchard    31054 Sep  6 19:23 libxenstore3.0_4.6.0-1+nmu2_amd64.deb
-rw-r--r-- 1 root    root    35962048 Jan 31 14:22 linux-image-custom-3.16.0-6-amd64_3.16.57-2_amd64.deb
-rw-r--r-- 1 orchard orchard     2062 Oct  1 12:02 pengxconf.deb
-rw-r--r-- 1 orchard orchard   326130 Sep  6 19:25 qemu-system-common_2.5+dfsg-5_amd64.deb
-rw-r--r-- 1 orchard orchard  3480820 Sep  6 19:27 qemu-system-x86_2.5+dfsg-5_amd64.deb
-rw-r--r-- 1 orchard orchard   625228 Sep  6 19:28 qemu-utils_2.5+dfsg-5_amd64.deb
-rw-r--r-- 1 orchard orchard    80944 Sep 12 13:56 splash.png
-rw-r--r-- 1 orchard orchard 10263046 Sep 27 02:33 uxenapi.deb
-rw-r--r-- 1 orchard orchard  1737314 Sep  6 19:28 xen-hypervisor-4.6-amd64_4.6.0-1+nmu2_amd64.deb
-rw-r--r-- 1 orchard orchard    26768 Sep  6 19:29 xenstore-utils_4.6.0-1+nmu2_amd64.deb
-rw-r--r-- 1 orchard orchard    20124 Sep  6 19:28 xen-system-amd64_4.6.0-1+nmu2_amd64.deb
-rw-r--r-- 1 orchard orchard   469116 Sep  6 19:29 xen-utils-4.6_4.6.0-1+nmu2_amd64.deb
-rw-r--r-- 1 orchard orchard   230726 Sep  6 19:29 xen-utils-common_4.6.0-1+nmu2_all.deb

orchard@customcd-jessie:~/custom-cd/jessie/profiles/pengx3_localpkg$ sudo chown -R orchard:orchard linux-image-custom-3.16.0-6-amd64_3.16.57-2_amd64.deb

패키지 파일에서 가져올 커널이미지의 이름을 변경한다.

# Kernel related packages. (kernel version 3.16.0-6-amd64)
linux-headers-amd64
linux-kbuild-3.16
initramfs-tools

# Xen essential packages. (Xen Version 4.6)
linux-image-custom
xen-hypervisor-4.6-amd64
libxenstore3.0
xenstore-utils
libxen-4.6
libxen-dev
xen-utils-4.6
xen-system-amd64

이렇게 하면 어떻게 될까?

한번 시험해본다.

xen 패키지에 왜 커널이 있는지도 의문이지만 일단 넘긴다.

빌드 시작!!

orchard@customcd-jessie:~/custom-cd/jessie$ build-simple-cdd -p uxen3

...

ERROR: '/home/orchard/custom-cd/jessie/profiles/pengx3_localpkg/linux-image-custom-3.16.0-6-amd64_3.16.57-2_amd64.deb' cannot be included as 'pool/main/l/linux/linux-image-3.16.0-6-amd64_3.16.57-2_amd64.deb'.
Already existing files can only be included again, if they are the same, but:
md5 expected: 3630686f4e62a48fc3c3a77ac605de18, got: 10c67185f75f2a432010824b13b1efdb
sha1 expected: 363298eef94d4b610e2157ff1e83b40e1684d31c, got: 2bf616beec78603af0e4bd8a9d2246b3e3ea1692
sha256 expected: ff5b674f8dd7273678e7784204828ea652c59a618876ab613c11120117ab099f, got: 3eb371bf79ec7d938848a802ec585e80dd3c857be584c13371794261f4565e6d
size expected: 34522160, got: 35962048
There have been errors!

...

WARNING: missing optional packages from profile default:  console-tools
ERROR: missing required packages from profile uxen3:  linux-image-custom

에러가 발생한다.

메세지의 내용을 보니 이전설정으로 돌려두면 될것 같다.

이전설정으로 돌린 후 다시 빌드 시작.

xorriso : UPDATE :  2.14% done
xorriso : UPDATE :  3.81% done, estimate finish Thu Jan 31 15:00:26 2019
xorriso : UPDATE :  3.81% done, estimate finish Thu Jan 31 15:00:52 2019
xorriso : UPDATE :  5.20% done, estimate finish Thu Jan 31 15:00:47 2019
xorriso : UPDATE :  7.62% done, estimate finish Thu Jan 31 15:00:32 2019
xorriso : UPDATE :  11.43% done, estimate finish Thu Jan 31 15:00:16 2019
xorriso : UPDATE :  15.24% done, estimate finish Thu Jan 31 15:00:09 2019
xorriso : UPDATE :  16.83% done, estimate finish Thu Jan 31 15:00:10 2019
xorriso : UPDATE :  19.05% done, estimate finish Thu Jan 31 15:00:10 2019
xorriso : UPDATE :  22.45% done, estimate finish Thu Jan 31 15:00:07 2019
xorriso : UPDATE :  26.67% done, estimate finish Thu Jan 31 15:00:03 2019
xorriso : UPDATE :  30.48% done, estimate finish Thu Jan 31 15:00:01 2019
xorriso : UPDATE :  34.29% done, estimate finish Thu Jan 31 14:59:59 2019
xorriso : UPDATE :  38.10% done, estimate finish Thu Jan 31 14:59:58 2019
xorriso : UPDATE :  41.90% done, estimate finish Thu Jan 31 14:59:57 2019
xorriso : UPDATE :  49.52% done, estimate finish Thu Jan 31 14:59:49 2019
xorriso : UPDATE :  56.89% done, estimate finish Thu Jan 31 14:59:47 2019
xorriso : UPDATE :  61.67% done, estimate finish Thu Jan 31 14:59:47 2019
xorriso : UPDATE :  65.05% done, estimate finish Thu Jan 31 14:59:47 2019
xorriso : UPDATE :  70.08% done, estimate finish Thu Jan 31 14:59:47 2019
xorriso : UPDATE :  75.43% done, estimate finish Thu Jan 31 14:59:46 2019
xorriso : UPDATE :  79.93% done, estimate finish Thu Jan 31 14:59:46 2019
xorriso : UPDATE :  82.78% done, estimate finish Thu Jan 31 14:59:47 2019
xorriso : UPDATE :  84.55% done, estimate finish Thu Jan 31 14:59:47 2019
xorriso : UPDATE :  87.62% done, estimate finish Thu Jan 31 14:59:48 2019
xorriso : UPDATE :  91.43% done, estimate finish Thu Jan 31 14:59:48 2019
xorriso : UPDATE :  95.24% done
ISO image produced: 215040 sectors
Written to medium : 215040 sectors at LBA 0
Writing to 'stdio:/home/orchard/custom-cd/jessie/images/uxen-3.2.0-amd64-CD-1.iso' completed successfully.

일단은 완성은 된 모양인데 내 커스텀 커널을 잘 가져간건지 확인이 필요하다.

orchard@yb:/home$ sudo scp -P 42544 110.45.238.92:/home/orchard/custom-cd/jessie/images/uxen-3.2.0-amd64-CD-1.iso .
[email protected]'s password:
uxen-3.2.0-amd64-CD-1.iso                                                          100%  420MB   5.2MB/s   01:21

만든 이미지를 내 로컬로 가지고 왔다.

또 부팅 USB를 만들어서 설치해보는건 너무 시간이 오래걸릴거 같다.

iso를 read-only로 마운트해서 안에 있는 패키지를 확인한다.

1. 새로만든 uxen3.2-iso

[iso 마운트]

root@yb:/home# mount -t iso9660 -o loop uxen-3.2.0-amd64-CD-1.iso /mnt

[풀에 있는 deb 확인]

root@yb:/mnt# cd pool/main/l/linux/
btrfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
crc-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
crypto-dm-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
crypto-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
efi-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
event-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
ext4-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
firewire-core-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
fuse-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
hyperv-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
i2c-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
jfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
linux-compiler-gcc-4.9-x86_3.16.59-1_amd64.deb
linux-headers-3.16.0-7-amd64_3.16.59-1_amd64.deb
linux-headers-3.16.0-7-common_3.16.59-1_amd64.deb
linux-image-3.16.0-7-amd64_3.16.59-1_amd64.deb
linux-libc-dev_3.16.59-1_amd64.deb
loop-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
md-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
mmc-core-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
multipath-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nbd-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-pcmcia-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-shared-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-usb-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-wireless-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
ntfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
pata-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
pcmcia-storage-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
ppp-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
scsi-extra-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
sound-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
squashfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
udf-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
uinput-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
virtio-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
xfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb

커널버전 3.16.0.7

2. 기존 uxen3.2-iso

[iso 마운트]

orchard@yb:~$ sudo mount -t iso9660 -o loop uxen-3.2.0-amd64-CD-1.iso /tmp
mount: /dev/loop1 is write-protected, mounting read-only

[풀에 있는 deb 확인]

orchard@yb:/tmp$ cd pool/main/l/linux/
btrfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
crc-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
crypto-dm-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
crypto-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
efi-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
event-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
ext4-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
firewire-core-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
fuse-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
hyperv-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
i2c-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
jfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
linux-compiler-gcc-4.9-x86_3.16.57-2_amd64.deb
linux-headers-3.16.0-6-amd64_3.16.57-2_amd64.deb
linux-headers-3.16.0-6-common_3.16.57-2_amd64.deb
linux-image-3.16.0-6-amd64_3.16.57-2_amd64.deb
linux-libc-dev_3.16.57-2_amd64.deb
loop-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
md-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
mmc-core-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
multipath-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nbd-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-pcmcia-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-shared-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-usb-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-wireless-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
ntfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
pata-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
pcmcia-storage-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
ppp-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
scsi-extra-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
sound-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
squashfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
udf-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
uinput-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
virtio-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
xfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb

커널버전 3.16.0.6

3. 결론

내가 만든 uxen3.2는 로컬 패키지에서 커널 패키지를 가져오지않고 원격 미러에서 가져왔다.

잘못만든 것이다. 어디서 잘못된걸까?

자꾸 뭔가 비교하여 이전과 다르니 넣을수 없다는 내용이 있어 전광석 연구원님께 문의해본 결과

“tmp파일에 캐시가 남아있어서” 그럴것 같다는 언질을 받을 수 있었다.

지우고 빌드를 시작했더니 일단 같은 오류는 발생하지 않는다. 그런데 빌드시간이 엄청 오래걸린다…

[ISO 생성2]

이제는 잘 생성될 것 이라고 믿고 만들어지면 풀확인 후에 부팅디스크로 만들어서 직접설치하고 드라이버를 확인하면 될것이다.

분명 잘 들어갔다는 로그를 확인했다.

/home/orchard/custom-cd/jessie/profiles/pengx3_localpkg/linux-image-3.16.0-6-amd64_3.16.57-2_amd64.deb: component guessed as 'main'
Skipping inclusion of 'linux-image-3.16.0-6-amd64' '3.16.57-2' in 'jessie|main|amd64', as it has already '3.16.57-2'.

이전 로그와는 확실히 상반되게 풀로 들어갔음을 알수있었다.

하지만 완성된 ISO에 접근하여 풀을 확인해보니 이전과 같이 3.16.0-7 커널을 받아왔다.

풀 확인.

root@yb:/mnt# cd pool/main/l/linux/
btrfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
crc-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
crypto-dm-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
crypto-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
efi-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
event-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
ext4-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
firewire-core-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
fuse-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
hyperv-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
i2c-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
jfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
linux-compiler-gcc-4.9-x86_3.16.59-1_amd64.deb
linux-headers-3.16.0-7-amd64_3.16.59-1_amd64.deb
linux-headers-3.16.0-7-common_3.16.59-1_amd64.deb
linux-image-3.16.0-7-amd64_3.16.59-1_amd64.deb
linux-libc-dev_3.16.59-1_amd64.deb
loop-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
md-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
mmc-core-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
multipath-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nbd-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-pcmcia-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-shared-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-usb-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
nic-wireless-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
ntfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
pata-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
pcmcia-storage-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
ppp-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
scsi-extra-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
sound-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
squashfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
udf-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
uinput-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
virtio-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb
xfs-modules-3.16.0-6-amd64-di_3.16.56-1+deb8u1_amd64.udeb

무엇이 문제일까?

“헤더등 다른 3.16.0-7 버전의 패키지와의 의존성때문에” 해당커널을 필수로 받아오는것은 아닌가

라는 추측을 기반으로 “3.16.0-7커널에 최신드라이버를 적용” 시켜 다시 빌드해보았다.

이전 글에 최신패칠가 적용된 uxenapi.deb를 만든적이 있다.

이 패키지도 추가하여 ISO를 만든다.

1. uxen3.conf 수정

orchard@customcd-jessie:~/custom-cd/jessie/profiles$ vi uxen3.conf
profiles="uxen3 uxenapi3"
locale="ko_KR"
keyboard="us"


debian_mirror="ftp://ftp.us.debian.org/debian/"
security_mirror="http://security.debian.org/"
mirror_components="main contrib non-free"


local_packages="$simple_cdd_dir/profiles/pengx3_localpkg/"
#all_extras="$all_extras \
#        $simple_cdd_dir/profiles/pengx3_extras/RELEASE.rst"


export SPLASHPNG="$simple_cdd_dir/profiles/pengx3_localpkg/splash.png"
export CDNAME="uxen"
export DEBVERSION="3.2.1"
export ARCHES="amd64"

DEBVERSION을 3.2.1로 변경하였다.

2. pengx3_localpkg에 패키지 추가

orchard@customcd-jessie:~/custom-cd/jessie/profiles/pengx3_localpkg$ ls
libxen-4.6_4.6.0-1+nmu2_amd64.deb
libxen-dev_4.6.0-1+nmu2_amd64.deb
libxenstore3.0_4.6.0-1+nmu2_amd64.deb
linux-image-3.16.0-7-amd64_3.16.59-1_amd64.deb
pengxconf.deb
qemu-system-common_2.5+dfsg-5_amd64.deb
qemu-system-x86_2.5+dfsg-5_amd64.deb
qemu-utils_2.5+dfsg-5_amd64.deb
splash.png
uxenapi.deb
xen-hypervisor-4.6-amd64_4.6.0-1+nmu2_amd64.deb
xenstore-utils_4.6.0-1+nmu2_amd64.deb
xen-system-amd64_4.6.0-1+nmu2_amd64.deb
xen-utils-4.6_4.6.0-1+nmu2_amd64.deb
xen-utils-common_4.6.0-1+nmu2_all.de

최신 uxenapi.deb와 linux-image-3.16.0-7을 커스텀하여 추가했다.

3. ISO 빌드

orchard@customcd-jessie:~/custom-cd/jessie$ build-simple-cdd -p uxen3

4. 빌드된 이미지로 UXEN설치 및 확인.

드라이버 확인.

root@test:~# modinfo i40e
filename:       /lib/modules/3.16.0-6-amd64/updates/drivers/net/ethernet/intel/i40e/i40e.ko
version:        2.7.29
license:        GPL
description:    Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
author:         Intel Corporation, <e1000-devel@lists.sourceforge.net>
srcversion:     2212C8D31172FBDBC9A1647
alias:          pci:v00008086d0000158Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000158Asv*sd*bc*sc*i*
alias:          pci:v00008086d000037D3sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D2sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D1sv*sd*bc*sc*i*
alias:          pci:v00008086d000037D0sv*sd*bc*sc*i*
alias:          pci:v00008086d000037CFsv*sd*bc*sc*i*
alias:          pci:v00008086d000037CEsv*sd*bc*sc*i*
alias:          pci:v00008086d00001588sv*sd*bc*sc*i*
alias:          pci:v00008086d00001587sv*sd*bc*sc*i*
alias:          pci:v00008086d000015FFsv*sd*bc*sc*i*
alias:          pci:v00008086d00001589sv*sd*bc*sc*i*
alias:          pci:v00008086d00001586sv*sd*bc*sc*i*
alias:          pci:v00008086d00001585sv*sd*bc*sc*i*
alias:          pci:v00008086d00001584sv*sd*bc*sc*i*
alias:          pci:v00008086d00001583sv*sd*bc*sc*i*
alias:          pci:v00008086d00001581sv*sd*bc*sc*i*
alias:          pci:v00008086d00001580sv*sd*bc*sc*i*
alias:          pci:v00008086d00001574sv*sd*bc*sc*i*
alias:          pci:v00008086d00001572sv*sd*bc*sc*i*
depends:        ptp,vxlan
retpoline:      Y
vermagic:       3.16.0-6-amd64 SMP mod_unload modversions
parm:           debug:Debug level (0=none,...,16=all) (int)

패키지 확인

root@test:/opt# ls
postgresql-9.4_9.4.19-0+deb8u1_amd64.deb           uxenapi_3.2.1_amd64.deb

패키지와 드라이버 모두 정상적으로 포함되었다.

5. 생성된 이미지 repo에 추가.

root@customcd-jessie:/home/orchard/custom-cd/jessie/images# ls -al
total 1046564
drwxr-xr-x 2 orchard orchard      4096 Feb  2 18:08 .
drwxr-xr-x 5 orchard orchard      4096 Feb  1 12:10 ..
-rw-r--r-- 1 orchard orchard 188743680 Sep 14 23:52 debian-8.11-amd64-CD-1.iso
-rw-r--r-- 1 orchard orchard      4298 Sep 14 23:52 debian-8.11-amd64-CD-1.list.gz
-rw-r--r-- 1 orchard orchard 440401920 Jan 31 14:59 uxen-3.2.0-amd64-CD-1.iso
-rw-r--r-- 1 orchard orchard      7300 Jan 31 14:59 uxen-3.2.0-amd64-CD-1.list.gz
-rw-r--r-- 1 orchard orchard 442499072 Feb  2 18:04 uxen-3.2.1-amd64-CD-1.iso
-rw-r--r-- 1 orchard orchard      7291 Feb  2 18:04 uxen-3.2.1-amd64-CD-1.list.gz

orchard@customcd-jessie:~/custom-cd/jessie/images$ scp -P42544 uxen-3.2.1-amd64-CD-1.iso [email protected]:/repo/lgu
[email protected]'s password:
uxen-3.2.1-amd64-CD-1.iso                            100%  422MB  26.4MB/s   00:16

완료.