免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5246 | 回复: 5
打印 上一主题 下一主题

[SCO UNIX] 不用软盘,在硬盘及光盘上制作、使用应急盘(应急光盘) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-08 01:03 |只看该作者 |倒序浏览
今天看到有人要用 不用软盘制作、使用应急盘 制作的应急盘,不明怎么使用,我重新整理了一下并分了段,作了少量改进。

#################第一步:虚拟2.88M软盘
cd /dev
mv fd0135ds36 fd0135ds36.std
mv rfd0135ds36 rfd0135ds36.std
>/tmp/fd288
marry -a /tmp/fd288
ls -l /dev/marry/tmp/fd288
brw-r--r--   1 root     sys       76,  1 Jul  6 22:51 /dev/marry/tmp/fd288
mknod fd0135ds36 b 76 1
mknod rfd0135ds36 c 76 1
#设备号与前面列出的相同
#################第二步 mkdev fd生成应急盘根文件系统
mkdev fd
        1. Filesystem
        2. Emergency Boot and Root floppy filesystems

Enter an option or q to quit: 2

        Choices for type of floppy filesystem.

        1.  96tpi, double sided, 15 sectors per track (1.2M 5.25 inch)
        2. 135tpi, double sided, 18 sectors per track (1.44M 3.5 inch)
        3. 135tpi, double sided, 36 sectors per track (2.88M 3.5 inch)
        4. 135tpi, double sided, 21 sectors per track (1.68M 3.5 inch)

Enter an option or q to quit: 3

Please choose the type of filesystem.

        1. Root filesystem
        2. Boot filesystem
        3. Single floppy Boot and Root filesystem (2.88M only)
        4. Root filesystem with network utilities
        5. Single floppy Boot and Root filesystem + network utils (2.88M only)

If you have high density (1.44M) disks, you must create separate root
and boot filesystem floppies. The root floppy must be prepared first.

If you have extra density (2.88M) disks, you can choose to have both
the root and boot filesystems on the same floppy disk.

Enter an option or q to quit: 1

Would you like to format the floppy first? (y/n) y


Copying files to RAM Disk ...

Saving /dev/cmos to file /etc/bootroot.d/mnt/etc/cmos.root

Do you want to place extra files on the root filesystem? (y/n) y
<bootroot>mount
/ on /dev/root read/write on Fri Jul 06 22:44:58 2007
/stand on /dev/boot read only on Fri Jul 06 22:44:58 2007
/u on /dev/u read/write on Fri Jul 06 22:45:13 2007
/etc/bootroot.d/mnt on /dev/marry/etc/bootroot.d/ramdisk read/write on Fri Jul 06 22:57:19 2007
cd /etc/bootroot.d/mnt
#拷自己需要的其它文件
#但后面可能会空间不够,需要的话要从/etc/bootroot.d/mnt删掉一些文件如:etc/badtrk etc/emulator
#下面这一步是为了将没用的空间,用空格填满,便于提高压缩效果
echo "                                                                                                                                             ">temp.txt
dd if=temp.txt bs=140 count=100>>temp.txt
dd if=temp.txt bs=14k count=200>>temp.txt
#验证文件系统是否100%满了:
df -kvt .
rm temp.txt
<bootroot>exit

Please choose the boot floppy style.

        1. System specific boot
        2. Generic boot (builds a special kernel)
        3. System specific boot with networking enabled
           (Current system must have functional network)

The System specific boot floppy can only boot the machine it was created on.

The Generic boot floppy can be used to boot any machine.

Enter an option or q to quit: q

#################第三步 将应急盘根文件系统ramdisk.Z复制到硬盘boot区
mount /dev/fd0135ds36 /mnt
cd /mnt
l
-rw-r--r--   1 root     sys      1688634 Jul  6 23:14 ramdisk.Z
umount /stand
mount /stand
cp ramdisk.Z /stand

#################第四步 硬盘应急盘启动方法
#到此为止,可以从硬盘上启动应急盘了:
#boot:unix ramdisk=ramdisk.Z ram.preload=7 root=ram(7)

#################第五步 制作boot启动盘(用于制作启动光盘)
mkdev fd

        Choices for contents of the floppy filesystem.

        1. Filesystem
        2. Emergency Boot and Root floppy filesystems

