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 20 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 1 of 2  [1] 2  Next page →


#188693 — Debian Live USB fails; bricks the USB stick

FromKent West <westk@acu.edu>
Date2017-11-07 18:10 +0100
SubjectDebian Live USB fails; bricks the USB stick
Message-ID<uJfxU-4px-15@gated-at.bofh.it>

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

I wanted to create a Live Debian USB stick (using an existing Debian
system). I remember doing such a few years ago with "unetbootin", but when
I looked for "unetbootin" via aptitude search, I couldn't find it, so I did
a quick "unetbootin debian" search, and found a Debian bug report from 2015
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775689) that led me to
believe I should not use unetbootin, but to use the newer method of simply
dd'ing the .ISO to the USB drive.

So I went to
https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/ and
downloaded the AMD64 Cinnamon version of 9.2.0, and then inserted my USB
stick, found it on /dev/sdc, and ran the command:

sudo if=debian-live-9.2.0-amd64-cinnamon.iso
<https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-9.2.0-amd64-cinnamon.iso>
 of=/dev/sdc

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.

Not finding any documentation that might help, I checked the md5sum on the
downloaded file (it was correct), and tried the dd again. Same result.

I tinkered a bit, and then the next time I tried a dd, I noticed that it
was giving me an input/output error for /dev/sdc. Still, it seemed to
finish properly, but the boot attempt gave the same failed result.

So I decided to try a different download; I tried the Mate flavor. Same
result.

So I decided to try a different USB stick. Same result.

And now, both my sticks are complaining about being mounted read-only, and
I can't seem to fix that.

I tried "hdparm -r0 /dev/sdc", and that reports that it's set the read-only
flag to off, but the stick still is read-only.

So it appears that dd'ing a Debian .iso to a USB stick, at least using my
hardware, bricks the USB stick.

