Chinaunix首页 | 论坛 | 博客
  • 博客访问: 789482
  • 博文数量: 130
  • 博客积分: 3477
  • 博客等级: 中校
  • 技术积分: 1339
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-30 21:53
文章分类

全部博文(130)

文章存档

2024年(1)

2023年(10)

2022年(4)

2021年(10)

2020年(9)

2018年(1)

2017年(1)

2014年(4)

2013年(3)

2012年(12)

2011年(24)

2010年(2)

2009年(8)

2008年(6)

2007年(34)

2006年(1)

分类:

2007-07-09 18:06:50

就目前而言,越来越多的系统不再使用软盘,而且软盘的保存时间不长,极其容易损坏。这里介绍一种新的方法,让你创建一个 2.88 MB 的应急启动软盘镜像,并刻录到光盘上去。这样,在你需要的时候,你可以使用这个带有启动信息的应急光盘来修复你的系统。
 
以下给出完整的方法。
 
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
        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
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=/tmp/temp.txt bs=10k count=8000>>temp.txt
rm temp.txt
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

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)
#下面说的是做启动光盘:
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 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
mount /dev/fd0135ds36 /mnt
cp /stand/ramdisk.Z /mnt
#最好将/stand/link拷过来
#根据空间情况,也可以将/stand下的几个unix选一个压缩后拷过来替换unix.Z: compress -Hc unix.Z
#下面几步不是必须的,仅当需要时做,将硬盘驱动拷上来,假设硬盘驱动镜像文件为/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= 。。。。。。。 link=ips Sdsk=ips(0,0,0,0) Srom=wd(0,0,0,0)
#下面这一步是为了将没用的空间,用空格填满,并将镜像文件增加到必要的长度
echo "                                                                                                                                             ">temp.txt
dd if=/tmp/temp.txt bs=10k count=8000>>temp.txt
rm temp.txt
cd /
umount /mnt
l /tmp/fd288
-rw-r--r--   1 root     sys      2949120 Jul  7 01:55 /tmp/fd288
#确认文件大小
#传到windows上来用nero刻光盘,选CDROM(引导)
指定2.88M的映像文件fd288
打开高级设置,虚拟2.88M软驱
ISO 9660 + Joliet
最多为31个字符(级别2)
多位
光盘上随你再添加别的文件。
注意mkdev fd期间不要按中断,否则不成功要重来。
##################################################################
如果愿意,也可以应急盘启动后将ramdisk中的内容复制到boot区,这样可能不用ramdisk,直接用boot区作为root来盘动应急盘:
应急盘启动后:
mount /dev/hd0root /mnt
mount /dev/boot /mnt/stand
find . -mount -depth -print|cpio -puvdm /mnt/stand
结合/mnt/etc/defaut/boot及/mnt/stand/default/boot修改这两个boot文件。
####################################################################
试试吧,祝好运。
 
 
原文作者:
原文链接:
阅读(1515) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~