Re: USB drive mounted Read-only; what to do ?
On Sun, 2014-12-21 at 16:46 -0300, Renaud OLGIATI wrote: On Sun, 21 Dec 2014 19:30:39 + Brian a...@cityscape.co.uk wrote: Only fly in the ointment is that gparted still complains that: Unable to open /dev/sdi read-write (Read-only file system). /dev/sdi has been opened read-only. Hve you not yet come to terms with the fact that your USB stick has cocked its toes up? I still doubt that, given I can read the contents. It's my experience that SD cards and USB flash drives eventually go read-only, presumably when there are no spare working flash blocks left to replace those that have worn out. Some cheap ones I've had have only lasted a mater of months, other are going strong after many years. -- Tixy -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/1419244191.2592.12.ca...@yxit.co.uk
Re: USB drive mounted Read-only; what to do ?
On Monday 22 December 2014 10:29:51 Tixy wrote: On Sun, 2014-12-21 at 16:46 -0300, Renaud OLGIATI wrote: On Sun, 21 Dec 2014 19:30:39 + Brian a...@cityscape.co.uk wrote: Only fly in the ointment is that gparted still complains that: Unable to open /dev/sdi read-write (Read-only file system). /dev/sdi has been opened read-only. Hve you not yet come to terms with the fact that your USB stick has cocked its toes up? I still doubt that, given I can read the contents. It's my experience that SD cards and USB flash drives eventually go read-only, presumably when there are no spare working flash blocks left to replace those that have worn out. Some cheap ones I've had have only lasted a mater of months, other are going strong after many years. Renaud has the only 100% reliable USB stick ever manufactured. ;-) Lisi -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/201412221032.43035.lisi.re...@gmail.com
Re: USB drive mounted Read-only; what to do ?
Ric Moore wrote: Andrei POPESCU wrote: On one hand I don't think it's such a big burden to use su/do or similar for this type of operation, on the other hand it's slightly easier to pick the wrong device and destroy your data. Andrei, the issue of IF the pen-drive was automounted on insertion has not been raised. What do you think?? Ric Certainly if it were mounted when writing to the underlying raw device I would expect that would really confuse the kernel about the mount point. If it were mounted read-only that would be the best case. But if the file system were trying to update structures then I would expect that would corrupt the iso image written to the raw device. Hopefully it wouldn't boot as opposed to booting but having strange errors later. Bob signature.asc Description: Digital signature
Re: USB drive mounted Read-only; what to do ?
On Sb, 20 dec 14, 19:50:51, Bob Proulx wrote: Good question. It feels like we have come full circle. That was the way it was before the introduction of devfs and udev. It appears that things now have returned to the way it was before udev. Which won't bother the old-school Unix folks because we already lived through that and already know how to deal with it. But why haven't the next generation started complaining about it? If it works for them, then how? The changelog says they are obsolete. But then what is the replacement for them? If my understanding is correct, normal read/write permissions are handled by udisks and should work regardless of whether a user happened to be the first one set up (usually by debian-installer) or not. Whether it is a good idea to restrict writing to the raw device only to root-equivalent users is a different question. On one hand I don't think it's such a big burden to use su/do or similar for this type of operation, on the other hand it's slightly easier to pick the wrong device and destroy your data. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser Offtopic discussions among Debian users and developers: http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic http://nuvreauspam.ro/gpg-transition.txt signature.asc Description: Digital signature
Re: USB drive mounted Read-only; what to do ?
On Fri, 19 Dec 2014 15:07:25 -0300 Renaud (Ron) OLGIATI ren...@olgiati-in-paraguay.org wrote: # ls -l /dev/sdi brw-rw---T 1 root floppy 8, 128 Dec 19 07:59 /dev/sdi Anyone know where I could find info on the special permission denoted by the leading b in the permissions above, and same for the trailing T ? Cheers, Ron. -- In war, truth is the first casualty. -- U Thant -- http://www.olgiati-in-paraguay.org -- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141221104943.1941c...@ron.cerrocora.org
Re: USB drive mounted Read-only; what to do ?
On Sun, 21 Dec 2014 10:49:43 -0300 Renaud (Ron) OLGIATI ren...@olgiati-in-paraguay.org wrote: Hello Renaud, # ls -l /dev/sdi brw-rw---T 1 root floppy 8, 128 Dec 19 07:59 /dev/sdi Anyone know where I could find info on the special permission denoted by the leading b in the permissions above, and same for the trailing T ? See; http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html for a good, but not complete view of what each bit is for. For example, the page doesn't explain the difference between t T or s S. For that, see; https://en.wikipedia.org/wiki/File_system_permissions -- Regards _ / ) The blindingly obvious is / _)radnever immediately apparent But they didn't tell him the first two didn't count Tin Soldiers - Stiff Little Fingers pgpGISvmqAEPO.pgp Description: OpenPGP digital signature
Re: USB drive mounted Read-only; what to do ?
On 12/21/2014 11:49 AM, Renaud (Ron) OLGIATI wrote: On Fri, 19 Dec 2014 15:07:25 -0300 Renaud (Ron) OLGIATI ren...@olgiati-in-paraguay.org wrote: # ls -l /dev/sdi brw-rw---T 1 root floppy 8, 128 Dec 19 07:59 /dev/sdi Anyone know where I could find info on the special permission denoted by the leading b in the permissions above, That's not a permission, it indicates it's a block device. and same for the trailing T ? Sticky bit is set. info ls brings the coreutils manual, where these flags are described (see section What information is listed). -- You are magnetic in your bearing. Eduardo M KALINOWSKI edua...@kalinowski.com.br -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/5496d294.7050...@kalinowski.com.br
Re: USB drive mounted Read-only; what to do ?
On Sun, 21 Dec 2014 12:00:52 -0200 Eduardo M KALINOWSKI edua...@kalinowski.com.br wrote: # ls -l /dev/sdi brw-rw---T 1 root floppy 8, 128 Dec 19 07:59 /dev/sdi Anyone know where I could find info on the special permission denoted by the leading b in the permissions above, That's not a permission, it indicates it's a block device. and same for the trailing T ? Sticky bit is set. info ls brings the coreutils manual, where these flags are described (see section What information is listed). Thanks to your help, and that of Eduardo M KALINOWSKI, I have managed to get rid of the sticky bit, by running successively: # ls -l /dev/sdi brw-rw---T 1 root floppy 8, 128 Dec 21 10:44 /dev/sdi # chmod a+x /dev/sdi # ls -l /dev/sdi brwxrwx--t 1 root floppy 8, 128 Dec 21 10:44 /dev/sdi # chmod a+rw /dev/sdi # ls -l /dev/sdi brwxrwxrwt 1 root floppy 8, 128 Dec 21 10:44 /dev/sdi # chmod o-t /dev/sdi # ls -l /dev/sdi brwxrwxrwx 1 root floppy 8, 128 Dec 21 10:44 /dev/sdi As you can see above, you need first a chhmod a+rw that converts the T in t, after which a chmod o-t removes the t; chmod o-T does not work. Maybe there is a simpler way, but this one did work. Only fly in the ointment is that gparted still complains that: Unable to open /dev/sdi read-write (Read-only file system). /dev/sdi has been opened read-only. Cheers, Ron. -- L'è el dì di Mort, alegher! -- http://www.olgiati-in-paraguay.org -- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141221113438.59a6b...@ron.cerrocora.org
Re: USB drive mounted Read-only; what to do ?
On Sun 21 Dec 2014 at 11:31:19 +0200, Andrei POPESCU wrote: On Sb, 20 dec 14, 19:50:51, Bob Proulx wrote: Good question. It feels like we have come full circle. That was the way it was before the introduction of devfs and udev. It appears that things now have returned to the way it was before udev. Which won't bother the old-school Unix folks because we already lived through that and already know how to deal with it. But why haven't the next generation started complaining about it? If it works for them, then how? The changelog says they are obsolete. But then what is the replacement for them? If my understanding is correct, normal read/write permissions are handled by udisks and should work regardless of whether a user happened to be the first one set up (usually by debian-installer) or not. I'm not too familiar with udisks but that is my understanding too. Whether it is a good idea to restrict writing to the raw device only to root-equivalent users is a different question. It is. Is there an explanatory answer? Following upstream rules allows the Debian patch to be removed, which implies it has some unstated consequences. On one hand I don't think it's such a big burden to use su/do or similar for this type of operation, on the other hand it's slightly easier to pick the wrong device and destroy your data. Someone without root access cannot dd, cp or cat a Debian ISO to a USB stick. I rather liked the Wheezy ability to do this and to use fdisk without worrying. One moment of inattentiveness or the wrong letter with root access would ruin one's day. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141221192733.gn19...@copernicus.demon.co.uk
Re: USB drive mounted Read-only; what to do ?
On Sun 21 Dec 2014 at 11:34:38 -0300, Renaud OLGIATI wrote: Only fly in the ointment is that gparted still complains that: Unable to open /dev/sdi read-write (Read-only file system). /dev/sdi has been opened read-only. Hve you not yet come to terms with the fact that your USB stick has cocked its toes up? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/21122014192833.de8a90d9e...@desktop.copernicus.demon.co.uk
Re: USB drive mounted Read-only; what to do ?
On Sun, 21 Dec 2014 19:30:39 + Brian a...@cityscape.co.uk wrote: Only fly in the ointment is that gparted still complains that: Unable to open /dev/sdi read-write (Read-only file system). /dev/sdi has been opened read-only. Hve you not yet come to terms with the fact that your USB stick has cocked its toes up? I still doubt that, given I can read the contents. Cheers, Ron. -- Democracy substitutes election by the incompetent many for appointment by the corrupt few. -- George Bernard Shaw -- http://www.olgiati-in-paraguay.org -- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141221164617.2fe18...@ron.cerrocora.org
Re: USB drive mounted Read-only; what to do ?
On 12/21/2014 04:31 AM, Andrei POPESCU wrote: On one hand I don't think it's such a big burden to use su/do or similar for this type of operation, on the other hand it's slightly easier to pick the wrong device and destroy your data. Andrei, the issue of IF the pen-drive was automounted on insertion has not been raised. What do you think?? Ric -- My father, Victor Moore (Vic) used to say: There are two Great Sins in the world... ..the Sin of Ignorance, and the Sin of Stupidity. Only the former may be overcome. R.I.P. Dad. Linux user# 44256 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/549726e6.2090...@gmail.com
Re: USB drive mounted Read-only; what to do ?
On Vi, 19 dec 14, 10:15:32, Brian wrote: On Fri 19 Dec 2014 at 05:45:33 -0300, Renaud OLGIATI wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync Thee is no need to be root to copy the ISO. Of course there is no need to be root to copy an ISO file around, but permission to write directly to the raw device is equivalent to root, so naturally this is not included in the permissions of normal users. $ ls -l /dev/sda brw-rw 1 root disk 8, 0 dec 20 23:16 /dev/sda From /usr/share/doc/base-passwd/users-and-groups.txt.gz disk Raw access to disks. Mostly equivalent to root access. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser Offtopic discussions among Debian users and developers: http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic http://nuvreauspam.ro/gpg-transition.txt signature.asc Description: Digital signature
Re: USB drive mounted Read-only; what to do ?
Andrei POPESCU wrote: Brian wrote: Renaud OLGIATI wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync Thee is no need to be root to copy the ISO. Of course there is no need to be root to copy an ISO file around, but permission to write directly to the raw device is equivalent to root, so naturally this is not included in the permissions of normal users. $ ls -l /dev/sda brw-rw 1 root disk 8, 0 dec 20 23:16 /dev/sda But removable media is mounted as part of the floppy group not the disk group. $ ls -l /dev/sd? brw-rw---T 1 root disk 8, 0 Dec 9 13:24 /dev/sda brw-rw---T 1 root disk 8, 16 Dec 9 13:24 /dev/sdb brw-rw---T 1 root floppy 8, 32 Dec 9 13:24 /dev/sdc Here /dev/sdc is a usb storage device and it gets set up with the floppy group. The console user is also set up with the floppy group too. Assuming one of libpam, consolekit, systemd-login0 and so forth. Therefore the console user doesn't need to be root. They can write to the write to it directly. From /usr/share/doc/base-passwd/users-and-groups.txt.gz disk Raw access to disks. Mostly equivalent to root access. True for non-removable media. Since it was declared to be a USB pen drive we can assume it will be in the floppy group. And this was confirmed by the poster in another message: Renaud OLGIATI wrote: # ls -l /dev/sdi brw-rw---T 1 root floppy 8, 128 Dec 19 07:59 /dev/sdi Bob signature.asc Description: Digital signature
Re: USB drive mounted Read-only; what to do ?
On Sat 20 Dec 2014 at 15:13:04 -0700, Bob Proulx wrote: Andrei POPESCU wrote: Brian wrote: Renaud OLGIATI wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync Thee is no need to be root to copy the ISO. Of course there is no need to be root to copy an ISO file around, but permission to write directly to the raw device is equivalent to root, so naturally this is not included in the permissions of normal users. $ ls -l /dev/sda brw-rw 1 root disk 8, 0 dec 20 23:16 /dev/sda But removable media is mounted as part of the floppy group not the disk group. $ ls -l /dev/sd? brw-rw---T 1 root disk 8, 0 Dec 9 13:24 /dev/sda brw-rw---T 1 root disk 8, 16 Dec 9 13:24 /dev/sdb brw-rw---T 1 root floppy 8, 32 Dec 9 13:24 /dev/sdc Here /dev/sdc is a usb storage device and it gets set up with the floppy group. The console user is also set up with the floppy group too. Assuming one of libpam, consolekit, systemd-login0 and so forth. Therefore the console user doesn't need to be root. They can write to the write to it directly. It is assumed you are doing this on Wheezy. You are then the 100% correct. For me: brian@desktop:~$ ls -l /dev/sd* brw-rw---T 1 root disk 8, 0 Nov 25 15:00 /dev/sda brw-rw---T 1 root disk 8, 1 Nov 25 15:00 /dev/sda1 brw-rw---T 1 root disk 8, 2 Nov 25 15:00 /dev/sda2 brw-rw---T 1 root disk 8, 3 Nov 25 15:00 /dev/sda3 brw-rw---T 1 root disk 8, 4 Nov 25 15:00 /dev/sda4 brw-rw---T 1 root floppy 8, 16 Dec 20 23:04 /dev/sdb brw-rw---T 1 root floppy 8, 17 Dec 20 23:04 /dev/sdb1 /dev/sdb is a USB stick I've just plugged in. I am a member of the floppy group because d-i set the machine up that way many years ago. From /usr/share/doc/base-passwd/users-and-groups.txt.gz disk Raw access to disks. Mostly equivalent to root access. True for non-removable media. Since it was declared to be a USB pen drive we can assume it will be in the floppy group. And this was confirmed by the poster in another message: Renaud OLGIATI wrote: # ls -l /dev/sdi brw-rw---T 1 root floppy 8, 128 Dec 19 07:59 /dev/sdi Being a member of the floppy group on testing or unstable doesn't confer the same privileges as it does on Wheezy. From the udev changelog of Sat, 26 Apr 2014 21:37:29 +0200. * Drop our Debian specific 50-udev-default.rules and 91-permissions.rules and use the upstream rules with a patch for the remaining Debian specific default device permissions. Many thanks to Marco d'Itri for researching which Debian-specific rules are obsolete! Amongst other things, this now also reads the hwdb info for USB devices (Closes: #717405) and gets rid of some syntax errors (Closes: #706221) 91-permissions.rules is the one to look at. How does a user now get to use fdisk or write to a USB stick without libpam etc and so forth? Or does it matter? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141220233537.gl19...@copernicus.demon.co.uk
Re: USB drive mounted Read-only; what to do ?
Brian wrote: Bob Proulx wrote: floppy group. The console user is also set up with the floppy group too. Assuming one of libpam, consolekit, systemd-login0 and so forth. Therefore the console user doesn't need to be root. They can write to the write to it directly. It is assumed you are doing this on Wheezy. You are then the 100% correct. Hopefully Stable is a good default assumption unless there is some reason to assume otherwise. For me: ... brw-rw---T 1 root floppy 8, 16 Dec 20 23:04 /dev/sdb /dev/sdb is a USB stick I've just plugged in. I am a member of the floppy group because d-i set the machine up that way many years ago. Ah, yes, even without libpam, consolekit, systemd-login0 it is *also* possible that the user is in the floppy group by specification in the /etc/group file too. Another and so forth possibility. Being a member of the floppy group on testing or unstable doesn't confer the same privileges as it does on Wheezy. Hmm... From the udev changelog of Sat, 26 Apr 2014 21:37:29 +0200. * Drop our Debian specific 50-udev-default.rules and 91-permissions.rules and use the upstream rules with a patch for the remaining Debian specific default device permissions. Many thanks to Marco d'Itri for researching which Debian-specific rules are obsolete! Amongst other things, this now also reads the hwdb info for USB devices (Closes: #717405) and gets rid of some syntax errors (Closes: #706221) 91-permissions.rules is the one to look at. Good pointer. Thanks for bringing this to my attention. Sure enough on my Sid system usb storage devices are no longer placed into the floppy group. I hadn't notice this yet. Below I have just inserted a USB storage on a Sid system. $ ll /dev/sdg* brw-rw 1 root disk 8, 96 Dec 20 17:25 /dev/sdg brw-rw 1 root disk 8, 97 Dec 20 17:25 /dev/sdg1 brw-rw 1 root disk 8, 98 Dec 20 17:25 /dev/sdg2 Set up as disk and not floppy. Good heads up that things have changed. Hmm... Seems like a change for the worse. How does a user now get to use fdisk or write to a USB stick without libpam etc and so forth? Or does it matter? Good question. It feels like we have come full circle. That was the way it was before the introduction of devfs and udev. It appears that things now have returned to the way it was before udev. Which won't bother the old-school Unix folks because we already lived through that and already know how to deal with it. But why haven't the next generation started complaining about it? If it works for them, then how? The changelog says they are obsolete. But then what is the replacement for them? Bob signature.asc Description: Digital signature
USB drive mounted Read-only; what to do ?
I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system Is there a way to force it to mount read-write ? Cheers, Ron. -- We'll cross that bridge when we come back to it later. -- http://www.olgiati-in-paraguay.org -- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141219054533.3b0d4...@ron.cerrocora.org
Re: USB drive mounted Read-only; what to do ?
On Fri 19 Dec 2014 at 05:45:33 -0300, Renaud OLGIATI wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync Thee is no need to be root to copy the ISO. dd: opening `/dev/sdi': Read-only file system It contains am ISO9660 file system which, by design, is read-only. Is there a way to force it to mount read-write ? Nothing is mounted during the reading and writing process. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/19122014100841.04d03d484...@desktop.copernicus.demon.co.uk
Re: USB drive mounted Read-only; what to do ?
On Fri, 19 Dec 2014 10:15:32 + Brian a...@cityscape.co.uk wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system It contains am ISO9660 file system which, by design, is read-only. No, when I launch dd it contains a FAT32 file system. Is there a way to force it to mount read-write ? Nothing is mounted during the reading and writing process. Then why does dd complain, and refuse to run ? Cheers, Ron. -- Government is not the solution to our problems; government is the problem. -- Ronald Wilson Reagan -- http://www.olgiati-in-paraguay.org -- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141219072830.3a8cb...@ron.cerrocora.org
Re: USB drive mounted Read-only; what to do ?
On Fri, Dec 19, 2014 at 05:45:33AM -0300, Renaud OLGIATI wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system I guess that /dev/sdi is your USB pen drive? Does the pen drive have a read-only switch? I know some USB stick which have a hardware switch for read-only and read-write. The output of dmesg may give more information. Shade and sweet water! Stephan -- | Stephan Seitz E-Mail: s...@fsing.rootsland.net | | Public Keys: http://fsing.rootsland.net/~stse/keys.html | smime.p7s Description: S/MIME cryptographic signature
Re: USB drive mounted Read-only; what to do ?
On Fri, 19 Dec 2014 05:45:33 -0300 Renaud (Ron) OLGIATI ren...@olgiati-in-paraguay.org wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system Is there a way to force it to mount read-write ? Try mount -o remount,rw /dev/sdi Petter -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141219113541.5266cea2@fenris
Re: USB drive mounted Read-only; what to do ?
2014-12-19 11:28 GMT+01:00 Renaud OLGIATI ren...@olgiati-in-paraguay.org: On Fri, 19 Dec 2014 10:15:32 + Brian a...@cityscape.co.uk wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system It contains am ISO9660 file system which, by design, is read-only. No, when I launch dd it contains a FAT32 file system. Is there a way to force it to mount read-write ? Nothing is mounted during the reading and writing process. Then why does dd complain, and refuse to run ? There is nothing to mount here as that dd command is writing to the whole disk (of=/dev/sdi). It bypasses the partition table and the file system. Do you run the command as root? A user can't write to a device (imagine anybody could run dd if=/dev/zero of=/dev/sda where sda is a system disk). Does your USB key have a write protection switch? Has your USB key been write protected by a software running on Windows? Frederic -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/CAJ7R-8THwX-wY7+ALGUSyg2B_QzKw5iE-V=qncfd57+wpnj...@mail.gmail.com
Re: USB drive mounted Read-only; what to do ?
On Fri, 19 Dec 2014 11:42:44 +0100 Stephan Seitz stse+deb...@fsing.rootsland.net wrote: The output of dmesg may give more information. after a # dmesg -c /dev/null # dmesg [916392.905430] usb 3-6.2: new high-speed USB device number 8 using ehci_hcd [916393.015968] usb 3-6.2: New USB device found, idVendor=0781, idProduct=556b [916393.015975] usb 3-6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [916393.015980] usb 3-6.2: Product: Cruzer Edge [916393.015983] usb 3-6.2: Manufacturer: SanDisk [916393.015985] usb 3-6.2: SerialNumber: 200435151107E3936DDD [916393.016660] scsi30 : usb-storage 3-6.2:1.0 [916394.022745] scsi 30:0:0:0: Direct-Access SanDisk Cruzer Edge 1.26 PQ: 0 ANSI: 5 [916394.023549] sd 30:0:0:0: Attached scsi generic sg9 type 0 [916394.025152] sd 30:0:0:0: [sdi] 125031680 512-byte logical blocks: (64.0 GB/59.6 GiB) [916394.028162] sd 30:0:0:0: [sdi] Write Protect is on [916394.028169] sd 30:0:0:0: [sdi] Mode Sense: 43 00 80 00 [916394.031417] sd 30:0:0:0: [sdi] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [916394.055963] sdi: sdi1 [916394.063433] sd 30:0:0:0: [sdi] Attached SCSI removable disk then: # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system The drive does not have a HW write-protection switch. Where does this Write Protect come from, how can one get rid of it ? ? Cheers, Ron. -- Government is not the solution to our problems; government is the problem. -- Ronald Wilson Reagan -- http://www.olgiati-in-paraguay.org -- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141219075535.3f451...@ron.cerrocora.org
Re: USB drive mounted Read-only; what to do ?
2014-12-19 11:55 GMT+01:00 Renaud OLGIATI ren...@olgiati-in-paraguay.org: On Fri, 19 Dec 2014 11:42:44 +0100 Stephan Seitz stse+deb...@fsing.rootsland.net wrote: The output of dmesg may give more information. # dmesg [916394.028162] sd 30:0:0:0: [sdi] Write Protect is on The drive does not have a HW write-protection switch. Where does this Write Protect come from, how can one get rid of it ? A google search reveals it is a common problem that should be fixed with sudo hdparm -r0 /dev/sdi Frederic -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/caj7r-8qyecb0k0pogzqfvsvm+zowomu+y+am5jwxdmzqjyy...@mail.gmail.com
Re: USB drive mounted Read-only; what to do ?
On Fri, 19 Dec 2014 05:45:33 -0300 Renaud (Ron) OLGIATI ren...@olgiati-in-paraguay.org wrote: Hello Renaud, Is there a way to force it to mount read-write ? I had similar issues with a USB hard drive. It turns out that I needed ntfs-3g installed. Maybe it's the same for you. -- Regards _ / ) The blindingly obvious is / _)radnever immediately apparent But they didn't tell him the first two didn't count Tin Soldiers - Stiff Little Fingers pgp76Mt1x6Rds.pgp Description: OpenPGP digital signature
Re: USB drive mounted Read-only; what to do ?
On Fri, Dec 19, 2014 at 07:55:35AM -0300, Renaud OLGIATI wrote: On Fri, 19 Dec 2014 11:42:44 +0100 Stephan Seitz stse+deb...@fsing.rootsland.net wrote: The output of dmesg may give more information. after a # dmesg -c /dev/null # dmesg [916392.905430] usb 3-6.2: new high-speed USB device number 8 using ehci_hcd [916393.015968] usb 3-6.2: New USB device found, idVendor=0781, idProduct=556b [916393.015975] usb 3-6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [916393.015980] usb 3-6.2: Product: Cruzer Edge [916393.015983] usb 3-6.2: Manufacturer: SanDisk [916393.015985] usb 3-6.2: SerialNumber: 200435151107E3936DDD [916393.016660] scsi30 : usb-storage 3-6.2:1.0 [916394.022745] scsi 30:0:0:0: Direct-Access SanDisk Cruzer Edge 1.26 PQ: 0 ANSI: 5 [916394.023549] sd 30:0:0:0: Attached scsi generic sg9 type 0 [916394.025152] sd 30:0:0:0: [sdi] 125031680 512-byte logical blocks: (64.0 GB/59.6 GiB) [916394.028162] sd 30:0:0:0: [sdi] Write Protect is on [916394.028169] sd 30:0:0:0: [sdi] Mode Sense: 43 00 80 00 [916394.031417] sd 30:0:0:0: [sdi] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [916394.055963] sdi: sdi1 [916394.063433] sd 30:0:0:0: [sdi] Attached SCSI removable disk then: # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system Maybe you could try unmounting it first, before the dd? (I guess you'd be unmounting /dev/sdi1.) -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141219111947.GA13792@side
Re: USB drive mounted Read-only; what to do ?
On Fri 19 Dec 2014 at 12:13:59 +0100, Frédéric Marchal wrote: 2014-12-19 11:55 GMT+01:00 Renaud OLGIATI ren...@olgiati-in-paraguay.org: On Fri, 19 Dec 2014 11:42:44 +0100 Stephan Seitz stse+deb...@fsing.rootsland.net wrote: The output of dmesg may give more information. # dmesg [916394.028162] sd 30:0:0:0: [sdi] Write Protect is on The drive does not have a HW write-protection switch. Where does this Write Protect come from, how can one get rid of it ? A google search reveals it is a common problem that should be fixed with sudo hdparm -r0 /dev/sdi That's worth trying, Being pessimistic, a search with usb write protect is on linux also indicates that the stick is damaged in some way. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/19122014111702.884fe9eae...@desktop.copernicus.demon.co.uk
Re: USB drive mounted Read-only; what to do ?
On Fri 19 Dec 2014 at 11:47:38 +0100, Frédéric Marchal wrote: 2014-12-19 11:28 GMT+01:00 Renaud OLGIATI ren...@olgiati-in-paraguay.org: On Fri, 19 Dec 2014 10:15:32 + Brian a...@cityscape.co.uk wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system It contains am ISO9660 file system which, by design, is read-only. No, when I launch dd it contains a FAT32 file system. Is there a way to force it to mount read-write ? Nothing is mounted during the reading and writing process. Then why does dd complain, and refuse to run ? There is nothing to mount here as that dd command is writing to the whole disk (of=/dev/sdi). It bypasses the partition table and the file system. Do you run the command as root? A user can't write to a device (imagine anybody could run dd if=/dev/zero of=/dev/sda where sda is a system disk). A user can write to a USB stick on Wheezy (which seems reasonable to me) but not on testing/unstable. Not that that has anything to do with the OP's problem. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/19122014115041.f3aa7908c...@desktop.copernicus.demon.co.uk
Re: USB drive mounted Read-only; what to do ?
Hi On Fri, Dec 19, 2014 at 05:45:33AM -0300, Renaud OLGIATI wrote: I plug in a USB pen drive, and launch dd to copy an iso image. # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system Read-only file system on /dev/sdi?? This is very out of the usual: This seems to indicate that your /dev filesystem is read-only, and dd cannot create /dev/sdi ... What does: ls -l /dev/sdi report? I suspect it will say the file does not exist. If /dev/sdi does not exist, dd will attempt to create it. As a normal file. Which is probably not what you want... Similarly, can /dev actually be written to? The output of a command like this would be instructive: touch /dev/somefile-which-doesnt-exist Is there a way to force it to mount read-write ? Probably. But it depends on why it was read-only to start with... -- Karl E. Jorgensen -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141219120135.GB25008@hawking
Re: USB drive mounted Read-only; what to do ?
On Fri, 19 Dec 2014 12:13:59 +0100 Frédéric Marchal frederic.marc...@wowtechnology.com wrote: A google search reveals it is a common problem that should be fixed with sudo hdparm -r0 /dev/sdi # hdparm -r0 /dev/sdi /dev/sdi: setting readonly to 0 (off) readonly = 0 (off) after which again: # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system Karl E. Jorgensen k...@jorgensen.org.uk wrote: What does: ls -l /dev/sdi report? I suspect it will say the file does not exist. # ls -l /dev/sdi brw-rw---T 1 root floppy 8, 128 Dec 19 07:59 /dev/sdi If /dev/sdi does not exist, dd will attempt to create it. As a normal file. Which is probably not what you want... Similarly, can /dev actually be written to? The output of a command like this would be instructive: touch /dev/somefile-which-doesnt-exist # touch /dev/somefile-which-doesnt-exist # ls -l /dev/somefile-which-doesnt-exist -rw-r--r-- 1 root root 0 Dec 19 09:54 /dev/somefile-which-doesnt-exist My gast remains fiercely flabbered... Cheers, Ron. -- George Orwell was an optimist. -- Isaac Asimov -- http://www.olgiati-in-paraguay.org -- -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141219150725.1f31a...@ron.cerrocora.org
Re: USB drive mounted Read-only; what to do ?
Petter Adsen wrote: Renaud (Ron) OLGIATI wrote: # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi sync dd: opening `/dev/sdi': Read-only file system Is there a way to force it to mount read-write ? Try mount -o remount,rw /dev/sdi That would actually be bad. Because the poster is trying to write to the raw device. You don't want it actively mounted when writing to it like that. Therefore any suggestion to mount it works against not having it mounted. :-( Bob signature.asc Description: Digital signature
Re: USB drive mounted Read-only; what to do ?
Brad Rogers wrote: Renaud (Ron) OLGIATI wrote: Is there a way to force it to mount read-write ? I had similar issues with a USB hard drive. It turns out that I needed ntfs-3g installed. Maybe it's the same for you. That would help if the task was to mount an ntfs usb storage device and then write into the cooked file system. But here the poster is trying to write to the raw device and overwrite any file sytem that is there with an iso image. Bob signature.asc Description: Digital signature
Re: USB drive mounted Read-only; what to do ?
On Fri, Dec 19, 2014 at 07:55:35AM -0300, Renaud OLGIATI wrote: [916394.028162] sd 30:0:0:0: [sdi] Write Protect is on Well, the pen drive is certainly read-only. You’re saying, that you have no hardware switch on the device. Stupid question, did you ever write anything to this drive? Can it be that it *is* a read-only pen drive? Maybe some kind of environment that you never should change? Well, others have said that the pen drive could have an error. Do you get any information with „smartctl -a /dev/sdi”? Shade and sweet water! Stephan -- | Stephan Seitz E-Mail: s...@fsing.rootsland.net | | Public Keys: http://fsing.rootsland.net/~stse/keys.html | smime.p7s Description: S/MIME cryptographic signature