I'm assuming my attempt has cost me two USB sticks, and has just left a bad
experience with Debian under my belt, and there's nothing I can do about
it. (I don't even know where a bug report might go.) But I thought I'd put
this info on the User's list, just for the record, and perhaps at the
chance that someone might have a solution.

Thanks!

-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

[toc] | [next] | [standalone]


#188697

FromCindy-Sue Causey <butterflybytes@gmail.com>
Date2017-11-07 18:30 +0100
Message-ID<uJfRg-4xU-21@gated-at.bofh.it>
In reply to#188693
On 11/7/17, Kent West <westk@acu.edu> wrote:
> I wanted to create a Live Debian USB stick (using an existing Debian
> system). I remember doing such a few years ago with "unetbootin", but when
> I looked for "unetbootin" via aptitude search, I couldn't find it, so I did
> a quick "unetbootin debian" search, and found a Debian bug report from 2015
> (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775689) that led me to
> believe I should not use unetbootin, but to use the newer method of simply
> dd'ing the .ISO to the USB drive.
>
> So I went to
> https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/ and
> downloaded the AMD64 Cinnamon version of 9.2.0, and then inserted my USB
> stick, found it on /dev/sdc, and ran the command:
>
> sudo if=debian-live-9.2.0-amd64-cinnamon.iso
> <https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-9.2.0-amd64-cinnamon.iso>
>  of=/dev/sdc
>
> 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.
>
> Not finding any documentation that might help, I checked the md5sum on the
> downloaded file (it was correct), and tried the dd again. Same result.
>
> I tinkered a bit, and then the next time I tried a dd, I noticed that it
> was giving me an input/output error for /dev/sdc. Still, it seemed to
> finish properly, but the boot attempt gave the same failed result.
>
> So I decided to try a different download; I tried the Mate flavor. Same
> result.
>
> So I decided to try a different USB stick. Same result.
>
> And now, both my sticks are complaining about being mounted read-only, and
> I can't seem to fix that.
>
> I tried "hdparm -r0 /dev/sdc", and that reports that it's set the read-only
> flag to off, but the stick still is read-only.
>
> So it appears that dd'ing a Debian .iso to a USB stick, at least using my
> hardware, bricks the USB stick.
>
> I'm assuming my attempt has cost me two USB sticks, and has just left a bad
> experience with Debian under my belt, and there's nothing I can do about
> it. (I don't even know where a bug report might go.) But I thought I'd put
> this info on the User's list, just for the record, and perhaps at the
> chance that someone might have a solution.


Would something like parted or gparted help you manhandle both sticks
back into submission?

That magic number error, I've seen that in my usage before.

I'm getting a different one now, that 3 initial one, x/x/x, on an HDD
partition myself in last few days. That was from an rsync and tweak to
be bootable. #FAIL. There *are* fixes that I've successfully used in
the last year or so, but I got sidetracked and never tracked that back
down this last time.

But that readonly might put the kibosh on any hope at any kind of fix
in your case unless something like parted or gparted helps with that
first..

Just thinking out loud (about something I might try).. :)

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *

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


#188704

FromPatrick Bartek <nemommxiv@gmail.com>
Date2017-11-07 19:50 +0100
Message-ID<uJh6F-5ep-5@gated-at.bofh.it>
In reply to#188693
On Tue, 7 Nov 2017 10:58:58 -0600 Kent West <westk@acu.edu> wrote:

> I wanted to create a Live Debian USB stick (using an existing Debian
> system). I remember doing such a few years ago with "unetbootin", but
> when I looked for "unetbootin" via aptitude search, I couldn't find
> it, so I did a quick "unetbootin debian" search, and found a Debian
> bug report from 2015
> (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775689) that led
> me to believe I should not use unetbootin, but to use the newer
> method of simply dd'ing the .ISO to the USB drive.
> 
> So I went to
> https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/
> and downloaded the AMD64 Cinnamon version of 9.2.0, and then inserted
> my USB stick, found it on /dev/sdc, and ran the command:
> 
> sudo if=debian-live-9.2.0-amd64-cinnamon.iso

I'd give the complete path to the downloaded ISO.  dd's pretty stupid.

> <https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-9.2.0-amd64-cinnamon.iso>

Remove this.

>  of=/dev/sdc
> 
> 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.
> 
> Not finding any documentation that might help, I checked the md5sum
> on the downloaded file (it was correct), and tried the dd again. Same
> result.
> 
> I tinkered a bit, and then the next time I tried a dd, I noticed that
> it was giving me an input/output error for /dev/sdc. Still, it seemed
> to finish properly, but the boot attempt gave the same failed result.
> 
> So I decided to try a different download; I tried the Mate flavor.
> Same result.
> 
> So I decided to try a different USB stick. Same result.
> 
> And now, both my sticks are complaining about being mounted
> read-only, and I can't seem to fix that.
> 
> I tried "hdparm -r0 /dev/sdc", and that reports that it's set the
> read-only flag to off, but the stick still is read-only.
> 
> So it appears that dd'ing a Debian .iso to a USB stick, at least
> using my hardware, bricks the USB stick.
> 
> I'm assuming my attempt has cost me two USB sticks, and has just left
> a bad experience with Debian under my belt, and there's nothing I can
> do about it. (I don't even know where a bug report might go.) But I
> thought I'd put this info on the User's list, just for the record,
> and perhaps at the chance that someone might have a solution.

An install CD/DVD ISO is usually read-only and gets "designated" that
way when dd'ed to a USB stick.  This is normal.  If you
repartition/reformat/etc  the stick, then you can "correct" that and
make it writeable, again, but the ISO file is gone, of course.

B

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


#188716

FromKent West <westk@acu.edu>
Date2017-11-07 22:10 +0100
Message-ID<uJji9-6JH-1@gated-at.bofh.it>
In reply to#188704

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

On Tue, Nov 7, 2017 at 12:41 PM, Patrick Bartek <nemommxiv@gmail.com> wrote:

> On Tue, 7 Nov 2017 10:58:58 -0600 Kent West <westk@acu.edu> wrote:
>
> > I wanted to create a Live Debian USB stick (using an existing Debian
> > system). I remember doing such a few years ago with "unetbootin", but
> > when I looked for "unetbootin" via aptitude search, I couldn't find
> > it, so I did a quick "unetbootin debian" search, and found a Debian
> > bug report from 2015
> > (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775689) that led
> > me to believe I should not use unetbootin, but to use the newer
> > method of simply dd'ing the .ISO to the USB drive.
> >
> > So I went to
> > https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/
> > and downloaded the AMD64 Cinnamon version of 9.2.0, and then inserted
> > my USB stick, found it on /dev/sdc, and ran the command:
> >
> > sudo if=debian-live-9.2.0-amd64-cinnamon.iso
>
> I'd give the complete path to the downloaded ISO.  dd's pretty stupid.
>
> > <https://cdimage.debian.org/debian-cd/current-live/amd64/
> iso-hybrid/debian-live-9.2.0-amd64-cinnamon.iso>
>
> Remove this.
>

That's just an artifact of my copy/paste into GMail; the actual command did
not include the web address.


>
> >  of=/dev/sdc
> >
> > 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.
> >
> > Not finding any documentation that might help, I checked the md5sum
> > on the downloaded file (it was correct), and tried the dd again. Same
> > result.
> >
> > I tinkered a bit, and then the next time I tried a dd, I noticed that
> > it was giving me an input/output error for /dev/sdc. Still, it seemed
> > to finish properly, but the boot attempt gave the same failed result.
> >
> > So I decided to try a different download; I tried the Mate flavor.
> > Same result.
> >
> > So I decided to try a different USB stick. Same result.
> >
> > And now, both my sticks are complaining about being mounted
> > read-only, and I can't seem to fix that.
> >
> > I tried "hdparm -r0 /dev/sdc", and that reports that it's set the
> > read-only flag to off, but the stick still is read-only.
> >
> > So it appears that dd'ing a Debian .iso to a USB stick, at least
> > using my hardware, bricks the USB stick.
> >
> > I'm assuming my attempt has cost me two USB sticks, and has just left
> > a bad experience with Debian under my belt, and there's nothing I can
> > do about it. (I don't even know where a bug report might go.) But I
> > thought I'd put this info on the User's list, just for the record,
> > and perhaps at the chance that someone might have a solution.
>
> An install CD/DVD ISO is usually read-only and gets "designated" that
> way when dd'ed to a USB stick.  This is normal.  If you
> repartition/reformat/etc  the stick, then you can "correct" that and
> make it writeable, again, but the ISO file is gone, of course.
>
> B
>

That's good to know. Thanks!



-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

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


#188730

FromPatrick Bartek <nemommxiv@gmail.com>
Date2017-11-08 00:30 +0100
Message-ID<uJltD-816-3@gated-at.bofh.it>
In reply to#188716
On Tue, 7 Nov 2017 15:05:06 -0600 Kent West <westk@acu.edu> wrote:

> On Tue, Nov 7, 2017 at 12:41 PM, Patrick Bartek <nemommxiv@gmail.com>
> wrote:
> 
> > On Tue, 7 Nov 2017 10:58:58 -0600 Kent West <westk@acu.edu> wrote:
> >
> > > I wanted to create a Live Debian USB stick (using an existing
> > > Debian system). I remember doing such a few years ago with
> > > "unetbootin", but when I looked for "unetbootin" via aptitude
> > > search, I couldn't find it, so I did a quick "unetbootin debian"
> > > search, and found a Debian bug report from 2015
> > > (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775689) that
> > > led me to believe I should not use unetbootin, but to use the
> > > newer method of simply dd'ing the .ISO to the USB drive.
> > >
> > > So I went to
> > > https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/
> > > and downloaded the AMD64 Cinnamon version of 9.2.0, and then
> > > inserted my USB stick, found it on /dev/sdc, and ran the command:
> > >
> > > sudo if=debian-live-9.2.0-amd64-cinnamon.iso
> >
> > I'd give the complete path to the downloaded ISO.  dd's pretty
> > stupid.
> >
> > > <https://cdimage.debian.org/debian-cd/current-live/amd64/
> > iso-hybrid/debian-live-9.2.0-amd64-cinnamon.iso>
> >
> > Remove this.
> >
> 
> That's just an artifact of my copy/paste into GMail; the actual
> command did not include the web address.
> 
> [snip]

I figured something was amiss.  Also, in your original post there was no
dd command to go with the if= and of=.  I assumed something similar.

Always proof read.

B

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


#188711

Fromdavidson <davidson@freevolt.org>
Date2017-11-07 20:40 +0100
Message-ID<uJhT4-5J2-5@gated-at.bofh.it>
In reply to#188693
On Tue, 7 Nov 2017, Kent West wrote:

> I wanted to create a Live Debian USB stick (using an existing Debian
> system). I remember doing such a few years ago with "unetbootin", but when
> I looked for "unetbootin" via aptitude search, I couldn't find it, so I did
> a quick "unetbootin debian" search, and found a Debian bug report from 2015
> (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775689) that led me to
> believe I should not use unetbootin, but to use the newer method of simply
> dd'ing the .ISO to the USB drive.
>
> So I went to
> https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/ and
> downloaded the AMD64 Cinnamon version of 9.2.0, and then inserted my USB
> stick, found it on /dev/sdc, and ran the command:
>
> sudo if=debian-live-9.2.0-amd64-cinnamon.iso
> <https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-9.2.0-amd64-cinnamon.iso>
> of=/dev/sdc

I view your messages (which I gather are sent as html) as plain
text. Clearly there are some obfuscatory artifacts arising from the
conversion process.

But, regardless of this, there is no 'dd' to be found in your command
line above (neither in the text version I have included, nor in the
html version).

What command did you actually issue? (Command history files, like
~/.bash_history , might be more reliable than your wetware memory.)

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


#188712

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2017-11-07 20:40 +0100
Message-ID<uJhT4-5J2-7@gated-at.bofh.it>
In reply to#188693
Hi,

> sudo if=debian-live-9.2.0-amd64-cinnamon.iso  of=/dev/sdc

I assume the missing "dd" between "sudo" and "if=" is a copy+paste error.
Elsewise it is the correct copying method.


> I checked the md5sum on the downloaded file (it was correct),

Did you also check the MD5 of the copy on USB stick ?

  dd if=/dev/sdc bs=2048 count=1043616 | md5sum

This has to be done before booting the stick the first time.
If i boot the image with OVMF as virtual firmware, then the MD5 of the
ISO changes. Obviously some data get written into the EFI partition.


> It gave me the grub menu,

So the copying process has probably worked fine.

If the menu is really from GRUB (with a headline saying "GNU/GRUB") and 
not ISOLINUX (with no such headline), then your firmware is EFI in its
native mode.


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

This must be an inner problem of the operating system.

But

  qemu-system-x86_64 -enable-kvm -m 512 \
                     -bios /usr/share/ovmf/OVMF.fd \
                     -hda debian-live-9.2.0-amd64-cinnamon.iso

boots for me through the first item of the GRUB menu and the kernel boot
messages into some graphical desktop.
The option -hda is the equivalent to an USB stick, -cdrom would be the
equivalent of a CD or DVD.

Since i cannot reproduce the problem from your info, you will have to
describe the symptoms and preconditions in more detail.
What's the firmware mode ? EFI or BIOS/Legacy ?
Especially the original error messages will be needed.

Then probably you will have to carry the issue to debian-live mailing list
  https://lists.debian.org/debian-live/


> And now, both my sticks are complaining about being mounted read-only, and I
> can't seem to fix that.

That's just a consequence of the fact that the partitions number 1 of the
sticks bear ISO 9660 filesystems, which are read-only. The stick is still
writable.

You can invalidate the ISO 9660 filesystem by

  dd if=/dev/zero bs=2048 count=1 seek=16 of=/dev/sdc

You may want to change the partitioning and also remove the EFI partition 2.
Then you may create new filesystems in the partitions.

(If you had dd'ed a backup image of the USB stick before dd-ing the ISO onto
 it, then you could dd that image onto the stick to get back the old
 partitions and their filesystems.)


Have a nice day :)

Thomas

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


#188715

FromKent West <westk@acu.edu>
Date2017-11-07 22:00 +0100
Message-ID<uJj8v-6qY-41@gated-at.bofh.it>
In reply to#188712

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

On Tue, Nov 7, 2017 at 1:37 PM, Thomas Schmitt <scdbackup@gmx.net> wrote:

> Hi,
>
> > sudo if=debian-live-9.2.0-amd64-cinnamon.iso  of=/dev/sdc
>
> I assume the missing "dd" between "sudo" and "if=" is a copy+paste error.
> Elsewise it is the correct copying method.
>
>
Yes, my bad. Sorry.



> > I checked the md5sum on the downloaded file (it was correct),
>
> Did you also check the MD5 of the copy on USB stick ?
>
>   dd if=/dev/sdc bs=2048 count=1043616 | md5sum
>
> This has to be done before booting the stick the first time.
> If i boot the image with OVMF as virtual firmware, then the MD5 of the
> ISO changes. Obviously some data get written into the EFI partition.
>
>
No, I did not check the MD5 of the USB stick's copy. This is a good thing
to know for future attempts.



>
> > It gave me the grub menu,
>
> So the copying process has probably worked fine.
>
> If the menu is really from GRUB (with a headline saying "GNU/GRUB") and
> not ISOLINUX (with no such headline), then your firmware is EFI in its
> native mode.
>


The headline says "GNU GRUB Version 2.02~beta3-5".



>
> > 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.
>
> This must be an inner problem of the operating system.
>
> But
>
>   qemu-system-x86_64 -enable-kvm -m 512 \
>                      -bios /usr/share/ovmf/OVMF.fd \
>                      -hda debian-live-9.2.0-amd64-cinnamon.iso
>
> boots for me through the first item of the GRUB menu and the kernel boot
> messages into some graphical desktop.
> The option -hda is the equivalent to an USB stick, -cdrom would be the
> equivalent of a CD or DVD.''
>


Well that's cool! I've used Parallels years ago, then VMWare a bit, then
VirtualBox, and had a couple of false starts with QEMU (so it's installed
on my Debian box), but I think this is the first time I've ever seen it in
action. (I don't have a /usr/share/ovmf directory, so I skipped that part;
still, cool!)

Yeah, I get to a partial Cinnamon desktop (it's missing pieces) so that
tells me that the image [mostly/sort of] works.



> Since i cannot reproduce the problem from your info, you will have to
> describe the symptoms and preconditions in more detail.
> What's the firmware mode ? EFI or BIOS/Legacy ?
> Especially the original error messages will be needed.
>

The firmware mode is EFI; BIOS/Legacy is disabled.

But I also tried re-enabling BIOS/Legacy, and setting it to that mode, just
to see what happened. That was this morning, so I don't recall exactly what
happened, but I do recall it didn't help.



> Then probably you will have to carry the issue to debian-live mailing list
>   https://lists.debian.org/debian-live/
>
>
> > And now, both my sticks are complaining about being mounted read-only,
> and I
> > can't seem to fix that.
>
> That's just a consequence of the fact that the partitions number 1 of the
> sticks bear ISO 9660 filesystems, which are read-only. The stick is still
> writable.
>

I thought I had rescued one of the sticks by discovering that cfdisk would
write to it and wipe out the partitions. But by the time I finished
tinkering with that, the stick became completely unreadable - sort of. I
stick it into my Debian box, and dmesg sees an sdc appear, but trying to
access it in any way reports that there's no medium for /dev/sdc. I'll try
the dd trick you share below, as soon as I can find where I misplaced that
stick :-0

>
> You can invalidate the ISO 9660 filesystem by
>
>   dd if=/dev/zero bs=2048 count=1 seek=16 of=/dev/sdc
>
> You may want to change the partitioning and also remove the EFI partition
> 2.
> Then you may create new filesystems in the partitions.
>
> (If you had dd'ed a backup image of the USB stick before dd-ing the ISO
> onto
>  it, then you could dd that image onto the stick to get back the old
>  partitions and their filesystems.)
>
>
> Have a nice day :)
>

Thanks! I appreciate your help!


>
> Thomas
>
>


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

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


#188717

FromKent West <westk@acu.edu>
Date2017-11-07 22:10 +0100
Message-ID<uJji9-6JH-15@gated-at.bofh.it>
In reply to#188715

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

On Tue, Nov 7, 2017 at 2:55 PM, Kent West <westk@acu.edu> wrote:

>
>
> On Tue, Nov 7, 2017 at 1:37 PM, Thomas Schmitt <scdbackup@gmx.net> wrote:
>




>
>> You can invalidate the ISO 9660 filesystem by
>>
>>   dd if=/dev/zero bs=2048 count=1 seek=16 of=/dev/sdc
>>
>

westk@westkent:~/Downloads$ sudo dd if=/dev/zero bs=2048 count=1 seek=16
of=/dev/sdc
[sudo] password for westk:
dd: failed to open '/dev/sdc': No medium found

westk@westkent:~/Downloads$ sudo dmesg | tail -
[89884.259617] usb 1-1.4: New USB device found, idVendor=05dc,
idProduct=a790
[89884.259620] usb 1-1.4: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[89884.259622] usb 1-1.4: Product: Gizmo!
[89884.259623] usb 1-1.4: Manufacturer: Crucial
[89884.259624] usb 1-1.4: SerialNumber: AA04011200010511
[89884.260052] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[89884.260222] scsi host6: usb-storage 1-1.4:1.0
[89886.721060] scsi 6:0:0:0: Direct-Access     Crucial  Gizmo!
          1100 PQ: 0 ANSI: 0 CCS
[89886.721612] sd 6:0:0:0: Attached scsi generic sg3 type 0
[89886.723738] sd 6:0:0:0: [sdc] Attached SCSI removable disk


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

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


#188721

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2017-11-07 23:10 +0100
Message-ID<uJkee-7kG-5@gated-at.bofh.it>
In reply to#188717
Hi,

i wrote:
> >       Did you also check the MD5 of the copy on USB stick ?

Kent West wrote:
> No, I did not check the MD5 of the USB stick's copy. This is a good thing to
> know for future attempts.

Regarding the current Live ISOs there is a deviation necessary from
  https://www.debian.org/CD/faq/#verify
The image file size is larger than the ISO filesystem size. The checksum
lists tell the checksums for the file size. So you need to use that size
divided by 2048 and not e.g. the result of "/sbin/isosize -x".
I already reported this problem to debian-live.


> The headline says "GNU GRUB Version 2.02~beta3-5". 

So your machine's firmware is running in native EFI mode.


> > qemu-system-x86_64 -enable-kvm -m 512 \
> >                    -bios /usr/share/ovmf/OVMF.fd \
> >                    -hda debian-live-9.2.0-amd64-cinnamon.iso

> Yeah, I get to a partial Cinnamon desktop (it's missing pieces) so that
> tells me that the image [mostly/sort of] works.

So the firmware of your machine has something to do with the problem.
(I assume you made sure to use OVMF by option -bios instead of the default
 firmware which will act as classic BIOS and boot the ISOLINUX menu.)


> But I also tried re-enabling BIOS/Legacy [...] it didn't help.

We need the exact error messages for searching in the code.


> I thought I had rescued one of the sticks by discovering that cfdisk would
> write to it and wipe out the partitions.

There are some stumblestones in the ISOs: Partition start at block 0,
presence of invalid GPT and of its backup GPT at the end of the image.
If the partition editors take offense, there is the nuke option to zero
the whole stick:

  dd if=/dev/zero of=/dev/sdc

Similarly powerful but less devastating is to have a backup image of the
original stick content and to overwrite the whole stick by it.


(next mail:)

> dd: failed to open '/dev/sdc': No medium found
> ...
> [89886.723738] sd 6:0:0:0: [sdc] Attached SCSI removable disk

Now that's a strange one.
Such a behavior can hardly be caused by copying any image data onto the stick.

So where in the kernel can an USB stick cause ENOMEDIUM ... ? 
Probably in line 1344 of
  https://github.com/torvalds/linux/blob/master/drivers/scsi/sd.c
which imposes the question how struct scsi_disk.media_present gets
set to 0.
One possibility is in line 1522, where the error reply of an SCSI device
is interpreted: Key 2, ASC 0x3A means indeed "MEDIUM NOT PRESENT".
This message would stem from the USB stick. But why should it say that ?
(I'd really like to have my theory more plausible.)

I only have experience with optical drives, not with disk-like devices.
Nevertheless i'd say that there are two potential problems:
- a hardware problem with one stick
- a software problem with any stick

In order to investigate the potential software problem you need to get
a stick which does not tell that there is no medium when you try to
write to its device file or to read from it.

The potential hardware problem should be investigated by plugging the
stick into other computers and checking whether one can read from or
write to its device file.


Have a nice day :)

Thomas

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


#188724

FromKent West <westk@acu.edu>
Date2017-11-07 23:30 +0100
Message-ID<uJkxA-7qZ-13@gated-at.bofh.it>
In reply to#188721

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

On Tue, Nov 7, 2017 at 4:03 PM, Thomas Schmitt <scdbackup@gmx.net> wrote:

>
>
> > The headline says "GNU GRUB Version 2.02~beta3-5".
>
> So your machine's firmware is running in native EFI mode.
>

The first one I tried, yes. But I also tried that machine in Legacy BIOS
mode.

The qemu test below I did on a completely different machine. I'm fairly
sure it's set to boot in Legacy BIOS mode.

>
>
> > > qemu-system-x86_64 -enable-kvm -m 512 \
> > >                    -bios /usr/share/ovmf/OVMF.fd \
> > >                    -hda debian-live-9.2.0-amd64-cinnamon.iso
>
> > Yeah, I get to a partial Cinnamon desktop (it's missing pieces) so that
> > tells me that the image [mostly/sort of] works.
>
> So the firmware of your machine has something to do with the problem.
> (I assume you made sure to use OVMF by option -bios instead of the default
>  firmware which will act as classic BIOS and boot the ISOLINUX menu.)
>

On the qemu test that I did, based on what you wrote above, that was in an
X terminal window on a completely different machine, without the USB stick
anywhere near. I was just testing the .ISO file. This machine does not have
a /usr/share/ovmf directory, so I did not include that part of the command
in my command.


>
>
> > But I also tried re-enabling BIOS/Legacy [...] it didn't help.
>
> We need the exact error messages for searching in the code.
>


I just now tried again. I went into the Firmware Setup, and told it to
enable the legacy modules, and told it to use the Legacy Boot (turning off
the UEFI boot).

I then booted from the (still-working, somewhat) USB stick, and got to a
"Main Menu" (no header mentioning grub). I choose the top option (Debian
GNU/Linux Live (kernel 4.9.0-4-amd64) and get as a result:

Loading /live/vmlinuz-4.0.9-4-amd64... ok
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".



>
>
> > I thought I had rescued one of the sticks by discovering that cfdisk
> would
> > write to it and wipe out the partitions.
>
> There are some stumblestones in the ISOs: Partition start at block 0,
> presence of invalid GPT and of its backup GPT at the end of the image.
> If the partition editors take offense, there is the nuke option to zero
> the whole stick:
>
>   dd if=/dev/zero of=/dev/sdc
>

On the one stick, I get:

dd: failed to open '/dev/sdc': No medium found

I haven't yet tried it on the still-somewhat-working stick.

Whereas I was able to use cfdisk on the now-non-working stick (maybe after
using hdparm? maybe after some other thing I tried?), I still get the
"cfdisk: cannot open /dev/sdc: Read-only file system" on the
still-somewhat-working stick.



> Similarly powerful but less devastating is to have a backup image of the
> original stick content and to overwrite the whole stick by it.
>
>
> (next mail:)
>
> > dd: failed to open '/dev/sdc': No medium found
> > ...
> > [89886.723738] sd 6:0:0:0: [sdc] Attached SCSI removable disk
>
> Now that's a strange one.
> Such a behavior can hardly be caused by copying any image data onto the
> stick.
>
> So where in the kernel can an USB stick cause ENOMEDIUM ... ?
> Probably in line 1344 of
>   https://github.com/torvalds/linux/blob/master/drivers/scsi/sd.c
> which imposes the question how struct scsi_disk.media_present gets
> set to 0.
> One possibility is in line 1522, where the error reply of an SCSI device
> is interpreted: Key 2, ASC 0x3A means indeed "MEDIUM NOT PRESENT".
> This message would stem from the USB stick. But why should it say that ?
> (I'd really like to have my theory more plausible.)
>
> I only have experience with optical drives, not with disk-like devices.
> Nevertheless i'd say that there are two potential problems:
> - a hardware problem with one stick
> - a software problem with any stick
>
> In order to investigate the potential software problem you need to get
> a stick which does not tell that there is no medium when you try to
> write to its device file or to read from it.
>

My somewhat-still-working stick does not generate this "no medium" error.

>
> The potential hardware problem should be investigated by plugging the
> stick into other computers and checking whether one can read from or
> write to its device file.
>

I have tried both sticks in at least three machines. The sticks were
working fine until I tried to turn them into a Live Debian USB stick, and
it's just gone downhill from there. I'm willing to nuke the second
somewhat-still-working stick with the "dd if=/dev/zero of=/dev/sdc"
command, but I'll wait a few minutes to see if anyone wants to respond to
this email.


>
>
> Have a nice day :)
>
> Thomas
>
>
Thanks!



-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

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


#188725

FromKent West <westk@acu.edu>
Date2017-11-07 23:40 +0100
Message-ID<uJkHf-7w5-3@gated-at.bofh.it>
In reply to#188724

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

[9082364.723288] usb 1-1.5: new high-speed USB device number 19 using
ehci-pci
[9082364.834216] usb 1-1.5: New USB device found, idVendor=05dc,
idProduct=a790
[9082364.834218] usb 1-1.5: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[9082364.834219] usb 1-1.5: Product: Gizmo!
[9082364.834219] usb 1-1.5: Manufacturer: Crucial
[9082364.834220] usb 1-1.5: SerialNumber: AA04011200010511
[9082364.834597] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[9082364.834751] scsi host6: usb-storage 1-1.5:1.0
[9082367.300870] scsi 6:0:0:0: Direct-Access     Crucial  Gizmo!
          1100 PQ: 0 ANSI: 0 CCS
[9082367.301256] sd 6:0:0:0: Attached scsi generic sg3 type 0
[9082367.303058] sd 6:0:0:0: [sdc] Attached SCSI removable disk
[9082371.379172] usb 1-1.6: new high-speed USB device number 20 using
ehci-pci
[9082371.488927] usb 1-1.6: New USB device found, idVendor=090c,
idProduct=1000
[9082371.488933] usb 1-1.6: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[9082371.488936] usb 1-1.6: Product: USB Flash Disk
[9082371.488939] usb 1-1.6: Manufacturer: General
[9082371.488943] usb 1-1.6: SerialNumber: 0405020000013002
[9082371.489365] usb-storage 1-1.6:1.0: USB Mass Storage device detected
[9082371.489629] scsi host7: usb-storage 1-1.6:1.0
[9082372.662144] scsi 7:0:0:0: Direct-Access     General  USB Flash Disk
  1100 PQ: 0 ANSI: 4
[9082372.663306] sd 7:0:0:0: Attached scsi generic sg4 type 0
[9082372.665578] sd 7:0:0:0: [sdd] 7864320 512-byte logical blocks: (4.03
GB/3.75 GiB)
[9082372.666346] sd 7:0:0:0: [sdd] Write Protect is on
[9082372.666350] sd 7:0:0:0: [sdd] Mode Sense: 43 00 80 00
[9082372.667108] sd 7:0:0:0: [sdd] Attached SCSI removable disk
[9082372.674434]  sdd: sdd1 sdd2


Tue Nov 07     16:32:46
-------------
westk[@]goshen]:/home/westk:> sudo fdisk -l /dev/sdc
fdisk: cannot open /dev/sdc: No medium found


Tue Nov 07     16:33:16
-------------
westk[@]goshen]:/home/westk:> sudo fdisk -l /dev/sdd
Disk /dev/sdd: 3.8 GiB, 4026531840 bytes, 7864320 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
Disklabel type: dos
Disk identifier: 0x74cb3684

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)



-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

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


#188726

FromKent West <westk@acu.edu>
Date2017-11-08 00:00 +0100
Message-ID<uJl0B-7Cv-1@gated-at.bofh.it>
In reply to#188725

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

westk[@]goshen]:/home/westk:> sudo hdparm -r0 /dev/sdd

/dev/sdd:
setting readonly to 0 (off)
readonly      =  0 (off)


Tue Nov 07     16:58:02
-------------
westk[@]goshen]:/home/westk:> sudo cfdisk /dev/sdd
cfdisk: cannot open /dev/sdd: Read-only file system


