- Perhatikan prepare-kernel-sources bash file yang ada di /usr/bin/prepare-kernel-sources
Code:
#!/bin/bash
VER=`uname -r`
echo "[*] apt-getting linux-source..."
apt-get install linux-source
cd /usr/src/
echo "[*] extracting sources, please wait"
tar jxpf linux-source-$VER.tar.bz2
echo "[*] doing stuff..."
rm -rf linux
ln -s linux-source-$VER linux
cd linux
zcat /proc/config.gz > .config
cp /boot/
make scripts
make prepare
ln -s /usr/src/linux /lib/modules/$VER/build
echo "[*] tada!"
- Ketik di terminal "uname -r"
Code:
root@blusp10it:~# uname -r
- Kalo gagal dengan alasan nggak nemuin file linux-source-2.6.38, berarti ganti prepare-kernel-sources bash kamu. Tapi pertama-tama kamu harus back-up bash ini dengan kode:
Code:
root@blusp10it:~# cp /usr/bin/prepare-kernel-sources /root/prepare-kernel-sources
Lanjut, ganti syntax bash:
Code:
root@blusp10it:~# kwrite /usr/bin/prepare-kernel-sources
Ganti bash-nya dengan:
Code:
root@metasploit:~# #!/bin/bash
VER=`uname -r`
echo "[*] apt-getting linux-source..."
apt-get install linux-source-$VER
cd /usr/src/
echo "[*] extracting sources, please wait"
tar jxpf linux-source-$VER.tar.bz2
echo "[*] doing stuff..."
rm -rf linux
ln -s linux-source-$VER linux
cd linux
zcat /proc/config.gz > .config
make scripts
make prepare
ln -s /usr/src/linux /lib/modules/$VER/build
echo "[*] tada!"
- Coba lagi:
Code:
root@blusp10it:~# prepare-kernel-sources
- Kalo masih ada pesan error, coba cara manual. Lakukan perintah berikut:
Code:
root@blusp10it:~# apt-get install $(uname -r)
- Kemudian:
Code:
root@blusp10it:~# prepare-kernel-sources
Pasti berhasil dengan tampilan:
- Sekarang kamu bisa install berbagai macam driver dengan parameter tambahan:
Code:
root@blusp10it:~# [command] --kernel-source-path='/usr/src/linux-source-2.6.38
0 comment:
Post a Comment