SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would definitely drop the -c option for the 'mkdosfs'.
You should 'man mkdosfs';
Code:
excerpt from 'man mkdsofs';
NAME
mkdosfs - create an MS-DOS file system under Linux
SYNOPSIS
mkdosfs [ -A ] [ -b sector-of-backup ] [ -c ] [ -l filename ] [ -C ] [
-f number-of-FATs ] [ -F FAT-size ] [ -h number-of-hidden-sectors ] [
-i volume-id ] [ -I ] [ -m message-file ] [ -n volume-name ] [ -r root-
dir-entries ] [ -R number-of-reserved-sectors ] [ -s sectors-per-clus-
ter ] [ -S logical-sector-size ] [ -v ] device [ block-count ]
DESCRIPTION
mkdosfs is used to create an MS-DOS file system under Linux on a device
(usually a disk partition). device is the special file corresponding
to the device (e.g /dev/hdXX). block-count is the number of blocks on
the device. If omitted, mkdosfs automatically determiness the file
system size.
OPTIONS
-A Use Atari variation of the MS-DOS filesystem. This is default if
mkdosfs is run on an Atari, then this option turns off Atari
format. There are some differences when using Atari format: If
not directed otherwise by the user, mkdosfs will always use 2
sectors per cluster, since GEMDOS doesn't like other values very
much. It will also obey the maximum number of sectors GEMDOS
can handle. Larger filesystems are managed by raising the logi-
cal sector size. Under Atari format, an Atari-compatible serial
number for the filesystem is generated, and a 12 bit FAT is used
only for filesystems that have one of the usual floppy sizes
(720k, 1.2M, 1.44M, 2.88M), a 16 bit FAT otherwise. This can be
overridden with the -F option. Some PC-specific boot sector
fields aren't written, and a boot message (option -m) is
ignored.
-b sector-of-backup
Selects the location of the backup boot sector for FAT32.
Default depends on number of reserved sectors, but usually is
sector 6. The backup must be within the range of reserved sec-
tors.
-c Check the device for bad blocks before creating the file system.
-C Create the file given as device on the command line, and write
the to-be-created file system to it. This can be used to create
the new file system in a file instead of on a real device, and
to avoid using dd in advance to create a file of appropriate
size. With this option, the block-count must be given, because
lines 27-50
Note: when I have formatted as a ext3 I have no problems. I only have problems when I format it as fat 32
mkfs.vfat: command not found
is the error for mkfs.vfat
Quote:
Originally Posted by sw67
If it's not W95 FAT32, change the type (W95 FAT32 code is 0B) and write the partition table, then try again.
You were right I had it set to something beside that. However it all went through this time. When I dropped the -c flag and switched things in cfdisk.
However, it wont mount I get a error saying bad super block can not read super block.
And for some reason it tries to read it as a 4 gig pen but it is not and I get this error also
Code:
>sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 3907583 512-byte hardware sectors (2001 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 45 00 00 08
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
scsi 0:0:0:1: CD-ROM SanDisk Cruzer 7.01 PQ: 0 ANSI: 0
sr0: scsi3-mmc drive: 48x/48x tray
sr 0:0:0:1: Attached scsi CD-ROM sr0
usb-storage: device scan complete
sd 0:0:0:0: Attached scsi generic sg0 type 0
sr 0:0:0:1: Attached scsi generic sg1 type 5
e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
input: Microsoft SideWinder GamePad as /devices/pci0000:00/0000:00:1e.0/0000:02:09.1/gameport0/input/input5
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
usb 2-2.1: USB disconnect, address 3
usb 2-2.1: new full speed USB device using uhci_hcd and address 4
usb 2-2.1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
scsi 1:0:0:0: Direct-Access Digital MP3 Player 0100 PQ: 0 ANSI: 4
sd 1:0:0:0: [sda] 492800 2048-byte hardware sectors (1009 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 3e 00 00 00
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] 492800 2048-byte hardware sectors (1009 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 3e 00 00 00
sd 1:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sda: p1 exceeds device capacity
sd 1:0:0:0: [sda] Attached SCSI removable disk
sd 1:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
attempt to access beyond end of device
sda: rw=0, want=7878136, limit=1971200
Buffer I/O error on device sda1, logical block 1969472
attempt to access beyond end of device
sda: rw=0, want=7878140, limit=1971200
Buffer I/O error on device sda1, logical block 1969473
attempt to access beyond end of device
sda: rw=0, want=7878136, limit=1971200
Buffer I/O error on device sda1, logical block 1969472
attempt to access beyond end of device
sda: rw=0, want=7878140, limit=1971200
Buffer I/O error on device sda1, logical block 1969473
attempt to access beyond end of device
sda: rw=0, want=7878256, limit=1971200
Buffer I/O error on device sda1, logical block 1969502
attempt to access beyond end of device
sda: rw=0, want=7878260, limit=1971200
Buffer I/O error on device sda1, logical block 1969503
attempt to access beyond end of device
sda: rw=0, want=7878256, limit=1971200
Buffer I/O error on device sda1, logical block 1969502
attempt to access beyond end of device
sda: rw=0, want=7878260, limit=1971200
Buffer I/O error on device sda1, logical block 1969503
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
Buffer I/O error on device sda1, logical block 1969506
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
Buffer I/O error on device sda1, logical block 1969506
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878208, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878212, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878264, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878268, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878136, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878140, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878136, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878140, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878256, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878260, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878256, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878260, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878208, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878212, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878264, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878268, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
sd 1:0:0:0: [sda] 492800 2048-byte hardware sectors (1009 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 3e 00 00 00
sd 1:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sda: p1 exceeds device capacity
attempt to access beyond end of device
sda: rw=0, want=7878136, limit=1971200
printk: 32 messages suppressed.
Buffer I/O error on device sda1, logical block 1969472
attempt to access beyond end of device
sda: rw=0, want=7878140, limit=1971200
Buffer I/O error on device sda1, logical block 1969473
attempt to access beyond end of device
sda: rw=0, want=7878136, limit=1971200
Buffer I/O error on device sda1, logical block 1969472
attempt to access beyond end of device
sda: rw=0, want=7878140, limit=1971200
Buffer I/O error on device sda1, logical block 1969473
attempt to access beyond end of device
sda: rw=0, want=7878256, limit=1971200
Buffer I/O error on device sda1, logical block 1969502
attempt to access beyond end of device
sda: rw=0, want=7878260, limit=1971200
Buffer I/O error on device sda1, logical block 1969503
attempt to access beyond end of device
sda: rw=0, want=7878256, limit=1971200
Buffer I/O error on device sda1, logical block 1969502
attempt to access beyond end of device
sda: rw=0, want=7878260, limit=1971200
Buffer I/O error on device sda1, logical block 1969503
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
Buffer I/O error on device sda1, logical block 1969506
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
Buffer I/O error on device sda1, logical block 1969506
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878208, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878212, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878264, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878268, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878136, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878140, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878136, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878140, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878256, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878260, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878256, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878260, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878208, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878212, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878264, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878268, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sda: rw=0, want=7878272, limit=1971200
FAT: logical sector size too small for device (logical sector size = 512)
usb 2-2.1: USB disconnect, address 4
printk: 32 messages suppressed.
Buffer I/O error on device sda1, logical block 0
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 1
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 2
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 3
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 4
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 5
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 6
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 7
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 8
lost page write due to I/O error on sda1
Buffer I/O error on device sda1, logical block 9
lost page write due to I/O error on sda1
usb 2-2.1: new full speed USB device using uhci_hcd and address 5
usb 2-2.1: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi 2:0:0:0: Direct-Access Digital MP3 Player 0100 PQ: 0 ANSI: 4
sd 2:0:0:0: [sdb] 492800 2048-byte hardware sectors (1009 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 3e 00 00 00
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] 492800 2048-byte hardware sectors (1009 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 3e 00 00 00
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sdb: p1 exceeds device capacity
sd 2:0:0:0: [sdb] Attached SCSI removable disk
sd 2:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
attempt to access beyond end of device
sdb: rw=0, want=7878136, limit=1971200
printk: 3840 messages suppressed.
Buffer I/O error on device sdb1, logical block 1969472
attempt to access beyond end of device
sdb: rw=0, want=7878140, limit=1971200
Buffer I/O error on device sdb1, logical block 1969473
attempt to access beyond end of device
sdb: rw=0, want=7878136, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878140, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878256, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878260, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878256, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878260, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878208, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878212, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878264, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878268, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878136, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878140, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878136, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878140, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878256, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878260, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878256, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878260, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878208, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878212, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878264, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878268, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
attempt to access beyond end of device
sdb: rw=0, want=7878272, limit=1971200
FAT: logical sector size too small for device (logical sector size = 512)
FAT: logical sector size too small for device (logical sector size = 512)
Last edited by khronosschoty; 11-08-2008 at 08:35 PM.
excetp from 'man fsck';
In actuality, fsck is simply a front-end for the various file system
checkers (fsck.fstype) available under Linux. The file system-specific
checker is searched for in /sbin first, then in /etc/fs and /etc, and
finally in the directories listed in the PATH environment variable.
Please see the file system-specific checker manual pages for further
details.
The only options I have for fat is the mkdosfs when I use fsck.vfat I get error. When I look in /sbin I do not see anything out side of mkdosfs for fat.
For some reason I keep getting bad super block and it wants to read it as a 4 gig. I need to learn how to completely wipe and make a new super block. In fact I do not know that much about file systems.
The only options I have for fat is the mkdosfs when I use fsck.vfat I get error. When I look in /sbin I do not see anything out side of mkdosfs for fat.
For some reason I keep getting bad super block and it wants to read it as a 4 gig. I need to learn how to completely wipe and make a new super block. In fact I do not know that much about file systems.
My pen is only one gig.
You may not be able to mkfs for MS fs on Slackware except up to fat16; as I recall, I tried a couple times in the last several years, never found anything, and probably read on the 'net (maybe here) at the time there was nothing. However, maybe there is a program named something else that you can run or link to (you might have to link it to something, IIRC,) or you may be able to tell mkdosfs to do vfat (did you type 'man mkdosfs' or 'info mkdosfs' or man or info for mkfs if only it has a man/info help page?) To try and find a program that makes vfat, type:
find / -name "*vfat*"
----------------------------------------------------------------
(and maybe other strings) 'slocate' is better than 'find,' but I do not remember slocate's syntax and cannot check it right now (my Slamd64 box is off because X/KDE died.)
You may not be able to mkfs for MS fs on Slackware except up to fat16; as I recall, I tried a couple times in the last several years, never found anything
That's just plain wrong.
Slackware has always been able to format partitions using 32bit VFAT. It's just that the fsck.vfat script (present in some other distros) does not ship with Slackware.
The command
Code:
mkdosfs -F 32 /dev/<partitionname>
is the correct command to format a partition as 32bit VFAT. Note that you should create this partition as a "type b" aka FAT32 partition using fdisk.
The error mentioned in the first post is not caused by an incorrect use of the command. Although I would leave off the "-c" option.
Plug in the thumb drive. It's light will blink and then
stay on. To find out what device it is assigned to see
dmesg | tail
it will normally be sda unless other "scsi" devices are present.
IMPORTANT: Check what dmesg says carefully - do not just assume it is sda or you may trash your system. If you've got a sata HD then it might be sda and the USB pen drive sdb or sdc etc.
Examine its partition table using:
fdisk -l /dev/sda
To repartition either do it the line-by-line way:
fdisk /dev/sda
OR the semi-GUI way
cfdisk /dev/sda
This only writes the parition table it DOES NOT create
the file system. To do this you need this command:
mkfs.ext2 /dev/sda1
or for FAT32
mkfs.vfat -F 32 /dev/sda1
but the vfat might not work on slackware, in which case do
mkdosfs -F 32 /dev/sda1
To stop linux checking the file system do this
tune2fs -c 0 -i 0 /dev/sda1
Odd problem
I had trouble partitioning a usb stick with fdisk or cfdisk
because it had some weird invisible partition that could
only be seen in windows. This partition was for some
feature called U3, which I wasn't interested in. The solution
was to use a manufacturer's tool to remove the U3 stuff
and it's annoying super-hidden partition.
Last edited by mcnalu; 11-14-2008 at 04:07 AM.
Reason: added sda warning
That's just plain wrong.
Slackware has always been able to format partitions using 32bit VFAT. It's just that the fsck.vfat script (present in some other distros) does not ship with Slackware.
The command
Code:
mkdosfs -F 32 /dev/<partitionname>
is the correct command to format a partition as 32bit VFAT. Note that you should create this partition as a "type b" aka FAT32 partition using fdisk.[...]
I remember now, but it is wrong to call win9x (the OSes of vfat) DOS unless you edit certain files by hand, and the lack of fsck.?fat* makes one think Slackware lacks complete ?fat* support. I have not used fat fs HDDs lately, so I forgot Slackware can make vfats, which would (have) come in handy for floppies and usb.
Well I guess some ware along the way I fried my USB pen. It was a crappy pen any way. It was buggy from day one.. I will not get that brand agian. Thanks every one for thier help!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.