Tue Nov 07     16:58:07
-------------
westk[@]goshen]:/home/westk:> sudo hdparm -r0 /dev/sdd

/dev/sdd:
setting readonly to 0 (off)
readonly      =  0 (off)


Tue Nov 07     16:58:10
-------------
westk[@]goshen]:/home/westk:> sudo dd if=/dev/zero of=/dev/sdd
dd: failed to open '/dev/sdd': Read-only file system


On Tue, Nov 7, 2017 at 4:57 PM, Kent West <westk@acu.edu> wrote:

> Tue Nov 07     16:40:32
> -------------
> westk[@]goshen]:/home/westk:> sudo dd if=/dev/zero of=/dev/sdc
> [sudo] password for westk:
> dd: failed to open '/dev/sdc': No medium found
>
>
> Tue Nov 07     16:56:51
> -------------
> westk[@]goshen]:/home/westk:> sudo dd if=/dev/zero of=/dev/sdd
> dd: failed to open '/dev/sdd': Read-only file system
>
> On Tue, Nov 7, 2017 at 4:35 PM, Kent West <westk@acu.edu> wrote:
>
>> [9082364.723288] usb 1-1.5: new high-speed USB device number 19 using
>> ehci-pci
>> [9082364.834216] usb 1-1.5: New USB device found, idVendor=05dc,
>> idProduct=a790
>> [9082364.834218] usb 1-1.5: New USB device strings: Mfr=1, Product=2,
>> SerialNumber=3
>> [9082364.834219] usb 1-1.5: Product: Gizmo!
>> [9082364.834219] usb 1-1.5: Manufacturer: Crucial
>> [9082364.834220] usb 1-1.5: SerialNumber: AA04011200010511
>> [9082364.834597] usb-storage 1-1.5:1.0: USB Mass Storage device detected
>> [9082364.834751] scsi host6: usb-storage 1-1.5:1.0
>> [9082367.300870] scsi 6:0:0:0: Direct-Access     Crucial  Gizmo!
>>           1100 PQ: 0 ANSI: 0 CCS
>> [9082367.301256] sd 6:0:0:0: Attached scsi generic sg3 type 0
>> [9082367.303058] sd 6:0:0:0: [sdc] Attached SCSI removable disk
>> [9082371.379172] usb 1-1.6: new high-speed USB device number 20 using
>> ehci-pci
>> [9082371.488927] usb 1-1.6: New USB device found, idVendor=090c,
>> idProduct=1000
>> [9082371.488933] usb 1-1.6: New USB device strings: Mfr=1, Product=2,
>> SerialNumber=3
>> [9082371.488936] usb 1-1.6: Product: USB Flash Disk
>> [9082371.488939] usb 1-1.6: Manufacturer: General
>> [9082371.488943] usb 1-1.6: SerialNumber: 0405020000013002
>> [9082371.489365] usb-storage 1-1.6:1.0: USB Mass Storage device detected
>> [9082371.489629] scsi host7: usb-storage 1-1.6:1.0
>> [9082372.662144] scsi 7:0:0:0: Direct-Access     General  USB Flash Disk
>>   1100 PQ: 0 ANSI: 4
>> [9082372.663306] sd 7:0:0:0: Attached scsi generic sg4 type 0
>> [9082372.665578] sd 7:0:0:0: [sdd] 7864320 512-byte logical blocks:
>> (4.03 GB/3.75 GiB)
>> [9082372.666346] sd 7:0:0:0: [sdd] Write Protect is on
>> [9082372.666350] sd 7:0:0:0: [sdd] Mode Sense: 43 00 80 00
>> [9082372.667108] sd 7:0:0:0: [sdd] Attached SCSI removable disk
>> [9082372.674434]  sdd: sdd1 sdd2
>>
>>
>> Tue Nov 07     16:32:46
>> -------------
>> westk[@]goshen]:/home/westk:> sudo fdisk -l /dev/sdc
>> fdisk: cannot open /dev/sdc: No medium found
>>
>>
>> Tue Nov 07     16:33:16
>> -------------
>> westk[@]goshen]:/home/westk:> sudo fdisk -l /dev/sdd
>> Disk /dev/sdd: 3.8 GiB, 4026531840 <(402)%20653-1840> bytes, 7864320
>> 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
>> Disklabel type: dos
>> Disk identifier: 0x74cb3684
>>
>> 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)
>>
>>
>>
>> --
>> Kent West                    <")))><
>> Westing Peacefully - http://kentwest.blogspot.com
>>
>
>
>
> --
> Kent West                    <")))><
> Westing Peacefully - http://kentwest.blogspot.com
>



