Install PROXMOX VE From a USB STICK

Hello World,

Update information :

  • This procedure has been tested with the latest version of Proxmox VE 1.9 and it’s still working !

 

  • If you want to deploy Proxmox VE 2.0, You should use the procedure described at http://c-nergy.be/blog/?p=1628. The process is much simpler and faster.  Proxmox VE 2.0 natively support installation from usb devices

 

 

In one of my previouspost about ProxMox VE , I mentioned that “at the moment”  it is not possible to perform a ProxMox VE installation from a bootable usb sitck. Up to Version 1.7, there is no support for installing from a USB thumbdrive.  This is quite disappointing !  Especially when you know that Vmware or Hyper-V can be installed quite easily from a USB Stick….

I came across this limitation during the re-installation of  a test environment.  I didn’t want to burn a new cdrom from the the ProxMox VE iso image.  So, I thought that by using utility such as unetbootin, I would transfer the ISO image into a bootable USB Stick and perform the installation from the USB… Well not quite !

The USB drive will boot without any problem but the ProxMox VE installer will not start and your system will reboot… This behavior can be explained by the fact that the script used by the ProxMox VE installer checks only for CDROM devices.  More information about this can be found on the ProxMox VE forums (see these links  http://forum.proxmox.com/threads/4941-Install-Proxmox-VE-from-a-flash-disk ; http://forum.proxmox.com/threads/2932-proxmox-install-from-usb  ; http://forum.proxmox.com/threads/1896-USB-Installation).  At this point, we just need to find a way to have the system launching the setup routine even if no CDROM devices are detected.

Let’s try doing this right now !

Installing ProxMox VE from a USB Stick – Yes, you can !

After some tests (try and errors), I succeeded ( on 2 differents hardware configuration) to start the ProxMox VE installation from a USB Stick !  To perform the installation from the usb stick, you need to manually enter some commands from the terminal session.  It might be possible to modify the init file and include the missing code to have the installer detecting USB devices and perform the installation from a USB Stick. But I think that the Team behind the ProxMox VE will probably integrate such capabilities in the next release.

So let’s go ! To perform your installation, you will need the following :

  • Download the ProxMox VE Iso file from here
  • Download a tool that will convert your usb stick into a bootable one (for example, unetbootin or usb universal installer)
  • USB Stick with 1 GB of RAM (or 512 MB can still do it)
  • a computer capable of booting from a Usb drive

Step 1 – Creating/configuring your Bootable Usb Stick

For this post, I was using a Windows machine and decided to give a try to the usb universal installer.  You simply download the utility, double-click on the exe file and accept the license agreement.  Within the application, you specify which drive letter is your USB Stick and where is located the ISO file you want to use.  Note that I have choosen for the distribution the option “Unlisted Linux ISO”

You simply press create and you wait for the process to complete.  At the end, if you explore the content of your usb stick, you will see something like this

This is the default file structure coming from the PROXMOX VE binaries.

Optional

To save on disk space, you can delete all the folders except the boot folder.  Because we will be installing from an ISO image, we do not really need all these files.  the boot folder contains what’s needed for the stick to boot in a minimal environment. So, my bootable USB stick looks like something like the screenshot below

Do not forget to copy your proxmox iso image at the root of the Usb stick (see above screenshot).  At this stage, you should have a bootable USB stick and you should be ready to plug this stick into your computer that will be hosting the ProxMox VE software

Step 2  – Boot from USB in Debug mode

In this step, you simply boot your machine from the usb stick you have just prepared.  If everything is correctly set, you will see the PROXMOX VE splash boot menu. Do not boot in normal mode.If you boot in normal mode,  the system will reboot automatically because no cdrom device will be founded.  Instead, boot in debug mode

To start in debug mode, simply type  at the prompt     :  debug  (see screenshot below)

click on the picture to enlarge

If you monitor the booting process, you should see that USB Mass storage devices are detected. You do not need to do anything at this stage. This is only informational. Wait for the boot process to complete

click on the picture to enlarge

When the boot process is completed, you will see a message similar to “no cdrom found – unable to continue (type exit or Ctrl-D to reboot)

At that stage, you have access to a console where you can issue a set of commands.

If you have reached this point, you can move to step 3

Step 3  – Identify your usb device and mount it

Based on the hardware configuration, the Usb Device can be identified by the system differently.  So, we will first need to identify how the usb device is recognized by the system.  Because i have a limited set of command (I cannot use lsub), i’ll be using the old fdisk command.

From the console, I’ll simply type fdisk -l.

This command will return the disks and partition available on the system. From the screenshot below, I know that my usb drive is mapped as /dev/sdb1 (because my usb is 1GB in size).  In your computer, this might be a different mapping.  On my other system, the usb drive is mapped to /dev/sdd1. So, please check !

click on the picture to enlarge

Ok! So you have identified your usb device. We now simply need to mount this device.  You can issue the famous mount command

mount /dev/sdb1 /mnt (note : the /dev/sdb1 represent my stick on my system — Please change this value to reflect your settings)

You can also check that the usb device is now mounted by simply typing  mount (see screenshot below)

click on the picture to enlarge

Step 4  – Mount the ISO file and manually start the Installer routine (from the command line)

Almost there….. We now need to issue 2 additional commands and we are ready to perform the installation of the ProxMox VE from our usb stick….

The following screenshot shows you the command that needs to be run on the system to start the ProxMox VE Installer

First, we need to mount the iso image containing the ProxMox Ve binaries.  This is quite straightforward. We simply need to issue the following command :

mount -o loop -t iso9660 /mnt/proxmox_1-7.iso /mnt (again change accordingly based the name of your iso file… )

To ensure that the mount operation succeeded and that a loop device is detected by the system, you can type again the command mount

Finally, we need to manually issue the command that will start the ProxMox Ve installer.  From the console, you simply type

chroot /mnt  sbin/unconfigured.sh

If everything works as expected, you should see the ProxMox VE installer (the GUI basically) and you can go through the wizard to perform your installation

Conclusions

This  post explains in detail how to have a successful installation of ProxMox VE from a USB bootable drive.  The procedure is not too complex and you just need to issue a bunch of command from the console.   I really hope that the next release of ProxMox VE will take into account that more and more people are performing installation from Usb sticks.  I hope that this post will be useful to other people out there using ProxMox VE

This procedure is working for me. I cannot guarantee that this will be working on all situation but you can give it a try ๐Ÿ™‚

Till next time

see ya

65 thoughts on “Install PROXMOX VE From a USB STICK

  1. Hi there,

    funny i did kind of the same stuff the last days. also i extracted the init script and did some changes to it. i used a usb stick with ext3 file system and extlinux to boot the stuff. unfortunately it seems that my graphic card is not very well supported… so the setup looks kind of creepy, i haven’t installed it yet hopefully it works. nice tutorial btw.

    c ya

  2. Wow – this is awesome!! Had a blade server where the CD drive just refused to work after install (obviously linux wasn’t picking it up) and these steps got it going.

    Thanks very much for taking time to post this – you’re the man!!

  3. for this command:

    chroot /mnt sbin/unconfigured.sh

    when terminal says: sbin/unconfigurated.sh file not found –> something like that

    just copy cp mnt/sbin/unconfigurated.sh sbin/unconfigurated.sh

    and then chroot again

    thanks for this guide

  4. That’s great, it worked perfectly with latest Proxmox 1.8. Thank you very much!!!!!

  5. When doing this, make sure your usb drive is formated to Fat. I just tried this using an ext3 usb stick and I couldn’t mount it in the debug environment.

    Bobby Jimmy

  6. Had the stick show as FAT, but for some reason was listed as MSDOS when verified w/ ‘mount’. Only issue is subject to an 8.3 filename. After some tinkering, renamed the ISO to comply with this format and all was good!

  7. losetup /dev/loop0 /mnt/proxmox_1-7.iso

    before this command:
    mount -o loop -t iso9660 /mnt/proxmox_1-7.iso /mnt (again change accordingly based the name of your iso fileโ€ฆ )

  8. I was not able to get in debug mode with 1.8 and nvidia graphics, but it turned out just going into normal mode did not reboot for me when it could not find cd, instead it dropped me into a shell so from there I could mount the iso and launch the installer like in the instructions on this site.

  9. Hello, thanks for the guide but it does not work with 1.9 :
    – create a partition on the usb key
    – format it (I used ext3)
    – copy all the CD to the key: cp -a iso/* /media/proxmox_usb/
    – install grub: grub-install –boot-directory=/media/proxmox_usb/boot /dev/sdc
    – configure grub with kernel as boot/isolinux/linux26 and initrd as boot/isolinux/initrd.img

    – the usb key boot
    – everything is fine until the shell arrives
    – then I mount my key under /mnt
    – but chroot /mnt /sbin/unconfigured.sh fails

    xinit fails with ‘no program named xterm in PATH’.
    xterm is not on the CD.

    Regards.

  10. Hello,
    Please check the comments in this posts. In the comment nยฐ13, a user noted that the stick should be formated as fat and not in ext3. I have not tested the install guide yet with 1.9 but this should be done in the comings days. I’ll be able to validate or modify this guide
    cheers

  11. Hello,

    The problem in comment nยฐ13 is easy to solve, just use the -t option to mount:

    mount -t ext3 /dev/sdX1 /mnt

    You only need to format in vfat if you use syslinux as a drop in replacement of isolinux.

    You can format in ext3 when using extlinux or grub.

    My methodology is quite different than the one used by tools like usb-creator-gtk.

    I’ll try with copying only initrd, vmlinuz and the iso to the key (which required dual mount : the key then the iso as loopback), but I don’t think it will change something, the unconfigured.sh script is clear, it launch xinit, xinit error message is clear, no xterm in PATH, and the FS is clear: no xterm binary on the CD.

    Regards.

  12. Hello Nebu,

    I’ve just tested the procedure as described in this post and i have no problem booting from usb and having access to the Proxmox VE installer even with the latest version (Proxmox ve 1.9). The exactly same steps apply as before.

    Based on your previous post, I’m assuming that you are preparing your bootable PVE stick from a Linux Machine. If I have some time, I can try to create a usb stick on a ubuntu machine and see if this procedure is working or not.
    But again this procedure has been tested on latest proxmox Ve1.9 and it’s working

    Cheers

  13. Hello,

    I finally found my problem, when I copy the content of the iso image to the usb key, some file where missing, comparing md5 between CD and my usb key gives:

    ./.Xdefaults: FAILED open or read
    ./.xinitrc: FAILED open or read

    Copying them at the root of the key make it works.

    So to resume:

    – mount the iso as loopback: sudo mount -t iso9660 -o loop proxmox-ve_1.9-6542-6.iso /media/proxmox_iso
    – create a partition on the usb key
    – format it (I used ext3 to keep block devices and symlink)
    – mount the partition: sudo mount -t ext3 /dev/sdX1 /media/proxmox_usb/
    – copy all the CD to the key: cd iso && sudo cp -a . /media/proxmox_usb/
    – install grub: sudo grub-install โ€“boot-directory=/media/proxmox_usb/boot /dev/sdX
    – configure grub with kernel as boot/isolinux/linux26 and initrd as boot/isolinux/initrd.img

    – boot
    – mount the key: mount -t ext3 /dev/sdX1 /mnt
    – run the configuration: chroot /mnt sbin/unconfigured.sh

    Regards.

  14. Hey Nebu,
    aaaaahhhhh, Good news… So the process is still valid… Good to hear that

    Thank you for sharing this other approach to create the bootable usb key and install PVE 1.9
    See ya around

  15. Hi Matthew

    thank you for the feedback but I would recommend you to try this procedure http://c-nergy.be/blog/?p=1628
    Proxmox ve 2.0 beta offer built in capabilities to install from USB and I have to say the process is faster and quite straight forward.

    thank for you visit
    See ya again

  16. Hello;

    good to hear that the post is still helping… I hope you will enjoy Proxmox VE software…..
    Till next time
    see ya

  17. Thanks for this howto.
    Just had to change the name of the iso to proxmo~1.iso as i had formated my usb key with fat32.

  18. I am often to blogging and i actually appreciate your content. The article has actually peaks my interest. I’m going to bookmark your web site and hold checking for brand spanking new information.

  19. i have successfully installed proxmox 2.3, but after rebooting, it does not boot. help pls.. thanks

  20. Hello Mark,

    have you checked the post http://c-nergy.be/blog/?p=1628. This post should apply for proxmox ve 2.0 qnd later. Using the instructions, you should be able to perform the installation from the usb stick. Note that the process is simpler than previous versions given that the usb install method is supported by Proxmox VE 2.0 and later

    Hope this help
    till next time

    See ya

  21. Hello Mark,

    Have you installed from usb using the instructions on this post.
    If yes, and because I cannot reproduce the error, can your tell me which error message are you getting, (possibly screenshots). No boot at all, the grub menu is displayed not displayed….

    let me know

    Till next time
    See ya

  22. @Griffon, yes i have read it. i will post my reply there regarding the results. many thanks

  23. AWESOME…..You save my day, my nerves….and a lot more !!!!

    Why is it so difficult to make a bootable iso from debian like distro ????

    I’m discovering a new “toy” thanks for the help and all the article on the blog!!
    very helpfull

    Old method but still working —–> POWERFULL

    Have a good day!!

Leave a Reply