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


Groups > linux.debian.user > #188693 > unrolled thread

Debian Live USB fails; bricks the USB stick

Started byKent West <westk@acu.edu>
First post2017-11-07 18:10 +0100
Last post2017-11-11 20:30 +0100
Articles 7 on this page of 27 — 11 participants

Back to article view | Back to linux.debian.user


Contents

  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

Page 2 of 2 — ← Prev page 1 [2]


#188755

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2017-11-08 17:10 +0100
Message-ID<uJB5o-Xu-11@gated-at.bofh.it>
In reply to#188752
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

[toc] | [prev] | [next] | [standalone]


#188757

FromThe Wanderer <wanderer@fastmail.fm>
Date2017-11-08 18:00 +0100
Message-ID<uJBRM-1do-7@gated-at.bofh.it>
In reply to#188755

[Multipart message — attachments visible in raw view] — view raw

On 2017-11-08 at 11:00, Thomas Schmitt wrote:

> 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.

Last time I saw a USB drive insist it was read-only in anything like
this fashion, it was indeed because the firmware had been set that way;
it was the install medium for some Autodesk software, shipped on branded
USB drives just for the additional cachet.

I had that drive because I'd been asked to see if I could find a way to
make it writable. I did indeed track one down, but it's apparently
model-specific, and not super-reliable (in addition to requiring a USB3
port, at least for the models I was looking at); it involves essentially
flashing the firmware of the USB drive, using specialized software
dedicated for the purpose.

I don't know of any software for that purpose that's available for
Linux, and the Windows tools I found (which I'd have to dig up again
from scratch) were not only closed source but also somewhat model- or at
least manufacturer-specific, but if you want to restore this drive to an
operational state this may be an avenue worth pursuing.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

[toc] | [prev] | [next] | [standalone]


#188729

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2017-11-08 00:20 +0100
Message-ID<uJljX-7Y2-1@gated-at.bofh.it>
In reply to#188725
Hi,

Kent West wrote:
> fdisk: cannot open /dev/sdc: No medium found

So we really have one bad piece of hardware.

The division of responsibilities between device and its data content makes
it very unlikely that the ISO content is to blame. Maybe it died from the
mere effort to store 2 GB in one sweep.


> Device     Boot Start     End Sectors  Size Id Type
> /dev/sdd1  *        0 4173823 4173824    2G  0 Empty
> /dev/sdd2        1540    2371     832  416K ef EFI (FAT-12/16/32)

That's what i see in debian-live-9.2.0-amd64-cinnamon.iso, too.
So far this piece of hardware seems ok and bears the data which constitute
the partition table of the ISO image (and much more).

I am quite sure that fdisk would remove both partitions and then create
new ones as you like.
To make it a safe bet i just tried with a copy of the ISO image. Deleted
both partitions and then created a single one from block 2048 to the end
the image. Result:
  Device    Boot Start     End Sectors Size Id Type
  test.iso1       2048 4174463 4172416   2G 83 Linux


> Loading /live/initrd.img-4.0.9-4-amd64...
> and then there's a very brief flash of a line that I can almost imagine I
> see the word "failed" in, and then it returns to the "Main Menu".

We will need advice about how to get to see that final line.

After you verified that you get the stick into a conventional state, you
should again dd the ISO onto it, verify the MD5 (matches only before first
boot attempt), and check whether it still fails.
This will not totally outrule hardware problems but that's the best we can
do before asking cluelessly at debian-live.


Have a nice day :)

Thomas

[toc] | [prev] | [next] | [standalone]


#188734

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2017-11-08 01:00 +0100
Message-ID<uJlWG-8ci-7@gated-at.bofh.it>
In reply to#188729
On Wed 08 Nov 2017 at 00:12:40 (+0100), Thomas Schmitt wrote:
> Hi,
> 
> Kent West wrote:
> > fdisk: cannot open /dev/sdc: No medium found
> 
> So we really have one bad piece of hardware.

In the past I've had the odd USB port die on me but then
come back to life. I don't remember whether rebooting was
enough; it might have taken an overnight rest.

I'm trying to recall what hardware I would have been plugging
into it at that time; probably cheap and nasty MP3 players:
a noname gift from MBNA credit cards, an Aigo from Maplin,
an ALi from Tesco. Real Intel mobo in the PC though.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#188718