-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

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


#188727

FromKent West <westk@acu.edu>
Date2017-11-08 00:00 +0100
Message-ID<uJl0B-7Cv-3@gated-at.bofh.it>
In reply to#188725

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

Tue Nov 07     16:40:32
-------------
westk[@]goshen]:/home/westk:> sudo dd if=/dev/zero of=/dev/sdc
[sudo] password for westk:
dd: failed to open '/dev/sdc': No medium found


Tue Nov 07     16:56:51
-------------
westk[@]goshen]:/home/westk:> sudo dd if=/dev/zero of=/dev/sdd
dd: failed to open '/dev/sdd': Read-only file system

On Tue, Nov 7, 2017 at 4:35 PM, Kent West <westk@acu.edu> wrote:

> [9082364.723288] usb 1-1.5: new high-speed USB device number 19 using
> ehci-pci
> [9082364.834216] usb 1-1.5: New USB device found, idVendor=05dc,
> idProduct=a790
> [9082364.834218] usb 1-1.5: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [9082364.834219] usb 1-1.5: Product: Gizmo!
> [9082364.834219] usb 1-1.5: Manufacturer: Crucial
> [9082364.834220] usb 1-1.5: SerialNumber: AA04011200010511
> [9082364.834597] usb-storage 1-1.5:1.0: USB Mass Storage device detected
> [9082364.834751] scsi host6: usb-storage 1-1.5:1.0
> [9082367.300870] scsi 6:0:0:0: Direct-Access     Crucial  Gizmo!
>           1100 PQ: 0 ANSI: 0 CCS
> [9082367.301256] sd 6:0:0:0: Attached scsi generic sg3 type 0
> [9082367.303058] sd 6:0:0:0: [sdc] Attached SCSI removable disk
> [9082371.379172] usb 1-1.6: new high-speed USB device number 20 using
> ehci-pci
> [9082371.488927] usb 1-1.6: New USB device found, idVendor=090c,
> idProduct=1000
> [9082371.488933] usb 1-1.6: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [9082371.488936] usb 1-1.6: Product: USB Flash Disk
> [9082371.488939] usb 1-1.6: Manufacturer: General
> [9082371.488943] usb 1-1.6: SerialNumber: 0405020000013002
> [9082371.489365] usb-storage 1-1.6:1.0: USB Mass Storage device detected
> [9082371.489629] scsi host7: usb-storage 1-1.6:1.0
> [9082372.662144] scsi 7:0:0:0: Direct-Access     General  USB Flash Disk
>   1100 PQ: 0 ANSI: 4
> [9082372.663306] sd 7:0:0:0: Attached scsi generic sg4 type 0
> [9082372.665578] sd 7:0:0:0: [sdd] 7864320 512-byte logical blocks: (4.03
> GB/3.75 GiB)
> [9082372.666346] sd 7:0:0:0: [sdd] Write Protect is on
> [9082372.666350] sd 7:0:0:0: [sdd] Mode Sense: 43 00 80 00
> [9082372.667108] sd 7:0:0:0: [sdd] Attached SCSI removable disk
> [9082372.674434]  sdd: sdd1 sdd2
>
>
> Tue Nov 07     16:32:46
> -------------
> westk[@]goshen]:/home/westk:> sudo fdisk -l /dev/sdc
> fdisk: cannot open /dev/sdc: No medium found
>
>
> Tue Nov 07     16:33:16
> -------------
> westk[@]goshen]:/home/westk:> sudo fdisk -l /dev/sdd
> Disk /dev/sdd: 3.8 GiB, 4026531840 <(402)%20653-1840> bytes, 7864320
> 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
> Disklabel type: dos
> Disk identifier: 0x74cb3684
>
> 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)
>
>
>
> --
> Kent West                    <")))><
> Westing Peacefully - http://kentwest.blogspot.com
>



