USB Installation

tux

Member
Jul 21, 2009
54
0
6
I have some server in a DC and want install Proxmox on it. The problem is they have no CD/DVD-ROM. In this case I use tools like UNetbootin (http://en.wikipedia.org/wiki/UNetbootin) (check http://en.wikipedia.org/wiki/List_of_tools_to_create_Live_USB_systems) to convert a normal ISO to a USB bootable installation medium.
UNetbootin support over 11 Linux distribution and FreeBSD and FreeDOS, but is not support Proxmox.

The problem is that Proxmox have the /dev folder with many files with a size of 0. By trying to copy this files on my USB stick (8 GB!) I get a size error. Also they are so many small files, that the procedure takes (before the abort!) over 2 hours. For Ubuntu I need only 8 minutes.

Any idea how to bring Proxmox on a USB Stick?
 
I have some server in a DC and want install Proxmox on it. The problem is they have no CD/DVD-ROM. In this case I use tools like UNetbootin (http://en.wikipedia.org/wiki/UNetbootin) (check http://en.wikipedia.org/wiki/List_of_tools_to_create_Live_USB_systems) to convert a normal ISO to a USB bootable installation medium.
UNetbootin support over 11 Linux distribution and FreeBSD and FreeDOS, but is not support Proxmox.

The problem is that Proxmox have the /dev folder with many files with a size of 0. By trying to copy this files on my USB stick (8 GB!) I get a size error. Also they are so many small files, that the procedure takes (before the abort!) over 2 hours. For Ubuntu I need only 8 minutes.

Any idea how to bring Proxmox on a USB Stick?

USB install not working (yet). pls follow this howto.
 
Cannot install using MultiBootUSB as well. Used the following in the menu.lst:
Code:
title ProxMox VE v1.5 (Virtualization Tools)
find --set-root /proxmox-ve_1.5-4627-3.iso
map /proxmox-ve_1.5-4627-3.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/proxmox.seed boot=casper persistent iso-scan/filename=/proxmox-ve_1.5-4627-3.iso splash
initrd /casper/initrd.lz
and also tried:
Code:
title ProxMox VE v1.5 (Virtualization Tools)
find --set-root /proxmox-ve_1.5-4627-3.iso
map /proxmox-ve_1.5-4627-3.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)
Both failed.
 
Even the following failed.
Code:
title ProxMox VE v1.5 (Virtualization Tools)
find --set-root /proxmox-ve_1.5-4627-3.iso
map /proxmox-ve_1.5-4627-3.iso (0xff)
map --hook
root (0xff)
kernel /boot/isolinux/linux26 file=/cdrom/preseed/proxmox.seed boot=boot iso-scan/filename=/proxmox-ve_1.5-4627-3.iso splash
initrd /boot/isolinux/initrd.img
The error is that the cdrom is not found.

On getting back to the command prompt after install failure, we are now able to mount the usbdrive with:
Code:
sbin/fdisk -l
mkdir /media/usbdrive -p
mount -t /dev/sda1 /media/usbdrive
ls -al /media/usbdrive
The last command above shows the proxmox ISO file it has.

The iso can be mounted with:
Code:
mkdir /mnt/iso
mount -t iso9660 -o loop /media/usbdrive/proxmox-ve_1.5-4627-3.iso
 
Last edited:
Tried the following config in menu.lst in MultiBootUSB:
Code:
title ProxMox VE v1.5 (Virtualization Tools)
find --set-root /proxmox-ve_1.5-4627-3.iso
map /proxmox-ve_1.5-4627-3.iso (0xff)
map --hook
root (0xff)
kernel /boot/isolinux/linux26 boot=boot iso-scan/filename=/proxmox-ve_1.5-4627-3.iso splash
initrd /boot/isolinux/initrd.img

Still same error that the cdrom was not found. Looks like the protected mode memory environment makes the bootup forget the loopback device (cdrom from iso).

Attached is the output of dmesg and ls-al after returning to the shell prompt on error.
 

Attachments

  • Trace.zip
    5.1 KB · Views: 5
Traced the error to the file init in the iso's uncompressed version of /boot/isolinux/initrd.img (it is actually a tar and gzipped file on cd). The init script fails in the loop at lines 188 to 221 which are listed below:
Code:
    echo "searching for cdrom"
    cdrom=

    for try in 5 4 3 2 1; do
    for i in /sys/block/hd* /sys/block/sr* /sys/block/scd*; do 

        if [ -d $i ] && [ $(cat $i/removable) = 1 ]; then

        path="/dev/${i##*/}"
        echo "testing cdrom $path"
        if mount -t iso9660 -o ro $path /mnt ; then
            if [ -r /mnt/id.txt ] && [ $(cat /mnt/id.txt) = proxmox-ve ]; then
            echo "found proxmox cdrom"
            cdrom=$path
            break
            fi
        fi
        umount /mnt
        fi
    done
    if test -n "$cdrom"; then
        break;
    fi
    if test $try -gt 1; then
        echo "testing again in 5 seconds"
        sleep 5
    fi
    done

    if [ -z $cdrom ]; then 
    echo "no cdrom found - unable to continue (type exit or CTRL-D to reboot)"
    debugsh
    myreboot
    fi
We see that the physical cdrom drives - IDE and SCSI / SATA - and RAM Drives are checked, but any loopback devices are ignored and hence the failure in this case.
 
We see that the physical cdrom drives - IDE and SCSI / SATA - and RAM Drives are checked, but any loopback devices are ignored and hence the failure in this case.

That looks interesting - I will put that on our todo list - we can test that when we build the next CD.
 
Last edited by a moderator:
You had to install Debian from USB and then upgrade to Proxmox from Internet.
 
The Griffon's IT Library article referred to does not require any debian install and works as a bare-metal installer.

I used this method and it works, but how can I set maxroot and swapsize this way? Executing unconfigured.sh gives me GUI installer without posibility to enter
Code:
linux maxroot=20 swapsize=10

Can I put that line somewhere in that script?
 
Yes, it looks much more simpler, but this is production server and beta software doesn't sounds as a good idea.

This is unconfigured.sh script:
Code:
#!/bin/bash

trap "err_reboot" ERR

parse_cmdline() {
    root=
    proxdebug=0
    for par in $(cat /proc/cmdline); do 
        case $par in
            root=*)
                root=${par#root=}
                ;;
            proxdebug)
                proxdebug=1
                ;;
        esac
    done;
}

