| | 868 | |
| | 869 | = 09/28 = |
| | 870 | * カーネルのビルドごとにゲスト側でインストールコマンドを叩くのが面倒なのでシェルスクリプトにした |
| | 871 | |
| | 872 | * install.sh |
| | 873 | {{{#!sh |
| | 874 | #! /bin/sh -ex |
| | 875 | |
| | 876 | VERSION=`ls -d /mnt/hgfs/linux-* | sed s#.*linux-##` |
| | 877 | echo Install Linux Kernel version ${VERSION} |
| | 878 | |
| | 879 | cd /mnt/hgfs/linux-${VERSION}/ |
| | 880 | make install |
| | 881 | make modules_install |
| | 882 | |
| | 883 | mkinitramfs -o /boot/initrd.img-${VERSION} ${VERSION} |
| | 884 | update-grub |
| | 885 | |
| | 886 | uname -a |
| | 887 | }}} |
| | 888 | |
| | 889 | * s0711489@ubuntu-lucid64:~$ time sudo /mnt/hgfs/tools/install.sh |
| | 890 | {{{ |
| | 891 | + sed s#.*linux-## |
| | 892 | + ls -d /mnt/hgfs/linux-2.6.35.14 |
| | 893 | + VERSION=2.6.35.14 |
| | 894 | + echo Install Linux Kernel version 2.6.35.14 |
| | 895 | Install Linux Kernel version 2.6.35.14 |
| | 896 | + cd /mnt/hgfs/linux-2.6.35.14/ |
| | 897 | + make install |
| | 898 | sh /mnt/hgfs/linux-2.6.35.14/arch/x86/boot/install.sh 2.6.35.14 arch/x86/boot/bzImage \ |
| | 899 | System.map "/boot" |
| | 900 | + make modules_install |
| | 901 | INSTALL arch/x86/kernel/test_nx.ko |
| | 902 | INSTALL drivers/scsi/scsi_wait_scan.ko |
| | 903 | INSTALL net/netfilter/xt_mark.ko |
| | 904 | DEPMOD 2.6.35.14 |
| | 905 | + mkinitramfs -o /boot/initrd.img-2.6.35.14 2.6.35.14 |
| | 906 | + update-grub |
| | 907 | Generating grub.cfg ... |
| | 908 | Found linux image: /boot/vmlinuz-2.6.35.14 |
| | 909 | Found initrd image: /boot/initrd.img-2.6.35.14 |
| | 910 | Found linux image: /boot/vmlinuz-2.6.32-33-generic |
| | 911 | Found initrd image: /boot/initrd.img-2.6.32-33-generic |
| | 912 | Found memtest86+ image: /boot/memtest86+.bin |
| | 913 | done |
| | 914 | + echo Install Kernel Headers to /lib/modules/2.6.35.14/build |
| | 915 | Install Kernel Headers to /lib/modules/2.6.35.14/build |
| | 916 | + date +%Y%m%d |
| | 917 | + mv /lib/modules/2.6.35.14/build /lib/modules/2.6.35.14/build-20110928 |
| | 918 | + cd /mnt/hgfs/ |
| | 919 | + tar c --files-from - |
| | 920 | + tar x -C /lib/modules/2.6.35.14/ |
| | 921 | + egrep -v vmlinu |
| | 922 | + egrep -v .o$ |
| | 923 | + find linux-2.6.35.14 -type f |
| | 924 | + mv /lib/modules/2.6.35.14/linux-2.6.35.14 /lib/modules/2.6.35.14/build |
| | 925 | + uname -a |
| | 926 | Linux ubuntu-lucid64 2.6.32-33-generic #72-Ubuntu SMP Fri Jul 29 21:07:13 UTC 2011 x86_64 GNU/Linux |
| | 927 | |
| | 928 | real 1m32.138s |
| | 929 | user 0m13.790s |
| | 930 | sys 1m26.160s |
| | 931 | }}} |