-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

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


#188732

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2017-11-08 00:50 +0100
Message-ID<uJlMZ-87l-1@gated-at.bofh.it>
In reply to#188727
Hi,

Ken West wrote:
> westk[@]goshen]:/home/westk:> sudo dd if=/dev/zero of=/dev/sdd
> dd: failed to open '/dev/sdd': Read-only file system

What the hell ... ?
Why does dd talk of filesystems ? I'd understand if it said "Permission
denied". The superuser isn't what he used to be.

Googling brings no insight: If it was an SD card, the advice would be to
blow air through the card reader.

Is any filesystem on /dev/sdd* mounted ?
If so: Does it help to unmount it before dd ?


Have a nice day :)

Thomas

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


#188733

FromFelix Miata <mrmazda@earthlink.net>
Date2017-11-08 01:00 +0100
Message-ID<uJlWG-8ci-5@gated-at.bofh.it>
In reply to#188732
Thomas Schmitt composed on 2017-11-08 00:44 (UTC+0100):

> Ken West wrote:

>> westk[@]goshen]:/home/westk:> sudo dd if=/dev/zero of=/dev/sdd
>> dd: failed to open '/dev/sdd': Read-only file system 

Don't we know it was a GPT disk to start with? If no iso ever got a chance to
finish writing all the way out to end of disk, the backup/reserve/secondary
partitioning at end of disk would still report a "filesystem" exists, surely
conflicting with the start data written from the Debian 9.2.0 iso file.

