Making a file system on a USB module

I am running open SuSE 11.0 nowadays.

I want to format a newly bought USB module and make ‘ext2’ file system.

The system recognized the USB module as ‘sdd1’.

First I used ‘fdisk’ command to format it.

I think it worked fine.

Because there were no error message.

ni@linux-j5q7:~> su root
linux-j5q7:/home/ni # fdisk -l /media/sdd1
linux-j5q7:/home/ni # mkfs -t ext2 /dev/sdd1
mke2fs 1.40.8 (13-Mar-2008)
/dev/sdd1 is mounted; will not make a filesystem here!
linux-j5q7:/home/ni #

I unmounted it.
linux-j5q7:/home/ni # umount /media/KINGSTON
linux-j5q7:/home/ni #

Afterwards, I used the command to create an ‘ext2’ file system.

linux-j5q7:/home/ni # mkfs -t ext2 /dev/sdd1
mke2fs 1.40.8 (13-Mar-2008)
Warning: 256-byte inodes not usable on older systems
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
123392 inodes, 493025 blocks
24651 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=507510784
16 block groups
32768 blocks per group, 32768 fragments per group
7712 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
linux-j5q7:/home/ni #

Have I successfully created an ‘ext2’ file system on the USB module?
Please tell me.**
Gins is online now
Tag This Post

Yes it seems to be alright even if fdisk does not format, instead it is used to partition hd! Anyway i suggest to perform a check on the newly created file system: fsck.ext2 /dev/sdd1

**Thanks for the reply.

Is it fine?

Please tell me.**

ni@linux-j5q7:~> su root
linux-j5q7:/home/ni # fsck.ext2 /dev/sdd1
e2fsck 1.40.8 (13-Mar-2008)
/dev/sdd1 is mounted.

WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? yes

/dev/sdd1 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdd1: 11/123392 files (9.1% non-contiguous), 8482/493025 blocks
linux-j5q7:/home/ni #

Do you really want to continue (y/n)?
I wrote ‘y’ for the above query.

Yes it is good even if i would repeat the check with device not mounted. So login as root and type umount /dev/sdd1 and now check again: fsck.ext2 /dev/sdd1.

I agree with @bcrisciotti. It sounds like this is very important for you, so after using fsck on the unmounted partition, mount it again and open it with Dolphin/Nautilus/Konqueror and write a text file to it (i.e., test read/write).