How To Install XenServer 5.5 on an external USB drive


Citrix XenServer 5.5

This 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.

  1. Disconnect or disable all hard drives except the external USB drive
  2. Download and burn a CD with XenServer 5.5
  3. Boot and install XenServer 5.5 on your external USB drive, see installation video here
  4. When the installation is finished, boot on the XenServer CD and press “F2” when you see “Welcome to XenServer”
  5. Type Shell and press Enter
  6. When the system has booted type : mkdir /tmp/sda
  7. Map the USB drive to the temp folder : mount -t ext3 /dev/sda1 /tmp/sda
  8. Change file permissions : chmod -R 664 /sys/block
  9. Copy System files, ignore Input / Error messages : cp -R /sys/block/ /tmp/sda/sys/block/
  10. Change root location : chroot /tmp/sda
  11. Change to the /boot folder on the USB drive : cd /boot
  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
  13. 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
  14. Remove the XenServer 5.5 intallation CD and reboot

Automation Framework Community Edition

The fastest way to build your lab environment.

Virtual Expo

Friday 30th of September 2022

15 thoughts on “How To Install XenServer 5.5 on an external USB drive”

  1. 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

  2. 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.


  3. 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.


  4. 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

  5. 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 …

    • 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 ?


  6. I think Leon and Michaels problem will be they either didn’t do step 3 or they are mounting the wrong usb device.

  7. 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!

    • 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.


  8. 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?


    • 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.


  9. 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

  10. Thanks!!! It worked great with XenServer 5.6 SP2.

    Everyone just make sure that at step 12 you do a dir in the boot folder and look at the file name of the initrd file. The initrd file changes with each release.

    Again thanks for all the help.

    • Thanks Josh. That’s correct, always check with the Dir command. The build number changes.


Leave a Comment