Hi!
I try to format a USB Memorystick with ext3.
The problem is the memorystick become write-protected. How do i make it Read-Write-able?
I use Partitioner to format the stick.
OpenSUSE 13.1 64bits
KDE
Hi!
I try to format a USB Memorystick with ext3.
The problem is the memorystick become write-protected. How do i make it Read-Write-able?
I use Partitioner to format the stick.
OpenSUSE 13.1 64bits
KDE
The fact that it is a memory stick is not realy important.
But we lack a lot of information. Yo only tell us your conslusions, but not the facts. Thus when you say “the memorystick become write-protected”, pleas tell us why you think that the stick is write protected.
There are mainly two things that make somethin write protected:
When you want help with the interpretation of what is the case here, post the output of
mount | grep <the-mount-point
ls -l <the-mount-point>
to begin witth. And of course replave <the-mount-point> with the real path to the mount-point.
I reread your post.
Is it possible that you mean that during the partitioning process there is an error that say that the sticky can not be written to?
Allways tell what you are doing. “I use Partitinoner” is not very clear. I would use Yast > System > Partitioner but there are many more. And when you have an error, either copy/paste it, or copy it by typing, or, when it is very large, show a screenshot.
In order to format a USB stick with ext3, you may have to delete the existing partitions. Trying to format a partition which is already formatted may result in a write protected error.
BTW why ext3? ext2 is better for a USB stick because it does not have the repeated writes that the journaling of ext3 creates.
Precisely the question I was about to ask, “why ext3?”. I also suggest ext2.
I thing the whole memory-stick is completely messed up. It want mount at all and now it doesn’t show up in Partitioner.
The only thing that manage to detect the memory-stick, its the kernel
user@linux-8db7:~> dmesg | grep Kingston
[12282.739589] usb 3-1.1.3: Manufacturer: Kingston
[12285.242736] scsi 6:0:0:0: Direct-Access Kingston DTCRC 1000 PQ: 0 ANSI: 0 CCS
[12657.641508] scsi 6:0:0:1: Direct-Access Kingston DTCRC uSD/M2 1000 PQ: 0 ANSI: 0 CCS
[18008.312216] usb 3-1.1.3: Manufacturer: Kingston
[18010.679341] scsi 7:0:0:0: Direct-Access Kingston DTCRC 1000 PQ: 0 ANSI: 0 CCS
[18383.178511] scsi 7:0:0:1: Direct-Access Kingston DTCRC uSD/M2 1000 PQ: 0 ANSI: 0 CCS
[18605.948043] usb 3-1.1.3: Manufacturer: Kingston
[18608.315013] scsi 8:0:0:0: Direct-Access Kingston DTCRC 1000 PQ: 0 ANSI: 0 CCS
[18608.579223] scsi 8:0:0:1: Direct-Access Kingston DTCRC uSD/M2 1000 PQ: 0 ANSI: 0 CCS
[19395.452893] usb 3-1.1.3: Manufacturer: Kingston
[19397.819901] scsi 9:0:0:0: Direct-Access Kingston DTCRC 1000 PQ: 0 ANSI: 0 CCS
[19398.084084] scsi 9:0:0:1: Direct-Access Kingston DTCRC uSD/M2 1000 PQ: 0 ANSI: 0 CCS
[19442.074467] usb 3-1.1.3: Manufacturer: Kingston
[19444.435104] scsi 10:0:0:0: Direct-Access Kingston DTCRC 1000 PQ: 0 ANSI: 0 CCS
[19444.699603] scsi 10:0:0:1: Direct-Access Kingston DTCRC uSD/M2 1000 PQ: 0 ANSI: 0 CCS
[20676.796581] usb 3-1.1.3: Manufacturer: Kingston
[20679.164702] scsi 11:0:0:0: Direct-Access Kingston DTCRC 1000 PQ: 0 ANSI: 0 CCS
[21974.279188] usb 3-1.1.3: Manufacturer: Kingston
[21976.647068] scsi 12:0:0:0: Direct-Access Kingston DTCRC 1000 PQ: 0 ANSI: 0 CCS
[21976.911211] scsi 12:0:0:1: Direct-Access Kingston DTCRC uSD/M2 1000 PQ: 0 ANSI: 0 CCS
[84147.118037] usb 3-1.1.3: Manufacturer: Kingston
[84149.477234] scsi 13:0:0:0: Direct-Access Kingston DTCRC 1000 PQ: 0 ANSI: 0 CCS
But there is no mount-point
@linux-8db7:~> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb2 20889188 13416916 6388112 68% /
devtmpfs 4049240 24 4049216 1% /dev
tmpfs 4062976 88 4062888 1% /dev/shm
tmpfs 4062976 1208 4061768 1% /run
tmpfs 4062976 0 4062976 0% /sys/fs/cgroup
tmpfs 4062976 1208 4061768 1% /var/lock
tmpfs 4062976 1208 4061768 1% /var/run
/dev/sda2 455859552 222445800 210234336 52% /home
So i guess i have to find another memorystick
RS
Sorry my bad!
The “stick” was formated as FAT32. I use Partitioner to first remove old FAT32-partition, click Next and Finish to execute the task. Then i run Partitioner again and create ext3 partition. It create and format it without error.
Now when i plug it in, it is not detected and mounted. I guess its completely messed up.
RS
Plug in the device and do (as root)
fdisk -l
Chances are that the device will be reported. If you want to format it, you don’t want to have it mounted.
Assuming it’s reported as /dev/sdb1, it can be unmounted with
umount /dev/sdb1
You could scrub it with a low-level write like this
dd if=/dev/zero of=/dev/sdb1
then format with
mkfs.ext2 /dev/sdb1
Hi! Thanks! It works, almost!
There is something very strange. I did the commands and created ext2-partition. Then when i plug it in, it mount and i opened in Dolphin. I wanted to copy some files in, but the memory-stic was only write-able for a minute, then again its bacl to write-protected.
I copy as root and now it works, so i look at det right-settings and yes it says only owner(root) kan write and all others can only read. I change this to wrx on other users.
Unmount the memorystick and plug it out and then in again.
Now it doesn’t mount at all and fdisk -l don’t show the memorystick. I i replug the stick several times, it mount again. The same happens again. Write-able for å short time and then back to write-protected.
There is eighter å problem(bug) in OpenSUSE or there is something wrong with the memory-stick.
RS
You are only telling stories and do not show us what any of the commands we offered you do.
Where is fdisk -l? where is mount? where is ls -l of the mount-point?
Most people here realy have problems in helping without the information they asked for.
And doing things as root because they do not function otherwise is of course not very clever. One should find out and understand why something does not function and then act accordingly. Just forcing things to be done as root is almost as bad as doing everything as root.
I’m really sorry that i can’t express myself in such way that you can understand what i’m trying to say/explain.
Im NOT telling storys, but i’m telling symptoms.
I can show you fdisk -l but it doesn’t help you because the memorystick is not listed there.
I can show you df, but it doesn’t help you, because its not in the list.
Ok! I will do what you want;
# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x81c02799
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616447 307200 7 HPFS/NTFS/exFAT
/dev/sda2 616448 927137791 463260672 83 Linux
/dev/sda3 927137792 972572671 22717440 7 HPFS/NTFS/exFAT
/dev/sda4 972572672 976756735 2092032 c W95 FAT32 (LBA)
Disk /dev/sdb: 24.0 GB, 24015495168 bytes, 46905264 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
Disk label type: dos
Disk identifier: 0x00090c12
Device Boot Start End Blocks Id System
/dev/sdb1 2048 4192255 2095104 82 Linux swap / Solaris
/dev/sdb2 4192256 46903295 21355520 83 Linux
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb2 20889188 13420988 6384040 68% /
devtmpfs 4049240 24 4049216 1% /dev
tmpfs 4062976 96 4062880 1% /dev/shm
tmpfs 4062976 1212 4061764 1% /run
tmpfs 4062976 0 4062976 0% /sys/fs/cgroup
tmpfs 4062976 1212 4061764 1% /var/lock
tmpfs 4062976 1212 4061764 1% /var/run
/dev/sda2 455859552 222462020 210218116 52% /home
# mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=4049240k,nr_inodes=1012310,mode=755)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sdb2 on / type ext4 (rw,relatime,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=34,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,mode=755)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda2 on /home type ext4 (rw,relatime,data=ordered)
vmware-vmblock on /var/run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
vmware-vmblock on /run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
none on /var/lib/ntp/proc type proc (ro,nosuid,nodev,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
gvfsd-fuse on /var/run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
As you can see; There is no /dev/sdc and there is no /dev/sdc1
BUT! Sometimes after 15-20minutes, it suddenly mount.
Ok! Now it at last mount again and i can run to commands again;
# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x81c02799
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616447 307200 7 HPFS/NTFS/exFAT
/dev/sda2 616448 927137791 463260672 83 Linux
/dev/sda3 927137792 972572671 22717440 7 HPFS/NTFS/exFAT
/dev/sda4 972572672 976756735 2092032 c W95 FAT32 (LBA)
Disk /dev/sdb: 24.0 GB, 24015495168 bytes, 46905264 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
Disk label type: dos
Disk identifier: 0x00090c12
Device Boot Start End Blocks Id System
/dev/sdb1 2048 4192255 2095104 82 Linux swap / Solaris
/dev/sdb2 4192256 46903295 21355520 83 Linux
Disk /dev/sdc: 2007 MB, 2007498752 bytes, 3920896 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
Disk label type: dos
Disk identifier: 0x71ec093d
Device Boot Start End Blocks Id System
/dev/sdc1 2048 3919871 1958912 83 Linux
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb2 20889188 13421120 6383908 68% /
devtmpfs 4049240 24 4049216 1% /dev
tmpfs 4062976 100 4062876 1% /dev/shm
tmpfs 4062976 1228 4061748 1% /run
tmpfs 4062976 0 4062976 0% /sys/fs/cgroup
tmpfs 4062976 1228 4061748 1% /var/lock
tmpfs 4062976 1228 4061748 1% /var/run
/dev/sda2 455859552 222469080 210211056 52% /home
/dev/sdc1 1928084 2880 1810876 1% /run/media/ronsim/c7524ec4-23ed-4117-aeb1-d0f69122b0f6
# mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=4049240k,nr_inodes=1012310,mode=755)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sdb2 on / type ext4 (rw,relatime,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=34,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,mode=755)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda2 on /home type ext4 (rw,relatime,data=ordered)
vmware-vmblock on /var/run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
vmware-vmblock on /run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
none on /var/lib/ntp/proc type proc (ro,nosuid,nodev,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
gvfsd-fuse on /var/run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
/dev/sdc1 on /run/media/ronsim/c7524ec4-23ed-4117-aeb1-d0f69122b0f6 type ext2 (rw,nosuid,nodev,relatime,uhelper=udisks2)
/dev/sdc1 on /var/run/media/ronsim/c7524ec4-23ed-4117-aeb1-d0f69122b0f6 type ext2 (rw,nosuid,nodev,relatime)
/run/media/ronsim/c7524ec4-23ed-4117-aeb1-d0f69122b0f6> ls -la
totalt 20
drwxr-xr-x 3 root root 4096 feb. 4 12:07 .
drwxr-x---+ 3 root root 60 feb. 4 12:50 ..
drwx------ 2 root root 16384 feb. 4 12:07 lost+found
Now we can see /dev/sdc and /sdc1
Thank you. Even when output does show that there is nothing, we like to see that. And we like it come to that conclusion ourselves. We are very suspicious and in fact we do not trust people, we trust systems.lol!
Now, when you say that it is unmounted after some time spontanious, that points to a hardware problem imho.
And about the ls -l you showed us, as you see root is the owner of that directory and the permission bits show that only root can write there (read: create/delete files in the directory). Thus user ronsim can not do that, like user ronsim can not remove/create file in /usr/bin. That is Unix/Linux protection by owner/group and permissions.
So using root to change to ownership might help:
chmod ronsim:users /run/media/ronsim/c7524ec4-23ed-4117-aeb1-d0f69122b0f6
(of course adapt when ronsim or users are not the user/group that should own this).
Thanks for trying to help!
But…
chmod ronsim:users /run/media/ronsim/c7524ec4-23ed-4117-aeb1-d0f69122b0f6
chmod: invalid mode: «ronsim:users»
Try 'chmod --help' for more information.
Did you meen CHOWN?
RS
Yup, CHOWN it should be.
I appoligize sincerely. Completely my fault. It should indeed be
chown .......
On 2014-02-04 00:46, Fraser Bell wrote:
>
> john_hudson;2621874 Wrote:
>>
>> BTW why ext3? ext2 is better for a USB stick because it does not have
>> the repeated writes that the journaling of ext3 creates.
>
> Precisely the question I was about to ask, “why ext3?”. I also suggest
> ext2.
Nope
Think of “extends”.
You can create an ext4 without journal, meaning fewer writes:
mke2fs -t ext4 -L KINGSTON -O ^has_journal /dev/sde1
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
FWIW, I have a memory stick formatted as ext4. I don’t use it often, but it is a few years old now, and I’ve never had any issues with it
True.
ext2 or ext4 are more suited to the task than ext3 is.
But, my recommendation for ext2 is that it is readable by more systems than ext4 is (although that getting to be less and less of an issue). Some of the very small distros can open ext2 or 3, but not ext4, and they are often found on older revived machines (Saved by Linux!). The USB keys I use most often are regularly taken around (most often to) pull someone out of a spot.
On 2014-02-04 22:56, Fraser Bell wrote:
> But, my recommendation for ext2 is that it is readable by more systems
> than ext4 is (although that getting to be less and less of an issue).
> Some of the very small distros can open ext2 or 3, but not ext4, and
> they are often found on older revived machines -(Saved by Linux!)-.
> The USB keys I use most often are regularly taken around (most often to)
> pull someone out of a spot.
That’s a point, yes.
When you use a stick for exchanges, you have to consider the other side.
So, I have fat, ntfs, ext4… For my external hard disks, I tend to use xfs.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)