制作 ESXi 5.1 的USB闪存"引导安装"盘

简介: 制作 ESXi 5.1 的USB闪存"引导安装"盘 1 准备工作 linux 系统    //我这里是ubuntu 12.04 U盘一个       //8GB kingston ESXi ISO文件  //vmware 官网下载 VMware-VMvisor-Installer-5.

制作 ESXi 5.1 的USB闪存"引导安装"盘



1 准备工作
linux 系统    //我这里是ubuntu 12.04
U盘一个       //8GB kingston
ESXi ISO文件  //vmware 官网下载 VMware-VMvisor-Installer-5.1.0-799733.x86_64.iso,XXXXXX为内部版本号

2. 为U盘创建分区表

 
  1. fdisk /dev/sdb 

    "d" 删除全部分区
    "n" 创建遍及整个磁盘的主分区1
    "t" 设置文件系统为FAT32(LBA),代码为"c"
    "a" 设置主分区1的Boot标记
    "p" 打印分区表
结果应类似下表:
    Disk /dev/sdb: 8076 MB, 80761322352 bytes
    186 heads, 28 sectors/track, 3028 cylinders
    Units = cylinders of 5208 * 512 = 2666496 bytes

    Device      Boot        Start       End     Blocks      Id      System
 /dev/sdb1        *             1      3029   7885824        c      W95 FAT32 (LBA)

    "w" 写入分区表并退出
注意:如有疑问可以参考最后的 fdisk 详细过程

3. 使用FAT32文件系统格式化U盘

 
  1. mkfs.vfat -F 32 -n ESXi /dev/sdb1 

  
4. 安装syslinux并写入MBR

 
  1. syslinux /dev/sdb1 
  2. cat /usr/lib/syslinux/mbr.bin > /dev/sdb 


5. 挂载U盘

 
  1. mount /dev/sdb1 /mnt/usb 


6. 挂载ESXi安装程序ISO镜像

 
  1. mount -o loop VMware-VMvisor-Installer-5.1.0-799733.x86_64.iso /mnt/iso 


7. 将ISO镜像的内容复制到U盘

 
  1. cp -r /mnt/iso/* /mnt/usb/ 


8. 将isolinux.cfg文件重命名为syslinux.cfg

 
  1. mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg 


9. 编辑syslinux.cfg 文件

 
  1. vim /mnt/usb/syslinux.cfg 

在/mnt/usb/syslinux.cfg 文件中,将APPEND -c boot.cfg 一行更改为 APPEND -c boot.cfg -p 1。

10. 拷贝一个新的menu.c32文件到U盘,覆盖原来的文件

 
  1. cp /usr/lib/syslinux/menu.c32 /mnt/usb/ 

注意:这步不在VMware vSphere官方手册 中,如没有此步骤,引导时会出现“menu.c32: not a COM32R image”这样的错误。

11. 卸载U盘
umount /mnt/usb

12. 卸载ISO镜像
umount /mnt/iso

完工:现在U盘可以引导安装ESXi 5.1 了


fdisk 详细过程注意红色字

 
  1. fdisk /dev/sdb 

Command (m for help): p

Disk /dev/sdb: 8166 MB, 8166703104 bytes
64 heads, 32 sectors/track, 7788 cylinders, total 15950592 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4bd294d1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           0     3311615     1655808   17  Hidden HPFS/NTFS

Command (m for help): d
Selected partition 1

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-15950591, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-15950591, default 15950591): 
Using default value 15950591

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

Disk /dev/sdb: 8166 MB, 8166703104 bytes
64 heads, 32 sectors/track, 7788 cylinders, total 15950592 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4bd294d1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048    15950591     7974272    c  W95 FAT32 (LBA)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

 

参考 
VMware vSphere官方手册
制作 ESXi 5.0 的 USB 安装盘

结束
更多请:
linux 相关 37275208
vmware 虚拟化相关  166682360


本文转自 dongnan 51CTO博客,原文链接:http://blog.51cto.com/dngood/1040268

相关文章
|
9月前
|
Ubuntu Linux
【Ubuntu】内存不够如何用外接U盘扩容(挂载)
【Ubuntu】内存不够如何用外接U盘扩容(挂载)
|
虚拟化
解决ESXI不支持USB移动硬盘
解决方式: 采用PCI设备直通方式分配给虚拟子机使用。前提: ESXI主机需支持PCI设备直通功能。(亲测技嘉H61、H81不支持如下图示)在技嘉H110和B250亲测成功 实验环境 主机:技嘉B250M主板系统:ESXI 6.0U3PCI转USB卡: IT-CEO PCI-E转USB3.0双口扩展卡 操作过程 使用vSphere Client连接到ESXi主机,在"配置→高级设置→编辑直通",在"将设备标记为可直通"对话框中,勾取插入的PCI转USB设备。
16789 0
|
Linux 虚拟化 Windows
如何在把Linux装进移动硬盘/U盘(UEFI启动)?
如何在把Linux装进移动硬盘/U盘(UEFI启动)?
2691 1
制作U盘启动时【usb-hdd和usb-zip的区别】
制作U盘启动时【usb-hdd和usb-zip的区别】
824 0
制作U盘启动时【usb-hdd和usb-zip的区别】
树莓派4B:扩展系统到整个SD卡
树莓派4B:扩展系统到整个SD卡
412 0
树莓派4B:扩展系统到整个SD卡
|
搜索推荐 测试技术 存储
|
数据安全/隐私保护 iOS开发 MacOS
|
Web App开发 存储