1.分区格式化USB:
sudo cfdisk /dev/sdb
分为4个区:
sdb1 primary linux 1000M (作为预留给用户的windows区)
sdb2 primary linux ext3 1000M (作为/分区)
sdb3 primary linux ext3 500M (作为/etc分区)
sdb4 primary linux ext3 1500M (作为/home分区)
2.sudo mkfs.vfat /dev/sdb1
sudo mkfs.ext3 /dev/sdb2
sudo mkfs.ext3 /dev/sdb3
sudo mkfs.ext3 /dev/sdb4
3.安装grub到USB的/sdb2中(因为sdb2作为USB启动的跟分区):
sudo mount /dev/sdb2 /mnt
sudo grub-install --no-floppy --root-directory=/mnt /dev/sdb2
sudo umount /mnt
4. 挂载拷贝iso进入sdb2(即/分区):result中的iso:boot、RAYS MO 1.0 目录直接拷贝到sdb2
sudo mount /dev/sdb2 /mnt
cp -r result/live_1134/* /mnt
sudo umount /mnt
5.分别添加/etc和/home目录的内容到sdb3,sdb4:
sudo mount /dev/sdb3 /mnt
tar xvfj /bak/rays.mo.etc.tar.bz2 -C /mnt
sudo umount /mnt
sudo mount /dev/sdb4 /mnt
tar xvfj /bak/rays.mo.home.tar.bz2 -C /mnt
sudo umount /mnt
阅读(1032) | 评论(0) | 转发(0) |