UbuntuThis forum is for the discussion of Ubuntu 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.
Disk /dev/hda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 12 96358+ 83 Linux
/dev/hda2 13 74 498015 82 Linux swap / Solaris
/dev/hda3 75 1533 11719417+ 83 Linux
/dev/hda4 1534 24792 186827917+ 5 Extended
/dev/hda5 1534 24792 186827886 83 Linux
Disk /dev/sda: 131 MB, 131072000 bytes
8 heads, 32 sectors/track, 1000 cylinders
Units = cylinders of 256 * 512 = 131072 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 1000 127984 6 FAT16
root@dns1:/mnt#
[43548684.280000] sdb: Write Protect is on
[43548684.280000] sdb: Mode Sense: 03 00 80 00
That appears to be your problem right there. Either your computer is not using the right driver for your stick or you actually have a physical locking mechanism (small switch) on the stick that allows you to make it read-only.
By the way, you don't even need to mount anything to use fdisk. You can fdisk unmounted partitions, but again when you call fdisk don't include the partition numbers. Also, it does not matter to fdisk if a partition is mounted as read only. If fdisk is having a problem it is either a driver or hardware issue.
Also,
Quote:
Originally Posted by tiger.woods
/dev/sdb1 125M 1.8M 124M 2% /media/usbdisk
it looks like your stick was auto-mounted at /media/usbdisk so you shouldn't need to manually mount it. Run the mount command with no options and see if it is there.
Thirdly, if you are going to manually mount a usb stick you shouldn't just use 'mount /dev/sda1 /mnt/USB'. You should include options to specify that it is vfat, noatime, etc. man mount for more info on the options. I usually create an entry in /etc/fstab if I am going to be manually mounting stuff a lot. Don't do this if your disk is still auto-mounting.
Try this...
Code:
cat /proc/bus/usb/devices
Do you see your USB stick? Is the manufacturer, etc correct?
Double check your drivers (check your kernel config to see if they are included or built as modules). Are the correct modules loaded (look at lsmod)?
Is it just this USB stick a problem or do others also have the same problem. Try another stick if you have the option.
root@dns1:/mnt# mount
/dev/hda3 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda5 on /video type ext3 (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sda1 on /media/usbdisk type vfat (ro,nosuid,nodev,quiet,shortname=mixed,uid=1001,gid=1001,umask=077,iocharset=utf8)
This is really strange. Everything I am seeing would lead me to believe it should work. Maybe your 'USB Flash Disk' (as it appears in proc) is some weird unsupported hardware in linux. Either that or it has some hidden lock keeping it as read-only.
What model/brand is this disk?
My only other suggestion is to try it in other operating systems. Try it in a completely different linux distro. If you can try it in Windows. If it still does not work in other OSs then it is probably a broken drive. If you only get it to work in Windows there is a nice (free) HP USB disk formatting tool that can do the job for you.
you might try installing gparted and then using that program. It can give you the option to unmount and then format to the file system you like. then you can mount the drive again
formatting does not require you to mount the drive. Also, there is a live cd for gparted, so you don't have to install it if you want to use it. It is a mighty handy tool and I would recommend that every serious computer user have a gparted live cd in their tool set.
At any rate gparted won't do anything useful for formatting a USB stick that fdisk can't do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.