Chinaunix

标题: 烧制2.88MB的应急引导盘 [打印本页]

作者: janlen    时间: 2006-01-21 14:32
标题: 烧制2.88MB的应急引导盘
  大家都知道SCO OSR55.0.x创建应急引导盘时可以做 boot+root的盘,但是只能用2.88MB的软盘(/dev/fd0135ds36),所以一直没有尝试过。 昨日无事,忽忆起此事,随试之:
  1、在/tmp/boot/目录下做一空文件,boot288.img(名字任意,boot目录自建)
  2、用marry伪装成设备:
  a) # cd /dev
  b) # mv fd0135ds36 /tmp
  c) # mv rfd0135ds36 /tmp
  d) # marry -a /tmp/boot/boot288.img
  e) # ln /dev/marry/tmp/boot/boot288.img /dev/fd0135ds36
  f) # mknod rfd0135ds36 c 76 1(76和1是根据此时的fd0135ds36来的,该操作是为了和当前的 /dev/fd0135ds36配对)
  3、运行mkdev fd创建应急引导盘。
  自然是选boot+root 和 2.88MB大小的设备了 :)
  4、将伪装的设备拆下来
  a) # marry -d /tmp/boot/boot288.img
  b) # mv ......将 mv 到tmp下的两个设备移回来
  5、生成可引导的镜像文件
  a) # cd /tmp/boot
  b) # vi p.sh ##(创建一SHELL 将生成的img文件[ 2683904 Bytes]不足的字节补齐 [ 2949120 Bytes ] )
  ######
  >ext
  A=1
  while [ "$A" -le 265216 ]
  do
  echo -n "\000" >>ext
  A=`expr $A + 1`
  done
  cat boot288.img ext >boot288a.img
  ######
  c) # mkisofs -b boot288a.img -J -o /tmp/boot288.iso -r -V "SCO_2.88MBGeneric" /tmp/boot
  6、将/tmp/boot288.iso传到WIN系统刻成光盘就OK了。
-----------------------------------@_@----------------------------------
注:你可以在/tmp/boot下加许多东东,要不然刻成的光盘就太浪费了,只有两MB哈。
  问题:用这张光盘引导完系统后,光盘没办法挂上使用,可惜哈。
  赠送:可以加 网络功能 和 vi 在镜像上,方法如下:
  Do you want a shell escape to place extra files on the root filesystem?(y/n)回答y,你将会看到如下信息:
  You can copy files into/mnt to customize your root filesystem floppy?
  After you finish,type “exit 0”to continue?
  You have n free blocks(512 bytes each)available on the floppy?
  此时,命令提示符是<bootroot>;
  在<bootroot>提示符下用下列命令复制网络服务文件和vi的支持功能:
  cp/etc/services /mnt/etc/services
  cp/etc/tcp /mnt/etc/tcp
  cp/etc/slink /mnt/etc/slink
  cp/etc/ifconfig /mnt/etc/ifconfig
  cp/etc/inconfig /mnt/etc/inconfig
  cp/bin/who /mnt/bin/who
  cp/bin/ps /mnt/bin/ps
  cp/usr/bin/telnet /mnt/usr/bin/telnet
  cp/usr/bin/rlogin /mnt/usr/bin/rlogin
  cp/usr/bin/ftp /mnt/usr/bin/ftp
  cp/usr/bin/vi /mnt/usr/bin
  mkdir -p /mnt/usr/lib/terminfo/a
  cd /usr/lib/terminfo/a
  cp ansi /mnt/usr/lib/terminfo/a
  exit 0


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/13151/showart_69582.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2