利用F5 VE制作F5 11.6.1系统安装引导U盘

来源:互联网 发布:南京大学大数据实验室 编辑:程序博客网 时间:2024/05/22 12:36

1.概述

在以下情况下可能需要使用U盘引导来安装F5系统:
1. 由于某种原因系统无法从硬盘引导加载时;
2. 需要将现有系统格盘推倒重来的安装F5系统时;

此文档将介绍如何使用F5 VE来制作F5系统安装引导用U盘。我将使用安装在VMware Workstation 12 下的F5 VE来进行下文中所涉及到的所有操作。理论上,由于F5基于Red Hat Linux,所以下文中所涉及的操作应该也适用于其他Linux发行版。但之前在最小化安装的CentOS上测试时,发现缺少一些必要的依赖库。当时由于赶时间,就没有再手动解决依赖的问题了。

操作环境及所需:
1. 可运行的F5(不论是硬件设备,还是安装在虚拟机中的F5 VE)
2. F5系统镜像文件
3. U盘1个


2.制作可引导U盘

2.1 运行F5 VE系统

这里写图片描述


2.2 插入U盘

Step1:选择“虚拟机”–> 选择“可移动设备”–> 选择刚刚插入的U盘 –> 选择“连接”
这里写图片描述


Step 2:确认U盘已被正确插入系统
使用命令fdisk -l查看U盘是否已经被系统识别:

[root@localhost:Active:Standalone] dvd # fdisk -lDisk /dev/sda: 134.2 GB, 134217728000 bytes255 heads, 63 sectors/track, 16317 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *           1          26      204799+   b  W95 FAT32Partition 1 does not end on cylinder boundary./dev/sda2              26          28       16384   82  Linux swap / SolarisPartition 2 does not end on cylinder boundary./dev/sda3              28       16317   130845118+  8e  Linux LVMDisk /dev/sdb: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  SystemDisk /dev/sdd: 8103 MB, 8103395328 bytes250 heads, 62 sectors/track, 1021 cylindersUnits = cylinders of 15500 * 512 = 7936000 bytes   Device Boot      Start         End      Blocks   Id  System/dev/sdd1   *           1        1021     7912749+  83  Linux

我当前插入的U盘容量为8GB,且文件系统为Linux,可以看到,系统已经检测到了U盘。


2.3 将F5系统镜像放入F5 VE中

有很多种方法可以将F5系统镜像放入F5 VE中,我这里只列举最简单的两种方法:
1. 为F5 VE添加拟光驱,然后将F5系统镜像插入VM虚拟光驱;
2. 使用命令scp将F5镜像文件上传到F5 VE中。


方法1:将F5系统镜像插入VM虚拟光驱

Step 1:选择“虚拟机”–>“可移动设备”–>“CD/DVD”–>“设置”
这里写图片描述


Step 2:选择“浏览”–> 选择所需的F5系统镜像文件 –> 选择“打开”;
这里写图片描述


Step 3: 查看DVD光驱是否已被挂载
使用命令mount查看DVD光驱是否已被挂载:

[root@localhost:Active:Standalone] dvd # mount/dev/mapper/vg--db--sda-set.1.root on / type ext3 (rw,noatime)none on /proc type proc (rw)devpts on /dev/pts type devpts (rw)/dev/mapper/vg--db--sda-set.1._config on /config type ext3 (rw,noatime)/dev/mapper/vg--db--sda-set.1._usr on /usr type ext3 (ro,noatime)/dev/mapper/vg--db--sda-set.1._var on /var type ext3 (rw,noexec,noatime)/dev/mapper/vg--db--sda-dat.share.1 on /shared type ext3 (rw,noatime)/dev/mapper/vg--db--sda-dat.log.1 on /var/log type ext3 (rw,noatime)none on /dev/shm type tmpfs (rw,noatime)none on /shared/rrd.1.2 type tmpfs (rw,noatime)none on /var/tmstat type tmpfs (rw)none on /var/run type tmpfs (rw,noatime)none on /sys/kernel/debug type debugfs (ro,noexec)prompt on /var/prompt type tmpfs (rw,size=4m)none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)none on /var/loipc type tmpfs (rw,noatime)none on /dev/mprov/tmm type hugetlbfs (rw)