Enter an option or q to quit: 2


        Choices for type of floppy filesystem.

        1.  96tpi, double sided, 15 sectors per track (1.2M 5.25 inch)
        2. 135tpi, double sided, 18 sectors per track (1.44M 3.5 inch)
        3. 135tpi, double sided, 36 sectors per track (2.88M 3.5 inch)
        4. 135tpi, double sided, 21 sectors per track (1.68M 3.5 inch)

Enter an option or q to quit: 3

Please choose the type of filesystem.

        1. Root filesystem
        2. Boot filesystem
        3. Single floppy Boot and Root filesystem (2.88M only)
        4. Root filesystem with network utilities
        5. Single floppy Boot and Root filesystem + network utils (2.88M only)

If you have high density (1.44M) disks, you must create separate root
and boot filesystem floppies. The root floppy must be prepared first.

If you have extra density (2.88M) disks, you can choose to have both
the root and boot filesystems on the same floppy disk.

Enter an option or q to quit: 2

Please choose the boot floppy style.

        1. System specific boot
        2. Generic boot (builds a special kernel)
        3. System specific boot with networking enabled
           (Current system must have functional network)

The System specific boot floppy can only boot the machine it was created on.

The Generic boot floppy can be used to boot any machine.

Enter an option or q to quit: 2
#这里根据情况,最好能选1,但可能空间不够;选2需要的空间小,但可能需要link硬盘驱动

Insert a 135ds36 floppy into drive 0
Press <RETURN> to continue or q to quit:
Would you like to format the floppy first? (y/n) y
Please choose the type of filesystem.

        1. Root filesystem
        2. Boot filesystem
        3. Single floppy Boot and Root filesystem (2.88M only)
        4. Root filesystem with network utilities
        5. Single floppy Boot and Root filesystem + network utils (2.88M only)

If you have high density (1.44M) disks, you must create separate root
and boot filesystem floppies. The root floppy must be prepared first.

If you have extra density (2.88M) disks, you can choose to have both
the root and boot filesystems on the same floppy disk.

Enter an option or q to quit: q

#################第六步 将ramdisk.Z及link等文件复制到boot盘
mount /dev/fd0135ds36 /mnt
cd /mnt
cp /stand/ramdisk.Z /mnt
#最好将/stand/link拷过来
#根据空间情况,也可以将/stand下的几个unix选一个压缩后拷过来替换unix.Z:
# compress -Hc </stand/unix.install >unix.Z

#################第七步 复制硬盘驱动到boot盘
#下面几步不是必须的,仅当需要时做。
#将硬盘驱动拷上来,假设硬盘驱动镜像文件为/tmp/ips.img,驱动名为ips:
#marry -a /tmp/ips.img
#mkdir /mnt2
#mount /dev/marry/tmp/ips.img /mnt2
#cp -rp /mnt2/ips /mnt/ips
#vi /mnt/etc/default/boot
#仅当需要时修改boot,如增加link串。
#内核已含硬盘驱动,直接从光盘上引导应急系统的引导串:
DEFBOOTSTR=unix.Z ramdisk=ramdisk.Z ram.preload=7 root=ram(7) dump=none swap=none
#内核已不含硬盘驱动,需要连接光盘上的硬盘驱动(假定为ips)再引导应急系统的引导串:
DEFBOOTSTR=unix.Z ramdisk=ramdisk.Z ram.preload=7 root=ram(7) link=ips Sdsk=ips(0,0,0,0) Srom=wd(0,0,0,0)  dump=none swap=none
#保存boot退出vi

#################第八步 用空格将boot盘空间填满
echo "                                                                                                                                             ">temp.txt
dd if=temp.txt bs=140 count=100>>temp.txt
dd if=temp.txt bs=14k count=200>>temp.txt
#验证文件系统是否100%满了:
df -kvt .
rm temp.txt
cd /
umount /mnt
l /tmp/fd288
-rw-r--r--   1 root     sys      2949120 Jul  7 01:55 /tmp/fd288
#确认文件大小

#################第九步 刻应急启动光盘
用二进制方式ftp将/tmp/fd288文件传到windows上来用nero刻光盘,选CDROM(引导)
指定2.88M的映像文件fd288
打开高级设置,虚拟2.88M软驱
ISO 9660 + Joliet
最多为31个字符(级别2)
多位
光盘上随你再添加别的文件。
注意mkdev fd期间不要按中断,否则不成功要重来。

