1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

USB Installation

Discussion in 'Proxmox VE 1.x: Installation and configuration' started by tux, Aug 13, 2009.

  1. tux

    tux Member

    Joined:
    Jul 21, 2009
    Messages:
    54
    Likes Received:
    0
    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?
     
  2. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    11,964
    Likes Received:
    190
    USB install not working (yet). pls follow this howto.
     
  3. apmuthu

    apmuthu Member

    Joined:
    Feb 26, 2009
    Messages:
    739
    Likes Received:
    2
    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.
     
  4. apmuthu

    apmuthu Member

    Joined:
    Feb 26, 2009
    Messages:
    739
    Likes Received:
    2
    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
     
    #4 apmuthu, Jun 1, 2010
    Last edited: Jun 1, 2010
  5. apmuthu

    apmuthu Member

    Joined:
    Feb 26, 2009
    Messages:
    739
    Likes Received:
    2
    The contents of the iso are seen with:
    Code:
     
    ls -al /mnt/iso
    
    How do we now execute the installer?
     
  6. apmuthu

    apmuthu Member

    Joined:
    Feb 26, 2009
    Messages:
    739
    Likes Received:
    2
    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.
     

    Attached Files:

  7. apmuthu

    apmuthu Member

    Joined:
    Feb 26, 2009
    Messages:
    739
    Likes Received:
    2
    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.
     
  8. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    15,347
    Likes Received:
    171
    That looks interesting - I will put that on our todo list - we can test that when we build the next CD.
     
    #8 dietmar, Jun 2, 2010
    Last edited by a moderator: Jun 2, 2010
  9. apmuthu

    apmuthu Member

    Joined:
    Feb 26, 2009
    Messages:
    739
    Likes Received:
    2
    Thanks to the article at Griffon's IT Library, we can now start the installer after mounting the CDROM.

    http://c-nergy.be/blog/?p=897
     
  10. docent

    docent Member

    Joined:
    Jul 23, 2009
    Messages:
    76
    Likes Received:
    0
    You had to install Debian from USB and then upgrade to Proxmox from Internet.
     
  11. apmuthu

    apmuthu Member

    Joined:
    Feb 26, 2009
    Messages:
    739
    Likes Received:
    2
  12. vlx

    vlx New Member

    Joined:
    Jul 28, 2009
    Messages:
    12
    Likes Received:
    0
    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?
     
  13. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    11,964
    Likes Received:
    190
  14. vlx

    vlx New Member

    Joined:
    Jul 28, 2009
    Messages:
    12
    Likes Received:
    0
    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?
     
  15. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    11,964
    Likes Received:
    190
    why donĀ“t you install from ISO? just grab a external USB cd-rom and do it.
     
  16. vlx

    vlx New Member

    Joined:
    Jul 28, 2009
    Messages:
    12
    Likes Received:
    0
    It's simple. I don't have one. :)
     
  17. Addison

    Addison New Member

    Joined:
    Oct 14, 2011
    Messages:
    6
    Likes Received:
    0
    great
    this is really good information for me to installation of usb.
    Thanks.
     

Share This Page