0

i installed UBUNTU 14.04 using my pen drive. the problem is i need my pen drive back with the same storage. is there is any way to do like that please.

6 Answers 6

1

In ubuntu there is many method by which you can format your pendrive

1 - by Disk utility see the video // simplest way

2- by Gparted tool see the video

you can install it from Ubuntu software center or you can install is by typing

sudo apt-get install gparted

3- by using Terminal see the video

go to super mode by typing "su" followed by super mode password

fdisk -l

that will show all the volume in your pc or you can also use the

df

to see the usb flash drive suppose it may be /deb/sdb1

umount /dev/sdb1

that un mount the drive

mkfs.vfat /dev/sdb1

to format drive into fat32 format

mkdosfs -F 32 -I /dev/sdxx

Where "xx" is from the command fdisk -l which denotes your usb drive's last letters.

2
  • 1
    What video, you mention one multiple times, but, wheres the link ?
    – Mark Kirby
    Aug 4, 2015 at 7:19
  • You'd want to format the whole drive, not the 1st partition, e.g. mkfs.vfat -I /dev/sdb
    – McSinyx
    Aug 4, 2015 at 7:41
0

Try to format the pendrive to fat32 filesytem through gparted partition editor.

In Ubuntu 14.04, gparted is not installed by default. Manually install it by running,

sudo apt-get install gparted 
0

There is actually a built in utility to do this, open the disks application, and open your USB drives page.

select the partition and delete it using the - button just underneath that. Then, click the + icon and leave all settings as default, but set the type to: fat32 or NTFS depending upon your requirements.

0

You can format a pendrive using "Gparted Partition Editor". It is not installed by default in Ubuntu 14.04
you can install it from the Ubuntu Software Center or by typing in the terminal :

sudo apt-get install gparted

After installing open Gparted from the dash or from the terminal using :

gksudo gparted

In the top right corner choose your pendrive, it will probably be something like /dev/sdX where x is an alphabet.
Unmount the pendrive by Partition->Unmount
Then do Partition->Format to->fat32
And Partition->Manage Flags and uncheck all flags except 'boot' flag.
Click on the green tick on top and you are done.

0

If you want to use the Terminal then locate the mounted usb drive, first, under /dev by typing

sudo df -h or sudo fdisk -l

Assuming your USB Device is /dev/sdc #8GB USB then format the USB Drive with fdisk to make Primary partition. (this will prepare the USB to make a file system)

sudo fdisk /dev/sdc

  • Press m for help.

  • then press n for new partition

  • p for primary

Leave the default sectors for First and last cylinder.

important note: Before you write the final changes to the USB, Just make sure the First and last cylinder value matches with the size of your USB. If Less cylinders are selected this may shrink the size of the USB. For example 8GB USB by default was formatted as 7.2GB

  • Once finished Press w to write the changes to the disk.

Now Your USB is ready to be formatted with desired file system. To make an ntfs based partition, type

sudo mkfs -t ntfs /dev/sdc

Please note that you may have to select the first partition on the disk, such as sdc1 instead of sdc.

0

Install gparted by:

sudo apt-get install gparted

Unmount the drive and try to create a new partition table, then format. In the event this does not work, You should run:

 dd count=1 bs=512 if=/dev/zero of=/dev/sdx && sync #where x is your drive's id

on the drive to zero the first 512bytes on the device(previous partition table) Then use gparted to create a new partition table and format your device as you like.(I reccomend and msdos partition table and ntfs filesystem for smooth operation on windows too.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .