• Welcome to Bashguru

    Linux is one of popular version of UNIX operating System. It is open source as its source code is freely available. It is free to use. Linux was designed considering UNIX compatibility. It's functionality list is quite similar to that of UNIX and become very popular over the last several years. Our Basic motive is to provide latest information about Linux Operating system.

  • Python Programming

    Python is a comparatively simple programming language, compared to c++. Although some of the benefits of c++ are abstracted away in python, they are replaced with an overall easier to learn language with many “intuitive” features. For this reason it is common and recommended by most professionals that people new to programming start with python.

  • Perl Programming

    Perl is an open-source, general-purpose interpreted programming language. Used often for CGI, Perl is also used for graphics programming, system administration, network programming, finance, bioinformatics, and other applications. The Perl languages borrow features from other programming languages including C, shell scripting (sh), AWK, and sed. They provide powerful text processing facilities without the arbitrary data-length limits of many contemporary UNIX command line tools, facilitating easy manipulation of text files.

  • Android

    Android is an operating system based on the Linux kernel, and designed primarily for touch screen mobile devices such as smart phones and tablet computers. Android is a Linux-based software system, and similar to Linux, is free and open source software. This means that other companies can use the Android operating developed by Google and use it in their mobile devices.Android gives you a world-class platform for creating apps and games for Android users everywhere, as well as an open marketplace for distributing to them instantly.

Friday, November 18, 2011

Posted by venu k
53 comments | 9:37 AM

Note: I have used my device name and number in examples, you have to change it
as your device name and number, otherwise unwanted device data will be wiped
out.

Put your USB flash drive in one of your computer's free USB ports. After a few
seconds, Linux will automatically recognize it and an icon for it will appear on
your desktop. If pen drive doesn't mounted automatically, login as root and try
to mount it, still it is not mounted there may be a problem with pen drive or it
is defective.

Finding device:


Very very first thing is you should to know what device you are working with.
For that you can use any one of the following methods.

Method 1: Using ls /dev/sd* command

First make sure your usb drive is not plugged in. Then run:

[venu@ras ~]$ ls /dev/sd*
/dev/sda /dev/sda10 /dev/sda12 /dev/sda2 /dev/sda6 /dev/sda8
/dev/sda1 /dev/sda11 /dev/sda13 /dev/sda5 /dev/sda7 /dev/sda9

Once you have done that, put in your pen drive and run the above command again.

[venu@ras ~]$ ls /dev/sd*
/dev/sda /dev/sda10 /dev/sda12 /dev/sda2 /dev/sda6 /dev/sda8 /dev/sdb
/dev/sda1 /dev/sda11 /dev/sda13 /dev/sda5 /dev/sda7 /dev/sda9 /dev/sdb1

Whatever drive (ex sdb) was not there before is your pen drive. From the above
list my pen drive is sdb. Don't be confuse with /dev/sdb and /dev/sdb1, sdb is
a drive and sdb1 is first partition in that drive.

Method 2: Using df command

