OVH Install CentOS7 official kernel on dedicated server with soft raid configured.

Ehsan Golpayegani
2 min readFeb 15, 2020

--

I have installed CentOS 7 with soft raid on dedicated servers at OVH. (because it’s really cheap ones)

Because of some prerequisites incompatible with OVH’s ones.
- I must run a CentOS 7 or RHEL 7 official kernel

BUT
- OVH forces his custom kernels
- These kernels does not support SELinux and comes with GRS security

I searched solutions on the (one, two), but since I have configured raid none were working.

Since OVH Servers are unmanaged I have to fix it myself because you can not get support from OVH for kernel change.

So here is the solution if you are using raid on OVH servers with CentOS 7.

  1. Install CentOS 7 as usual from OVH console with raid configured.
  2. Login to server when it successfully boots
  3. Install original kernel “yum install kernel”
  4. Check grub configuration “vi /boot/grub2/grub.cfg” : new kernel should be appeared there in the list of available kernel , it’s usually will be second entry if it’s your first installation.
  5. edit default kernel to recently installed official kernel “vi /etc/default/grub” and change “GRUB_DEFAULT=1” in my case 1 is second entry in my grub “menuentry”
  6. At the time of this article “3.10.0–1062.9.1.el7.x86_64” is the version I have installed.
  7. Do not restart your server because it will fail to start.
  8. Now you have to rebuild initramfs with dracut :
# dracut — mdadmconf — fstab — add=”mdraid” — add-drivers=”raid1" -f /boot/initramfs-3.10.0–1062.9.1.el7.x86_64.img 3.10.0–1062.9.1.el7.x86_64

Note : If you have raid0 change raid1 to raid0.

Now you can restart your server and it should pick proper kernel with correct raid configuration.

Now You’re Done.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Ehsan Golpayegani
Ehsan Golpayegani

Written by Ehsan Golpayegani

DevOps Engineer / Cloud Architect / Engineering Lead / Leader / Mentor / Teacher / Blogger

Responses (1)

Write a response