Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Jan 31, 2012 4:54 pm 
Offline
Senior Newbie

Joined: Thu Sep 22, 2011 9:30 am
Posts: 6
Website: http://www.brianparsons.net
AOL: mediaserf
The 3.x series linux kernel includes the xen modules. This makes it easier than ever to run the stock Arch Linux kernel on your linode.

I plan to write up a less techie version for the library, but here are the steps.

First, make sure your Arch linux linode is completely up to date!

There are a few recent upgrades that require some intervention so be sure to check out the www.archlinux.org page - specifically for the initscripts and filesystem package updates.

Your system is up to date when you run pacman -Syu and it says "there is nothing to do".

Code:
$ sudo pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do



Also as you go through and edit the files below it is always a good idea to make a backup copy in case you need to change it back.

Once you are up to date here are the steps to change to running the stock Arch kernel. The commands below are using "sudo" but if you log in as root just remove the "sudo" from them.

1) Install the kernel and grub
Code:
sudo pacman -Sy linux grub --noconfirm


2) Add the Xen Modules to the mkinitcpio.conf file
Code:
sudo sed -i 's/MODULES=""/MODULES="xen-blkfront xen-fbfront xenfs xen-netfront xen-kbdfront"/g' /etc/mkinitcpio.conf


If the command above scares you, what you want to do is make sure that the following modules are in the MODULES line of the /etc/mkinitcpio.conf file: xen-blkfront xen-fbfront xenfs xen-netfront xen-kbdfront

You can do that using whatever editor you are comfortable with.

3) Re-create the kernel/initramfs
Code:
sudo mkinitcpio -p linux


4) Edit /boot/grub/menu.lst so that the (0) Arch Linux entry matches the following:
(pay close attention to the root (hd0) - by default it is (hd0,0) and this will fail)

Code:
# (0) Arch Linux
title  Arch Linux  [/boot/vmlinuz-linux]
root   (hd0)
kernel /boot/vmlinuz-linux root=/dev/xvda ro
initrd /boot/initramfs-linux.img




5) Edit the /etc/fstab (see the note above about backing up files!) to match the below:

Code:
# <file system> <mount point>   <type>  <options>                   <dump>  <pass>
proc            /proc           proc    defaults                    0    0
/dev/xvda       /               ext3    defaults,noatime,barrier=0  0    1
/dev/xvdb       swap            swap    defaults                    0    0
xen             /proc/xen       xenfs   defaults                    0    0
devpts          /dev/pts        devpts  defaults                    0    0


*** Pay close attention to the /dev/xvda line - if you leave the errors=remount-ro in there your system will be read-only


6) Update the kernel in Linode Control Panel to be pv-grub

Go to your Linode's dashboard and edit the Configuration Profile of the Linode, selecting the right "pv-grub" 32/64 bit for your linode.

See the Library article on pv grub for more info.

7) reboot (via control panel)

8) login and test

If you have trouble, change the configuration profile back and/or access the console.

You can always clone your Linode and try this on the clone first.


Top
   
PostPosted: Wed Feb 01, 2012 5:54 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
brianp wrote:
*** Pay close attention to the /dev/xvda line - if you leave the errors=remount-ro in there your system will be read-only

As someone who does not use Arch or pv-grub, why are there fs errors? o_O

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
PostPosted: Wed Feb 01, 2012 6:17 pm 
Offline
Senior Newbie

Joined: Thu Sep 22, 2011 9:30 am
Posts: 6
Website: http://www.brianparsons.net
AOL: mediaserf
mnordhoff wrote:
As someone who does not use Arch or pv-grub, why are there fs errors? o_O


There aren't fs errors in the traditional sense of fs errors, but I think it mounts read only because the modules are actually a newer version of xen than what is being used in the host kernel.


Top
   
 Post subject:
PostPosted: Mon Feb 27, 2012 11:35 am 
Offline
Newbie

Joined: Fri Jan 20, 2012 4:24 pm
Posts: 3
Note this will only work with the x86_64 kernel, not the i686 because the xen modules are not included in the i686 ARCH kernel.


Top
   
 Post subject:
PostPosted: Mon Feb 27, 2012 11:36 am 
Offline
Newbie

Joined: Fri Jan 20, 2012 4:24 pm
Posts: 3
Note this will only work with the x86_64 kernel, not the i686 because the xen modules are not included in the i686 ARCH kernel.


Top
   
 Post subject: 32-bit
PostPosted: Mon Feb 27, 2012 6:34 pm 
Offline
Senior Newbie

Joined: Thu Sep 22, 2011 9:30 am
Posts: 6
Website: http://www.brianparsons.net
AOL: mediaserf
Yes - for 32-bit you'll need to use the linux-xen package from AUR. Sorry I didn't mention that before!


Top
   
 Post subject:
PostPosted: Thu Mar 01, 2012 6:08 pm 
Offline
Junior Member

Joined: Thu May 05, 2011 9:50 am
Posts: 23
Is there a practical advantage to using the stock Arch kernel instead of the kernel provided by Linode?


Top
   
 Post subject:
PostPosted: Thu Mar 01, 2012 6:33 pm 
Offline
Senior Newbie

Joined: Thu Sep 22, 2011 9:30 am
Posts: 6
Website: http://www.brianparsons.net
AOL: mediaserf
I don't know of any specific advantages/disadvantages. Arch being a rolling distro I do update the servers (first a development box so I can work through any potential issues).

