301
edits
(5 intermediate revisions by the same user not shown) | |||
Line 71: | Line 71: | ||
https://www.freebsd.org/doc/handbook/adding-swap-space.html | https://www.freebsd.org/doc/handbook/adding-swap-space.html | ||
==== Shell | ==== Shell 파티셔닝과 geli 암호화 ==== | ||
[[셸]]([[shell]], [[쉘]])은 [[GUI]]가 아닌 [[CLI]] 환경에서 사용하는 [[터미널]]([[terminal]])같은 걸 말한다. | |||
[[프리BSD]]([[FreeBSD]])에서는 [[전체 디스크 암호화]]([[full disk encryption]])를 [[겔리]]([[geli]], [[젤리]])로 한다. geli는 [[FreeBSD]]의 [[GEOM]] 위에서 작동하기 때문에 [[오픈BSD]]([[OpenBSD]])나 [[넽BSD]]([[NetBSD]])에서는 쓸 수 없다. | |||
[[리넠스]]([[Linux]])에서는 [[렄스]]([[LUKS]], [[Linux Unified Key Setup]])를 쓴다. 리넠스 [[커널]]([[kernel]])에서 지원하는 암호화가 [[dm-crypt]]이며, 그 [[front-end]]가 [[cryptsetup]]이고, cryptsetup에 [[쏠트]]([[salt]])를 넣는 등 개선한 것이 [[LUKS]]이다. | |||
Use this shell to set up partitions for the new system. When finished, mount the system at /mnt and place an fstab file for the new system at /tmp/bsdinstall_etc/fstab. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'. | Use this shell to set up partitions for the new system. When finished, mount the system at /mnt and place an fstab file for the new system at /tmp/bsdinstall_etc/fstab. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'. | ||
Line 82: | Line 92: | ||
[[터미널]]에서 gpart show로 디스크와 파티션 목록을 확인한다. ada0은 [[SSD]]나 [[HDD]]이고, da0은 설치용 USB 드라이브이다. | [[터미널]]에서 gpart show로 디스크와 파티션 목록을 확인한다. ada0은 [[SSD]]나 [[HDD]]이고, da0은 설치용 USB 드라이브이다. | ||
gpart destroy -F ada0 | |||
위 명령어는 ada0 HDD에 있던 GPT 파티션 테이블을 지우는 명령어인데 특별히 문제가 없다면 지울 필요는 없다. | |||
gpart create -s gpt ada0 | gpart create -s gpt ada0 | ||
위 명령어로 GPT partition table을 만든다. 다른 [[운영 체제]]를 설치해서 이미 GPT partition table이 생성된 상태라면 이 명령어는 생략해도 된다. | 위 명령어로 ada0 HDD에 GPT partition table을 만든다. 다른 [[운영 체제]]를 설치해서 이미 GPT partition table이 생성된 상태라면 이 명령어는 생략해도 된다. | ||
Line 94: | Line 109: | ||
gpart add -t efi -s 800k ada0 | gpart add -t efi -s 800k ada0 | ||
800 kB 크기의 [[EFI]] 파티션은 ada0 디스크에 만든다. | 800 kB 크기의 [[EFI]] 파티션은 ada0 디스크에 만든다. [[트루OS]]의 경우 800k 대신 200m을 써서 200 MB 크기로 만든다. | ||
Line 104: | Line 119: | ||
gpart add -t freebsd-ufs -s 1g -l boot0 ada0 | gpart add -t freebsd-ufs -s 1g -l boot0 ada0 | ||
1 GB 크기의 파티션을 만든다. 이름표(label)를 boot0 이라고 붙인다. | 1 GB 크기의 파티션을 만든다. 이름표(label)를 boot0 이라고 붙인다. [[트루OS]]는 [[ZFS]]만 지원하여 [[UFS]]를 사용하면 설치시 [[오류]]가 나니, freebsd-ufs 대신에 freebsd-zfs라고 적어준다. | ||
gpart add -t freebsd-ufs -l root0 ada0 | gpart add -t freebsd-ufs -l root0 ada0 | ||
나머지 공간 전체를 파티션으로 만들고, root0 이라는 이름을 붙인다. /에 배정할 공간은 15 GB 이상이면 된다. | 나머지 공간 전체를 파티션으로 만들고, root0 이라는 이름을 붙인다. /에 배정할 공간은 15 GB 이상이면 된다. TrueOS의 경우 freebsd-zfs라고 적어준다. | ||
newfs -L bootfs0 /dev/gpt/boot0 | newfs -L bootfs0 /dev/gpt/boot0 | ||
[[고스트BSD]]의 경우 위 명령어를 입력하면 newfs: /dev/gpt/boot0: failed to open disk for writing이라는 [[오류]] 메시지가 뜬다. su 명령어로 root 계정으로 바꾼 후 하면 된다. | |||
geli init -b -B /var/tmp/system0 -e AES-XTS -l 256 -s 4096 /dev/gpt/root0 | geli init -b -B /var/tmp/system0 -e AES-XTS -l 256 -s 4096 /dev/gpt/root0 | ||
Line 126: | Line 144: | ||
newfs -U -L rootfs0 /dev/gpt/root0.eli | newfs -U -L rootfs0 /dev/gpt/root0.eli | ||
[[고스트BSD]]의 경우 위 [[명령어]]를 입력하면 newfs: /dev/gpt/root0.eli: could not find special device라는 [[에러]] 메시지가 뜬다. 이건 root 권한으로 해도 마찬가지 오류가 뜬다. | |||
mount /dev/gpt/root0.eli /mnt | mount /dev/gpt/root0.eli /mnt | ||
[[GhostBSD]]에서 위 명령어를 입력하면 mount /dev/gpt/root0.eli: No such file or directory라는 [[오류]] 메시지가 뜬다. root 권한으로 해도 마찬가지다. | |||
mkdir -p /mnt/bootfs | mkdir -p /mnt/bootfs | ||
Line 159: | Line 181: | ||
echo 'vfs.root.mountfrom="ufs:ada0p11.eli"' >> /boot/loader.conf | echo 'vfs.root.mountfrom="ufs:ada0p11.eli"' >> /boot/loader.conf | ||
트루OS의 경우, 위 내용 중 ufs:ada0p11을 zfs:ada0p11로 바꿔준다. p11의 숫자는 해당하는 파티션 번호를 적어준다. 그런데 사실 TrueOS에서는 오류가 나서 이 과정이 되지 않았다. | |||
Line 199: | Line 224: | ||
EFI 파티션은 800 kB면 충분하다.<ref>https://wiki.freebsd.org/UEFI</ref> | |||
FreeBSD에서 [[EFI]] 파티션은 800 kB면 충분하다.<ref>https://wiki.freebsd.org/UEFI</ref> 다른 운영 체제에서의 EFI 파티션 크기는 아래 링크를 참조하기 바란다. | |||
* EFI partition size | |||
2016-03-03 | |||
https://www.reddit.com/r/archlinux/comments/48qtmj/ | |||
edits