I.K.Picture & IT Info.

fdisk 파티션 관리 본문

Desktop and Mobile/Linux

fdisk 파티션 관리

helpful-intruder 2016. 7. 22. 19:21
반응형

오늘은

간단한 내용이지만 정리겸 작성해보려고 합니다.


리눅스에서 디스크를 관리하기 위해 사용하는 fdisk 기능 중 파티션 삭제하는 기능입니다.


기본적으로 sudo 또는 root 계정에서 작업을 하셔야되구요

작업하려는 디스크를 /dev/sdb 가정하겠습니다.


#fdisk /dev/sdb


 

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0x321f5ec6.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


The device presents a logical sector size that is smaller than

the physical sector size. Aligning to a physical sector (or optimal

I/O) size boundary is recommended, or performance may be impacted.


Command (m for help): 




위와 같이 비슷하게 나오게 됩니다. 여기서 m을 누르게 되면 제가 지금 삭제하려는 기능 외에도 많습니다. :)


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)



여기서 d 를 누르면 파티션이 삭제 됩니다.

만약 파티션이 여러개 일 경우엔 몇번 파티션을 지울 것인지 물어보게 됩니다.

(이 때 파티션 번호를 잘 모른다 싶으면 무조건 p를 눌러 파티션 번호를 먼저 확인하세요 !!)


파티션이 딸랑 하나다!?

싶으면 무조건 그 파티션 하나를 바로 지우게 됩니다. 

뭐 다행히 모두 작업을 한 후에 w를 눌러야 적용이 되면서 종료하기 때문에 

잘못해서 지웠다고 해도 ... 그냥 Ctrl+C로 나갔다가 들어오면 되요 ^^~


반응형
Comments