Configuring your filesystem for Xen
Contents
Introduction
In order to boot a file system under our XS series of servers (Xen 3.4.x),
several changes need to be made. You will need to add devices, setup your Xen console,
and edit your /etc/fstab.
Devices
The following commands need to be run to setup the devices required by the Xen kernel.
/bin/mknod /dev/xvda1 b 202 1 /bin/mknod /dev/xvda2 b 202 2 /bin/mknod /dev/xvda3 b 202 3 /bin/mknod /dev/hvc0 c 229 0
If you are running a Udev based VPS, you will want to create these nodes in /lib/udev/devices,
so that udev creates them automatically on boot in /dev. Otherwise, you may simply create them in /dev.
Xen Console
The Xen console hvc0 needs to be setup. The getty you choose depends on which getty is installed in your distro, such as agetty, getty, mingetty, etc. Agetty is shown here.
You may have a /etc/inittab, or need to create a /etc/event.d/hvc0, depending on distro.
#Change the console to hvc0, and edit /etc/inittab hvc0:1235:respawn:/sbin/agetty 38400 console
#Add /etc/event.d/hvc0, and paste the following: start on stopped rc2 start on stopped rc3 start on stopped rc4 start on stopped rc5 stop on runlevel 0 stop on runlevel 1 stop on runlevel 6 respawn exec /sbin/agetty 38400 hvc0
Add hvc0 to /etc/securetty
echo "hvc0" >> /etc/securetty
/etc/fstab
Put the following in your /etc/fstab:
/dev/xvda1 / ext3 errors=remount-ro 0 1 /dev/xvda2 none swap sw 0 0 proc /proc proc defaults 0 0
That should be it, reboot your VPS from the QCP, and all should be well.
If your VPS does not work, you can attach to your console, provided the above hvc0 entry is correct, or you can boot with the Rescue mode, and make further changes to your VPS.
- Login to post comments