> What the hell ... ?
> Why does dd talk of filesystems ? I'd understand if it said "Permission
> denied". The superuser isn't what he used to be.

> Googling brings no insight: If it was an SD card, the advice would be to
> blow air through the card reader.

> Is any filesystem on /dev/sdd* mounted ?
> If so: Does it help to unmount it before dd ?

Also, why are this/these stick(s) getting flip-flopped between sdd and sdc?
-- 
"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]


#188735

FromHenrique de Moraes Holschuh <hmh@debian.org>
Date2017-11-08 01:20 +0100
Message-ID<uJmg1-5J-1@gated-at.bofh.it>
In reply to#188732
On Wed, 08 Nov 2017, Thomas Schmitt wrote:
> > dd: failed to open '/dev/sdd': Read-only file system
> 
> What the hell ... ?
> Why does dd talk of filesystems ? I'd understand if it said "Permission
> denied". The superuser isn't what he used to be.

Because the only error number usable for "this thing is read-only" in
POSIX is EROFS, so that's what a read-only block device reports.  Never
mind "EROFS" reads like something that would be used to deny access to
a digital porn stash instead...

Anyway, if this is a pendrive or some other flash-based media, it most
often means it is in the fail-safe last-resort mode (switched to
read-only access so that you can try to salvage some data off it).

