You are not logged in.
I'm trying to create a bootable USB stick, but whatever I do it seems to be read-only.
[root@crypt mnt]# mount /dev/sdc usbstick/
mount: /dev/sdc is write-protected, mounting read-onlyFlipping the flag seems to work:
[root@crypt mnt]# hdparm -r1 /dev/sdc
/dev/sdc:
setting readonly to 1 (on)
readonly = 1 (on)
[root@crypt mnt]# hdparm -r0 /dev/sdc
/dev/sdc:
setting readonly to 0 (off)
readonly = 0 (off)...but when I mount it, I get the same message about it being write-protected.
I have formatted the drive to FAT16 and FAT32, and fdisk -l shows the right information:
Disk /dev/sdc: 1.9 GiB, 2021654528 bytes, 3948544 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
Disklabel type: dos
Disk identifier: 0x43756644
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 3948543 3946496 1.9G 6 FAT16But strangely, when I mount the drive and look through the folders, all the data seems to be there--even if I delete the partition entirely.
[root@crypt media]# gparted /dev/sdc
... during this, I formatted the partition so that the entire drive shows as unallocated. The step completes, and gparted shows it as unallocated. fdisk no longer shows the /dev/sdc1 partition either.
[root@crypt media]# mount /dev/sdc usb/
mount: /dev/sdc is write-protected, mounting read-only
[root@crypt media]# cd usb/
[root@crypt usb]# ls
arch EFI isolinux loaderI still seem to be able to view all the files on the usb stick..... but trying to delete anything results in a "rm: cannot remove [file]: Read-only file system" error
It is a pretty old flash drive (6+ years)... so it may just be a dead flash drive. Does anyone have any other insights into what might be going on?
Last edited by crypt (2016-10-15 21:32:57)
Offline
Why are you trying to mount /dev/sdc and not the partition /dev/sdc1 ?
Offline
...... *facepalms*.
I am not a smart man. Thanks!
I guess as a followup question (if someone cares to answer or link me to some reading materials)... why would I be able to explore the directory and see a bunch of seemingly well-formed files and folders when I mount /dev/sdc?
Everything looks to be in order now, though. Mounting /dev/sdc1 (after creating the partition, of course) works properly.
Offline
There was a similar thread recently https://bbs.archlinux.org/viewtopic.php?id=217557 where it was pointed out that it is possible to have partition-less USB sticks. I did read up a bit on this and using partitions makes the stick a “USB-HDD”, but when there are no partitions it is a “USB-FDD”. There's also “USB-ZIP” which is specially partitioned to have just a single partition.
Your fdisk output showed a FAT partition, which is why I asked what I did.
From the “ls” output I'm guessing you had written to it an Arch install ISO previously, so (speculation on my part) maybe /dev/sdc was being mounted with the iso9660 fs which is read-only.
If a USB stick has previously had a hybrid ISO written to it, it's usually a good idea to zero out the first few K before re-partitioning/re-formatting it for "normal" use.
Offline