LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3508|回复: 8

OpenBSD安装(三)

[复制链接]
发表于 2003-9-26 10:54:13 | 显示全部楼层 |阅读模式
OpenBSD安装(三)

前两篇我们安装了基本的系统,但只有最基本的东西, 像内核源代码, ports tree都没安装!

在安装时我们安装了X, 现在我们配置X-windows, 运行xf86cfg设置!OpenBSD的默认桌面是fvwm.

现在我们给系统添加新用户adduser, 在第一次使用时会有一些基本的设置, 如密码使用什么加密, 有好几种, 我选择了最常用的md5,

首先, 我们开始安装内核源代码, 为以后编译内核作准备!
如果你有CD,则只需要从CD中取出src.tar.gz,cd /usr/src  然后tar xvzf src.tar.gz, 上篇, 我们是从FTP安装的, 因此, 我们要下载两个包:src.tar.gz, sys.tar.gz.
ftp://ftp.ca.openbsd.org/pub/OpenBSD/3.3/i386/src.tar.gz ftp://ftp.ca.openbsd.org/pub/OpenBSD/3.3/i386/sys.tar.gz

安装ports tree, 下载ports.tar.gz, 然后copy /usr/ , tar xzvf ports.tar.gz .
ftp://ftp.ca.openbsd.org/pub/OpenBSD/3.3/i386/ports.tar.gz

安装cvsup,
下载cvsup-16.1f.tar.gz, 如果没安装X则下载 cvsup-16.1f-no_X.tar.gz
ftp://ftp.ca.openbsd.org/pub/Ope ... cvsup-16.1f..tar.gz
pkg_add cvsup-16.1f.tar.gz

编辑cvsup-supfile, OpenBSD里的编辑器是mg, 类似于emacs。
#Defaults that apply to all the collections
*default release=cvs
*default delete use-rel-suffix
*default umask=002
*default host=cvsup.uk.openbsd.org
*default base=/cvsup
*default prefix=/cvsup

#If your network link is T1 or faster, comment out the following line.
*default compress

OpenBSD-all
#OpenBSD-src
#OpenBSD-www
#OpenBSD-ports
#OpenBSD-x11
#OpenBSD-xf4

保存,

# mg cvsup-supfile
# cd /
# mkdir cvsup
# cd
# cvusp –g –L 2 cvsup-supfile 就可升级ports tree等了!
安装软件同FreeBSD下一样, 以后再说说编译内核吧!
基本的操作同FreeBSD一样!有什么问题可参考FreeBSD的使用!不过在OpenBSD一般推荐不使用root登陆, 使用普通用户登陆, 有什么操作可以sudo操作!FreeBSD默认是没安装的, 你可使用whereis sudo查看!

主要cvsup站点:
cvsup.uk.openbsd.org]
cvsup.de.openbsd.org
cvsup2.de.openbsd.org
cvsup.hu.openbsd.org
cvsup.fr.openbsd.org
cvsup.ca.openbsd.org
cvsup.usa.openbsd.org
cvsup.kr.openbsd.org
cvsup.no.openbsd.org
cvsup.pt.openbsd.org
anoncvs.de.openbsd.org
rt.fm
skeleton.phys.spbu.ru
cvsup.jp.OpenBSD.org
mirror.osn.de
openbsd.informatik.uni-erlangen.de

        OpenBSD-src        - The src repository
        OpenBSD-ports        - The ports repository
        OpenBSD-www        - The www repository
        OpenBSD-x11        - The XFree86-3 repository
        OpenBSD-xf4        - The XFree86-4 repository
        OpenBSD-all        - All OpenBSD repositories
发表于 2003-9-26 11:40:14 | 显示全部楼层
建议版主把这三篇OpenBSD的安装教程加入置顶的问题索引中。
发表于 2003-9-26 12:40:16 | 显示全部楼层
强烈建议在置顶的贴子中加入openbsd专版,嘿嘿~~~~~~~~~~

老兄动作好快,一天出一篇,牛啊,呵呵~~~~~~~
发表于 2003-9-26 12:42:37 | 显示全部楼层
还有编译内核, 以后再说吧!它同FreeBSD有点区别!
发表于 2003-9-26 12:50:35 | 显示全部楼层
好的!多谢你们的建议,我已经加了,到现在才加是因为,我没条件测试,所以我不知道,rainren兄的文章是否存在问题,抱歉!既然大家测试过了,我就加了;)
发表于 2003-9-26 12:50:48 | 显示全部楼层
只要把系统装上什么都好办了,就是装上还有点困难,特别是分区,要装在主分区好麻烦哦,万一不行就把winme给format了,嘿嘿~~~~~~~~
发表于 2003-9-26 13:05:05 | 显示全部楼层
在安装时, 如果硬盘大于8G, 一定要设置好BIOS, 盘上有多个分区, 则要设置好Master Boot Record! 查看分区, 选择一个你想去安装OpenBSD的分区, e * (*代表那个分区), fdisk分区:
fdisk: 1> e 1
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
   1: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
  Partition id ('0' to disable)  [0 - FF]: [0] (? for help) a6 (重点)
  Do you wish to edit in CHS mode? [n] y
  BIOS Starting cylinder [0 - 2585]: [0] 203
  BIOS Starting head [0 - 239]: [0] Enter
  BIOS Starting sector [1 - 63]: [0] 1
  BIOS Ending cylinder [0 - 2585]: [0] 2585
  BIOS Ending head [0 - 239]: [0] 239
  BIOS Ending sector [1 - 63]: [0] 63
  fdisk:*1> p
  Disk: wd0       geometry: 2586/240/63 [39100320 Sectors]
  Offset: 0       Signature: 0xAA55
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
  *0: 06    0   1  1 -  202 239 63 [          63:     3069297 ] DOS > 32MB
   1: A6  203   0  1 - 2585 239 63 [     3069360:    36030960 ] OpenBSD
   2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
   3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
  fdisk:*1> p m
  Disk: wd0       geometry: 2586/240/63 [19092 Megabytes]
  Offset: 0       Signature: 0xAA55
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
  *0: 06    0   1  1 -  202 239 63 [          63:        1499M] DOS > 32MB
   1: A6  203   0  1 - 2585 239 63 [     3069360:       17593M] OpenBSD
   2: 00    0   0  0 -    0   0  0 [           0:           0M] unused
   3: 00    0   0  0 -    0   0  0 [           0:           0M] unused
  
fdisk:*1> f 1
  Partition 1 marked active.
  fdisk:*1> p
  Disk: wd0       geometry: 2586/240/63 [39100320 Sectors]
  Offset: 0       Signature: 0xAA55
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
   0: 06    0   1  1 -  202 239 63 [          63:     3069297 ] DOS > 32MB
  *1: A6  203   0  1 - 2585 239 63 [     3069360:    36030960 ] OpenBSD
   2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
   3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
  fdisk:*1>
fdisk:*1> w
  Writing MBR at offset 0.
  wd0: no disk label
  fdisk: 1> q
然后创建disklabel:
  Here is the partition information you chose:
  
  Disk: wd0       geometry: 2586/240/63 [39100320 Sectors]
  Offset: 0       Signature: 0xAA55
           Starting       Ending       LBA Info:
   #: id    C   H  S -    C   H  S [       start:      size   ]
  ------------------------------------------------------------------------
  *0: 06    0   1  1 -  202 239 63 [          63:     3069297 ] DOS > 32MB
   1: A6  203   0  1 - 2585 239 63 [     3069360:    36030960 ] OpenBSD
   2: 00    0   0  0 -    0   0  0 [           0:           0 ] unused
   3: 00    0   0  0 -    0   0  0 [           0:           0 ] unused

  You will now create an OpenBSD disklabel inside the OpenBSD MBR
  partition. The disklabel defines how OpenBSD splits up the MBR partition
  into OpenBSD partitions in which filesystems and swap space are created.

  The offsets used in the disklabel are ABSOLUTE, i.e. relative to the
  start of the disk, NOT the start of the OpenBSD MBR partition.

  disklabel: no disk label
  WARNING: Disk wd0 has no label. You will be creating a new one.
  
  # using MBR partition 1: type A6 off 3069360 (0x2ed5b0) size 36030960 (0x225c9f0)

  Treating sectors 3069360-39100320 as the OpenBSD portion of the disk.
  You can use the 'b' command to change this.

  Initial label editor (enter '?' for help at any prompt)
  > ?

这是OpenBSD上的安装说明的一点介绍! 具体的去参考:
http://www.openbsd.org/faq/faq4.html
发表于 2004-7-1 14:12:15 | 显示全部楼层
请问可以详细点指考一下怎样在多分区下应该怎样安装,我的分区是这样的:
1、500M(主分区,/BOOT)
2、1G(罗辑分区,/)
3、2G(罗辑分区,SWAP)
3、3G(罗辑分区,/USR)
4、5G(罗辑分区,/USR/SAMBA)
5、10G(罗辑分区,/USR/WWW)
发表于 2004-7-1 14:14:43 | 显示全部楼层
fdisk: 1>
请说一下我进入到这个界面以后应该怎样做
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表