描述
在USB存储设备上安装一个CD/DVD镜像。USB设备能够引导启动已经安装的操作系统
参数说明
--overlay-size-mb 依赖于USB设备,占用USB的空间,为操作系统创建一个可用的磁盘空间
This option sets the overlay size in megabytes.
The overlay is additional storage available to the live operating system
if the operating system supports it.
The USB storage device must have enough free space for the image and the overlay.
--reset-mbr
Sets the Master Boot Record( MBR ) of the USB storage device to the mbr.bin file from the image's syslinux directory.
将镜像文件中syslinux目录下的mbr.bin启动引导代码写入USB存储设备
用法
# ./livecd-iso-to-disk --home-size-mb 900 CentOS6.5.iso /dev/sda1 --reset-mbr
Verifying p_w_picpath...
Unable to fit live p_w_picpath + overlay on available space on USB stick
+ Size of live p_w_picpath: 232
+ Home overlay size: 900
---------------------------
= Requested: 1132
- Available: 932
---------------------------
= To fit, free or decrease requested size total by: 200
Cleaning up to exit...
细节
1)
使用a,指定分区为启动分区
1 ext3文件系统格式
生成extlinux.cfg配置文件
2 win95 FAT32文件格式
生成syslinux.cfg配置文件
开始将光盘内容写入USB中:
/dev/sdb1是刚才的分区
2)
如果没有格式化文件系统,出现如下的错误:
It is OK to use this media.
mount: /dev/sdd1: can‘t read superblock
Cleaning up to exit...
umount: /media/usbdev.AkFUXh: not mounted