YesYo.com MintState Forums
뒤로    YesYo.com MintState BBS > Tech > Linux
검색
멤버이름    오토
비밀번호 
 

swap 파티션션 추가하기

페이지 정보

작성자 MintState 댓글 0건 조회 17,849회 작성일 08-10-30 15:06

본문

swap 파티션션 추가하기

스왑 파티션을 추가하려면, 우선 fdisk를 사용하여 스왑파티션으로 사용할
파티션을 생성해야 합니다.


1. fdisk로 파티션 생성("fdisk는 어떻게 사용합니까?" 참고)

아래는 fdisk를 실행하고 새로운 "Linux native" 파티션의 생성 과정을
나타낸 것입니다. 새로 생성된 파티션은 파티션 번호 8번을 갖게 됩니다.

----------------------------------------------------------------------
The number of cylinders for this disk is set to 1247.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 255 heads, 63 sectors, 1247 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 64 514048+ 83 Linux
/dev/hda2 65 1247 9502447+ 5 Extended
/dev/hda5 65 256 1542208+ 83 Linux
/dev/hda6 257 511 2048256 83 Linux
/dev/hda7 512 544 265041 82 Linux swap

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)

l ---> 확장 파티션안에 논리 파티션 생성

First cylinder (545-1247, default 545): ---> 시작 실린더(기본값 사용)
Using default value 545

Last cylinder or +size or +sizeM or +sizeK (545-1247, default 1247): +10M ---> 끝 실린더(사이즈 단위 사용)

Command (m for help):
----------------------------------------------------------------------


2. 파티션 TYPE 변경

변경된 파티션정보를 저장하고 종료하기전에 새로이 생성한 파티션의 TYPE을
"Linux Swap"으로 변경해 주어야 합니다.

파티션 TYPE의 변경은 "t"키를 사용합니다.
변경이 가능한 TYPE의 목록은 "l"키를 사용하여 확인할 수 있습니다.

----------------------------------------------------------------------
Command (m for help): p

Disk /dev/hda: 255 heads, 63 sectors, 1247 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 64 514048+ 83 Linux
/dev/hda2 65 1247 9502447+ 5 Extended
/dev/hda5 65 256 1542208+ 83 Linux
/dev/hda6 257 511 2048256 83 Linux
/dev/hda7 512 544 265041 82 Linux swap
/dev/hda8 545 546 16033+ 83 Linux

Command (m for help): l

-- 결과 생략("Linux swap" TYPE은 TYPE번호 82번입니다.) --

Command (m for help): t ---> 파티션 TYPE 변경

Partition number (1-8): 8 ---> 새로 만든 파티션 번호 입력

Hex code (type L to list codes): 82 ---> TYPE 번호 입력

Changed system type of partition 8 to 82 (Linux swap)

Command (m for help):

Command (m for help): w ---> 저장하고 종료
The partition table has been altered!

Calling ioctl() to re-read partition table.
Re-read table failed with error 16: 장치나 자원이 동작 중.
Reboot your system to ensure the partition table is updated.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
----------------------------------------------------------------------


3. Swap 파일 시스템 생성

# mkswap /dev/hda8
Setting up swapspace version 1, size = 271396864 bytes


4. Swap 파티션 활성화

# swapon /dev/hda8


5. 활성화된 Swap 파티션을 확인합니다

# cat /proc/swaps
Filename Type Size Used Priority
/dev/hda7 partition 265032 0 -1
/dev/hda8 partition 265032 0 -2

6. fstab 등록

새로운 스왑파티션을 등록해줍니다. 부팅시에 자동 활성화하기 위해서입니다.

/dev/hda7 swap swap defaults 0 0
/dev/hda8 swap swap defaults 0 0

댓글목록

등록된 댓글이 없습니다.

Total 360건 18 페이지
게시물 검색
모바일 버전으로 보기
CopyRight ©2004 - 2024, YesYo.com MintState. ™