可以看到,当前光驱尚未被挂载!


Step 4:挂载DVD光驱
使用命令mount /dev/sr0 /media/dvd挂载DVD光驱:

[root@localhost:Active:Standalone] dvd # mount /dev/sr0 /media/dvdmount: block device /dev/sr0 is write-protected, mounting read-only

Step 5: 查看DVD光驱是否已被挂载
使用命令mount查看DVD光驱是否已被挂载:

[root@localhost:Active:Standalone] dvd # mount/dev/mapper/vg--db--sda-set.1.root on / type ext3 (rw,noatime)none on /proc type proc (rw)devpts on /dev/pts type devpts (rw)/dev/mapper/vg--db--sda-set.1._config on /config type ext3 (rw,noatime)/dev/mapper/vg--db--sda-set.1._usr on /usr type ext3 (ro,noatime)/dev/mapper/vg--db--sda-set.1._var on /var type ext3 (rw,noexec,noatime)/dev/mapper/vg--db--sda-dat.share.1 on /shared type ext3 (rw,noatime)/dev/mapper/vg--db--sda-dat.log.1 on /var/log type ext3 (rw,noatime)none on /dev/shm type tmpfs (rw,noatime)none on /shared/rrd.1.2 type tmpfs (rw,noatime)none on /var/tmstat type tmpfs (rw)none on /var/run type tmpfs (rw,noatime)none on /sys/kernel/debug type debugfs (ro,noexec)prompt on /var/prompt type tmpfs (rw,size=4m)none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)none on /var/loipc type tmpfs (rw,noatime)none on /dev/mprov/tmm type hugetlbfs (rw)/dev/sr0 on /media/dvd type iso9660 (ro)   #光驱已被挂载!

可以看到,当前光驱已被挂载!


Step 6:进入DVD光驱挂载点目录

[root@localhost:Active:Standalone] dvd # cd /media/dvd[root@CentOS dvd]# lltotal 88drwxr-xr-x. 6 502 502  2048 May  5  2016 BIGIP1161drwxr-xr-x. 2 502 502  2048 May  5  2016 boot-rw-r--r--. 1 502 502    32 May  5  2016 directorydrwxr-xr-x. 3 502 502  2048 May  5  2016 downloadsdrwxr-xr-x. 2 502 502  2048 May  5  2016 EUD-rw-r--r--. 1 502 502   336 May  5  2016 f5.archive.xmldrwxr-xr-x. 3 502 502  2048 May  5  2016 isolinux-rw-rw-rw-. 1 502 502  9428 May  5  2016 isolinux.bin-r--r--r--. 1 502 502 63261 May  5  2016 metadata.xml-r-xr-xr-x. 1 502 502  1802 Mar  6  2014 mkdisk-r-xr-xr-x. 1 502 502   918 Dec 22  2010 rmeuddrwxr-xr-x. 3 502 502  2048 May  5  2016 tftpboot

方法2:使用命令scp上传

Step 1:使用命令scp将F5系统镜像文件从本地上传到F5 VE中

scp BIGIP-11.6.1.0.0.317.iso root@192.168.1.245:/shared/

Step 2:挂载F5系统镜像
使用命令mount -o loop /shared/BIGIP-11.6.1.0.0.317.iso /media/dvd挂载DVD光驱:

[root@localhost:Active:Standalone] dvd # mount -o loop /shared/BIGIP-11.6.1.0.0.317.iso /media/dvdmount: block device /dev/sr0 is write-protected, mounting read-only

Step 3:进入镜像文件挂载点目录

