i need help formatting a drive
Hey guys, i'm pretty new to linux (about 1 yr into using it off an on) and I can't find my partitions
or my other hard drive. I need to format the other drive and I'm not sure how even once i find it. Can anyone help?? Thanks |
fdisk -l /dev/hdx
Will display partitions on a drive. Check 'man fdisk' Exact formatting command depends on the fileststem you wish to use. For instance, for Reiser filesystem: mkreiserfs /dev/hdxx Check 'man mkreiserfs' Help any? |
You can find all the drives and partitions by the command under superuser mode:
fdisk -l To format the partitions as ext3, type: mke2fs -j /dev/hdxn Where x=a for primary master, b for primary slave, c for secondary master, d for secondary slave. Also n is the parition number starting from 1. For example, mke2fs -j /dev/hdc1 formats the first partition in secondary master hard disk. Be careful with this. It will erase all data! |
First go in the superuser mode. type the following on the shell prompt:-
su then provide the superuser password. You can then format the partitions by a general command. mkfs eg:- mkfs -t ext2 /dev/hda3 mkfs can create file systems of various types like vfat,ext2,ext3 etc. see man mkfs for details. Dear partner note that fdisk command is used to create partitions and after creating them you have to create filesystem(format it) for that you need mkfs. Note that playing with partitions is dangerous. |
All times are GMT -5. The time now is 03:55 PM. |