{"id":1182,"date":"2018-04-04T03:58:45","date_gmt":"2018-04-04T11:58:45","guid":{"rendered":"https:\/\/www.cloudinsidr.com\/content\/?p=1182"},"modified":"2019-05-17T02:21:29","modified_gmt":"2019-05-17T09:21:29","slug":"update-your-linux-kernel-in-place-running-centos-7-on-aws","status":"publish","type":"post","link":"https:\/\/www.cloudinsidr.com\/content\/update-your-linux-kernel-in-place-running-centos-7-on-aws\/","title":{"rendered":"A fix for Spectre &#038; Meltdown: update your Linux kernel in place (running CentOS\/RHEL 7 or above), and live happily ever after"},"content":{"rendered":"<p>If you launch an instance from the official CentOS or RHEL 7.x AMI on AWS,\u00a0you will be running kernel 3.1 as of this writing. That&#8217;s not a good idea. You can easily take advantage of improved security features of newer kernels that are already\u00a0available in a stable release. The renowned Linux kernel maintainer Greg Kroah-Hartman released the Linux Kernel 4.14.15, which includes important fixes for Spectre &amp; Meltdown. Here is how to update your Linux kernel from 3.1 to 4.16.11 in place.<\/p>\n<p><!--more--><\/p>\n<h4>Step 1. Import the repo key<\/h4>\n<p>First, import the GPG key for the repository:<\/p>\n<pre>rpm --import https:\/\/www.elrepo.org\/RPM-GPG-KEY-elrepo.org<\/pre>\n<h4>Step 2. Install the repository<\/h4>\n<p>Install the repository that holds your new kernel:<\/p>\n<pre>yum install http:\/\/www.elrepo.org\/elrepo-release-7.0-3.el7.elrepo.noarch.rpm<\/pre>\n<p>Before you enable the new repo, you can peek inside its configuration file to see what it will be doing:<\/p>\n<pre>nano \/etc\/yum.repos.d\/elrepo.repo<\/pre>\n<h4>Step 3. Enable the repository<\/h4>\n<p>Enable the repository with this command:<\/p>\n<pre>yum --enablerepo=elrepo-kernel install kernel-ml<\/pre>\n<h4>Step 4. Install the RPM of your new kernel<\/h4>\n<p>To install your new\u00a0kernel for CentOS\/RHEL 7.03, run this command:<\/p>\n<pre>yum install http:\/\/www.elrepo.org\/elrepo-release-7.0-3.el7.elrepo.noarch.rpm<\/pre>\n<h4>Step 5. List all available kernels<\/h4>\n<p>List all kernels that are available to the grub bootloader on your system:<\/p>\n<pre>awk -F\\' '$1==\"menuentry \" {print $2}' \/etc\/grub2.cfg<\/pre>\n<h4>Step 6. Select the new kernel<\/h4>\n<p>From the list of available kernels, select the new kernel:<\/p>\n<pre>grub2-set-default 0<\/pre>\n<p>The number 0 denotes the first kernel in the list.<\/p>\n<h4>Step 7.\u00a0Save the new configuration and reboot<\/h4>\n<p>Save your new configuration:<\/p>\n<pre>grub2-mkconfig -o \/boot\/grub2\/grub.cfg<\/pre>\n<p>Reboot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you launch an instance from the official CentOS or RHEL 7.x AMI on AWS,\u00a0you will be running kernel 3.1 as of this writing. That&#8217;s not a good idea. You can easily take advantage of improved security features of newer kernels that are already\u00a0available in a stable release. The renowned Linux kernel maintainer Greg Kroah-Hartman [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1858,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[33,143],"tags":[58,145,144,28],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v14.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>A fix for Spectre &amp; Meltdown: update your Linux kernel in place (running CentOS\/RHEL 7 or above), and live happily ever after - CloudInsidr<\/title>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cloudinsidr.com\/content\/update-your-linux-kernel-in-place-running-centos-7-on-aws\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A fix for Spectre &amp; Meltdown: update your Linux kernel in place (running CentOS\/RHEL 7 or above), and live happily ever after - CloudInsidr\" \/>\n<meta property=\"og:description\" content=\"If you launch an instance from the official CentOS or RHEL 7.x AMI on AWS,\u00a0you will be running kernel 3.1 as of this writing. That&#8217;s not a good idea. You can easily take advantage of improved security features of newer kernels that are already\u00a0available in a stable release. The renowned Linux kernel maintainer Greg Kroah-Hartman [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cloudinsidr.com\/content\/update-your-linux-kernel-in-place-running-centos-7-on-aws\/\" \/>\n<meta property=\"og:site_name\" content=\"CloudInsidr\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-04T11:58:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-17T09:21:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.cloudinsidr.com\/content\/wp-content\/uploads\/2018\/04\/safe-913452.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"3452\" \/>\n\t<meta property=\"og:image:height\" content=\"3000\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#website\",\"url\":\"https:\/\/www.cloudinsidr.com\/content\/\",\"name\":\"CloudInsidr\",\"description\":\"Cyber security, infotech\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.cloudinsidr.com\/content\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/update-your-linux-kernel-in-place-running-centos-7-on-aws\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.cloudinsidr.com\/content\/wp-content\/uploads\/2018\/04\/safe-913452.jpg\",\"width\":3452,\"height\":3000,\"caption\":\"a safe\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/update-your-linux-kernel-in-place-running-centos-7-on-aws\/#webpage\",\"url\":\"https:\/\/www.cloudinsidr.com\/content\/update-your-linux-kernel-in-place-running-centos-7-on-aws\/\",\"name\":\"A fix for Spectre & Meltdown: update your Linux kernel in place (running CentOS\/RHEL 7 or above), and live happily ever after - CloudInsidr\",\"isPartOf\":{\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/update-your-linux-kernel-in-place-running-centos-7-on-aws\/#primaryimage\"},\"datePublished\":\"2018-04-04T11:58:45+00:00\",\"dateModified\":\"2019-05-17T09:21:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#\/schema\/person\/dd6ee9cb21cf05763fd7cff3d6f11b2b\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cloudinsidr.com\/content\/update-your-linux-kernel-in-place-running-centos-7-on-aws\/\"]}]},{\"@type\":[\"Person\"],\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#\/schema\/person\/dd6ee9cb21cf05763fd7cff3d6f11b2b\",\"name\":\"Cloud Insidr\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8b2fa1415b3d573b97d818b8f8f83b7c?s=96&d=mm&r=g\",\"caption\":\"Cloud Insidr\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts\/1182"}],"collection":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/comments?post=1182"}],"version-history":[{"count":27,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts\/1182\/revisions"}],"predecessor-version":[{"id":1987,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts\/1182\/revisions\/1987"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/media\/1858"}],"wp:attachment":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/media?parent=1182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/categories?post=1182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/tags?post=1182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}