debugsh() {
    getty 38400 tty1 -i -n -l /bin/bash
}

real_reboot() {

    trap - ERR 

    /etc/init.d/networking stop 

    # stop udev (release file handles)
    /etc/init.d/udev stop

    echo -n "Deactivating swap..."
    swap=$(grep /dev /proc/swaps);
    if [ -n "$swap" ]; then
       set $swap
       swapoff $1
    fi
    echo "done."

    umount -l -n /etc/network/run

    umount -l -n /dev/shm
    umount -l -n /dev/.static/dev
    umount -l -n /dev

    umount -l -n /target >/dev/null 2>&1
    umount -l -n /tmp
    umount -l -n /var/tmp
    umount -l -n /var/log
    umount -l -n /var/run
    umount -l -n /var/lib/xkb

    umount -l -n /proc
    umount -l -n /sys

    exit 0
}

err_reboot() {

    echo "\nInstallation aborted - unable to continue (type exit or CTRL-D to reboot)"
    debugsh
    real_reboot
}

echo "Starting Proxmox installation"

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin

mount -n -t proc proc /proc
mount -n -t tmpfs tmpfs /tmp
mount -n -t tmpfs tmpfs /var/tmp
mount -n -t tmpfs tmpfs /var/log
mount -n -t tmpfs tmpfs /var/run
mount -n -t tmpfs tmpfs /var/lib/xkb
mount -n -t sysfs sysfs /sys

parse_cmdline

# always load most common input drivers
modprobe -q psmouse || /bin/true
modprobe -q sermouse || /bin/true
modprobe -q usbhid || /bin/true

# load device mapper - used by lilo
modprobe -q dm_mod || /bin/true

echo "Installing additional hardware drivers"
export RUNLEVEL=S 
export PREVLEVEL=N
/etc/init.d/udev start

# used by if up down scripts
mount -t tmpfs none /dev/shm
mkdir /dev/shm/network
mount -t tmpfs tmpfs /etc/network/run

# set the hostname 
hostname proxmox

#check system time
/usr/bin/checktime

# try to get ip config with dhcp
echo -n "Detecting network settings... "
/etc/init.d/networking start >/dev/tty2 2>&1
echo "done"

xinit -- -dpi 96 >/dev/tty2 2>&1

if [ $proxdebug -ne 0 ]; then 
    echo "Debugging mode (type exit or CTRL-D to reboot)"
    debugsh 
fi

echo "Installation done, rebooting... "
#mdadm -S /dev/md0 >/dev/tty2 2>&1
real_reboot

# never reached
exit 0

Is there any place I can put those options?
 
why don´t you install from ISO? just grab a external USB cd-rom and do it.
 
great
this is really good information for me to installation of usb.
Thanks.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!