Posts Tagged ‘kernel’

Download: 32 & 64-bit Xen Paravirtualized domU initrd-free Monolithic Kernel 3.10.17

This is a significant step up from the drop-in kernels I have posted previously. Thanks to a massive cleanup this is the first Xen PV kernel I’ve been able to build with heap randomization and stack smashing protection. Other improvements include:

  • EXT4 support
  • NFS4 support
  • Full-range IPSec support (untested)
  • Head-to-toe netfilter and crypto
  • Per-process i/o stats (see iotop)!
  • dmesg_restrict

Download
kernel-domU-3.10.17-32 739ca0128e68b33164fdccc66bd53bb8 (.config)
kernel-domU-3.10.17-64 0e59bba671893715b04a16f7ee8edb3a (.config)

As always, these kernels are monolithic (lack loadable module support) for security and do not require an initrd to boot a Xen virtual machine.

Your udev or other parts of userland may require upgrading or downgrading to play ball with this kernel version. I’m migrating from 3.2.12 without any issues.

Compiled from gentoo-sources-3.10.17

Configuring GRUB2 for Xen on Gentoo

GRUB2 is highly customizable and feature-rich, however it is a bit of a nightmare if you configure bootloaders regularly. Unfortunately GRUB 0.97 doesn’t support ext4 and – if you were an idiot like me – you might have set up your new dedicated with an ext4 /boot. Now, you have neither the time nor patience to re-install and need to make Xen go.

First, copy your Dom0 .config and kernel to /boot/. /etc/grub.d/20_linux_xen picks up on the CONFIG_XEN_PRIVILEGED_GUEST=y variable.

# cp /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel-dom0
# cp /usr/src/linux/.config /boot/config-dom0

Next, remove the executable flag from /etc/grub.d/10_linux or you will end up with three or four entries that boot straight to the Dom0 kernel without the hypervisor.

# chmod -x /etc/grub.d/10_linux

To add kernel boot parameters to your grub.cfg (as generated with grub2-mkconfig and 20_linux_xen) add these lines to your /etc/default/grub file:

GRUB_CMDLINE_LINUX_XEN_REPLACE="max_loop=128"
GRUB_CMDLINE_XEN="dom0_mem=512"

The former will place your boot options on the Dom0 kernel’s module line. The latter will place boot options on the xen.gz hypervisor’s kernel line.

Now, generate your new configuration:

# grub2-mkconfig -o /boot/grub2/grub.cfg

Once the config file has been written, determine the position of the Xen hypervisor entry and update GRUB_DEFAULT in /etc/default/grub.

Install GRUB2 to your MBR(s) as necessary:

# grub2-install /dev/sda 

Xen Virtual Disk I/O Errors

I just encountered this while making a tar backup on one of my virtual filesystems:

lost page write due to I/O error on xvdb1
end_request: I/O error, dev xvdb1, sector 33707688
Buffer I/O error on device xvdb1, logical block 4213461

Unfortunately, my fs suffered corruption.

Some folks, particularly Ubuntu users with kernel 3.2.x seem to say the answer is adding

barrier=0

to your ext3/ext4 mount options.

In my case I’m pretty sure an OOM error killed something critical to the backend on dom0.

Be sure to check your dom0′s dmesg.

UPDATE Uhh yeah, something actually managed to overflow the dom0′s fs. >.> This is what I was getting in the dom0 dmesg:

loop: Write error at byte offset 17820364800, length 4096.

for which there is very little discussion, but a quick df told me what was going on.

Return top
foxpa.ws
Online Marketing Toplist
Internet
Technology Blogs - Blog Rankings

Internet Blogs - BlogCatalog Blog Directory

Bad Karma Networks

Please Donate!


Made in Canada  •  There's a fox in the Gibson!  •  2010-12