Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #188755

Re: Debian Live USB fails; bricks the USB stick

From "Thomas Schmitt" <scdbackup@gmx.net>
Newsgroups linux.debian.user
Subject Re: Debian Live USB fails; bricks the USB stick
Date 2017-11-08 17:10 +0100
Message-ID <uJB5o-Xu-11@gated-at.bofh.it> (permalink)
References <uJAj0-qj-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

Kent West wrote:
> The Yosemite Mac's Disk Utility gives me more info
> "This disk is not writable and can't be partitioned"
> that the Write Status is Read Only,

It really looks like this info comes from the stick's firmware and is
not fabricated by a software layer of the operating system.


I looked for the possible reason of EROFS in Linux driver sd.c.
Function sd_read_write_protect_flag() does its best to get a Mode Parameter
Header that preceeds any SCSI mode page reply. Then it interprets the
"Device-Specific Parameter" byte in that 4-byte header.
Standard SBC-2 says in section 6.1.3 that if bit 7 of this byte is set
then the medium is write protected.
I see this test in line 2638 of
  https://github.com/torvalds/linux/blob/master/drivers/scsi/sd.c
as
  sdkp->write_prot = ((data.device_specific & 0x80) != 0);

So like with the "No medium" error, it looks like an ill drive.

(I always thought that optical drives are a bit bitchy. But disk devices
 have their own ways to surprise the programmer. I better stay with
 the opticals and in userspace. :))


> It's just really odd that two differently-manufactured/aged sticks went bad
> at the same time, when trying to do the same operation with them,

My best explanation is that copying the 2 GB was more work than they had
to do in the years before.
Others are that misery loves company and misfortune seldom comes alone.

Already yesterday i dd'ed the ISO onto a 4 GB SanDisk Cruzer stick
in order to look for problems with mounted partitions. (None found.)
The stick is still alive and writable.

So debian-live-9.2.0-amd64-cinnamon.iso is not poisonous to all sticks.

I can hardly imagine how the computer should be to blame. It could
possibly fry the stick's controller. But talking it into losing its
medium or making it read-only ?


> Looks like I'll be tossing these sticks.

If you buy a new one, then make a backup before putting the ISO on it:

  dd if=/dev/sdc bs=1M | gzip >new_stick_backup.gz

A virgin stick should yield quite a small .gz file.


Have a nice day :)

Thomas

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-07 18:10 +0100
  Re: Debian Live USB fails; bricks the USB stick Cindy-Sue Causey <butterflybytes@gmail.com> - 2017-11-07 18:30 +0100
  Re: Debian Live USB fails; bricks the USB stick Patrick Bartek <nemommxiv@gmail.com> - 2017-11-07 19:50 +0100
    Re: Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-07 22:10 +0100
      Re: Debian Live USB fails; bricks the USB stick Patrick Bartek <nemommxiv@gmail.com> - 2017-11-08 00:30 +0100
  Re: Debian Live USB fails; bricks the USB stick davidson <davidson@freevolt.org> - 2017-11-07 20:40 +0100
  Re: Debian Live USB fails; bricks the USB stick "Thomas Schmitt" <scdbackup@gmx.net> - 2017-11-07 20:40 +0100
    Re: Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-07 22:00 +0100
      Re: Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-07 22:10 +0100
        Re: Debian Live USB fails; bricks the USB stick "Thomas Schmitt" <scdbackup@gmx.net> - 2017-11-07 23:10 +0100
          Re: Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-07 23:30 +0100
            Re: Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-07 23:40 +0100
              Re: Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-08 00:00 +0100
              Re: Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-08 00:00 +0100
                Re: Debian Live USB fails; bricks the USB stick "Thomas Schmitt" <scdbackup@gmx.net> - 2017-11-08 00:50 +0100
                Re: Debian Live USB fails; bricks the USB stick Felix Miata <mrmazda@earthlink.net> - 2017-11-08 01:00 +0100
                Re: Debian Live USB fails; bricks the USB stick Henrique de Moraes Holschuh <hmh@debian.org> - 2017-11-08 01:20 +0100
                Re: Debian Live USB fails; bricks the USB stick "Thomas Schmitt" <scdbackup@gmx.net> - 2017-11-08 09:50 +0100
                Re: Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-08 16:00 +0100
                Re: Debian Live USB fails; bricks the USB stick Kent West <westk@acu.edu> - 2017-11-08 16:20 +0100
                Re: Debian Live USB fails; bricks the USB stick "Thomas Schmitt" <scdbackup@gmx.net> - 2017-11-08 17:10 +0100
                Re: Debian Live USB fails; bricks the USB stick The Wanderer <wanderer@fastmail.fm> - 2017-11-08 18:00 +0100
              Re: Debian Live USB fails; bricks the USB stick "Thomas Schmitt" <scdbackup@gmx.net> - 2017-11-08 00:20 +0100
                Re: Debian Live USB fails; bricks the USB stick David Wright <deblis@lionunicorn.co.uk> - 2017-11-08 01:00 +0100
  Re: Debian Live USB fails; bricks the USB stick Felix Miata <mrmazda@earthlink.net> - 2017-11-07 22:50 +0100
  Re: Debian Live USB fails; bricks the USB stick Mike Kupfer <mkupfer@alum.berkeley.edu> - 2017-11-11 19:50 +0100
    Re: Debian Live USB fails; bricks the USB stick Gene Heskett <gheskett@shentel.net> - 2017-11-11 20:30 +0100

csiph-web