How To Install XenServer 5.5 on an external USB drive
By Trond Eirik Haavarstein 10/10/2009 – 17:52This post is a modified version of Chris Wolfs “Installing and Running XenServer 41 on an External USB-Drive” which makes it possible to run Citrix XenServer 5.5 on an external USB drive.
- Disconnect or disable all hard drives except the external USB drive
- Download and burn a CD with XenServer 5.5
- Boot and install XenServer 5.5 on your external USB drive, see installation video here
- When the installation is finished, boot on the XenServer CD and press “F2″ when you see “Welcome to XenServer”
- Type Shell and press Enter
- When the system has booted type : mkdir /tmp/sda
- Map the USB drive to the temp folder : mount -t ext3 /dev/sda1 /tmp/sda
- Change file permissions : chmod -R 664 /sys/block
- Copy System files, ignore Input / Error messages : cp -R /sys/block/ /tmp/sda/sys/block/
- Change root location : chroot /tmp/sda
- Change to the /boot folder on the USB drive : cd /boot
- Rename old initrd image : mv initrd-2.6.18-128.1.6.el5.xs5.5.0.496.1012xen.img initrd-2.6.18-128.1.6.el5.xs5.5.0.496.1012xen.img.old
- Make a new initrd image : mkinitrd –-with-usb initrd-2.6.18-128.1.6.el5.xs5.5.0.496.1012xen.img 2.6.18-128.1.6.el5.xs5.5.0.496.1012xen
- Remove the XenServer 5.5 intallation CD and reboot
Click here to get free eBook “Citrix XenApp 5.0 for Windows 2008 – A Hands-On Guide“







13 Responses to “How To Install XenServer 5.5 on an external USB drive”
Should read – Make a new initrd image : mkinitrd –-with-usb initrd-2.6.18-128.1.6.el5.xs5.5.0.496.1012xen.img 2.6.18-128.1.6.el5.xs5.5.0.496.1012xen
By Dean S on Oct 31, 2009
Thanks Dean, I have updated the post
Eric
By admin on Nov 1, 2009
What do you do if step ten does not work? I have tried to work around it but I can not seem to find a way to get it to work. It just seems to always keep giving me this error:
“cannot run command ‘/bin/sh’: No such file or directory”
Any help would be appreciated. I would really love to have a portable xenserver going.
Thanks
By Leon Denard on Jan 28, 2010
Hi Leon,
Make sure you type exactly as show with space and everything, even when you think it’s wrong. Use the TAB key to auto fill.
Have you stopped at number 10 ? It’s possible that you get “no job control in this shell”, but this error message can be ignored.
Eric
By admin on Jan 28, 2010
Great post. It works successfully but… when finally booting on the USB key, my SAS RAID controler (HP P410i) cannot be accessed, although I wanted to create SR on it !
I guess the mkinitrd command needs an additional option to create an image with the SAS driver. Can anyone help ?
No problem when installing Xen on the SAS disks instead. So, I’m sure XenServer can use this device.
Many thanks in advance
By Robert on Feb 6, 2010
I’m also getting the same error as Leon whilst trying to chroot. (trying to install Xenserver 5.5 update 2 onto my USB drive)
I’m sure the commands aren’t getting mistyped as I’ve tried this 4-5 times …
Also another step of mkdir /tmp/sda/sys/ is needed for it to copy files to the drive correctly …
By Michael on Feb 24, 2010
Hi Michael,
The current ISO from Citrix (last time I checked) was the XenServer 5.5 version and this installs fine to USB. What I did see when I updated my XenServer 5.5 USB drive with Update 2 via XenCenter the XenServer goes into a boot loop. I havn’t had time to solve this issuse yet, will post a seperate post when this is fixed. Anyone else successfully updated XS5.5 USB with Update 2 ?
Eric
By admin on Feb 24, 2010
I think Leon and Michaels problem will be they either didn’t do step 3 or they are mounting the wrong usb device.
By Donuts on Feb 28, 2010
I got it working on a flash drive on a blade server, using these instructions and XenServer update 2, much thanks!
I had to try three times to install the same thing on an identical blade server for my second server. So easy to make a typo. I’d like to point out a typo in your directions above, Step 12, “Rename old initrd image : mv initrd 2.6.18-128.1.6.el5.xs5.5.0.496.1012xen.img initrd-2.6.18-128.1.6.el5.xs5.5.0.496.1012xen.img.old”, there should be a dash after the first initrd.
Thanks again!
By LATurner on Mar 16, 2010
Hi everybody,
As you see it’s very easy to type something wrong, a nice tip is to use the TAB key to autofill what’s missing.
Eric
By admin on Mar 16, 2010
I’m having the same issue as Leon and Michael. I watched the youtube video but it is a video on how to install XenServer on a vmworkstation, not a usb drive. I watched him install and he does nothing different from a standard local disk install. If I try to install to the usb disk using the typical install (like in the video) it fails with an unrecoverable error.
I tried assuming that was supposed to happen and follow the rest of the instructions at that point but I still get sh error on step 10.
Perhaps we need a more detailed step 3?
Thanks!
By Trent on Mar 31, 2010
Hi,
Please take a look at my newest post How To Install XenServer 5.6 Beta to external USB
The installation is straight forward, and the VMware instructions can be used if you are not familiar with it.
Please note that you will need a 16GB USB stick and not all of them are supported. If you’re having problems please try another stick / external harddrive.
Eric
By admin on Mar 31, 2010
Thanks a lot! Our Xenserver crashed and did Kernel Panic on boot (from internal harddrive).
I installed it on a 16gb usb stick and can now salvage the virtual machines
Saves me a lot of headache
By robbie on Apr 7, 2010