In fact, it is easy to format a disk to yours. U should better let your disk to be linux's fs. Windows is lots of dust. U can do like following.
jiawei@jiawei-desktop:~$ sudo fdisk -l
[sudo] password for jiawei:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf0b1ebb0
Device Boot Start End Blocks Id System
/dev/sda1 * 1 4863 39062016 83 Linux
/dev/sda2 4864 19457 117226305 5 Extended
/dev/sda5 4864 5106 1951866 82 Linux swap / Solaris
/dev/sda6 5107 11185 48829536 83 Linux
/dev/sda7 14833 19457 37150281 83 Linux
/dev/sda8 11186 14832 29294496 83 Linux
Partition table entries are not in disk order
Disk /dev/sdc: 1983 MB, 1983341056 bytes
62 heads, 62 sectors/track, 1007 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
jiawei@jiawei-desktop:~$ mkfs /dev/sdc -l
mkfs.ext2:选项需要一个参数 -- l
Usage: mkfs.ext2 [-c|-l filename] [-b block-size] [-f fragment-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G meta group size] [-N number-of-inodes]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-T fs-type] [-U UUID] [-jnqvFSV] device [blocks-count]
jiawei@jiawei-desktop:~$ mkfs.vfat /dev/sdc -l
mkfs.vfat 3.0.1 (23 Nov 2008)
mkfs.vfat: option requires an argument -- 'l'
Unknown option: ?
Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]
[-m boot-msg-file] [-n volume-name] [-i volume-id]
[-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]
[-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]
/dev/name [blocks]
jiawei@jiawei-desktop:~$ mkfs /dev/sdc
mke2fs 1.41.4 (27-Jan-2009)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
/dev/sdc is mounted; will not make a filesystem here!
jiawei@jiawei-desktop:~$ sudo su
root@jiawei-desktop:/home/jiawei# cd
root@jiawei-desktop:~# clear
root@jiawei-desktop:~# ls
Desktop eioXpacklog.txt
root@jiawei-desktop:~# umount /dev/sdc
root@jiawei-desktop:~# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda1 38448276 6595148 29900028 19% /
tmpfs 497164 0 497164 0% /lib/init/rw
varrun 497164 132 497032 1% /var/run
varlock 497164 0 497164 0% /var/lock
udev 497164 156 497008 1% /dev
tmpfs 497164 760 496404 1% /dev/shm
lrm 497164 2192 494972 1% /lib/modules/2.6.28-19-generic/volatile
/dev/sda6 48062440 44263784 1357180 98% /home
/dev/sda7 36567320 17679320 17030488 51% /home/disk_1
/dev/sda8 28834716 18267332 9102660 67% /home/disk_2
root@jiawei-desktop:~# mkfs.ext3 /dev/sdc
mke2fs 1.41.4 (27-Jan-2009)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
121200 inodes, 484214 blocks
24210 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=499122176
15 block groups
32768 blocks per group, 32768 fragments per group
8080 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@jiawei-desktop:~# fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf0b1ebb0
Device Boot Start End Blocks Id System
/dev/sda1 * 1 4863 39062016 83 Linux
/dev/sda2 4864 19457 117226305 5 Extended
/dev/sda5 4864 5106 1951866 82 Linux swap / Solaris
/dev/sda6 5107 11185 48829536 83 Linux
/dev/sda7 14833 19457 37150281 83 Linux
/dev/sda8 11186 14832 29294496 83 Linux
Partition table entries are not in disk order
Disk /dev/sdc: 1983 MB, 1983341056 bytes
62 heads, 62 sectors/track, 1007 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes
Disk identifier: 0x00000000
Disk /dev/sdc doesn't contain a valid partition table
Then take your disk off then put it on and do,
jiawei@jiawei-desktop:/media$ sudo chmod 777 disk/
Okay, congratulations! Your disk will be well forever.
I will translate mkfs and mkfs.fsname's man manual. If u like, u can hack with me. Give me a mail. :)
阅读(588) | 评论(1) | 转发(0) |