While Arch runs nicely with a different kernel (such as Linode's provided one) - I feel that the userspace tools (kmod, udev, etc) should be as closely in step with the kernel as possible.

It just didn't sit well with me, them being updated and not the kernel.

The first time I did it though was because Linode had rolled out the 3.1 kernel and there was a bug that caused one of our servers to hang. They rolled back to 3.0 but I had already shifted that instance over to the pv-grub/instance-based kernel.


Top
   
 Post subject:
PostPosted: Tue Mar 27, 2012 12:09 pm 
Offline
Senior Member

Joined: Mon Jul 30, 2007 9:55 pm
Posts: 80
Hmm. I rolled my own Arch using Oracle VirtualBox, dd'd the result, transferred to Linode running Finnix, then copied contents to /dev/xvda (formatted and mounted as ext3).

Note that I intentionally did not dd the image to /dev/xvda b/c that would have resulted in a "raw" linode disk with partition table, which would have precluded me from using their resizing tools, etc.

Anyway, I am not able to boot using pv-grub. Gub config loads, but when I try to boot the selection it says something like "Using whole disk" followed by "File not found"

Any hints? I followed all of the steps, above.


Top
   
 Post subject:
PostPosted: Tue Mar 27, 2012 12:34 pm 
Offline
Senior Member

Joined: Mon Jul 30, 2007 9:55 pm
Posts: 80
nm. typo in menu.lst

thanks for the write up!


Top
   
 Post subject:
PostPosted: Tue Jun 05, 2012 7:44 pm 
Offline
Newbie

Joined: Thu Jan 12, 2012 3:50 pm
Posts: 2
Zr40 wrote:
Is there a practical advantage to using the stock Arch kernel instead of the kernel provided by Linode?

I think it is much more practical to use the kernel provided by Linode, as it is the Best Business Web Hosting, but I know many people use the stock Arch kernel with no issues. Did you ever get a good response regarding the practical advantage of one or the other? Thanks.


Last edited by barrymorgan88 on Mon Jun 11, 2012 8:47 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Thu Jun 07, 2012 3:03 pm 
Offline
Senior Member

Joined: Mon Jul 30, 2007 9:55 pm
Posts: 80
barrymorgan88 wrote:
Zr40 wrote:
Did you ever get a good response regarding the practical advantage of one or the other? Thanks.

No, but the Arch kernel gets updated very frequently. Pretty annoying on a server b/c you don't want to be rebooting all the time. I think Linode's kernel is more practical from a sysadmin perspective.


Top
   
PostPosted: Wed Jun 13, 2012 6:23 pm 
Offline

Joined: Wed Jun 13, 2012 6:07 pm
Posts: 1
Has anyone in recent days had trouble during a reboot?

I used this tutorial to get up and running a few months ago.

Yesterday, I performed an update (which included the kernel to linux-lts 3.0.33), and now I'm getting errors on reboot. I tried downgrading to my previous kernel, but it didn't help.

Code:
Booting 'Arch Linux  [/boot/vmlinuz-linux]'                                                       
                                                                                                   
root   (hd0)                                                                                       
 Filesystem type is ext2fs, using whole disk                                                       
kernel /boot/vmlinuz-linux-lts root=/dev/xvda ro                                                   
initrd /boot/initramfs-linux-lts.img                                                               
                                                                                                   
close blk: backend at /local/domain/0/backend/vbd/1407/51712                                       
close blk: backend at /local/domain/0/backend/vbd/1407/51728                                       
[3194139.200651] i8042: No controller found                                                         
[3194139.242638] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)                           
:: running early hook [udev]                                                                       
:: running hook [udev]                                                                             
:: Triggering uevents...                                                                           
Waiting 10 seconds for device /dev/xvda ...                                                         
ERROR: device '/dev/xvda' not found. Skipping fsck.                                                 
ERROR: Unable to find root device '/dev/xvda'.                                                     
You are being dropped to a recovery shell


Top
   
PostPosted: Sun Jul 01, 2012 11:00 pm 
Offline
Senior Newbie

Joined: Sun Jun 24, 2012 7:00 pm
Posts: 10
Hi Guys,

I'm trying to get my arch linux working on linode however after a week of trying I'm close to give up...
I have followed tourtorials from here:
http://library.linode.com/linode-platform/custom-instances
and read through this:
http://articles.slicehost.com/2010/10/27/using-pv-grub-to-run-custom-kernels-on-arch-preparing-the-slice
xen for arch linux:
https://wiki.archlinux.org/index.php/Xen#Arch_as_Xen_guest_.28PVHVM_mode.29

And after all grub does not let me boot (booting process stops on grub).

I booted to rescue mode and chrooted to my drive (xvdb in my case) and tried to run install-grub (now I know it is rather not very wise on XEN)

Anyway my kernel does support XEN, all modules are modprobed, I'm in the forrest and can not find the way out.
Please anyone with good heart - have mercy and help...


Top
   
PostPosted: Sun Jul 01, 2012 11:07 pm 
Offline
Junior Member
User avatar

Joined: Fri May 04, 2012 8:57 pm
Posts: 49
Hey,

When you boot up your Linode, what's it saying in LISH?

_________________
me | voltaireMC


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group