发新话题
打印

不用软盘,在硬盘及光盘上制作、使用应急盘(应急光盘)

不用软盘,在硬盘及光盘上制作、使用应急盘(应急光盘)

作者:zhangshebao
今天看到有人要用 不用软盘制作、使用应急盘 制作的应急盘,不明怎么使用,我重新整理了一下并分了段,作了少量改进。

#################第一步:虚拟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**苯踊爻悼梢技毕低      
this message will self-destruct in 5 seconds......
我们的目标--------消灭蛀.....................零回复

TOP

发新话题