Thursday, 20 March 2014

Add ProxMox Install ISOs to a USB Easy2Boot drive

The ProxMox install ISOs don't 'just work' with Easy2Boot. The ISO shows a 'PROXMOX INSTALLER' splash screen and then seems to hang. However, if you press F2 or ESC to get to the linux command prompt, you can easily start the installer as follows:
1. Type
    fdisk -l
to find the USB 4th partition. This will usually be /dev/sdb4 on a single disk system.
2. Next type
    mount /dev/sdb4 /mnt
to mount the 4th partition (this will already contain the ISO file set up by E2B).
3. Finally type
    chroot /mnt sbin/
to start the installer (it takes a minute or two to load - be patient).

If you prefer, you can copy the ISO file to the \_ISO\MAINMENU\MNU folder and make a small .mnu file in the same folder to remind you of the commands that are required:

title ProxMox Installer ISO \n Use fdisk -l to find 4th partition\n mount /dev/sdb4 /mnt\n chroot /mnt sbin/
set ISO=proxmox-ve_3.2-1933730b-2.iso
/%grub%/qrun.g4b $HOME$/%ISO%

P.S. If the E2B drive is an NTFS drive, the mount command fails (for some reason).

For NTFS E2B USB Drives

1. Create an empty folder on the Windows Desktop

2. Copy your PROXMOX.ISO file to the empty folder (do NOT extract the contents)

3. Drag-and-drop the folder onto the MPI_FAT32 Desktop icon and create a PROXMOX.imgPTN file on your NTFS E2B USB drive that is about double the size of the ISO file - e.g. 1400MB for a 665MB ISO.

4. Boot to E2B and select the PROXMOX.imgptn file to get to the CSM Menu - then Quit.

5.  Edit the \menu.lst file on the E2B USB drive (it should be the large CSM menu.lst and there should be a \e2b folder present also).

Add to the bottom of the menu:

title ProxMox Installer ISO \n Use fdisk -l to find 4th partition\n mount /dev/sdb4 /mnt\n chroot /mnt sbin/
partnew (hd0,3) 0 /proxmox.iso
map /proxmox.iso (0xff)
map --hook
root (0xff)

chainloader (0xff)

Note that the PROXMOX.ISO file inside the .imgPTN file needs to be contiguous - this is why we must choose a much larger size for the .imgPTN file than we need. If you get a 'not contiguous' error from the above menu, use WinContig to defrag the PROXMOX.ISO file on the E2B USB drive. If it is not possible, create a larger .imgPTN file and try again.

ProxMox 4/5

The file structure has changed with proxmox 4 and later versions.

Here is one way to get it to work:

1. Copy the .ISO file to \_ISO\LINUX on your E2B drive
2. Boot to the proxmox boot menu
3. Select the first install option in the menu and press e for edit
4. Add the string lvm2root=/dev/sdX4  where X is the drive letter for your USB drive.
For instance, on a notebook with a single hard disk, add lvm2root=/dev/sdb4
Under a VM where the USB drive is the first drive in the system, use /dev/sda4

Add in lvm2root=/dev/sdX4  in the exact place shown  (the \ character at the end of the line in the screenshot just shows that the line continues)

5. Press F10 to boot.

Alternative for Proxmox 4\5

Or you can use a .mnu file to automate the process (but you need to check the suggested /dev/sdx device is correct for that system)...

# place ISO and this .mnu file in \_ISO\LINUX\MNU folder.
# vga=791 is required or will get Installation aborted error.
# lvm2root must be set the the E2B USB drive partition which is mapped to the ISO

iftitle [if exist $HOME$/proxmox-ve_4.4-eb2d6f1e-2.iso] proxmox 4.4\n You must enter the correct USB name.
set ISO=proxmox-ve_4.4-eb2d6f1e-2.iso

#don't echo of values on screen
debug off
#make sure all drives are unmapped as this can change the count
#reset hdcount in BIOS to default
map --unhook
map --unmap=0:0xff
root (bd)
#set number of hard disks in system from BIOS location 475h
set /a HDCNT=*0x475 & 0xff > nul
# cannot install to E2B drive!
if %HDCNT%==1 pause --wait=3 ERROR: No internal hard disk detected && configfile (md)0x3000+0x50
# add 0x60 so drive 1 = a, drive 2 = b
set /A ldisk=%HDCNT%+0x60 > nul
call echo -e sd\%ldisk:~1,4% | set ldisk=
echo %HDCNT% disks in system including USB drive
echo -e      I guess the USB drive will be $[0104]%ldisk%
set /p ldisk=Enter linux device name for USB drive, e.g. sdb or sdc (A=abort, ESC=%ldisk%) : 
# must start with sd
if not "%ldisk:~0,2%"=="sd" pause --wait=3 ERROR: Must begin with "sd" && configfile (md)0x3000+0x50
pause --wait=3 Will use /dev/%ldisk%4 for ISO file
set NOSUG=1
set redir=> nul
/%grub%/QRUN.g4b $HOME$/%ISO%
kernel /boot/linux26 ro ramdisk_size=16777216 lvm2root=/dev/%ldisk%4 vga=791 rw quiet splash=silent
initrd /boot/initrd.img

Note: proxmox 5.4 seems to be broken. It won't even boot if I dd the ISO to a USB drive.

No comments:

Post a Comment