Différences entre les versions de « Créer une clé USB bootable pour installer VMWare ESXi »

De Société Coopérative d'Aménagement Numérique Icaunaise
Aller à la navigation Aller à la recherche
(Page créée avec « (Howto from https://raymii.org/s/tutorials/VMWare-ESXi-5-USB-installer.html) Preparation You'll need: A working linux installation The latest version of syslinu... »)
 
 
Ligne 1 : Ligne 1 :
(Howto from https://raymii.org/s/tutorials/VMWare-ESXi-5-USB-installer.html)
(Howto from https://raymii.org/s/tutorials/VMWare-ESXi-5-USB-installer.html)


Preparation
= Préparation =
Il vous faut :
* Un linux qui marche
* Avec la dernière version de syslinux
* Une clé USB de 2Go au moins
* Une ISO de VMWare ESXi


You'll need:
= Installation logiciel =
(pour debian/ubuntu)


    A working linux installation
<pre>apt-get install dosfstools mtools syslinux</pre>
    The latest version of syslinux
    A +2GB USB thumb drive
    The VMWare ESXi 5 ISO (register and download from vmware.com)


Install required software:
Il faut ensuite préparer la clé USB. Branchez la et retrouvez le device qui va avec (voir dans /var/log/syslog ou dmesg. Souvent /dev/sdb ou /dev/sdc)


# This is for debian/ubuntu
Effacez totalement la clé
apt-get install dosfstools mtools syslinux


Insert your USB drive in your linux server and find the device name (dmesg), in my case it was /dev/sdc.
<pre>/sbin/fdisk /dev/sdc</pre>
Preparing the USB drive
* Type d to delete partitions until they are all deleted.
* Type n to create primary partition 1 that extends over the entire disk.
* Type t to set the type to an appropriate setting for the FAT32 file system, such as c.
* Type a to set the active flag on partition 1.
* Type p to print the partition table.


2We are going to completely format the USB drive, ALL DATA WILL BE WIPED.
Le résultat devrait donner


/sbin/fdisk /dev/sdc
<pre>Disk /dev/sdc: 2004 MB, 2004877312 bytes
 
    Type d to delete partitions until they are all deleted.
    Type n to create primary partition 1 that extends over the entire disk.
    Type t to set the type to an appropriate setting for the FAT32 file system, such as c.
    Type a to set the active flag on partition 1.
    Type p to print the partition table.
 
The result should be similar to the following text:
 
Disk /dev/sdc: 2004 MB, 2004877312 bytes
255 heads, 63 sectors/track, 243 cylinders
255 heads, 63 sectors/track, 243 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Units = cylinders of 16065 * 512 = 8225280 bytes
  Device Boot Start End Blocks Id System
  Device Boot Start End Blocks Id System
/dev/sdc1 * 1 243 1951866 c W95 FAT32 (LBA)
/dev/sdc1 * 1 243 1951866 c W95 FAT32 (LBA)</pre>


    Type w to write the partition table and quit.
* Type w to write the partition table and quit.
* Format the USB flash drive with the Fat32 file system.


    Format the USB flash drive with the Fat32 file system.
<pre>/sbin/mkfs.vfat -F 32 -n USB /dev/sdc1</pre>


    /sbin/mkfs.vfat -F 32 -n USB /dev/sdc1
= Installation du bootloader =


Now we are going to install the syslinux bootloader to the USB device. Please replace the path below with the location where your downloaded and extracted version of syslinux is.
<pre>syslinux /dev/sdc1
cat /path/to/syslinux/download/mbr/mbr.bin > /dev/sdc</pre>


syslinux /dev/sdc1
= Copie de l'ISO VMWare =
cat /path/to/syslinux/download/mbr/mbr.bin &gt; /dev/sdC
 
Copy the ISO
 
First create two mount folders, one for the USB drive, and one for the ISO:
 
mkdir -p /mnt/{iso,usb}
 
Now mount the VMWare ESXi 5.1 iso


<pre>
mkdir -p /mnt/iso
mkdir -p /mnt/usb
mount -o loop ./path/to/vmware-esxi-5.1.iso /mnt/iso
mount -o loop ./path/to/vmware-esxi-5.1.iso /mnt/iso
And mount the USB stick:
mount /dev/sdc1 /mnt/usb
mount /dev/sdc1 /mnt/usb
Copy the ISO over to the USB stick:
cp -r /mnt/iso/* /mnt/usb
cp -r /mnt/iso/* /mnt/usb
</pre>


Go to the USB stick mount folder:
= Activation de syslinux =


<pre>
cd /mnt/usb
cd /mnt/usb
Copy the ISOLINUX for SYSLINUX
cp isolinux.cfg syslinux.cfg
cp isolinux.cfg syslinux.cfg
Edit syslinux.cfg:
vim syslinux.cfg
vim syslinux.cfg
</pre>


And change the line DEFAULT menu.c32 to DEFAULT mboot.c32.
* Changez la ligne "DEFAULT menu.c32" par "DEFAULT mboot.c32"
 
The file should look like this (mind version numbers):
 
DEFAULT mboot.c32
MENU TITLE ESXi-5.1.0-799733-standard Boot Menu
NOHALT 1
PROMPT 0
TIMEOUT 80
LABEL install
  KERNEL mboot.c32
  APPEND -c boot.cfg -p 1
  MENU LABEL ESXi-5.1.0-799733-standard ^Installer
LABEL hddboot
  LOCALBOOT 0x80
  MENU LABEL ^Boot from local disk
 
Now unmount the USB drive:


<pre>
cd ~
umount /mnt/usb
umount /mnt/usb
umount /mnt/iso
</pre>


And you can boot from it and install ESXi.
Votre clé est prête à booter pour installer VMWare !

Version actuelle datée du 29 février 2016 à 12:20

(Howto from https://raymii.org/s/tutorials/VMWare-ESXi-5-USB-installer.html)

Préparation

Il vous faut :

  • Un linux qui marche
  • Avec la dernière version de syslinux
  • Une clé USB de 2Go au moins
  • Une ISO de VMWare ESXi

Installation logiciel

(pour debian/ubuntu)

apt-get install dosfstools mtools syslinux

Il faut ensuite préparer la clé USB. Branchez la et retrouvez le device qui va avec (voir dans /var/log/syslog ou dmesg. Souvent /dev/sdb ou /dev/sdc)

Effacez totalement la clé

/sbin/fdisk /dev/sdc
  • Type d to delete partitions until they are all deleted.
  • Type n to create primary partition 1 that extends over the entire disk.
  • Type t to set the type to an appropriate setting for the FAT32 file system, such as c.
  • Type a to set the active flag on partition 1.
  • Type p to print the partition table.

Le résultat devrait donner

Disk /dev/sdc: 2004 MB, 2004877312 bytes
255 heads, 63 sectors/track, 243 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 Device Boot Start End Blocks Id System
/dev/sdc1 * 1 243 1951866 c W95 FAT32 (LBA)
  • Type w to write the partition table and quit.
  • Format the USB flash drive with the Fat32 file system.
/sbin/mkfs.vfat -F 32 -n USB /dev/sdc1

Installation du bootloader

syslinux /dev/sdc1
cat /path/to/syslinux/download/mbr/mbr.bin > /dev/sdc

Copie de l'ISO VMWare

mkdir -p /mnt/iso
mkdir -p /mnt/usb
mount -o loop ./path/to/vmware-esxi-5.1.iso /mnt/iso
mount /dev/sdc1 /mnt/usb
cp -r /mnt/iso/* /mnt/usb

Activation de syslinux

cd /mnt/usb
cp isolinux.cfg syslinux.cfg
vim syslinux.cfg
  • Changez la ligne "DEFAULT menu.c32" par "DEFAULT mboot.c32"
cd ~
umount /mnt/usb
umount /mnt/iso

Votre clé est prête à booter pour installer VMWare !