LiveUSB


U 盘一般只有一个分区,但是仍需要将该分区设置为活动分区。

# fdisk /dev/sdb
Command (m for help): a
Partion number (1-5): 1
Command (m for help): w
# 格式化分区
mkdosfs -F 16 /dev/sdb1

# 写入主引导记录
dd if=/usr/share/syslinux/mbr.bin of=/dev/sdb

# 挂载ISO镜像文件
mkdir -p /mnt/cdrom
mount -o loop,ro -t iso9660 livecd-i686-installer-2007.0.iso /mnt/cdrom

# 挂载U盘
mkdir -p /mnt/usb
mount -t vfat /dev/sdb1 /mnt/usb
cp /mnt/cdrom/* /mnt/usb -r
mv /mnt/usb/isolinux/* /mnt/usb
mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg
rm -rf /mnt/usb/isolinux

# 修改 memtest
# mv /mnt/usb/memtest86 /mnt/usb/memtest 
# sed -i -e "s:cdroot:cdroot slowusb:" -e "s:kernel memtest86:kernel memtest:" /mnt/usb/syslinux.cfg

# 卸载,并安装syslinux
umount /mnt/cdrom
umount /mnt/usb
syslinux /dev/sdb1