OpenBSD 설치용 USB 디스크 만들기

1단계 : 파티셔닝 및 포맷

# fdisk -e /dev/rsd0c
fdisk: 1> reinit
In memory copy is initialized to:
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
*3: A6      0   1   2 -    976 254  63 [          64:    15695441 ] OpenBSD
Use 'write' to update disk.
fdisk: 1> flag 3
fdisk:*1> write
fdisk: 1> exit

# disklabel -E /dev/rsd0c
> a a
offset: [64]
size: [15695441]
FS type: [4.2BSD]
Rounding size to bsize (32 sectors): 15695424
> p
OpenBSD area: 64-15695505; size: 15695441; free: 17
#                size           offset  fstype [fsize bsize  cpg]
  a:         15695424               64  4.2BSD   2048 16384    1
  c:         15695871                0  unused
> w
> q

# newfs /dev/rsd0a
/dev/rsd0a: 7663.8MB in 15695424 sectors of 512 bytes
38 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
 32, 414688, 829344, 1244000, 1658656, 2073312, 2487968, 2902624, 3317280,
 3731936, 4146592, 4561248, 4975904, 5390560, 5805216, 6219872, 6634528,
 7049184, 7463840, 7878496, 8293152, 8707808, 9122464, 9537120, 9951776,
 10366432, 10781088, 11195744, 11610400, 12025056, 12439712, 12854368,
 13269024, 13683680, 14098336, 14512992, 14927648, 15342304,

2단계 : 부트이미지 기록

# mount /dev/sd0a /mnt
# cp /bsd.rd /boot /mnt
# mv /mnt/bsd.rd /mnt/bsd
# /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd0
boot: /mnt/boot proto: /usr/mdec/biosboot device: /dev/rsd0c
/mnt/boot is 1 blocks x 16384 bytes
fs block shift 2; part offset 64; inode block 3213608, offset 552
master boot record (MBR) at sector 0
        partition 3: type 0xA6 offset 64 size 15695441
/boot will be written at sector 64
# umount /mnt

3단계 : 설치파일 복사

# mkdir /isomnt
# vnconfig vnd0 /tmp/install52.iso
# mount -t cd9660 /dev/vnd0c /isomnt


# mount /dev/sd0a /mnt
# cp -R /isomnt/* /mnt/
# umount /mnt


# umount /isomnt
# vnconfig -u vnd0

위로 스크롤