#################第十步 应急光盘使用:
#如果第七步boot文件的引导串设置得当,boot:下直接回车可引导急系统
#也可以手工输入引导串,并指定使用光盘引导区fd(44)或fd(60)、软盘fd(65)或fd(61)、硬盘boot区hd(40)中的unix、ramdsik.Z、硬盘驱动
#不需要连接硬盘驱动直接启动到应急系统的情况:
boot:unix.Z ramdisk=ramdisk.Z ram.preload=7 root=ram(7) dump=none swap=none
#内核已不含硬盘驱动,需要连接光盘上的硬盘驱动(假定为ips)再引导应急系统的引导串:
boot:unix.Z ramdisk=ramdisk.Z ram.preload=7 root=ram(7) link=ips Sdsk=ips(0,0,0,0) Srom=wd(0,0,0,0)  dump=none swap=none
#从软盘上连接硬盘驱动,使用硬盘上的unix.install(有的机器连接硬盘驱动后内存出错,换用unix.install或unix.safe可能就能通过):
boot: hd(40)unix.install ramdisk=ramdisk.Z ram.preload=7 root=ram(7) link=fd(61)ips Sdsk=ips(0,0,0,0) Srom=wd(0,0,0,0)  dump=none swap=none
#应急光盘引导,使用光盘上的内核,连光盘引导区上的硬盘驱动ips进入正常root系统:
boot: unix.Z  root=hd(42) link=ips Sdsk=ips(0,0,0,0) Srom=wd(0,0,0,0)  dump=none swap=hd(41)

#################第十一步 直接使用硬盘boot区作为root启动应急系统:
如果愿意,也可以应急盘启动后将ramdisk中的内容复制到boot区,这样可以不用ramdisk,直接用boot区作为root来盘动应急盘:
uncompress -dc </stand/ramdisk >/tmp/ramdisk
marry -a /tmp/ramdisk
mount -r /dev/marry/tmp/ramdisk /mnt
umount /stand
mount /stand
cd /mnt
find . -mount -depth -print|cpio -puvdm /mnt/stand
重启动后
boot:unix root=hd(40) swap=hd(41)
可以在/stand/etc/default/boot中加入
boot40=unix root=hd(40) swap=hd(41)
以后boot下输入boot40就启动到应急系统了。

####################################################################
另:新增u盘制作应急盘:用u盘制作应急盘
试试吧,祝好运。

[ 本帖最后由 zhangshebao 于 2008-6-5 01:16 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-05-30 19:35 |只看该作者
好东西,坚决顶。

论坛徽章:
0
3 [报告]
发表于 2008-06-05 01:18 |只看该作者
谢版主鼓励.
新增u盘制作应急盘:用u盘制作应急盘(http://bbs.chinaunix.net/viewthr ... &extra=page%3D1)

论坛徽章:
0
4 [报告]
发表于 2008-06-30 23:23 |只看该作者
非常不错了,谢谢分享。

论坛徽章:
0
5 [报告]
发表于 2008-07-16 09:30 |只看该作者

回复 #2 jxncxf 的帖子

#################第一步:虚拟2.88M软盘
cd /dev
mv fd0135ds36 fd0135ds36.std
mv rfd0135ds36 rfd0135ds36.std
>/tmp/fd288
marry -a /tmp/fd288
ls -l /dev/marry/tmp/fd288
brw-r--r--   1 root     sys       76,  1 Jul  6 22:51 /dev/marry/tmp/fd288
mknod fd0135ds36 b 76 1
mknod rfd0135ds36 c 76 1
#设备号与前面列出的相同

这部分是不是有点不对呀
mv rfd0135ds36 rfd0135ds36.std
>/tmp/fd288
marry -a /tmp/fd288
ls -l /dev/marry/tmp/fd288
这些是什么意思?

论坛徽章:
0
6 [报告]
发表于 2008-07-16 22:16 |只看该作者

回复 #5 w1w2 的帖子

mv rfd0135ds36 rfd0135ds36.std        #备份
>/tmp/fd288                                         #生成空文件
marry -a /tmp/fd288                             #用生成的空文件做一个虚拟设备
ls -l /dev/marry/tmp/fd288                    #看一下虚拟设备的设备号
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP