플로피 한 장으로 OpenBSD 설치하기
이 문서는 http://www.openbsd.org/faq의 설치부분 문서를 일부
수정한 것이다.
먼저 ftp.openbsd.org/pub/OpenBSD/3.0/i386에서 floppy30.fs를 받아온다.
이상없는 플로피 디스켓을 한 장 준비한다. 혹시 의심스럽다면 플로피에 이상이 없는지는 포맷을 해본다.
# fdformat /dev/fd0a |
유닉스계열의 OS를 사용하고 있다면 다음의 명령으로 이미지를 플로피에 복사 할 수 있다.
# dd if=floppy30.fs of=/dev/rfd0c bs=126b |
만약을 위해서 이미지가 제데로 복사되었는지 확인해 보는 것도 좋을 것이다.
# cmp /dev/rfd0c floppy30.fs |
자신의 시스템이 Windows 9x 계열이면 아래의 방법으로 하도록 한다. (아래의 유틸리티들은 ftp.openbsd.org/pub/OpenBSD/3.0/tools에서 받아오면 된다.)
C:\> rawrite |
Windows NT계열에서는 rawrite를 사용할 수 없다. fdimage 이나 ntrw를 사용하도록 한다.
C:\> fdimage -q floppy30.fs a: |
혹은
C:\> ntrw floppy30.fs a: |
이제 준비가 다 되었으면 이제 플로피 디스크를 넣고 부팅을 하도록 한다.
설치를 하기 위해서 i를 선택하고 터미널 타입을 선택하도록 한다.
rootdev=0x1100
rrootdev=0x2f00 rawdev=0x2f02 |
OpenBSD를 설치할 하드디스크를 선택한다. 하드디스크는 순서대로
wd0, wd1, wd2.. 순서로 되어있다. fdisk로 파티션을 설정 할 것인지 물어본다.
초보자들은 다른 파티션 도구를 사용할 것을 권한다.(개인적으로는 FreeBSD에서 나누길
권한다. 깔끔한 부트메니저까지 자동으로 설치된다. 파티션 번호는 FreeBSD는 165번을
사용하고 OpenBSD는 166번이다.)
이미 파티션을 나눴다면 no를 선택하고 disklabel을 편집하도록 하자.
The installation
program needs to know which disk to consider the root disk. |
disklabel을 편집 한다. ?를 치면 도움말을 볼 수 있다.
라벨중에 c는 전체를 나타낸다, 건드리지 않는다.(건드릴 수도 없다.)
참고 : 본인 같은 경우 FAT32 파티션이 i로 나타났다. 윈도우를 날리고 싶지 않다면
이것도 건드리지 말도록한다.
라벨은 6개 까지 만들 수 있다. b는 디폴트로 swap 이다.
참고로 OpenBSD를 설치 했을 때의 최소용량은 다음과 같다.
/ = 35M, /usr = 229M, /var = 24M, /usr/X11 = 72M
각 사용자의 필요에 따라 /usr와 /var은 각자의 필요에 따라 용량을 설정하도록 한다.
(OpenBSD는 웹 디록토리와 익명 ftp가 /var 하에 위치한다.)
중요한 명령은 다음과 같다.
p : 현재의 설정을 보여준다.
a : 디스크 라벨을 추가한다.
d : 디스크 라벨을 삭제한다.
Inside the BIOS
'A6' ('OpenBSD') partition you just created, there resides an Available commands:
p [unit] - print label.
M - show entire OpenBSD man page for disklabel.
e - edit drive parameters.
a [part] - add new partition.
b - set OpenBSD disk boundaries.
c [part] - change partition size.
d [part] - delete partition.
g [d|b] - Use [d]isk or [b]ios geometry.
m [part] - modify existing partition.
n [part] - set the mount point for a partition.
r - recalculate free space.
u - undo last change.
s [path] - save label to file.
w - write label to disk.
q - quit and save changes.
x - exit without saving changes.
X - toggle expert mode.
? [cmnd] - this message or command specific help.
Numeric parameters may use suffixes to indicate units:
'b' for bytes, 'c' for cylinders, 'k' for kilobytes, 'm' for megabytes,
'g' for gigabytes or no suffix for sectors (usually 512 bytes).
Non-sector units will be rounded to the nearest cylinder.
Entering '?' at most prompts will give you
(simple) context sensitive help. 16 partitions: # size offset fstype [fsize bsize cpg] a: 164241 63 4.2BSD 1024 8192 16 # / b: 614880 164304 swap c: 80041248 0 unused 0 0 d: 164304 779184 4.2BSD 1024 8192 16 # /tmp e: 164304 943488 4.2BSD 1024 8192 16 # /var g: 716688 1107792 4.2BSD 1024 8192 16 # /usr h: 78216768 1824480 4.2BSD 1024 8192 16 # /home > w |
각 라벨의 마운트 포인트를 확인하고 디스크를 포맷하도록 한다.
You will now have the opportunity to enter filesystem information for wd0.
You will be prompted for the mount point (full path, including the prepending
'/' character) for each BSD partition on wd0. Enter "none" to skip a
partition or "done" when you are finished.
The following partitions will be used for the root filesystem and swap:
wd0a /
wd0b swap
Mount point for wd0d (size=82152k) [/tmp, RET, none, or done]? <Enter>
Mount point for wd0e (size=82152k) [/var, RET, none, or done]? <Enter>
Mount point for wd0g (size=358344k) [/usr, RET, none, or done]? <Enter>
Mount point for wd0h (size=39108384k) [/home, RET, none, or done]? <Enter>
Mount point for wd0d (size=82002k) [/tmp, RET, none, or done]? done <Enter>
Now you can select another disk to initialize. (Do not re-select a disk
you have already entered information for). Available disks are:
wd0
Which one? [done] <Enter>
You have configured the following devices and mount points:
wd0a /
wd0d /tmp
wd0e /var
wd0g /usr
wd0h /home
============================================================
The next step will overwrite any existing data on:
wd0a wd0d wd0e wd0g wd0h
Are you really sure that you're ready to proceed? [n] y
Creating filesystems...
Warning: 64 sector(s) in last cylinder unallocated
/dev/rwd0a: 164240 sectors in 163 cylinders of 16 tracks, 63 sectors
80.2MB in 11 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0d: 164304 sectors in 163 cylinders of 16 tracks, 63 sectors
80.2MB in 11 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0e: 164304 sectors in 163 cylinders of 16 tracks, 63 sectors
80.2MB in 11 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0g: 716688 sectors in 711 cylinders of 16 tracks, 63 sectors
349.9MB in 45 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0h: 78216768 sectors in 77596 cylinders of 16 tracks, 63 sectors
38191.8MB in 4850 cyl groups (16 c/g, 7.88MB/g, 1920 i/g) |
네트워크를 설정하도록 한다. 먼저 호스트의 이름과 도메인 이름을
입력한다.
다음 랜카드를 선택하고 아이피를 설정하도록 한다. dhcp 라면 아이피 입력부분에
그냥 엔터를 치거나 dhcp를 입력한다.
You will now be given the opportunity to configure the network. This will be
useful if you need to transfer the installation sets via FTP, HTTP, or NFS.
Even if you choose not to transfer installation sets that way, this information
will be preserved and copied into the new root filesystem.
Configure the network [y] <Enter>
Enter system hostname (short form): [] vaio
Enter DNS domain name: [] zedi.net
If you have any devices being configured by a DHCP server
it is recommended that you do not enter a default route or
any name servers.
You may configure the following network interfaces (the interfaces
marked with [X] have been successfully configured):
[ ] fxp0
Configure which interface? (or, enter 'done') [fxp0] <Enter>
IP address (or 'dhcp') ? [] 192.168.1.2
Symbolic (host) name? [test2] <Enter>
Netmask ? [255.255.255.0] <Enter>
Your use of the network interface may require non-default
media directives. The default media is:
media: Ethernet autoselect (100baseTX full-duplex)
This is a list of supported media:
media autoselect
media 100baseTX mediaopt full-duplex
media 100baseTX
media 10baseT mediaopt full-duplex
media 10baseT
If the default is not satisfactory, and you wish to use another
media, copy that line from above (e.g. "media 100baseTX")
Media directives? [] <Enter>
You may configure the following network interfaces (the interfaces
marked with [X] have been successfully configured):
[X] fxp0
Configure which interface? (or, enter 'done') [done] <Enter> |
라우터와 네임서버를 선택한다.
Enter IP address of default route: [none] 192.168.1.1 Enter IP address of primary nameserver: [none] 218.146.244.47 Would you like to use the nameserver now? [y] <Enter> |
이때까지의 설정을 취소하고 다시 하고싶다면 쉘로 나간다음 install을
입력하면 된다.
다름 root 패스워드를 입력하고, X-Window를 설치 할 것인지 선택한다.
당연히 ftp로 설치한다.
You will now be given the opportunity to escape to the command shell to do any additional network configuration you may need. This may include adding additional routes, if needed. In addition, you might take this opportunity to redo the default route in the event that it failed above. Escape to shell? [n] <Enter> /dev/wd0a on /mnt type ffs (rw, asynchronous, local) /dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local) /dev/wd0e on /mnt/var type ffs (rw, asynchronous, local) /dev/wd0g on /mnt/usr type ffs (rw, asynchronous, local) /dev/wd0h on /mnt/home type ffs (rw, asynchronous, local) Please enter the initial password that the root account will have. Password (will not echo): <Your Password Here!> Password (again): <Your Password Here!> Do you expect to run the X Window System? [y] <Enter> It is now time to extract the installation sets onto the hard disk. Make sure the sets are either on a local device (i.e. tape, CD-ROM) or on a network server. You will have the chance to repeat this step or to extract sets from several places, so you don't have to try to load all the sets in one try and can recover from some errors. Install from (f)tp, (h)ttp, (t)ape, (C)D-ROM, (N)FS or local (d)isk? f |
OpenBSD를 받아올 ftp 서버를 설정한다. 호스트이름, 아이피, 리스트의 번호 중 하나를 입력하면 된다. 여기서는 개인적으로 즐겨사용하는 일본을 선택했다.
This is an automated ftp-based installation process. You will be asked
questions and then the files will be retrieved iteratively via ftp.
HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or "none') [none] <Enter>
By default, ftp will attempt a passive connection and fall back to normal
(active) connection if that does not work. However, there are some very
old ftp servers that claim to support passive mode, but really do not.
In this case, you should to explicitly request an active session.
Do you want to use active ftp? [n] <Enter>
Do you want a list of potential ftp servers? [y] <Enter>
1 ftp://ftp.openbsd.org/pub/OpenBSD Alberta, Canada
2 ftp://.....................................................
3 ftp://.....................................................
..............................................................
: <Space bar>
..............................................................
..............................................................
..............................................................
Server IP address, hostname, or list#?[]34
Using ftp://ftp.jp.openbsd.org/pub/OpenBSD Tokyo, Japan
Server IP address, hostname, or list#?[ftp.jp.openbsd.org] <Enter>
Server directory? [pub/OpenBSD/3.0/i386] <Enter>
Login? [anonymous] <Enter>
|
설치할 패키지를 선택한다. 앞부분에 +, -를 붙여서 설치할 패키지를
선택한다.(예 : +comp30.tgz)
모두 선택한다면 all, 혹은 *을 입력하면 된다. 선택이 끝났으면 done을 입력하도록
한다.
패키지들의 내용은 다음과 같다.
base30.tgz - 기본 시스템
etc30.tgz - 시스템 설정들
comp30.tz - 컴파일러와 툴 등
man30.tgz - 메뉴얼 페이지
misc30.tgz - 기타
game30.tgz - 게임
xbase30.tgz - X 기본 시스템
xfont30.tgz - X 폰트서버 및 폰트
xserv30.tgz - X 서버.
xshare30.tgz - X 문서, X 설정등
bsd - OpenBSD 커널
The following sets are available for extraction.
Enter filename, `list', `all', or `done'.
You may de-select a set by prepending a '-' to its name.
[X] base30.tgz
[X] etc30.tgz
[ ] misc30.tgz
[ ] comp30.tgz
[X] man30.tgz
[ ] game30.tgz
[ ] xbase30.tgz
[ ] xshare30.tgz
[ ] xfont30.tgz
[ ] xserv30.tgz
[X] bsd
File name? [] *
The following sets are available for extraction.
Enter filename, `list', `all', or `done'.
You may de-select a set by prepending a '-' to its name.
[X] base30.tgz
[X] etc30.tgz
[X] misc30.tgz
[X] comp30.tgz
[X] man30.tgz
[X] game30.tgz
[X] xbase30.tgz
[X] xshare30.tgz
[X] xfont30.tgz
[X] xserv30.tgz
[X] bsd
File name? [] -game*
The following sets are available for extraction.
Enter filename, `list', `all', or `done'.
You may de-select a set by prepending a '-' to its name.
[X] base30.tgz
[X] etc30.tgz
[X] misc30.tgz
[X] comp30.tgz
[X] man30.tgz
[ ] game30.tgz
[X] xbase30.tgz
[X] xshare30.tgz
[X] xfont30.tgz
[X] xserv30.tgz
[X] bsd
File name? [] done |
패키지 선택이 끝나면 설치를 시작한다.
Fetching files via ftp may take a long time, especially over a slow network connection. Ready to install sets? [y] <Enter> Getting base30.tgz: 100% |**************************************************| 21192 KB 02:27 ETA Getting etc30.tgz: 100% |**************************************************| 987 KB 00:38 ETA Getting man30.tgz: 100% |**************************************************| 4957 KB 01:14 ETA Getting bsd: 100% |**************************************************| 3053 KB 00:42 ETA ............................................................................... ............................................................................... ............................................................................... Extract more sets? [n] <Enter> |
시간대를 설정하고 장치파일을 생성한다. 단독머신이 아닌 윈도우 머신과 같이 쓰는 시스템이라면 시간대를 [GMT]로 하도록 한다. OpenBSD 전용 시스템이라면 시간대를 Asia/Seoul로 설정한다. 장치파일을 만드는 것으로 설치는 끝이다. 재부팅 하도록 하자..
Copying fstab, hostname.fxp0, hosts, myname, mygate, resolv.conf, ...done.
Select a time zone for your location. Timezones are represented on the system
by a directory structure rooted in "/usr/share/timezone". Most timezones can
be selected by entering a token like "MET" or "GMT-6". Other zones are
grouped by continent or country, with detailed zone information separated by
a slash ("/"), e.g. "US/Pacific" or "Canada/Mountain".
To get a listing of what's available in /usr/share/zoneinfo, enter "?"
at the prompts below.
What timezone are you in? [`?' for list] [GMT] Asia/Seoul
You have selected timezone "Asia/Seoul".
Installing timezone link.
Making all device nodes (by running /dev/MAKEDEV all) ...... done.
Installing boot block...
boot: /mnt/boot
proto: /usr/mdec/biosboot
device: /dev/rwd0c
/usr/mdec/biosboot: entry point 0
proto bootblock size 512
room for 12 filesystem blocks at 0x16f
Will load 7 blocks of size 8192 each.
Using disk geometry of 63 sectors and 255 heads.
0: 20 @(0 108 44) (6847-6866)
1: 63 @(0 109 1) (6867-6929)
2: 13 @(0 110 1) (6930-6942)
3: 5 @(0 9 59) (625-629)
4: 11 @(0 10 1) (630-640)
/mnt/boot: 5 entries total
using MBR partition 3: type 166 (0xa6) offset 63 (0x3f)
Enabling machdep.allowaperture. Read xf86(4) for more information.
Unmounting filesystems... /mnt/home /mnt/usr /mnt/var /mnt/tmp /mnt ... Done.
Done.
CONGRATULATIONS! You have successfully installed OpenBSD! To boot the
installed system, enter halt at the command prompt. Once the system has
halted, reset the machine and boot from the disk.
# reboot |
마치며:
현재 ftp로 설치가 가능한 경우는 고정아이피 아니면 dhcp로 인터넷에 연결된 경우만 가능하다. 따라서 설치에 제약이 있는건 사실이나 만약 두 대의 컴퓨터를 가지고 있다면 쉽게 설치가 가능할 것이다. 설치만 되면 한국통신의 PPPoE도 쉽게 사용이 가능하다. 다른건 사용을 안해봐서 모르겠다.