Dec 14
說明:
- U盤已經格式化為vfat,其它格式未測試
- grub.exe取自grub4dos
- syslinux.cfg和menu.lst附在文章最後
- 想保存進入sysrcd 後做的一些修改,可以創建存儲文件 sysrcd.bs 。方法如下:
進入引导界面裏,按tab鍵,在後面加上这个选项“backstore=off”
你想保存sysrcd.bs在哪里,你就挂载哪个分区(这个分区要是可写的)。可以在進入sysrcd後,重新挂載usb為可寫
mount -o remount,rw /dev/sdc1
创建 sysrcd.bs 单位是M,下面指定的是256M
sysresccd-backstore create /livemnt/boot/sysrcd.bs 256
重启
下面是制作腳本。沒有親自測試過,根據歷史記錄寫的。注釋寫得很明白了。
#!/bin/bash
# files are at ~
#├── grub
#│ ├── e2fs_stage1_5
#│ ├── fat_stage1_5
#│ ├── ffs_stage1_5
#│ ├── grub.exe
#│ ├── iso9660_stage1_5
#│ ├── jfs_stage1_5
#│ ├── menu.lst
#│ ├── minix_stage1_5
#│ ├── reiserfs_stage1_5
#│ ├── stage1
#│ ├── stage2
#│ ├── stage2_eltorito
#│ ├── ufs2_stage1_5
#│ ├── vstafs_stage1_5
#│ └── xfs_stage1_5
#├── syslinux.cfg
#├── systemrescuecd-x86-2.3.1.iso
#└── tinycore-tinycore.iso
# mount the usb on /mnt
DEV=/dev/sdc1
mount $DEV /mnt
# install sysrescuecd
# copy all files in systemrescuecd-x86-2.3.1.iso to the root of usb /mnt
# rename /mnt/isolinux to /mnt/syslinux,
# and copy ~/syslinux.cfg which has been configed before to /mnt/syslinux
ISO1=systemrescuecd-x86-2.3.1.iso
DIR1=/tmp/sys
[ -d $DIR1 ] || mkdir $DIR1
mount $ISO $DIR1
cd $DIR1
cp * -av /mnt/
/mnt/usb_inst/install-mbr /dev/sdc
/mnt/usb_inst/syslinux /dev/sdc1
mv /mnt/{iso,sys}linux
cp ~/syslinux.cfg syslinux
# install tiny core
# copy all the files in boot in tinycore-current.iso to the root of usb /mnt
#
ISO2=tinycore-current.iso
DIR2=/tmp/tiny
[ -d $DIR2 ] || mkdir $DIR2
cp $DIR2/boot -av /mnt
# set grub
# The grub's syntax is easier than syslinux
cp ~/grub -av /mnt
sync
exit 0