[venu@ras ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on

/dev/sda10 29753556 8008860 20208884 29% /
/dev/sda12 19840892 1528664 17288088 9% /msfiles
/dev/sda11 21825108 16772836 3925716 82% /venu
tmpfs 1032232 0 1032232 0% /dev/shm
/dev/sdb1 1947636 4 1947632 1% /media/VENU

As you can see above my pen drive (/dev/sdb1) is mounted at /media/VENU. If you
have any doubt about which one is your pen drive, do same thing as in method1.
Run df command before and after inserting pen drive.

Method 3: dmesg | tail

[venu@ras ~]$ dmesg | tail
sdb: assuming drive cache: write through
SCSI device sdb: 3903359 512-byte hdwr sectors (1999 MB)
sdb: Write Protect is off
sdb: Mode Sense: 0b 00 00 08
sdb: assuming drive cache: write through
sdb: sdb1
sd 8:0:0:0: Attached scsi removable disk sdb
sd 8:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
SELinux: initialized (dev sdb1, type vfat), uses genfs_contexts

Method 4: mount -l

[venu@ras ~]$ mount -l
/dev/sda10 on / type ext3 (rw) [/]
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda12 on /msfiles type ext3 (rw) [/msfiles1]
/dev/sda11 on /venu type ext3 (rw) [/venu1]
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdb1 on /media/VENU type vfat (rw,nosuid,nodev,shortname=winnt,uid=500)
[VENU]

Method 5: fdisk -l

fdisk command need root privileges. So login as root and run the command:

[root@ras ~]# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 60800 447418282+ f W95 Ext'd (LBA)
/dev/sda5 5100 10198 40957686 7 HPFS/NTFS
/dev/sda10 50994 54817 30716248+ 83 Linux
/dev/sda11 54818 57622 22531131 83 Linux
/dev/sda12 57623 60172 20482843+ 83 Linux
/dev/sda13 60173 60694 4192933+ 82 Linux swap / Solaris

Disk /dev/sdb: 1998 MB, 1998519808 bytes
32 heads, 63 sectors/track, 1936 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes

Device Boot Start End Blocks Id System

/dev/sdb1 1 1936 1951456+ b W95 FAT32

fdisk -l displays all detected drives even drive is unmounted.

Formatting pen drive:


First decide which file system you want. FAT32 is probably the file system you
want, but that's up to you. Ext3 may not be work on windows, It asks for fomatt-
ing.

1.Once you have Identified your pen drive, unmount it.

[root@ras ~]# umount /dev/sdb1

2.Format pen drive now.

Depending on distribution different commands are available for formatting, but
in general most used ones that I have seen are mkdosfs or mkfs.vfat for FAT32
and mke2fs or mkfs.ext3 for Linux filesystems.

For Ms-Dos or Windows file system:

Use mkdosfs -n "Label" -I /dev/sdx, Replace Label with the name you want the
pen drive to have and /dev/sdx with your drive.

[root@ras ~]# mkdosfs -n "KVMREDDY" -I /dev/sdb1
mkdosfs 2.11 (12 Mar 2005)
or
[root@ras ~]# mkfs.vfat -n "KVMREDDY" -I /dev/sdb1
mkfs.vfat 2.11 (12 Mar 2005)

(Note: I – capital letter of i )

If you don't want any Label then no need to supply option n. switch I will
force mkdosfs to work properly but it is not mandatory, you can remove that
also.

For Linux File system:

Use mkfs.ext3 -L "Label" /dev/sdx for ext3 file system or mke2fs -L 'Label'
/dev/sdx
for ex2, Replace Label with the name you want the pen drive to have
and /dev/sdx with your drive.

Ext3 file system:

[root@ras ~]# mkfs.ext3 -L "KVMREDDY" /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=KVMREDDY
OS type: Linux
.............................
[root@ras ~]#

ext2 file system:

[root@ras ~]# mke2fs -L 'VENU' /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=VENU
OS type: Linux
...........................
[root@ras ~]#

After formatting you will be returned to the prompt then remove and insert the
pen drive to have mounted again.

53 comments:

  1. Hi that was useful info, thanks for sharing

    ReplyDelete
  2. I am using Scientific Linux. I have tried the above commands but I have not been able to format a flash that has been infected by viruses. Thank you for your contribution.
    Victor

    ReplyDelete
  3. Replies
    1. I was scratching my head trying to figure out how to reformat my new ScanDisk flashdrive. Control Center wouldn't let me do it, but your way worked great. Thanks a million!

      Delete
  4. i have a sandisk pen drive and its current format is RAR i want to change in fat32 format but i couldn't, i have also use the function of disk utility but no result found i am using ubuntu 12.04

    PLEASE HELP ME

    thanks in advance

    ReplyDelete
  5. It is the easiest way is to open your flash drive from the drop down menu on the right then click the partition tab then click format to and then pick fat 32 system and then format the drive.
    ----------------------------------------------------------------------
    Hybrid Cloud

    ReplyDelete
  6. it's not work please tell me the the other solution !

    ReplyDelete
  7. Hi Venu,
    Many Thanks for this simple easy steps.

    ReplyDelete
  8. Hi Rajan
    Can you give me the data what u r getting. If possible send screen shot.
    r u unmounted your Pendrive before formatting it.
    if possible post bellow commands output.
    fdisk -l
    which mkdosfs or which mkfs

    ReplyDelete
  9. Respected sir,
    i have use the 'Disk utility' for formatting and also use those commands which are written in this page on the terminal but nothing happen .
    the error is ....
    "Error creating file system: helper exited with exit code 1: cannot mount /dev/sdb at /var/run/udisks/job-mkfs-jF0l6C: Invalid argument"

    and after run the command fdisk -l the out put is ..

    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0008a3a8

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 972771327 486384640 83 Linux
    /dev/sda2 972773374 976771071 1998849 5 Extended
    /dev/sda5 972773376 976771071 1998848 82 Linux swap / Solaris

    Disk /dev/sdb: 67 MB, 67108864 bytes
    3 heads, 43 sectors/track, 1016 cylinders, total 131072 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000

    Disk /dev/sdb doesn't contain a valid partition table

    Please help me sir

    ReplyDelete
  10. Dear Rajan,

    I think your partition table is corrupted or your flash drive file system is not supported by your OS. Give me two more commands output

    fdisk -l /dev/sdb

    sfdisk -d /dev/sdb | sfdisk --force /dev/sdb

    ReplyDelete
  11. The out put of the above commands are ....

    rajan@rajan-laptop:~$ fdisk -l /dev/sdb
    Cannot open /dev/sdb
    rajan@rajan-laptop:~$ sfdisk -d /dev/sdb | sfdisk --force /dev/sdb
    /dev/sdb: Permission denied
    /dev/sdb: Permission denied

    sfdisk:
    sfdisk: cannot open /dev/sdb for reading
    cannot open /dev/sdb read-write

    now what should be done

    ReplyDelete
  12. eliko@eliko-PC:~$ mount
    /dev/sda6 on / type ext4 (rw,errors=remount-ro,user_xattr,commit=0)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    fusectl on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    udev on /dev type devtmpfs (rw,mode=0755)
    eliko@eliko-PC:~$ mkfs.vfat -F 32 -n USBFLASH -I /dev/sdb1
    mkfs.vfat 3.0.9 (31 Jan 2010)
    /dev/sdb1: Permission denied
    eliko@eliko-PC:~$ mkfs.vfat -F 32 -n USBFLASH -I /dev/sdb1

    mkfs.vfat 3.0.9 (31 Jan 2010)
    /dev/sdb1: Permission denied

    eliko@eliko-PC:~$ dmesg |tail
    [15924.839809] sd 14:0:0:0: [sdb] No Caching mode page present
    [15924.839817] sd 14:0:0:0: [sdb] Assuming drive cache: write through
    [15924.844414] sdb: sdb1
    [15924.847315] sd 14:0:0:0: [sdb] No Caching mode page present
    [15924.847322] sd 14:0:0:0: [sdb] Assuming drive cache: write through
    [15924.847329] sd 14:0:0:0: [sdb] Attached SCSI removable disk
    [15935.779511] FAT-fs (sdb1): error, invalid access to FAT (entry 0x0048f1ad)
    [15935.779516] FAT-fs (sdb1): Filesystem has been set read-only
    [15935.779837] FAT-fs (sdb1): error, invalid access to FAT (entry 0x19012eb8)
    [15935.780045] FAT-fs (sdb1): error, invalid access to FAT (entry 0x0eabf7cb)

    eliko@eliko-PC:~$ sudo mkfs.vfat -n ‘Label’ -I /dev/sdb
    mkfs.vfat 3.0.9 (31 Jan 2010)
    mkfs.vfat: unable to open /dev/sdb

    eliko@eliko-PC:~$ dmesg |tail
    [15924.844414] sdb: sdb1
    [15924.847315] sd 14:0:0:0: [sdb] No Caching mode page present
    [15924.847322] sd 14:0:0:0: [sdb] Assuming drive cache: write through
    [15924.847329] sd 14:0:0:0: [sdb] Attached SCSI removable disk
    [15935.779511] FAT-fs (sdb1): error, invalid access to FAT (entry 0x0048f1ad)
    [15935.779516] FAT-fs (sdb1): Filesystem has been set read-only
    [15935.779837] FAT-fs (sdb1): error, invalid access to FAT (entry 0x19012eb8)
    [15935.780045] FAT-fs (sdb1): error, invalid access to FAT (entry 0x0eabf7cb)
    [17370.072887] FAT-fs (sdb1): error, invalid access to FAT (entry 0x0048f1ad)
    [17370.073145] FAT-fs (sdb1): error, invalid access to FAT (entry 0x19012eb8)

    eliko@eliko-PC:~$ sudo umount /dev/sdb
    umount: /dev/sdb: не примонтирован

    eliko@eliko-PC:~$ sudo umount /dev/sdb1

    eliko@eliko-PC:~$ sudo mkfs.vfat -n ‘Label’ -I /dev/sdb1
    mkfs.vfat 3.0.9 (31 Jan 2010)
    mkfs.vfat: failed whilst writing FAT

    eliko@eliko-PC:~$ sudo umount /dev/sdb1

    eliko@eliko-PC:~$ sudo mkfs.vfat -n ‘Label’ -I /dev/sdb1
    mkfs.vfat 3.0.9 (31 Jan 2010)

    eliko@eliko-PC:~$ lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 002: ID 0bda:8197 Realtek Semiconductor Corp. RTL8187B Wireless Adapter
    Bus 001 Device 003: ID 064e:d104 Suyin Corp.
    Bus 001 Device 005: ID 0bda:0159 Realtek Semiconductor Corp. Digital Media Card Reader
    Bus 002 Device 008: ID 19d2:0016 ONDA Communication S.p.A.

    eliko@eliko-PC:~$ hdparm /dev/sdb
    /dev/sdb: Permission denied

    eliko@eliko-PC:~$ hdparm /dev/sdb1
    /dev/sdb1: Permission denied

    eliko@eliko-PC:~$ sudo umount /dev/sdb1

    eliko@eliko-PC:~$ sudo mkfs -t vfat /dev/sdb1
    mkfs.vfat 3.0.9 (31 Jan 2010)
    sudo eject /dev/sdb1
    eliko@eliko-PC:~$ sudo eject /dev/sdb1
    eliko@eliko-PC:~$ fdisk -l
    eliko@eliko-PC:~$ sudo umount /dev/sdb1
    umount: /dev/sdb1: не примонтирован
    eliko@eliko-PC:~$ sudo umount /dev/sdb
    umount: /dev/sdb: не примонтирован
    eliko@eliko-PC:~$ mkdosfs /dev/sdb1
    mkdosfs 3.0.9 (31 Jan 2010)
    /dev/sdb1: Permission denied
    eliko@eliko-PC:~$ mkfs.vfat /dev/sdb1
    mkfs.vfat 3.0.9 (31 Jan 2010)
    /dev/sdb1: Permission denied
    eliko@eliko-PC:~$ mkfs.vfat /dev/sdb
    mkfs.vfat 3.0.9 (31 Jan 2010)
    /dev/sdb: Permission denied

    ReplyDelete
  13. eliko@eliko-PC:~$ sudo fdisk -l

    Диск /dev/sda: 320.1 Гб, 320072933376 байт
    255 головок, 63 секторов/треков, 38913 цилиндров, всего 625142448 секторов
    Units = секторы of 1 * 512 = 512 bytes
    Размер сектора (логического/физического): 512 байт / 512 байт
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Идентификатор диска: 0xc83d8e54

    Устр-во Загр Начало Конец Блоки Id Система
    /dev/sda1 * 2048 821247 409600 27 Hidden NTFS WinRE
    /dev/sda2 821248 251951103 125564928 7 HPFS/NTFS/exFAT
    /dev/sda3 313391104 625141759 155875328 7 HPFS/NTFS/exFAT
    /dev/sda4 251953150 313391103 30718977 5 Расширенный
    /dev/sda5 251953152 258095103 3070976 82 Linux своп / Solaris
    /dev/sda6 258097152 313391103 27646976 83 Linux

    Пункты таблицы разделов расположены не в дисковом порядке

    Диск /dev/sdb: 8048 МБ, 8048869376 байт
    255 головок, 63 секторов/треков, 978 цилиндров, всего 15720448 секторов
    Units = секторы of 1 * 512 = 512 bytes
    Размер сектора (логического/физического): 512 байт / 512 байт
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Идентификатор диска: 0x00000000

    Устр-во Загр Начало Конец Блоки Id Система
    /dev/sdb1 8192 15711569 7851689 b W95 FAT32
    eliko@eliko-PC:~$ sudo umount /dev/sdb1
    umount: /dev/sdb1: не примонтирован
    eliko@eliko-PC:~$ sudo umount /dev/sdb1
    eliko@eliko-PC:~$ sudo mkdosfs -F 32 /dev/sdb1
    mkdosfs 3.0.9 (31 Jan 2010)
    eliko@eliko-PC:~$ dd if=/dev/zero of=/dev/sdb bs=1M
    dd: открытие «/dev/sdb»: Отказано в доступе
    eliko@eliko-PC:~$ dd if=/dev/urandom of=/dev/sdb bs=1M
    dd: открытие «/dev/sdb»: Отказано в доступе
    eliko@eliko-PC:~$ fdisk -l /dev/sdb
    Невозможно открыть /dev/sdb
    eliko@eliko-PC:~$ fdisk -l /dev/sdb
    Невозможно открыть /dev/sdb
    eliko@eliko-PC:~$ ls /dev/sd*
    /dev/sda /dev/sda2 /dev/sda4 /dev/sda6 /dev/sdb1
    /dev/sda1 /dev/sda3 /dev/sda5 /dev/sdb
    eliko@eliko-PC:~$ df
    Файловая система 1K-блоков Исп Доступно Исп% смонтирована на
    /dev/sda6 27214716 21205444 4626928 83% /
    udev 1459848 12 1459836 1% /dev
    tmpfs 586776 916 585860 1% /run
    none 5120 4 5116 1% /run/lock
    none 1466940 404 1466536 1% /run/shm
    /dev/sdb1 7847584 879360 6968224 12% /media/NO_NAME

    ReplyDelete
    Replies
    1. The root user should only be used for specific administration or monitoring tasks.
      try to logged in as super user.

      Delete
  14. eliko@eliko-PC:~$ dmesg | tail
    [20441.453708] sd 16:0:0:0: [sdb] Sense Key : Hardware Error [current]
    [20441.453713] sd 16:0:0:0: [sdb] Add. Sense: No additional sense information
    [20441.453718] sd 16:0:0:0: [sdb] CDB: Write(10): 2a 00 00 00 94 3e 00 00 f0 00
    [20441.453728] end_request: I/O error, dev sdb, sector 37950
    [20485.413839] FAT-fs (sdb1): error, invalid access to FAT (entry 0x0048f1ad)
    [20485.413844] FAT-fs (sdb1): Filesystem has been set read-only
    [20485.414216] FAT-fs (sdb1): error, invalid access to FAT (entry 0x19012eb8)
    [20485.414373] FAT-fs (sdb1): error, invalid access to FAT (entry 0x0eabf7cb)
    [20888.800365] FAT-fs (sdb1): error, invalid access to FAT (entry 0x0048f1ad)
    [20888.815662] FAT-fs (sdb1): error, invalid access to FAT (entry 0x19012eb8)
    eliko@eliko-PC:~$ mount -l
    /dev/sda6 on / type ext4 (rw,errors=remount-ro,user_xattr,commit=0)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    fusectl on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    udev on /dev type devtmpfs (rw,mode=0755)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
    none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
    none on /run/shm type tmpfs (rw,nosuid,nodev)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    gvfs-fuse-daemon on /home/eliko/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=eliko)
    /dev/sdb1 on /media/NO_NAME type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks) [NO_NAME]
    eliko@eliko-PC:~$ sudo fdisk -l

    Диск /dev/sda: 320.1 Гб, 320072933376 байт
    255 головок, 63 секторов/треков, 38913 цилиндров, всего 625142448 секторов
    Units = секторы of 1 * 512 = 512 bytes
    Размер сектора (логического/физического): 512 байт / 512 байт
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Идентификатор диска: 0xc83d8e54

    Устр-во Загр Начало Конец Блоки Id Система
    /dev/sda1 * 2048 821247 409600 27 Hidden NTFS WinRE
    /dev/sda2 821248 251951103 125564928 7 HPFS/NTFS/exFAT
    /dev/sda3 313391104 625141759 155875328 7 HPFS/NTFS/exFAT
    /dev/sda4 251953150 313391103 30718977 5 Расширенный
    /dev/sda5 251953152 258095103 3070976 82 Linux своп / Solaris
    /dev/sda6 258097152 313391103 27646976 83 Linux

    Пункты таблицы разделов расположены не в дисковом порядке

    Диск /dev/sdb: 8048 МБ, 8048869376 байт
    255 головок, 63 секторов/треков, 978 цилиндров, всего 15720448 секторов
    Units = секторы of 1 * 512 = 512 bytes
    Размер сектора (логического/физического): 512 байт / 512 байт
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Идентификатор диска: 0x00000000

    Устр-во Загр Начало Конец Блоки Id Система
    /dev/sdb1 8192 15711569 7851689 b W95 FAT32
    eliko@eliko-PC:~$ umount /dev/sdb1
    eliko@eliko-PC:~$ sudo mkdosfs -n "KVMREDDY" -I /dev/sdb1
    mkdosfs 3.0.9 (31 Jan 2010)

    mkfs.vfat -n "KVMREDDY" -I /dev/sdb1
    sudo mkfs.vfat -n "KVMREDDY" -I /dev/sdb1
    eliko@eliko-PC:~$
    eliko@eliko-PC:~$ mkfs.vfat -n "KVMREDDY" -I /dev/sdb1
    mkfs.vfat 3.0.9 (31 Jan 2010)
    /dev/sdb1: Permission denied
    eliko@eliko-PC:~$ sudo mkfs.vfat -n "KVMREDDY" -I /dev/sdb1
    mkfs.vfat 3.0.9 (31 Jan 2010)

    doesn't work.

    ReplyDelete
  15. Respected venu k sir
    as you guided me to run the commands
    fdisk -l /dev/sdb

    sfdisk -d /dev/sdb | sfdisk --force /dev/sdb

    the out puts are ...

    ajan@rajan-laptop:~$ fdisk -l /dev/sdb
    Cannot open /dev/sdb
    rajan@rajan-laptop:~$ sfdisk -d /dev/sdb | sfdisk --force /dev/sdb
    /dev/sdb: Permission denied
    /dev/sdb: Permission denied

    sfdisk:
    sfdisk: cannot open /dev/sdb for reading
    cannot open /dev/sdb read-write

    now please guide me further ...

    ReplyDelete
    Replies
    1. Dear Rajan,

      You need super user privileges to do this. Your command prompt showing that you logged in as a normal user. Check method 5, I pointed there you need super user privileges.

      Delete
  16. thanks for reply me
    venu k sir
    the out put of the method no 5 is ...

    root@rajan-laptop:/home/rajan# fdisk -l

    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0008a3a8

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 972771327 486384640 83 Linux
    /dev/sda2 972773374 976771071 1998849 5 Extended
    /dev/sda5 972773376 976771071 1998848 82 Linux swap / Solaris

    Disk /dev/sdb: 67 MB, 67108864 bytes
    3 heads, 43 sectors/track, 1016 cylinders, total 131072 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000

    Disk /dev/sdb doesn't contain a valid partition table

    now further ,what steps should be follow

    thanks...

    ReplyDelete
  17. Dear Rajan,

    I hope bellow solution may solve your issue. Delete old partition table and create new one on your device. It won't harm anything. Only caution on device number, check your device is /dev/sdb or not.

    I have ntfs formatted pen-drive. I have removed ntfs support from my system.

    [root@ras ~]# mount /dev/sdb1 /mnt/

    mount: unknown filesystem type 'ntfs'

    [root@ras ~]# fdisk -l /dev/sdb



    Disk /dev/sdb: 4022 MB, 4022337024 bytes

    1 heads, 63 sectors/track, 124700 cylinders

    Units = cylinders of 63 * 512 = 32256 bytes



    Device Boot Start End Blocks Id System

    /dev/sdb1 2 124695 3927861 7 HPFS/NTFS

    /dev/sdb2 124696 124696 31+ 21 Unknown


    [root@ras ~]# fdisk /dev/sdb
    . .................

    Command (m for help): d (here give value d then enter)

    Partition number (1-4): 1 (give 1 then enter)

    Command (m for help): n

    Command action

    e extended

    p primary partition (1-4)

    p (here you will see cursor is blinking, p and enter)
    Partition number (1-4): 1 (1 and enter)

    First cylinder (2-124700, default 2): (here you will see cursor is blinking don't
    enter anything just press enter)

    Using default value 2

    Last cylinder or +size or +sizeM or +sizeK (2-124695, default 124695):
    (here also blinking only press enter)

    Using default value 124695


    Command (m for help): w (w and enter)
    The partition table has been altered!


    Calling ioctl() to re-read partition table.

    Syncing disks.

    [root@ras ~]# partprobe /dev/sdb


    some times you will get “can not mount volume” window, close the window or click ok button.

    New partition table has been created on your volume. Now format it

    [root@ras ~]# mkfs.vfat -n "KVMREDDY" -I /dev/sdb1

    mkfs.vfat 2.11 (12 Mar 2005)
    [root@ras ~]# mount /dev/sdb1 /mnt/

    [root@ras ~]#

    If you still have a problem bring it to my attention.

    ReplyDelete
  18. thanks for sharing
    http://www.hitech-cloud.com/

    ReplyDelete
  19. Hyderabadsys web preparing Technologies gives the best particular Computer Training & Software preparing for different Computer IT courses. We are giving online programming preparing focused around particular needs of the understudies particularly we give creative coordinated preparing in all the virtual products which are having incredible open doors in the present pattern. We gives Class room preparing and in addition web preparing to battle with today's aggressive programming world. Understudies can get a handle on the subject from our accomplished and ensured coaches which helps the understudies to work continuously environment. Tackle the force of your machine by learning shell scripting. A general outline is given, and also cases of the most prominent advances utilized. These days, prophet shell scripting preparing has ended up more than a necessity. An expansive no of shell scripting preparing focuses are set online to help understudies get prepared with the most recent shell scripting lessons as needed in a percentage of the top posts of shell scripting software engineer.
    Shell scripting Online Training
    Contact us:
    India +91 9030400777
    Usa +1-347-606-2716
    Email: contact@Hyderabadsys.com

    ReplyDelete
  20. Great tutorial. I really learned some new things in here. So thanks

    school websites

    ReplyDelete
  21. Thanks a lot for sharing this useful informative blog with us. This is really great blog.

    SAP ABAP Training in Chennai

    ReplyDelete
  22. Great tips, and awesome way to get exert tips from everyone, not only i like that post all peoples like that post, because of all given information was wonderful and it's very helpful for me.

    Weblogic Training in Chennai

    ReplyDelete
  23. Happy Wheels is a very popular rag doll physics game with a dark sense of humor. The aim in Happy Wheels is pretty simple – just try and get to the end of the level in one piece. You can try out some unusual forms of transport, ranging from a wheelchair to a Segway. You can also play this game at happy wheels
    happy wheels |

    ReplyDelete
  24. Flip Diving: play it now - World's #1 cliff diving game. Pull off Frontflips, Backflips & Gainers from high cliffs, rickety platforms, trees, castles, and trampolines!
    flip diving

    ReplyDelete
  25. This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.

    iOS App Development Company

    ReplyDelete
  26. Thank your site! information your share is useful to me!
    twitter search

    ReplyDelete
  27. The knowledge you share really changes me in life, I sincerely thank you for the things you have done, sure your blog will help more people. Sincerely thanks

    ReplyDelete
  28. Putlocker, 123movies Relation created for supplying which will together with most of us

    ReplyDelete
  29. That was really an interesting post. Thanks for this information.
    Best Excel Institute in Bangalore

    ReplyDelete
  30. we are happy to comment here, and we await your komantar in our blog

    ReplyDelete
  31. a pride for me to be able to discuss on a quality website because I just learned to make an article on

    ReplyDelete
  32. Formatting a pen drive is very useful, thanks a lot blogger.
    Play 8 ball pool

    ReplyDelete
  33. The only place for kids and teens is here.Com to enjoy to the abcya games at school or home.
    Solitaire card

    ReplyDelete
  34. I have read through other blogs, but they are cumbersome and confusing more than your post. I hope you continue to have such quality articles to share with everyone!
    slither io

    ReplyDelete
  35. After looking towards this post I am impressed very much with your blog, keep sharing the new updates...
    Best Online Software Training Institute | jQuery Training

    ReplyDelete
  36. A great initiative, it is worth doing such things.

    ReplyDelete
  37. Great pleasure that I can read this blog.

    ReplyDelete
  38. I wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.


    python training in pune

    ReplyDelete
  39. Appreciation for really being thoughtful and also for deciding on certain marvelous guides most people really want to be aware of.

    UX Design Training
    UX Design Training in Chennai

    ReplyDelete
  40. Needed to compose one simple word yet thanks for the suggestions that you are contributed here, please do keep updating us...
    Unix Linux Training | Linux Unix Online Training

    ReplyDelete
  41. I am very glad to visit your website. I extremely grateful that you perform this piece of writing very simply.

    Linux Online Training

    ReplyDelete