[SOLVED] CentOS-6.7: Using the Distribution-Supplied Kernel

Hello:

We're needing to use the distribution-supplied Kernel [so that we may utilize the nfconntrackftp Kernel module to allow active FTP].

I've read the Guide "Custom Compiled Kernel on CentOS 7" . However, the Guide does not address the creation of the initial /boot/grub/grub.con file - a situation that I've never faced before! To compound matters: This is a Customer-facing Production server that can not tolerate any more down-time. (The client's site has been disabled for 5 days now because their WordPress site has been hacked and we've had to disable the site in order to avoid being shut-off for ToS violations [i.e., network over-utilization, CPU over-utilization, network attacks.)

Anyhow: I think that the CentOS guide "Grub Installation for CentOS 5 and 6" makes the process look pretty simple. But I'd like confirmation before switching the boot configuration and jumping into the Abyss.

In your estimation: Assuming that /dev/sda is the root device:

[root@cp ~]# mount | grep sd
/dev/sda on / type ext4 (rw,noatime,errors=remount-ro)
/dev/sdc on /tmp type ext4 (rw,noatime)
/dev/sdd on /var type ext4 (rw,noatime)

…and assuming that /dev/sda CONTAINS NO PARITIONS:

[root@cp ~]# cat /proc/partitions | grep sda
   8        0   10489856 sda

[root@cp ~]# fdisk -l /dev/sda
Disk /dev/sda: 10.7 GB, 10741612544 bytes
64 heads, 32 sectors/track, 10244 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

…and with the /boot directory containing these bits:

[root@cp ~]# ls -1 /boot
config-2.6.32-696.16.1.el6.x86_64
efi
grub
initramfs-2.6.32-696.16.1.el6.x86_64.img
symvers-2.6.32-696.16.1.el6.x86_64.gz
System.map-2.6.32-696.16.1.el6.x86_64
vmlinuz-2.6.32-696.16.1.el6.x86_64

Will this grub.conf file boot my Linode using the distribution-supplied Kernel (if I place it in the /boot/grub/ directory)?

default=0
timeout=10

title CentOS
  root (hd0)
  kernel /boot/vmlinuz-2.6.32-696.16.1.el6.x86_64 ro root=/dev/sda noquiet
  initrd /boot/initramfs-2.6.32-696.16.1.el6.x86_64.img

NOTE:

* The boot device passed to Grub(hd0)

  • The root option that is passed to the Kernel (/dev/sda)

…is specified as the bare device (hd0 and /dev/sda) because /dev/sda CONTAINS NO PARITIONS.

TIA!

2 Replies

The procedure I use for all my CentOS servers is as follows:

yum install kernel.x86_64 grub2
grub2-mkconfig -o /boot/grub2/grub.cfg

Next, I change the Linode configuration to boot from "GRUB 2" and then reboot the server.

Thanks, IfThenElse!

Linode Support directed me to the guide "Use the Distribution-Supplied Kernel on CentOS 6 with Grub Legacy" and, from that, I was able to confirm that the grub.conf file that I'd created (above) would be adequate.

:D

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct