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

fdisk의 사용법

페이지 정보

작성자 MintState 댓글 0건 조회 16,386회 작성일 08-10-30 15:05

본문

fdisk의 사용법

fdisk의 사용에 관한 예제입니다.


1. fdisk 실행
# fdisk /dev/hda

----------------------------------------------------------------------
The number of cylinders for this disk is set to 2495.
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):
----------------------------------------------------------------------


2. 도움말 보기 : "m" 키
----------------------------------------------------------------------
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition"s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
----------------------------------------------------------------------


3. 파티션 정보보기 : "p" 키
----------------------------------------------------------------------
Command (m for help):
Command (m for help): p

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

Device Boot Start End Blocks Id System
/dev/hda1 * 1 504 4048348+ b Win95 FAT32
/dev/hda2 505 1779 10241437+ 83 Linux
/dev/hda3 1780 2495 5751270 83 Linux
----------------------------------------------------------------------


4. 파티션 삭제 : "d" 키
"d"키를 누르면 파티션 번호를 묻습니다. 삭제하고자 하는 파티션의 번호를 입력해 줍니다. 만약 잘못지웠다면, "q"키를 누르면 작업 정보를 저장하지 않고 빠져 나가게 되며 이전 파티션 정보는 그대로 보존됩니다.

파티션 작업 결과는 "w"키를 입력해야만 저장됩니다.
----------------------------------------------------------------------
Command (m for help):
Command (m for help): d
Partition number (1-4): 1

Command (m for help): p

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

Device Boot Start End Blocks Id System
/dev/hda2 505 1779 10241437+ 83 Linux
/dev/hda3 1780 2495 5751270 83 Linux

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


5. 파티션 생성 : "n" 키
"n"키를 누르면 생성될 파티션의 TYPE을 묻게 됩니다. 하나의 디스크에서 주 파티션은 4개까지만 생성이 가능합니다. 4개이상의 파티션을 만들려면 확장파티션을 사용해야하며 주 파티션 3개와 하나의 확장파티션을 만들어 필요한 나머지 파티션을 확장파티션안에 생성할 수 있습니다.

파티션 TYPE을 정하면 파티션 번호를 묻습니다. 만약 확장파티션안에서 추가 파티션을 만드는 것이라면, 파티션의 번호를 묻지 않습니다.

이후에 시작실린더,끝실린더등을 묻습니다. 용량단위의 설정이 가능합니다.

----------------------------------------------------------------------
Command (m for help): n
Command action
e extended
p primary partition (1-4)

p ---> 주 파티션을 생성함

Partition number (1-4): 1 ---> 파티션 번호 선택

First cylinder (1-2495, default 1): ---> 시작 실린더(Enter는 기본값사용)
Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-504, default 504): +20M ---> 끝 실린더( +20M 등의 SIZE 단위 지원가능함)


Command (m for help): p ---> 생성된 파티션 확인

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

Device Boot Start End Blocks Id System
/dev/hda1 1 3 24066 83 Linux
/dev/hda2 505 1779 10241437+ 83 Linux
/dev/hda3 1780 2495 5751270 83 Linux
----------------------------------------------------------------------


6. 파티션 작업 정보 저장 : "w" 키
"w"키를 누르면 현재 설정된 파티션 정보를 저장하고 fdisk를 빠져나가게 됩니다. 나간후에 쉘에서 mkfs명령을 이용하여 파일시스템을 생성합니다.

파일시스템을 생성한 후에야 mount 해서 사용할 수 있습니다.

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

댓글목록

등록된 댓글이 없습니다.

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