(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{303:function(e,t,n){"use strict";n.r(t);var s=n(15),a=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"kernel-modifications"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#kernel-modifications"}},[e._v("#")]),e._v(" Kernel Modifications")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#update-kernel"}},[e._v("Update Kernel")])]),t("li",[t("a",{attrs:{href:"#confirm-kernel"}},[e._v("Confirm Kernel")])]),t("li",[t("a",{attrs:{href:"#set-default-boot"}},[e._v("Set Default Boot")])]),t("li",[t("a",{attrs:{href:"#boot-from-hard-disk"}},[e._v("Boot from hard disk")])])])]),t("p"),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("In most cases, only users with a server provided by OVH will need to make any modifications to their kernel.")])]),e._v(" "),t("h2",{attrs:{id:"update-kernel"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#update-kernel"}},[e._v("#")]),e._v(" Update Kernel")]),e._v(" "),t("p",[e._v("Install the new kernels using apt-get. In this case we are installing the latest version of the kernel,\nbut feel free to browse using apt-cache search linux-image-extra to find all possible image versions you can\ninstall. You'll want to install the latest.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("apt-get")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("install")]),e._v(" linux-image-generic linux-image-extra-virtual\n")])])]),t("p",[e._v("After you've installed the new kernel you'll need to update the grub loader using the command below. After that, a\nserver reboot is in order.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mv")]),e._v(" /etc/grub.d/06_OVHkernel /etc/grub.d/96_OVHkernel\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("update-grub")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("reboot")]),e._v("\n")])])]),t("h2",{attrs:{id:"confirm-kernel"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#confirm-kernel"}},[e._v("#")]),e._v(" Confirm Kernel")]),e._v(" "),t("p",[e._v("Once you've rebooted, check that the latest kernel is installed using "),t("code",[e._v("uname -r")]),e._v(", it should output "),t("code",[e._v("4.4.0-131-generic")]),e._v("\n(in this case) or similar.")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("If it still includes "),t("code",[e._v("-xxxx-grs-ipv6-64")]),e._v(" or similar, it didn't work and you should move on top the steps below.")])]),e._v(" "),t("h2",{attrs:{id:"set-default-boot"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#set-default-boot"}},[e._v("#")]),e._v(" Set Default Boot")]),e._v(" "),t("p",[e._v("Ok, so unfortunately the easiest way didn't work, but don't worry, we can still fix this. Firstly, lets run a quick\ncommand to list potential kernels, just look at the output and make sure you see your newly installed kernel listed.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"menuentry \'"')]),e._v(" /boot/grub/grub.cfg\n")])])]),t("p",[e._v("After running that you should see output similar to the example below.")]),e._v(" "),t("div",{staticClass:"language-text extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-ad1a8550-963c-4a9f-b922-85827cf44fbe' {\n menuentry 'Ubuntu, with Linux 4.4.0-131-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-131-generic-advanced-ad1a8550-963c-4a9f-b922-85827cf44fbe' {\n menuentry 'Ubuntu, with Linux 4.4.0-131-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-131-generic-recovery-ad1a8550-963c-4a9f-b922-85827cf44fbe' {\n menuentry 'Ubuntu, with Linux 4.4.0-127-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-127-generic-advanced-ad1a8550-963c-4a9f-b922-85827cf44fbe' {\n menuentry 'Ubuntu, with Linux 4.4.0-127-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-127-generic-recovery-ad1a8550-963c-4a9f-b922-85827cf44fbe' {\n menuentry 'Ubuntu, with Linux 4.4.0-116-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-116-generic-advanced-ad1a8550-963c-4a9f-b922-85827cf44fbe' {\n menuentry 'Ubuntu, with Linux 4.4.0-116-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-116-generic-recovery-ad1a8550-963c-4a9f-b922-85827cf44fbe' {\n")])])]),t("p",[e._v("As you can see, we have "),t("code",[e._v("Ubuntu, with Linux 4.4.0-131-generic")]),e._v(" listed as the first indented option. To boot using this\nspecific kernel, we will need to modify our grub file.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("nano")]),e._v(" /etc/default/grub\n")])])]),t("p",[e._v("Find "),t("code",[e._v("GRUB_DEFAULT")]),e._v(", it is most likely set to "),t("code",[e._v("GRUB_DEFAULT=0")]),e._v(". We're going to modify it a bit to boot our new kernel.")]),e._v(" "),t("div",{staticClass:"language-text extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("GRUB_DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux 4.4.0-131-generic'\n")])])]),t("p",[e._v("The only part of the code above that you might need to change is the "),t("code",[e._v("4.4.0-131-generic")]),e._v(", which you can find based on\nthe kernel version you install. You might also notice that it matches the first indented entry from the grep menuentry\ncommand and also the version of the kernel that we installed above. Once you've done that, run the commands below to\nupdate grub and reboot, and you should be set.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("update-grub")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("reboot")]),e._v("\n")])])]),t("h2",{attrs:{id:"boot-from-hard-disk"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#boot-from-hard-disk"}},[e._v("#")]),e._v(" Boot from hard disk")]),e._v(" "),t("p",[e._v("It's possible that even after you modified the GRUB configuration the server's still booted into a OVH kernel. If this happens to you, go to the OVH control panel and check the server's booting settings and make sure it's booting from hard disk instead of network boot.")])])}),[],!1,null,null,null);t.default=a.exports}}]);