PV-GRUB makes it possible to run your own kernel on your Linode, instead of using a host-supplied kernel. This is useful in cases where you'd like to enable specific kernel features, or for cases where you'd prefer handling kernel upgrades directly.
This guide assumes you have already followed the steps outlined in our getting started guide, and that your Linode is in a functional state. These steps should be performed as root on your Linode via an SSH session.
If you'd like to run a custom distro on your Linode in combination with PV-GRUB, please follow our custom distro guide before taking these steps.
These instructions work with the Linode platform. If you don't have a Linode yet, sign up for a Linux VPS and get started today.
Before proceeding, make sure your package repositories and installed packages are up to date by issuing the following commands:
apt-get update apt-get upgrade --show-upgraded
Issue the following commands to install the default kernel for Ubuntu 10.04 LTS and create a directory for your menu.lst file:
apt-get install linux-virtual mkdir /boot/grub
Create a file named /boot/grub/menu.lst with the following contents. Adjust the "title", "kernel", and "initrd" lines to reflect the actual filenames found in the /boot directory.
File: /boot/grub/menu.lst
timeout 5 title Ubuntu 10.04 LTS, kernel 2.6.32-23-generic-pae root (hd0) kernel /boot/vmlinuz-2.6.32-23-generic-pae root=/dev/xvda console=hvc0 ro quiet initrd /boot/initrd.img-2.6.32-23-generic-pae
In the Linode Manager, edit your Linode's configuration profile to use either pv-grub-x86_32 or pv-grub-x86_64 as the "Kernel", depending on the version of Ubuntu you have deployed (32-bit or 64-bit). Make sure the root device is specified as xvda. Save your changes by clicking "Save Profile" at the bottom of the page, and reboot your Linode from the "Dashboard" tab.
Once your Linode has rebooted, log back into it and issue the command "uname -a". You should see output similar to the following, indicating you're running the native kernel:
Linux li175-165 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/Linux
Note that if you install an updated kernel, you'll need to add an entry for it to your menu.lst file. By default, the first kernel in the list will be booted.
Before proceeding, make sure your package repositories and installed packages are up to date by issuing the following commands:
apt-get update apt-get upgrade --show-upgraded
Issue the following commands to install the default kernel for Debian 5 (Lenny) and create a directory for your menu.lst file.
32-bit Debian:
apt-get install linux-image-xen-686 mkdir /boot/grub
64-bit Debian:
apt-get install linux-image-xen-amd64 mkdir /boot/grub
Create a file named /boot/grub/menu.lst with the following contents. Adjust the "title", "kernel", and "initrd" lines to reflect the actual filenames found in the /boot directory.
File: /boot/grub/menu.lst
timeout 5 title Debian GNU/Linux, kernel 2.6.26-2-xen-686 root (hd0) kernel /boot/vmlinuz-2.6.26-2-xen-686 root=/dev/xvda ro quiet initrd /boot/initrd.img-2.6.26-2-xen-686
In the Linode Manager, edit your Linode's configuration profile to use either pv-grub-x86_32 or pv-grub-x86_64 as the "Kernel", depending on the version of Debian you have deployed (32-bit or 64-bit). Make sure the root device is specified as xvda. Save your changes by clicking "Save Profile" at the bottom of the page, and reboot your Linode from the "Dashboard" tab.
Once your Linode has rebooted, log back into it and issue the command "uname -a". You should see output similar to the following, indicating you're running the native kernel:
Linux li175-165 2.6.26-2-xen-686 #1 SMP Mon Jun 21 10:37:05 UTC 2010 i686 GNU/Linux
Note that if you install an updated kernel, you'll need to add an entry for it to your menu.lst file. By default, the first kernel in the list will be booted.
Before proceeding, make sure your package repositories and installed packages are up to date by issuing the following command:
yum update
Issue the following commands to install the default kernel for Fedora 13:
32-bit Fedora:
yum install kernel-PAE.i686
64-bit Fedora:
yum install kernel.x86_64
Create a file named /boot/grub/menu.lst with the following contents. Adjust the "title", "kernel", and "initrd" lines to reflect the actual filenames found in the /boot/ directory.
File: /boot/grub/menu.lst
timeout 5 title Fedora 13, kernel 2.6.33.6-147.fc13.i686.PAE root (hd0) kernel /boot/vmlinuz-2.6.33.6-147.fc13.i686.PAE root=/dev/xvda ro quiet initrd /boot/initramfs-2.6.33.6-147.fc13.i686.PAE.img
In the Linode Manager, edit your Linode's configuration profile to use either pv-grub-x86_32 or pv-grub-x86_64 as the "Kernel", depending on the version of Fedora you have deployed (32-bit or 64-bit). Make sure the root device is specified as xvda. Save your changes by clicking "Save Profile" at the bottom of the page, and reboot your Linode from the "Dashboard" tab.
Once your Linode has rebooted, log back into it and issue the command "uname -a". You should see output similar to the following, indicating you're running the native kernel:
Linux li175-165 2.6.33.6-147.fc13.i686.PAE #1 SMP Tue Jul 6 22:24:44 UTC 2010 i686 i686 i386 GNU/Linux
Note that if you install an updated kernel, you'll need to add an entry for it to your menu.lst file. By default, the first kernel in the list will be booted.
This guide is licensed under a Creative Commons Attribution-No Derivative Works 3.0 United States License
.
Please feel free to redistribute unmodified copies of it as long as attribution is provided, preferably via a link to this page.
Linux warewolves 2.6.31-302-ec2 #7-Ubuntu SMP Tue Oct 13 19:06:04 UTC 2009 i686 GNU/Linux
|
|
Submitted by Cliff Cunnington on Thursday, August 26 2010 at 21:15:07 GMT
Hi,
Information about CentOS-5.X under this topic might be useful for others. I've appended my notes below for that purpose. Regards, Cliff --- CentOS/5.X - not supported The stock kernel-xen package doesn't work with Linode's pv_grub - the kernels do not include the CONFIG_PARAVIRT and other options required by the Linode environment (see: CentOS Bug 3372). (The post-2.6.18 kernel in the forthcoming CentOS/6.X release is expected to work under the Linode/pv_grub setup.) Note: While under CentOS/5.X it is possible to set up /boot/grub/menu.lst and the rest (adapted from the Fedora instructions above) the initrd fails with these errors: Quote:
|
Got a comment?