kaorimatz / packer-templates

Packer templates for Vagrant base boxes
MIT License
491 stars 244 forks source link

Changing kernel #11

Closed imehrdad2012 closed 7 years ago

imehrdad2012 commented 7 years ago

Hello,

I want to change the Ubuntu kernel through the following codelets. Which file should i modify? I tried both apt.sh and clean_up.sh but both of them result in corrupted boxes.

wget -q --progress=bar:force kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.2/linux-headers-4.7.2-040702_4.7.2-040702.201608201334_all.deb wget -q --progress=bar:force kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.2/linux-headers-4.7.2-040702-generic_4.7.2-040702.201608201334_amd64.deb wget -q --progress=bar:force kernel.ubuntu.com/~kernel-ppa/mainline/v4.7.2/linux-image-4.7.2-040702-generic_4.7.2-040702.201608201334_amd64.deb sudo dpkg -i linux-headers-4.7.2.deb linux-image-4.7.2.deb sudo rm linux-headers-4.7.2.deb linux-image-4.7.2.deb sudo apt-get purge -y linux-image-4.4.0-57-generic sudo update-grub2 sudo reboot

ek9 commented 7 years ago

Hi,

You can add a custom script. Consdering it's a custom kernel, you need to run it at the very start, before any virtualbox modules are installed (before virtualbox.sh). Just add it to debian-8.7-amd.json file, near scripts section.

There is no guarantee that the VirtualBox modules will work with a custom kernel though, so your results may warry.

Additional problem with your script is that it calls for reboot, and that is likely to break the whole process as the rest of the scripts are not run. So you have to remove reboot too.

Otheriwse, this is quite personal request and not related to this repository directly, so I am not able to help further.

Suggesting to close.