Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: Rodary Jacques Newsgroups: linux.debian.user Subject: Re: USB key and lost space Date: Sun, 18 Feb 2018 20:50:02 +0100 Message-ID: References: X-Original-To: debian-user@lists.debian.org X-Mailbox-Line: From debian-user-request@lists.debian.org Sun Feb 18 19:43:05 2018 Old-Return-Path: X-Amavis-Spam-Status: No, score=-2.671 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, FOURLA=0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=2, LDO_WHITELIST=-5, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_HTTP=0.001, RCVD_IN_SORBS_SOCKS=1.927] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: -7 User-Agent: KMail/5.2.3 (Linux/4.9.0-5-amd64; KDE/5.28.0; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="nextPart2594663.Fy6lyIcBoT" Content-Transfer-Encoding: 7Bit X-Mailing-List: archive/latest/732430 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/1703547.0z2OmikiDO@ns.rodary.net Approved: robomod@news.nic.it Lines: 464 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Thomas Schmitt X-Original-Date: Sun, 18 Feb 2018 20:42:47 +0100 X-Original-Message-ID: <1703547.0z2OmikiDO@ns.rodary.net> X-Original-References: <2001392.kIX8Eksk8A@ns.rodary.net> <25041774082976853801@scdbackup.webframe.org> Xref: csiph.com linux.debian.user:192620 This is a multi-part message in MIME format. --nextPart2594663.Fy6lyIcBoT Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Le vendredi 16 f=E9vrier 2018, 12:03:56 CET Thomas Schmitt a =E9crit : > Hi, >=20 > Rodary Jacques wrote: > > I did subscribe in april 2016, >=20 > The mail header X-Spam-Status in your mail to the list does not contain > the test "LDOSUBSCRIBER". So currently your address rodaryj@free.fr is > not subscribed. >=20 > Consider to subscribe again and also to Cc: the debian-user list with > your replies. >=20 >=20 > > Where am I supposed to find firmware.tar.gz. It may be a very stupid > > question, I was used with .iso image disks only. >=20 > Other people on debian-user probably have more experience with that. > I have to google. > For the current Debian release 9 "stretch" it is probably on > https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/stretch= /current/ >=20 >=20 > I wrote: > > > So use /sbin/fdisk to create partition 3. >=20 > > I used fdisk, cfdisk and partitionprobe and it seems my Key is quite > > useless now >=20 > Which ISO image did you put onto the USB stick ? >=20 > Let's give current netinst a try: >=20 > $ dd if=3Ddebian-9.3.0-amd64-netinst.iso of=3D/dev/sdc bs=3D1M > ... > $ /sbin/fdisk /dev/sdc > ... > Command (m for help): p > ... > Device Boot Start End Sectors Size Id Type > /dev/sdc1 * 0 593919 593920 290M 0 Empty > /dev/sdc2 3760 4591 832 416K ef EFI (FAT-12/16/32) >=20 > Command (m for help): n > Partition type > p primary (2 primary, 0 extended, 2 free) > e extended (container for logical partitions) > Select (default p): p > Partition number (3,4, default 3): 3 > First sector (593920-7864318, default 593920):=20 > Last sector, +sectors or +size{K,M,G,T,P} (593920-7864318, default 7864= 318):=20 >=20 > Created a new partition 3 of type 'Linux' and of size 3.5 GiB. >=20 > Command (m for help): p > Disk /dev/sdc: 3.8 GiB, 4026531328 bytes, 7864319 sectors > Units: sectors of 1 * 512 =3D 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disklabel type: dos > Disk identifier: 0x0347fd41 >=20 > Device Boot Start End Sectors Size Id Type > /dev/sdc1 * 0 593919 593920 290M 0 Empty > /dev/sdc2 3760 4591 832 416K ef EFI (FAT-12/16/32) > /dev/sdc3 593920 7864318 7270399 3.5G 83 Linux >=20 >=20 > Command (m for help): w > The partition table has been altered. > Calling ioctl() to re-read partition table. > Re-reading the partition table failed.: Permission denied >=20 > The final error message comes because i did this as normal user, just > having rw-permission to /dev/sdc. > I unplug and replug the USB stick to let the kernel assess the new > partitioning: >=20 > $ ls /dev/sdc* > /dev/sdc /dev/sdc1 /dev/sdc2 /dev/sdc3 >=20 >=20 > > I will try dd, very carefully. to erase this new partition I finally > > created, and perhaps come back to you afterwards. >=20 > I would just copy the ISO again onto the USB stick base device=20 > and then run fdisk. >=20 >=20 > Have a nice day :) >=20 > Thomas Saturday: I don't quite know how, but with fdisk, cfdisk, parted, partx and partpro= be I now have a brand new key with 16 GB (or GiB), the original size, with= out the iso file, type vfat (rw, nosuid, nodev, relatime, uid=3D1000, gid= =3D1000, fmask=3D0022, dmask=3D0022, codepage=3D437, iocharset=3Dascii, sho= rtname=3Dmixed, showexec, utf8, flush,errors=3Dremount-ro, uhelper=3Dudisks= 2. I have three oher microSDHC to save! Sunday: That was yesterday! Two of the microSDHC cards didn't resist to my= assaults. But the one with netinst iso (with the two partitions) seem to = be much harder.=20 Tired of trying (fdisk cfdisk sfdisk parted failed with "read only disk"),= I put the card in my camera to format it, successfully.=20 On a Mac, it is now known as "NIKON D7100" and is read-write, as on the ca= mera. But on my Debian and Fedora boxes, if it recognized as such also, it = stays read only: 'wipefs /dev/sde' continue to read: offset type=20 which was the old situation, mount says "/dev/sde1 on /media/jr/NIKON D710= 0 type vfat (ro, etc..." which is correct except for the ro! Same with the = other tools. How can I force the kernel to forget this 'read only' on the disk? Could i= t be because of the external card reader I use? It is not really important, since I can use this card with my mac and to s= can documents, but I like to understand. Jacques --nextPart2594663.Fy6lyIcBoT Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="iso-8859-1"

Le vendredi= 16 f=E9vrier 2018, 12:03:56 CET Thomas Schmitt a =E9crit :

> Hi,

>

> Rodary= Jacques wrote:

> > I= did subscribe in april 2016,

>

> The ma= il header X-Spam-Status in your mail to the list does not contain

> the te= st "LDOSUBSCRIBER". So currently your address rodaryj@free.fr is<= /p>

> not su= bscribed.

>

> Consid= er to subscribe again and also to Cc: the debian-user list with

> your r= eplies.

>

>

> > W= here am I supposed to find firmware.tar.gz. It may be a very stupid

> > q= uestion, I was used with .iso image disks only.

>

> Other = people on debian-user probably have more experience with that.

> I have= to google.

> For th= e current Debian release 9 "stretch" it is probably on

> http= s://cdimage.debian.org/cdimage/unofficial/non-free/firmware/stretch/current= /

>

>

> I wrot= e:

> > &= gt; So use /sbin/fdisk to create partition 3.

>

> > I= used fdisk, cfdisk and partitionprobe and it seems my Key is quite

> > u= seless now

>

> Which = ISO image did you put onto the USB stick ?

>

> Let's = give current netinst a try:

>

> $ dd= if=3Ddebian-9.3.0-amd64-netinst.iso of=3D/dev/sdc bs=3D1M

> ...<= /p>

> $ /s= bin/fdisk /dev/sdc

> ...<= /p>

> Comm= and (m for help): p

> ...<= /p>

> Devi= ce Boot Start End Sectors Size Id Type

> /dev= /sdc1 * 0 593919 593920 290M 0 Empty

> /dev= /sdc2 3760 4591 832 416K ef EFI (FAT-12/16/32)

>

> Comm= and (m for help): n

> Part= ition type

> p= primary (2 primary, 0 extended, 2 free)

> e= extended (container for logical partitions)

> Sele= ct (default p): p

> Part= ition number (3,4, default 3): 3

> Firs= t sector (593920-7864318, default 593920):

> Last= sector, +sectors or +size{K,M,G,T,P} (593920-7864318, default 7864318):

>

> Crea= ted a new partition 3 of type 'Linux' and of size 3.5 GiB.

>

> Comm= and (m for help): p

> Disk= /dev/sdc: 3.8 GiB, 4026531328 bytes, 7864319 sectors

> Unit= s: sectors of 1 * 512 =3D 512 bytes

> Sect= or size (logical/physical): 512 bytes / 512 bytes

> I/O = size (minimum/optimal): 512 bytes / 512 bytes

> Disk= label type: dos

> Disk= identifier: 0x0347fd41

>

> Devi= ce Boot Start End Sectors Size Id Type

> /dev= /sdc1 * 0 593919 593920 290M 0 Empty

> /dev= /sdc2 3760 4591 832 416K ef EFI (FAT-12/16/32)

> /dev= /sdc3 593920 7864318 7270399 3.5G 83 Linux

>

>

> Comm= and (m for help): w

> The = partition table has been altered.

> Call= ing ioctl() to re-read partition table.

> Re-r= eading the partition table failed.: Permission denied

>

> The fi= nal error message comes because i did this as normal user, just

> having= rw-permission to /dev/sdc.

> I unpl= ug and replug the USB stick to let the kernel assess the new

> partit= ioning:

>

> $ ls= /dev/sdc*

> /dev= /sdc /dev/sdc1 /dev/sdc2 /dev/sdc3

>

>

> > I= will try dd, very carefully. to erase this new partition I finally

> > c= reated, and perhaps come back to you afterwards.

>

> I woul= d just copy the ISO again onto the USB stick base device

> and th= en run fdisk.

>

>

> Have a= nice day :)

>

> Thomas=

Saturday:

I don't qu= ite know how, but with fdisk, cfdisk, parted, partx and partprobe I now ha= ve a brand new key with 16 GB (or GiB), the original size, without the iso= file, type vfat (rw, nosuid, nodev, relatime, uid=3D1000, gid=3D10= 00, fmask=3D0022, dmask=3D0022, codepage=3D437, iocharset=3Dascii, shortnam= e=3Dmixed, showexec, utf8,= flush,errors=3Dremount-ro, uhelper=3Dudisks2. I have three oher microSDHC = to save!

Sunday:
That was yesterday! Two of th= e
microSDHC cards didn't r= esist to my assaults. But the one with netinst iso (with the two partitions= ) seem to be much harder.

Tired of trying (fdisk cfdisk sfdisk parted= failed with "read only disk"), I put the card in my camera to fo= rmat it, successfully.

On a Mac, it is now known as "NIKON D7= 100" and is read-write, as on the camera. But on my Debian and Fedora = boxes, if it recognized as such also, it stays read only: 'wipefs /dev/sde' continue to read:

off= set =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0type
--------------------------------------------= =2D-------------------
0x200 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0gpt =A0=A0[table de partitions]

0x1fe =A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0dos =A0=A0[table de partitions]

0x80= 01 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0iso9660 =A0=A0[filesystem] =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0LABEL: Debia= n 9.3.0 amd64 n
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0UUID: =A02017-12-09-12-12-33-00

which was the old situation, mount says &qu= ot;/dev/sde1 on /media/jr/NIKON D7100 type vfat (ro, etc...&= quot; which is correct except for the ro! Same with the other tools.=

How can I force the kernel to forget this '= read only' on the disk? Could it be because of the external card reader I u= se?

It is not really important, since I can use= this card with my mac and to scan documents, but I like to understand.

Jacques

&nb= sp;

&nb= sp;

--nextPart2594663.Fy6lyIcBoT--