Linux (X86) 자료실 - 포기하지 않으면 실패하지 않는다!
Vote Modify Delete Forward Next List

  작성자   : 조성환 [ ladmin ] 추천: 416, 수정: 1, 조회: 1955, 줄수: 70, 분류: Etc.
디스크 파티션 생성, 포맷, 마운트하는 방법 소개 [강추]

fdisk, mkfs.ext3 및 mount 명령을 사용하여 디스크 파티션을 만들고, 포맷하고 마운트하는 방법을 소개합니다.


[root@Synology-FedoraVM /]# fdisk -l


Disk /dev/sdb: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

[root@Synology-FedoraVM /]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x6eae1b66.
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)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19581, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-19581, default 19581):
Using default value 19581

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


[root@Synology-FedoraVM /]# mkfs.ext3 /dev/sdb1
mke2fs 1.41.10 (10-Feb-2009)
Filesystem label=
OS type: Linux
...
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


[root@Synology-FedoraVM /]# mount /dev/sdb1 /mnt
[root@Synology-FedoraVM /]# cd /mnt
[root@Synology-FedoraVM mnt]# ls -l
total 16
drwx------. 2 root root 16384 Oct 29 12:16 lost+found


다음: centos 6.5 usb로 설치시 repository 오류날때 처리 방법 2015/05/13(15:17) from 203.234.123.96
CrazyWWWBoard 2000

Vote Modify Delete Forward Next List
(c) Nobreak Technologies, Inc.