Of course, you could also be that one has moved by accident that
minuscle "tab" in some SD cards (and SD-to-micro-SD adapters) to the
write-protect position...

-- 
  Henrique Holschuh

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


#188742

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2017-11-08 09:50 +0100
Message-ID<uJudz-4Xw-3@gated-at.bofh.it>
In reply to#188735
Hi,

Felix Miata wrote:
> Don't we know it was a GPT disk to start with? If no iso ever got a chance to
> finish writing all the way out to end of disk, the backup/reserve/secondary
> partitioning at end of disk would still report a "filesystem" exists,

The backup GPT of the old stick content could indeed have the read-only
bit set in the flags word of the partition entry.
But that backup would first have to be activated by moving it to the
normal position of the GPT near the start of the drive.

In general the partition table should not keep dd from writing to the
device file of the whole drive.
Further it was possible to put the ISO onto the stick by help of dd,
when the main GPT would have been still present and valid.


> Also, why are this/these stick(s) getting flip-flopped between sdd and sdc?

That's because Kent plugged them in at the same time, i guess.
sdc is the clearly ill one, sdd is the one which is at least readable.


Kent West wrote:
> > > dd: failed to open '/dev/sdd': Read-only file system

i wrote:
> > Why does dd talk of filesystems ?

Henrique de Moraes Holschuh wrote:
> Because the only error number usable for "this thing is read-only" in
> POSIX is EROFS, so that's what a read-only block device reports.
> ...
> Anyway, if this is a pendrive or some other flash-based media, it most
> often means it is in the fail-safe last-resort mode (switched to
> read-only access so that you can try to salvage some data off it).

