Tuesday, 23 September 2014

How to formate Pen drive in opensuse?

Today I was wondering how to format pen drive in opensuse I searched some site

Mounting USB pen drive
1. In Ubuntu desktop, the USB pen drive will be detected and mounted automatically. In Ubuntu server command line terminal, a message will appear to notice you that some information about the USB pen drive that has been plug in or alternatively you can use fdisk command to check whether USB has been mounted or not. Here is sample

how to mount usb drive in ubuntu using terminal

1.a. If you get same output as mine then you can get mount location by using mount command

mount USB drive in Linux Mint

2. If Step 1 didn't work for you, then run dmesg command to identify the correct device name corresponding to the USB pen drive

$ dmesg

[19197.235469] sd 25:0:0:0: [sdb] Write Protect is off
[19197.235476] sd 25:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[19197.236972] sd 25:0:0:0: [sdb] No Caching mode page present
[19197.236982] sd 25:0:0:0: [sdb] Assuming drive cache: write through
[19197.242047] sd 25:0:0:0: [sdb] No Caching mode page present
[19197.242055] sd 25:0:0:0: [sdb] Assuming drive cache: write through
[19197.279672] sdb: sdb1 --> Device name
[19197.282401] sd 25:0:0:0: [sdb] No Caching mode page present
[19197.282406] sd 25:0:0:0: [sdb] Assuming drive cache: write through
[19197.282410] sd 25:0:0:0: [sdb] Attached SCSI removable disk
[19199.953227] usb 2-1.1: USB disconnect, device number 28

2.a. Create Mount Point

$ mkdir -p /media/usb

2.b. Mount USB pen drive

$ sudo mount /dev/sdb1 /media/usb

Unmounting USB pen drive


1. To unmount a USB device simply run the following command

$ sudo umount /dev/sdb1

OR

$ sudo umount /media/usb

NOTE: /media/usb is a mount point.

Formatting USB pen drive


1. First make sure that USB device is not mounted, if it is then unmount it.

2. Format USB device in fat32 format

$ sudo mkfs.vfat /dev/sdb1

Note: You can use mkfs.ext3 to format to ext3 filesystem.

Caution: Enter your device name correctly otherwise it will wip out your entire data.

3. Format and change the Label of the USB drive.

$ sudo mkfs.vfat -n 'sandeep' /dev/sdb1




mount -o remount,rw /media/THE_ONE/
rm -R -f /media/THE_ONE/IMAG2781.jpg

No comments:

Post a Comment