[root@localhost:Active:Standalone] dvd # cd /media/dvd[root@localhost:Active:Standalone] dvd # lltotal 88drwxr-xr-x. 6 502 502  2048 May  5  2016 BIGIP1161drwxr-xr-x. 2 502 502  2048 May  5  2016 boot-rw-r--r--. 1 502 502    32 May  5  2016 directorydrwxr-xr-x. 3 502 502  2048 May  5  2016 downloadsdrwxr-xr-x. 2 502 502  2048 May  5  2016 EUD-rw-r--r--. 1 502 502   336 May  5  2016 f5.archive.xmldrwxr-xr-x. 3 502 502  2048 May  5  2016 isolinux-rw-rw-rw-. 1 502 502  9428 May  5  2016 isolinux.bin-r--r--r--. 1 502 502 63261 May  5  2016 metadata.xml-r-xr-xr-x. 1 502 502  1802 Mar  6  2014 mkdisk-r-xr-xr-x. 1 502 502   918 Dec 22  2010 rmeuddrwxr-xr-x. 3 502 502  2048 May  5  2016 tftpboot

2.4 制作引导U盘

Step 1:运行光盘根目录下的mkdisk文件
选择所要制作的U盘:

[root@localhost:Active:Standalone] dvd # ./mkdisk ................................................................................7517 blocksPlease select the device on which you wish to create the bootable installerIndex  Device    Product                        Size      Notes1      /dev/sdd  SMI     USB DISK               7728 MB   May hold 2 productsPlease select a device by index (1 - 1) --->1     #选择所要制作的U盘

选择所要安装平台:

On which F5 platform will the installation media be used?Index  Platform1      BIG-IP 8002      BIG-IP 16003      BIG-IP 22004      BIG-IP 36005      BIG-IP 39006      BIG-IP 42007      BIG-IP 52008      BIG-IP 52509      BIG-IP 690010     BIG-IP 705511     BIG-IP 720012     BIG-IP 725013     BIG-IP 725514     BIG-IP 890015     BIG-IP 895016     BIG-IP 1005517     BIG-IP 1020018     BIG-IP 1025519     BIG-IP 1035020     BIG-IP 1100021     BIG-IP 1105022     BIG-IP 1205023     BIG-IP 1337124     BIG-IP 1337225     BIG-IP 1337326     BIG-IP 1337427     BIG-IP 1337528     BIG-IP 1337629     BIG-IP 1337730     BIG-IP VIPRION 410031     BIG-IP VIPRION 420032     BIG-IP VIPRION 430033     BIG-IP VIPRION B210034     BIG-IP VIPRION B215035     BIG-IP VIPRION B225036     BIG-IP VIPRION B4400Please select a device by index (1 - 36) --->6        # 选择所要安装的平台

确认继续:

Chosen device /dev/sdd is SMI     USB DISKWARNING: The next step will destroy all data on this device!Are you sure you want to continue? (y|n) [n] --> y     # 确认继续

开始制作引导U盘:

info: Creating partition table on device /dev/sdd info: capture: status 0 returned by command: echo "0,,83,*" | sfdisk /dev/sdd info: >++++ result: info: Checking that no-one is using this disk right now ... info: OK info:  info: Disk /dev/sdd: 1021 cylinders, 250 heads, 62 sectors/track info: Old situation: info: Units = cylinders of 7936000 bytes, blocks of 1024 bytes, counting from 0 info:  info:    Device Boot Start     End   #cyls    #blocks   Id  System info: /dev/sdd1   *      0+   1020    1021-   7912749+  83  Linux info: /dev/sdd2          0       -       0          0    0  Empty info: /dev/sdd3          0       -       0          0    0  Empty info: /dev/sdd4          0       -       0          0    0  Empty info: New situation: info: Units = cylinders of 7936000 bytes, blocks of 1024 bytes, counting from 0 info:  info:    Device Boot Start     End   #cyls    #blocks   Id  System info: /dev/sdd1   *      0+   1020    1021-   7912749+  83  Linux info: /dev/sdd2          0       -       0          0    0  Empty info: /dev/sdd3          0       -       0          0    0  Empty info: /dev/sdd4          0       -       0          0    0  Empty info: Successfully wrote the new partition table info:  info: Re-reading the partition table ... info:  info: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) info: to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1 info: (See fdisk(8).) info: >---- info: Waiting for device mapper to map /dev/sdd1 info: Waiting for device mapper to map /dev/sdd1 info: Creating filesystem on /dev/sdd1 info: Mounting /dev/sdd1 on /mnt/j4d1UJuo0p info: Installing the master boot record on device /dev/sdd info: Installing the boot loader copying ./isolinux/vmlinuz => /mnt/j4d1UJuo0pcopying ./isolinux/initrd.img => /mnt/j4d1UJuo0pThe following products are available for transfer:BIG-IP version 11.6.1Would you like to transfer BIG-IP version 11.6.1? (y|n) [y] --> y  # 选择所要转换的系统版本

开始制作引导U盘,会看到大量log信息弹出,且之后不会再有键入操作:

Queueing BIG-IP version 11.6.1Ready to copy one product (this will take a while...).Creating repository in /mnt/tm_install/31193.FECpzL/51qeQdrOZK (this will take a while)... info: copying EUD package EUD_T-1.0-2.8.0.24.0.i386.rpm info: Copy ./EUD/EUD_T-1.0-2.8.0.24.0.i386.rpm        => /mnt/tm_install/31193.FECpzL/51qeQdrOZK/EUD info: copying EUD package EUD_C-1.0-14.2.0.3.0.i386.rpm info: Copy ./EUD/EUD_C-1.0-14.2.0.3.0.i386.rpm        => /mnt/tm_install/31193.FECpzL/51qeQdrOZK/EUD info: copying EUD package EUD_VF-1.0-15.0.1.10.0.i386.rpm info: Copy ./EUD/EUD_VF-1.0-15.0.1.10.0.i386.rpm        => /mnt/tm_install/31193.FECpzL/51qeQdrOZK/EUD info: copying EUD package EUD_M-1.0-12.12.0.4.0.i386.rpm info: Copy ./EUD/EUD_M-1.0-12.12.0.4.0.i386.rpm        => /mnt/tm_install/31193.FECpzL/51qeQdrOZK/EUD info: copying EUD package EUD_V-1.0-12.2.0.2.0.i386.rpm info: Copy ./EUD/EUD_V-1.0-12.2.0.2.0.i386.rpm        => /mnt/tm_install/31193.FECpzL/51qeQdrOZK/EUD info: copying package i686/acctd-11.6.1-0.0.317.i686.rpm info: copying package i686/apl_parser-11.6.1-0.0.317.i686.rpm info: copying package i686/apm_common-11.6.1-0.0.317.i686.rpm # -------此处略过大量输出信息---------info: copying package x86_64/xz-libs-4.999.9-0.0.317.x86_64.rpm info: copying package x86_64/zeromq-2.0.7-2.el5.0.0.317.x86_64.rpm info: copying package x86_64/zlib-1.2.3-3.0.0.317.x86_64.rpm info: copying package x86_64/zxfrd-11.6.1-0.0.317.x86_64.rpm doneMoving repository to thumb drive (this will take a while) ... Broadcast message from root (Sun Jun 18 02:01:07 2017):011d0004:3: Disk partition media_dvd has only 0% freeBroadcast message from root (Sun Jun 18 02:11:07 2017):011d0004:3: Disk partition media_dvd has only 0% freedoneProduct setup complete.Flushing disk buffer (this may take a while)... done[root@localhost:Active:Standalone] dvd # 

当F5的命令提示符再次出现时,引导U盘的制作就完成了!

原创粉丝点击