Valid theory. One can read this in the web about SanDisk devices.

But i am reluctant to declare two out of two USB sticks ill.
For now i still deem it possible that something like udev decided to
block access because of the data it saw on the device.

The decisive experiments would be to try writing to the sdd stick on
some other operating system with very different software between kernel
and userland. (Best would be an old GNU/Linux without any systemd/udev.)

Although i really do not believe in the theory that the ISO can kill
the USB stick, i leave the decision to Kent whether he wants to risk
a third stick (preferrably a young one) for experiments.


Have a nice day :)

Thomas

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


#188749

FromKent West <westk@acu.edu>
Date2017-11-08 16:00 +0100
Message-ID<uJzZD-4Q-5@gated-at.bofh.it>
In reply to#188742

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

On Wed, Nov 8, 2017 at 2:41 AM, Thomas Schmitt <scdbackup@gmx.net> wrote:

> Hi,
>
> Felix Miata wrote:
>
>
> > Also, why are this/these stick(s) getting flip-flopped between sdd and
> sdc?
>
> That's because Kent plugged them in at the same time, i guess.
> sdc is the clearly ill one, sdd is the one which is at least readable.
>

Correct.



>
>
> Kent West wrote:
> > > > dd: failed to open '/dev/sdd': Read-only file system
>
> i wrote:
> > > Why does dd talk of filesystems ?
>
> Henrique de Moraes Holschuh wrote:
> > Because the only error number usable for "this thing is read-only" in
> > POSIX is EROFS, so that's what a read-only block device reports.
> > ...
> > Anyway, if this is a pendrive or some other flash-based media, it most
> > often means it is in the fail-safe last-resort mode (switched to
> > read-only access so that you can try to salvage some data off it).
>
> Valid theory. One can read this in the web about SanDisk devices.
>
> But i am reluctant to declare two out of two USB sticks ill.
> For now i still deem it possible that something like udev decided to
> block access because of the data it saw on the device.
>


That's kind of what I thought. One stick? Sure, likely. Two sticks?
Considerably less likely. But possible.



> The decisive experiments would be to try writing to the sdd stick on
> some other operating system with very different software between kernel
> and userland. (Best would be an old GNU/Linux without any systemd/udev.)
>

Good idea. Pretty obvious idea; I don't know what I hadn't already tried
that.

I just plugged the "can't see it at all anymore" stick into an iMac. Does
not show up on Desktop; does not show up in Disk Utility; "dmesg" doesn't
seem to mention it, unless it's in this single line - "USBMSC Identifier
(non-unique): AA4011200010511 0x5dc 0xa790 0x1100, 2".

The somewhat-still-working stick, when inserted into the iMac, brings up a
pop-up window that says "The disk you inserted was not readable by this
computer. Ignore/Eject". Disk Utility sees it as an "Unknown" disk2s2 426KB
external drive. But it lets me try to Erase it, although that results in an
error saying "Couldn't modify partition map." I tried all four formatting
options (Mac OS Extended Journaled, Mac OS Extended Case-sensitive
Journaled, ExFAT, MS-DOS (FAT)). I tried tinkering with the Security
Options.

If it had been one stick, I would just assume the stick had gone bad. But
two sticks, at the same time, happening by the same process, sure seems
suspicious.

Just to round out the OSes, I'll go see if I can find a Windows machine.

I

>
> Although i really do not believe in the theory that the ISO can kill
> the USB stick, i leave the decision to Kent whether he wants to risk
> a third stick (preferrably a young one) for experiments.
>


If I had a third one handy, I probably would. But without running to
Wal-Mart, or waiting a day or three for an on-line order, I'm currently out
of sticks. I'm sure I can come up with one in a day or few, and scrunching
my visage up in concern that I'm going to waste another stick I'm sure I'll
experiment with it, but at the moment, these two are all I have.

Thanks for everyone's input!


>
> Have a nice day :)
>
> Thomas
>
>


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

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


#188752

FromKent West <westk@acu.edu>
Date2017-11-08 16:20 +0100
Message-ID<uJAj0-qj-5@gated-at.bofh.it>
In reply to#188749

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

On Wed, Nov 8, 2017 at 8:49 AM, Kent West <westk@acu.edu> wrote:

>
> The somewhat-still-working stick, when inserted into the iMac, brings up a
> pop-up window that says "The disk you inserted was not readable by this
> computer. Ignore/Eject". Disk Utility sees it as an "Unknown" disk2s2 426KB
> external drive. But it lets me try to Erase it, although that results in an
> error saying "Couldn't modify partition map." I tried all four formatting
> options (Mac OS Extended Journaled, Mac OS Extended Case-sensitive
> Journaled, ExFAT, MS-DOS (FAT)). I tried tinkering with the Security
> Options.
>
> If it had been one stick, I would just assume the stick had gone bad. But
> two sticks, at the same time, happening by the same process, sure seems
> suspicious.
>


I just plugged the somewhat-still-working stick into a different iMac; the
first one was running Sierra; this one is running Yosemite. The Yosemite
Mac's Disk Utility gives me more info (it's stupid to me that the newer the
OS, the less informative the tools, as a trend).

It actually sees the whole 4.03 GB stick, not just the "disk2s2" slice, but
it won't let me to anything to it, saying "This disk is not writable and
can't be partitioned" It says S.M.A.R.T. is not supported, that the Write
Status is Read Only, that the Partition Map Scheme is Master Boot Record,
and that it's USB Flash Media.

I think y'all are right about the two sticks being kicked into "last resort
mode", where the internal Read-only switch is triggered (I've been unable
to find an external switch).

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, on a good
Dell box that's been running Debian for 4 years without any glitches
whatsoever.


>
> Just to round out the OSes, I'll go see if I can find a Windows machine.
>


Yep, Windows 10 Disk Manager can't see the one as anything more than
existing, and can see the other one only as Read-Only, with no options to
do anything with it. Looks like I'll be tossing these sticks.



-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

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


Page 1 of 2  [1] 2  Next page →

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


csiph-web