Adventures in custom kernels and pv_grub

I am having trouble running my linode with a custom kernel. I am running 64-bit Gentoo, and attempting to run the hardened kernel with grsecurity and PaX.

My process was thus:

Download and install the latest hardened-sources, extract the current linode kernel configuration from /proc/config.gz and run a make oldconfig. After answering the few questions that came up, I ran a menuconfig and went about setting up the kernel as I like it. After compiling, I set up the kernel per the guides provided in the Linode Library and on the wiki.

Whenever I boot my custom kernel with pv_grub, I see errors during the init proccess that files or the filesystem is readonly. These errors start when eth0 starts requesting an IP addres via dhcp. Prior to that, there are no errors which appear to indicate something is wrong with the filesystem, especially init attempting to remount /dev/xvda as read-write. I haven't been able to figure out why this is. What's even more puzzling about this, is that whenever I go back to the latest linode kernel, /dev/xvda is detected as having errors and neeeds to be fscked. As I type this, it ocurrs to me that maybe whatever problem is causing /dev/xvda to be suddenly become read-only under the Gentoo kernel is also causing mild filesystem damage as well. What might cause this sort of behavior?

I've tried the following:
* Manually remount the root filesystem as read/write with a mount command. No dice, /dev/xvda is not writeable, and thus cannot be remounted read-write. In hindsight, I should have anticipated that chicken & egg problem.

  • Remove the 'ro' option from the root=/dev/xvda on the kernel command line in menu.lst. I thought that was forcing the kernel to keep /dev/xvda read-only, but that hasn't changed anything. Truthfully, I'm not even sure why it's there.

  • Edit /etc/fstab per this thread. That had no change as well.

I'm out of ideas presently. What else should I check so I can find what's causing this and fix it?

It ocurred to me that being new to Xen-based virtual machines and Linode, maybe I made a wrong choice for one of the options I set or unset in my custom kernel. I extracted the linode kernel config from /proc/config.gz and compared it to my configs with diff. Diff's output is below. Does anyone see any settings that could cause this, or other obviously wrong things I should fix?

Thanks in advance.

Edit: the suggestion provided below did it. No sense in keeping a huge block of text unrelated to the problem posted,

2 Replies

What happens if you add: 'rootflags=nobarrier' to your kernel args in your grub config?

-Tim

That was suggested in the support ticket as well and did the trick. Thank you. I should add mention of that to the wiki, as I don't remember seeing it anywhere.

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