LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-08-2013, 02:06 PM   #1
zibzab
LQ Newbie
 
Registered: Feb 2013
Distribution: Fedora 18
Posts: 6

Rep: Reputation: Disabled
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.

Last edited by zibzab; 02-08-2013 at 02:08 PM.
 
Old 02-08-2013, 02:19 PM   #2
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,646

Rep: Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951
What is the output of "mount" and "df"?
 
Old 02-08-2013, 02:24 PM   #3
zibzab
LQ Newbie
 
Registered: Feb 2013
Distribution: Fedora 18
Posts: 6

Original Poster
Rep: Reputation: Disabled
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
 
Old 02-08-2013, 02:33 PM   #4
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,646

Rep: Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951
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)?
 
Old 02-08-2013, 02:36 PM   #5
zibzab
LQ Newbie
 
Registered: Feb 2013
Distribution: Fedora 18
Posts: 6

Original Poster
Rep: Reputation: Disabled
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

Last edited by zibzab; 02-08-2013 at 02:37 PM.
 
Old 02-08-2013, 03:02 PM   #6
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,646

Rep: Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951Reputation: 951
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.
 
Old 02-08-2013, 10:22 PM   #7
zibzab
LQ Newbie
 
Registered: Feb 2013
Distribution: Fedora 18
Posts: 6

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Format a Floppy With a Filesystem other than FAT Zssfssz Linux - General 5 11-03-2011 07:25 PM
how can i format my hard disk in fedora9 as ntfs or fat system v4u_2k722k10 Linux - Newbie 4 11-26-2008 08:39 PM
Format USB Diskette Drive to FAT? sipples Linux - Hardware 12 10-31-2006 08:09 AM
Linux USB, FAT Tux Linux - General 5 09-05-2006 07:08 PM
Format partition as ext3, fdisk says FAT? ChesterHemmer Linux - General 7 07-09-2006 12:13 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration