LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Cannot format usb as FAT (http://www.linuxquestions.org/questions/linux-general-1/cannot-format-usb-as-fat-4175449208/)

zibzab 02-08-2013 02:06 PM

Cannot format usb as FAT
 
I'm running fedora 18, if you need any other information let me know.

I had this problem with my previous usb drive which is why i purchased a new device. I cannot format my usb drive as fat or ntf, I can use the command:
Code:

mkfs.ext4 /dev/sdb1
to format my drive, that works.

When I run mkfs.vfat I get different output:
Code:

matthew@Fedora ~$ sudo mkfs.vfat /dev/sdb1
mkfs.vfat 3.0.14 (23 Jan 2023)
mkfs.vfat: /dev/sdb1 contains a mounted file system.
matthew@Fedora ~$ sudo umount /dev/sdb1
umount: /run/media/matthew/LIVE: not found

Gparted won't even let me unmount the usb drive.

Disks(gnome tool) will also allow me to format the drive as ext4 but not fat/ntfs.

I don't know why It's trying to unmount LIVE, that was what the usb was when I installed fedora's live installer onto it. after that I tried to format the drive as ntfs to put my windows iso contents onto it which is what ended up causing the error.

Also, fdisk isn't of any help either, just trying to create a default primary partition.
Code:

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

Rebooting or running partprobe isn't of any help either.

Any suggestions on fixing this would be greatly appreciated.

suicidaleggroll 02-08-2013 02:19 PM

What is the output of "mount" and "df"?

zibzab 02-08-2013 02:24 PM

mount output:
Code:

matthew@Fedora ~$ sudo mount
/dev/sdb1 on /run/media/matthew/LIVE type vfat (rw,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
/dev/loop0 on /run/media/matthew/UDF Volume type udf (ro,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,umask=0077,uhelper=udisks2)
configfs on /sys/kernel/config type configfs (rw)
/dev/sda1 on /boot type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sdb1 on /run/media/matthew/LIVE type vfat (rw,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
configfs on /sys/kernel/config type configfs (rw)
/dev/sda1 on /boot type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
configfs on /sys/kernel/config type configfs (rw)
configfs on /sys/kernel/config type configfs (rw)
/dev/sda1 on /boot type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
configfs on /sys/kernel/config type configfs (rw)
/dev/sda1 on /boot type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sdb on /run/media/matthew/LIVE type vfat (rw,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
configfs on /sys/kernel/config type configfs (rw)
/dev/sda1 on /boot type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
configfs on /sys/kernel/config type configfs (rw)
/dev/sda1 on /boot type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sdb1 on /run/media/matthew/LIVE type ext4 (rw,nodev,nosuid,uhelper=udisks2)
configfs on /sys/kernel/config type configfs (rw)
/dev/sda1 on /boot type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sdb1 on /run/media/matthew/11a8e651-3353-42e8-bb34-6a3ed6ec878b type ext4 (rw,nodev,nosuid,uhelper=udisks2)
configfs on /sys/kernel/config type configfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/fedora_fedora-home on /home type ext4 (rw)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=matthew)
fusectl on /sys/fs/fuse/connections type fusectl (rw)

df output:
Code:

matthew@Fedora ~$ df
df: ‘/run/media/matthew/LIVE’: No such file or directory
df: ‘/run/media/matthew/UDF Volume’: No such file or directory
df: ‘/run/media/matthew/LIVE’: No such file or directory
df: ‘/run/media/matthew/LIVE’: No such file or directory
df: ‘/run/media/matthew/LIVE’: No such file or directory
df: ‘/run/media/matthew/11a8e651-3353-42e8-bb34-6a3ed6ec878b’: No such file or directory
Filesystem                    1K-blocks    Used Available Use% Mounted on
/dev/sda1                        495844  111766    358478  24% /boot
/dev/mapper/fedora_fedora-home 358681340 4771768 335689540  2% /home


suicidaleggroll 02-08-2013 02:33 PM

According to mount and df you have no root to the filesystem ( / )
Have you installed Fedora to your system or are you still running it in live mode (if live, what device contains the live image)?

zibzab 02-08-2013 02:36 PM

Fedora is installed on partitions /dev/sda1 and dev/sda2, here is my fdisk -l output
Code:

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1            2048    1026047      512000  83  Linux
/dev/sda2        1026048  850747391  424860672  8e  Linux LVM
/dev/sda3  *  850749440  858561939    3906250    7  HPFS/NTFS/exFAT


suicidaleggroll 02-08-2013 03:02 PM

Was the live USB in the machine when you last started it up? It doesn't look like things are mounted correctly. I would power off the system, remove the USB, start it up, and then once it's booted into the OS you can re-insert the USB and try your formatting.

zibzab 02-08-2013 10:22 PM

I couldn't fix the issue. Instead I used the gnome application disks to format my disk as ext, then used the fedora liveusb creator tool to install fedora back onto the usb stick. I ended up with everything working the way it should now.

I still wasn't able to format the usb stick to fat with linux, had to do it on windows(which had no problems). I may report the bug to fedora.

Thanks suicidaleggroll for the help.

A mod can close this thread now.


All times are GMT -5. The time now is 04:12 AM.