FromFelix Miata <mrmazda@earthlink.net>
Date2017-11-07 22:50 +0100
Message-ID<uJjUS-6Yb-7@gated-at.bofh.it>
In reply to#188693
Kent West composed on 2017-11-07 10:58 (UTC-0600):

> I wanted to create a Live Debian USB stick (using an existing Debian
...
> found it on /dev/sdc, and ran the command:
> 
> sudo [dd] if=debian-live-9.2.0-amd64-cinnamon.iso of=/dev/sdc

> I walked away then and came back in a few minutes

How few?

> to find it had finished,

How did you make that determination? IME, writing an iso to a USB stick can take
an obscene length of time, finishing *long* after the command prompt returns if
you have a lot of RAM to read the iso into before the stick can be written to.
Was the stick's activity LED off before you tried accessing it or rebooting?

> but didn't pay attention to any other messages, and then tried booting it
> on another year-old Dell PC. It gave me the grub menu, but then when I
> tried to boot Debian Live, I got an error about an invalid magic number and
> a need to load a kernel first.

Maybe the bad magic number resulted from writing less than the whole iso file to
the stick?....
-- 
"Wisdom is supreme; therefore get wisdom. Whatever else you
get, get wisdom." Proverbs 4:7 (New Living Translation)

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

[toc] | [prev] | [next] | [standalone]


#188888

FromMike Kupfer <mkupfer@alum.berkeley.edu>
Date2017-11-11 19:50 +0100
Message-ID<uKJ0R-5zx-1@gated-at.bofh.it>
In reply to#188693
Kent West wrote:

> I walked away then and came back in a few minutes to find it had finished,
> but didn't pay attention to any other messages, and then tried booting it
> on another year-old Dell PC. It gave me the grub menu, but then when I
> tried to boot Debian Live, I got an error about an invalid magic number and
> a need to load a kernel first.

I stumbled over something last night with the netinst installer and a
Dell Latitude E7250 (which still had Windows on it).  I don't know if
it's related to your problem, but in case it might be relevant, I
thought I'd mention it.

I was able to boot the installer from a thumbdrive, and it would get
through a couple screens (e.g., locale), but then it would get no
further, saying it couldn't find the "CDROM" (i.e., the thumb drive).  I
eventually came across this text in the Installation Guide[1]:

  On some UEFI systems, the firmware will reduce “boot” time by not
  initialising the keyboard controller or USB hardware

I booted the BIOS setup and changed the system from fast boot to
"thorough" boot.  That fixed my problem.

regards,
mike

[1] https://www.debian.org/releases/stable/amd64/ch03s06.html.en#disable-fast-boot

[toc] | [prev] | [next] | [standalone]


#188889

FromGene Heskett <gheskett@shentel.net>
Date2017-11-11 20:30 +0100
Message-ID<uKJDz-63r-11@gated-at.bofh.it>
In reply to#188888
On Saturday 11 November 2017 13:23:24 Mike Kupfer wrote:

> Kent West wrote:
> > I walked away then and came back in a few minutes to find it had
> > finished, but didn't pay attention to any other messages, and then
> > tried booting it on another year-old Dell PC. It gave me the grub
> > menu, but then when I tried to boot Debian Live, I got an error
> > about an invalid magic number and a need to load a kernel first.
>
> I stumbled over something last night with the netinst installer and a
> Dell Latitude E7250 (which still had Windows on it).  I don't know if
> it's related to your problem, but in case it might be relevant, I
> thought I'd mention it.
>
> I was able to boot the installer from a thumbdrive, and it would get
> through a couple screens (e.g., locale), but then it would get no
> further, saying it couldn't find the "CDROM" (i.e., the thumb drive). 
> I eventually came across this text in the Installation Guide[1]:
>
>   On some UEFI systems, the firmware will reduce “boot” time by not
>   initialising the keyboard controller or USB hardware
>
> I booted the BIOS setup and changed the system from fast boot to
> "thorough" boot.  That fixed my problem.
>
> regards,
> mike
>
> [1]
> https://www.debian.org/releases/stable/amd64/ch03s06.html.en#disable-f
>ast-boot

Very good to know Mike, thank you.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.debian.user


csiph-web