Re: testing new sdm drive

2024-02-08 Thread David Christensen

On 2/8/24 12:36, Linux-Fan wrote:

Alexander V. Makartsev writes:

From here on I'd suggest trying the tools from package `f3`.



Thank you for the suggestion -- I was hoping somebody knew of a FOSS 
Debian package that can validate drive capacity:


https://packages.debian.org/bookworm/f3

https://oss.digirati.com.br/f3/

https://fight-flash-fraud.readthedocs.io/en/stable/


David



Re: testing new sdm drive

2024-02-08 Thread David Christensen

On 2/8/24 11:23, gene heskett wrote:

On 2/8/24 07:22, Alexander V. Makartsev wrote:

This is how I would test it.
...
Looks neat. Any chance this will crash my machine? I have other design 
work going on, and I'd hate to have to start from scratch.



Do not use a production computer for drive maintenance; especially not 
your primary workstation.  Use a spare computer.



I thought you were going to hook up all the new USB SSD's to a USB hub 
to a SBC, and turn it into a file server, backup server, or some such?



David



Re: Unidentified flying subject!

2024-02-08 Thread Charles Curley
On Fri, 09 Feb 2024 04:30:14 +
Richmond  wrote:

> So you need to store a lot of data and then verify that it has written
> with 'diff'.

Yeah.

I've been thinking about this. Yeah, I know: dangerous.

What I would do is write a function to write 4096 bytes of repeating
data, the data being the block number being written to. So the first
block is all zeros, the second all ones, etc.. For convenience they
would be 64 bit unsigned ints.

And, given the block number, a function to verify that block number N
is full of Ns and nothing else.

By doing it this way, we don't have to keep copies of what we've
written. We only have to keep track of which block got written to which
LBA so we can go back and check it later.

Now, divide the drive in half. Write block zero there. Divide the two
halves each in half, and write blocks one and two. Divide again, and
write blocks three through five. Etc., a nice binary division.

Every once in a while, I would go back and verify the blocks already
written. Maybe every time I subdivide again.

If we're really lucky, and the perpetrators really stupid, the 0th block
will fail, and we have instant proof that the drive is a failure.
We don't care why the drive is failing, only that the 0th block (which
is clearly not at the end of the drive) has failed.

Here's a conjecture: This was designed to get people who use FAT and
NTFS. I know that FAT starts writing at the beginning of the partition,
and goes from there. This is because floppy disks (remember them?) have
track 0 at the outside, which is far more reliable than the tracks at
the hub simply because each each flux reversal is longer. So the first
64G should be fine; only after you get past there do you see bad
sectors. I believe NTFS does similarly.

But I don't think that's what they're doing. Other operating systems
have put the root directory and file allocation table (or equivalent)
in the middle of the disk (for faster access), Apple DOS for one.
mkfs.extX write blocks all over the place.

I think that they are re-allocating sectors on the fly, regardless of
the LBA, until they run out of real sectors. So we write 64G+ of my
4096 byte blocks. It'll take a while, but who cares?

If Gibson is correct that these things only have 64 gig of real memory,
and my arithmetic is correct, we should start seeing failures after
writing 16777216 of my 4096 blocks. 

Of course, these things might allocate larger sectors than 4096 bytes.
In which case we'll hit the limit sooner.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: testing new sdm drive

2024-02-08 Thread tomas
On Fri, Feb 09, 2024 at 01:11:05AM +0500, Alexander V. Makartsev wrote:
> On 09.02.2024 00:23, gene heskett wrote:
> > Looks neat. Any chance this will crash my machine? I have other design
> > work going on, and I'd hate to have to start from scratch.
> Well, it will consume CPU cycles for sure, at least to calculate md5 hashes
> and perform I/O on the target drive and RAM.

...unless the device under test starts misbehaving (what, after all, is
the thing we are after). Then, probably, all bets are off. If it "just"
starts reporting bad blocks or just returning corrupted data, I guess
the kernel will cope, but things are... complex ;-)

> I don't think it could crash the system, but the load could be significant
> enough to disturb your work, so
> if I was in your place I'd wait until the machine is free from any work or
> load and then test the new drive.

Sound wise, yes. Perhaps you have a spare raspi you can dedicate to this
boring task. Or an old laptop gathering dust.

BTW, if it was me, I'd skip the file system part and just dd checksummed
blocks to it (and read them back with dd), thus sparing a whole layer of
complexity and difficult to predict behaviour (caching, what not).

BTW2, there is a program for that, "badblocks", part of e2fsprograms, so
chances are it's installed. I'd look into that man page.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Unidentified subject!

2024-02-08 Thread Richmond
Charles Curley  writes:

> On Thu, 08 Feb 2024 18:02:36 -0500
> Stefan Monnier  wrote:
>
>> > Test it with Validrive.
>> > https://www.grc.com/validrive.htm  
>> 
>> Looks like proprietary software for Windows.
>
> badblocks, available in a Debian repo near you, might be a suitable
> replacement.

I am not sure badblocks would do the same thing.

"The drive appears to be the 1 or 2 terabyte drive you purchased. You
plug it into your computer and everything looks fine. You can even copy
files to the drive; as many as you want. And when you look at the
drive's contents the files are there. But what's insidious is that the
files' contents may have never been stored.  "

So you need to store a lot of data and then verify that it has written
with 'diff'.



Qemu malfunction

2024-02-08 Thread Leandro Noferini
Ciao a tutti,

I have a home server with openmediavault on (so, debian oldstable) whith
installed the support for virtualization.

From some days I have a malfunction because an image of a debian running
inside is stopping always. If I try to start it after some minutes I get
this error in wirsh

virsh # errore: Disconnected from qemu:///system due to keepalive timeout

Another image (more important luckly) is running normally.

Where I could look for to try to understand what is going on?

--
Ciao
leandro


signature.asc
Description: PGP signature


Re: Drag-and-drop actions broken for Firefox 122.0.1 under Wayland

2024-02-08 Thread Max Nikulin

On 08/02/2024 09:41, Jake Herrmann wrote:

I'm running Debian 12 (bookworm), using GNOME 43.9 under Wayland. I
installed Firefox 122.0.1 from the Mozilla binaries as described on
the Debian Wiki [1].

Drag-and-drop actions with Firefox seem to be broken under Wayland.


Does drag-n-drop work for you with Firefox-115 installed as the 
firefox-esr deb package from *debian* repositories?


P.S. The following recently added mozilla APT repository is not 
described in the wiki. I have not idea if it has some downsides.


https://support.mozilla.org/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions

I would test firefox-esr from debian before changing APT configuration 
to avoid possible complications.




Re: Unidentified subject!

2024-02-08 Thread Charles Curley
On Thu, 08 Feb 2024 18:02:36 -0500
Stefan Monnier  wrote:

> > Test it with Validrive.
> > https://www.grc.com/validrive.htm  
> 
> Looks like proprietary software for Windows.

badblocks, available in a Debian repo near you, might be a suitable
replacement.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Unidentified subject!

2024-02-08 Thread Stefan Monnier
> Test it with Validrive.
> https://www.grc.com/validrive.htm

Looks like proprietary software for Windows.


Stefan



Re: Unidentified subject!

2024-02-08 Thread Richmond
gene heskett  writes:

> Well the 2T memory everybody was curious about 3 weeks ago got here early.
>
> From dmesg after plugging one in:
> [629240.916163] usb 1-2: new high-speed USB device number 39 using xhci_hcd
> [629241.066221] usb 1-2: New USB device found, idVendor=048d,
> idProduct=1234, bcdDevice= 2.00
> [629241.066234] usb 1-2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [629241.066239] usb 1-2: Product: Disk 3.0
> [629241.066242] usb 1-2: Manufacturer: USB
> [629241.066246] usb 1-2: SerialNumber: 2697241127107725123
> [629241.069485] usb-storage 1-2:1.0: USB Mass Storage device detected
> [629241.074187] scsi host37: usb-storage 1-2:1.0
> [629242.100738] scsi 37:0:0:0: Direct-Access  SSD 3.0
> 2.00 PQ: 0 ANSI: 4
> [629242.100959] sd 37:0:0:0: Attached scsi generic sg13 type 0
> [629242.101190] sd 37:0:0:0: [sdm] 409600 512-byte logical blocks:
> (2.10 TB/1.91 TiB)
> [629242.101289] sd 37:0:0:0: [sdm] Write Protect is off
> [629242.101290] sd 37:0:0:0: [sdm] Mode Sense: 03 00 00 00
> [629242.101409] sd 37:0:0:0: [sdm] No Caching mode page found
> [629242.101410] sd 37:0:0:0: [sdm] Assuming drive cache: write through
> [629242.103927]  sdm: sdm1
> [629242.104047] sd 37:0:0:0: [sdm] Attached SCSI disk
> gene@coyote:
>
> Looks like a reasonable facsimile of a 2T disk to me.
>
> Cheers, Gene Heskett, CET.

Test it with Validrive.

https://www.grc.com/validrive.htm



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Gremlin

On 2/8/24 16:28, Andy Smith wrote:

Hello,

On Thu, Feb 08, 2024 at 04:22:49PM -0500, Gremlin wrote:

On Thu, Feb 08, 2024 at 08:43:17PM +, Andy Smith wrote:

I really do mean all forms of USB that come over a USB port.


That line was meant to read

 I really do mean all forms of storage that come over a USB port.

Changing the goal post now are we.


Erm no, it was a simple mistaken repetition of the word "USB" that I
only noticed when I read it back. It would be clearly very difficult
to refuse to use any kind of USB device at all! I have been
consistently talking about storage devices.

You have been very clear that you do not agree though, so let's just
agree to disagree.

Thanks,
Andy



You back pedal really well don't you!  Where did you learn that?



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Andy Smith
Hello,

On Thu, Feb 08, 2024 at 04:22:49PM -0500, Gremlin wrote:
> On Thu, Feb 08, 2024 at 08:43:17PM +, Andy Smith wrote:
> > I really do mean all forms of USB that come over a USB port.
> 
> That line was meant to read
> 
> I really do mean all forms of storage that come over a USB port.
> 
> Changing the goal post now are we.

Erm no, it was a simple mistaken repetition of the word "USB" that I
only noticed when I read it back. It would be clearly very difficult
to refuse to use any kind of USB device at all! I have been
consistently talking about storage devices.

You have been very clear that you do not agree though, so let's just
agree to disagree.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Gremlin

On 2/8/24 16:16, Andy Smith wrote:

On Thu, Feb 08, 2024 at 03:56:19PM -0500, Gremlin wrote:

On 2/8/24 15:43, Andy Smith wrote:

I wouldn't have much issue with taking a USB drive out of its caddy
to get the SATA drive from inside, except that it would have to be
an amazingly good deal to make it worth voiding the warranty, so I
generally wouldn't bother.


Why would it void the warranty?  I put it in the caddy


I mean the USB drives that come as a sealed unit that you can
sometimes find a lot cheaper than the same model SATA drive that is
actually inside them. Some people do enjoy taking those apart to get
the SATA drive out.

Thanks,
Andy



On Thu, Feb 08, 2024 at 08:43:17PM +, Andy Smith wrote:
> I really do mean all forms of USB that come over a USB port.

That line was meant to read

I really do mean all forms of storage that come over a USB port.

Thanks,
Andy


Changing the goal post now are we.



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Andy Smith
Hello,

On Thu, Feb 08, 2024 at 04:00:01PM -0500, Gremlin wrote:
> I have been using USB attached HDDs and SSDs for 10 years now and
> have never had one unexpectedly go off line.  Your postings
> suggest you don't know what your talking about.

Okay then. Despite this uncharitable comment, I do still wish you
what I consider to be continued good fortune!

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Andy Smith
On Thu, Feb 08, 2024 at 03:56:19PM -0500, Gremlin wrote:
> On 2/8/24 15:43, Andy Smith wrote:
> > I wouldn't have much issue with taking a USB drive out of its caddy
> > to get the SATA drive from inside, except that it would have to be
> > an amazingly good deal to make it worth voiding the warranty, so I
> > generally wouldn't bother.
> 
> Why would it void the warranty?  I put it in the caddy

I mean the USB drives that come as a sealed unit that you can
sometimes find a lot cheaper than the same model SATA drive that is
actually inside them. Some people do enjoy taking those apart to get
the SATA drive out.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Gremlin

On 2/8/24 15:35, Andy Smith wrote:

Hello,

On Fri, Feb 09, 2024 at 12:23:45AM +0700, Max Nikulin wrote:

On 08/02/2024 22:36, Andy Smith wrote:

On Wed, Feb 07, 2024 at 03:30:29PM -0500, gene heskett wrote:

[629241.074187] scsi host37: usb-storage 1-2:1.0


USB storage is for phones and cameras etc, not for serious
computing.


Do you mean that a proper backup drive should use uas (USB Attached Storage)
instead of usb-storage driver?


No, I just mean I advise to never ever use storage that comes to you
via a USB port for anything you care about.

I might consider it okay for temporary shifting of data about, but I
would never use it as part of a permanent setup without fully
expecting one day to find it just not working. But then that is also
how I feel about any storage device. It's just worse when USB is
added to the mix.

I have been using USB attached HDDs and SSDs for 10 years now and have 
never had one unexpectedly go off line.  Your postings suggest you don't 
know what your talking about.




Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Gremlin

On 2/8/24 15:43, Andy Smith wrote:

Hello,

On Thu, Feb 08, 2024 at 02:20:59PM -0500, Jeffrey Walton wrote:

On Thu, Feb 8, 2024 at 11:57 AM Ralph Aichinger  wrote:

How does a breaking USB disk differ from a breaking SATA disk?


I may be mistaken, but I believe AS is talking about USB thumb drives,
SDcards and the like. I don't think he's talking about external SSD's
and NVME's over USB. But I don't want to put words in his mouth.


I really do mean all forms of USB that come over a USB port.

I wouldn't have much issue with taking a USB drive out of its caddy
to get the SATA drive from inside, except that it would have to be
an amazingly good deal to make it worth voiding the warranty, so I
generally wouldn't bother.


Why would it void the warranty?  I put it in the caddy



If I need directly attached storage I'd much rather explore options
like SAS and eSATA, or even networked storage, before I would ever
consider USB for a permanent installation.


You need to start thinking outside the box.



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Andy Smith
On Thu, Feb 08, 2024 at 08:43:17PM +, Andy Smith wrote:
> I really do mean all forms of USB that come over a USB port.

That line was meant to read

I really do mean all forms of storage that come over a USB port.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Andy Smith
Hello,

On Thu, Feb 08, 2024 at 02:20:59PM -0500, Jeffrey Walton wrote:
> On Thu, Feb 8, 2024 at 11:57 AM Ralph Aichinger  wrote:
> > How does a breaking USB disk differ from a breaking SATA disk?
> 
> I may be mistaken, but I believe AS is talking about USB thumb drives,
> SDcards and the like. I don't think he's talking about external SSD's
> and NVME's over USB. But I don't want to put words in his mouth.

I really do mean all forms of USB that come over a USB port.

I wouldn't have much issue with taking a USB drive out of its caddy
to get the SATA drive from inside, except that it would have to be
an amazingly good deal to make it worth voiding the warranty, so I
generally wouldn't bother.

If I need directly attached storage I'd much rather explore options
like SAS and eSATA, or even networked storage, before I would ever
consider USB for a permanent installation.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Andy Smith
Hello,

On Thu, Feb 08, 2024 at 05:40:54PM +0100, Ralph Aichinger wrote:
> On Thu, 2024-02-08 at 15:36 +, Andy Smith wrote:
> > I learned not to go there a long time ago and have seen plenty of
> > reminders along the way from others' misfortunes to not ever go
> > there again myself.
> 
> How does a breaking USB disk differ from a breaking SATA disk?

In my experience it happens more often and also brings with it
frequent issues of poor performance and other reliability issues
like just dropping off the USB bus. There is almost always a better
way.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: testing new sdm drive

2024-02-08 Thread Linux-Fan

Alexander V. Makartsev writes:


On 08.02.2024 12:14, gene heskett wrote:

gene@coyote:/etc$ sudo smartctl --all -dscsi /dev/sdm
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.0-17-rt-amd64] (local  
build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke,  
http://www.smartmontools.org>www.smartmontools.org


=== START OF INFORMATION SECTION ===
Vendor:
Product:  SSD 3.0


[...]

Looks like a scam. Probably a reprogrammed controller to falsely report 2TB  
of space to the system.


I support this view :)


This is how I would test it.
First create a new GPT partition table and a new 2TB partition:
    $ sudo gdisk /dev/sdX

/!\  Make double sure you've selected the right device by using "lsblk" and  
"blkid" utilities.  /!\
/!\    It could change from 'sdm' to another name  
after reboot.      /!\


At gdisk prompt press "o" to create a new GPT table, next press "n" to create  
a new partition, accept default values by pressing "enter".
To verify setup press "p", to accept configuration and write it to device  
press "w".


Next format partition to ext4 filesystem:
    $ sudo mkfs.ext4 -m 0 -e remount-ro /dev/sdX1

Next mount the filesystem:
    $ sudo mkdir /mnt/disktest
    $ sudo mount /dev/sdX1 /mnt/disktest

Next create reference 1GB file filled with dummy data:
    $ cd /mnt/disktest



From here on I'd suggest trying the tools from package `f3`.


After installing it, find the documentation under
/usr/share/doc/f3/README.rst.gz. Basic usage requires only two commands:

f3write .

Fills the drive until it is full (No Space Left on Device). Umount and re- 
mount it to ensure that data is actually written to the disk. Then switch  
back to /mnt/disktest and read it back using


f3read .

It should output a tabular summary about what could be read successfully and  
what couldn't.


As to whether this affects the stability of the running system: If the drive  
is fake (which I think is a real possibility) then it may as well cause  
hickups in the system. If the work you are doing on the machine is mission- 
critical, don't run tests with suspect hardware on it...


HTH
Linux-Fan

öö

[...]


pgpxY5QIR73gw.pgp
Description: PGP signature


Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Andy Smith
Hello,

On Fri, Feb 09, 2024 at 12:23:45AM +0700, Max Nikulin wrote:
> On 08/02/2024 22:36, Andy Smith wrote:
> > On Wed, Feb 07, 2024 at 03:30:29PM -0500, gene heskett wrote:
> > > [629241.074187] scsi host37: usb-storage 1-2:1.0
> > 
> > USB storage is for phones and cameras etc, not for serious
> > computing.
> 
> Do you mean that a proper backup drive should use uas (USB Attached Storage)
> instead of usb-storage driver?

No, I just mean I advise to never ever use storage that comes to you
via a USB port for anything you care about.

I might consider it okay for temporary shifting of data about, but I
would never use it as part of a permanent setup without fully
expecting one day to find it just not working. But then that is also
how I feel about any storage device. It's just worse when USB is
added to the mix.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: D12 Installer does not recognize rtl8xxxu wifi

2024-02-08 Thread Franco Martelli

On 08/02/24 at 19:24, Felix Natter wrote:

Dear debian-users,

I put this on a stick and booted it:
debian-live-12.4.0-amd64-gnome.iso

When I boot the live option, the network is immediately loaded and I can
connect to a WIFI network. However, if I use the same stick
(or one with debian 12.4.0 netinst) with the installation option,
the LAN is recognized, but WLAN is not.


Hope I'm wrong, but I've heard that D-I has trouble with USB devices 
other than keyboard and mouse. The rtl8xxxu module is usually for USB 
NIC, if it's the case I think you can rely only to LAN for the installation.


Cheers,
--
Franco Martelli



Re: testing new sdm drive

2024-02-08 Thread Alexander V. Makartsev

On 09.02.2024 00:23, gene heskett wrote:
Looks neat. Any chance this will crash my machine? I have other design 
work going on, and I'd hate to have to start from scratch.
Well, it will consume CPU cycles for sure, at least to calculate md5 
hashes and perform I/O on the target drive and RAM.
I don't think it could crash the system, but the load could be 
significant enough to disturb your work, so
if I was in your place I'd wait until the machine is free from any work 
or load and then test the new drive.


--
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄

Re: testing new sdm drive

2024-02-08 Thread gene heskett

On 2/8/24 07:22, Alexander V. Makartsev wrote:

On 08.02.2024 12:14, gene heskett wrote:

gene@coyote:/etc$ sudo smartctl --all -dscsi /dev/sdm
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.0-17-rt-amd64] (local 
build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, 
www.smartmontools.org


=== START OF INFORMATION SECTION ===
Vendor:
Product:  SSD 3.0
Revision: 2.00
Compliance:   SPC-2
User Capacity:    2,097,152,000,000 bytes [2.09 TB]
Logical block size:   512 bytes
scsiModePageOffset: response length too short, resp_len=4 offset=4 
bd_len=0
scsiModePageOffset: response length too short, resp_len=4 offset=4 
bd_len=0

>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or 
more '-T permissive' options.

gene@coyote:/etc$

And then again, it worked, sorta

Cheers, Gene Heskett, CET.


Looks like a scam. Probably a reprogrammed controller to falsely report 
2TB of space to the system.


This is how I would test it.
First create a new GPT partition table and a new 2TB partition:
     $ sudo gdisk /dev/sdX

/!\  Make double sure you've selected the right device by using "lsblk" 
and "blkid" utilities.  /!\
/!\    It could change from 'sdm' to another 
name after reboot.      /!\


At gdisk prompt press "o" to create a new GPT table, next press "n" to 
create a new partition, accept default values by pressing "enter".
To verify setup press "p", to accept configuration and write it to 
device press "w".


Next format partition to ext4 filesystem:
     $ sudo mkfs.ext4 -m 0 -e remount-ro /dev/sdX1

Next mount the filesystem:
     $ sudo mkdir /mnt/disktest
     $ sudo mount /dev/sdX1 /mnt/disktest

Next create reference 1GB file filled with dummy data:
     $ cd /mnt/disktest
     $ sudo fallocate -l 1G ./reftestfile
     $ sudo badblocks -w -s -t random ./reftestfile

Now we can use script to create 1830 1GB files and check their checksum:
     $ for i in $(seq 1830); do sudo dd if="./reftestfile" 
of="./testfile${i}" status=none; md5sum -b "./testfile${i}" ;done


This procedure will take a very long time to complete. "md5sum" will 
output the checksum for each file and they should be equal to checksum 
of "reftestfile":

     $ md5sum -b ./reftestfile
     3f2c5fa95492bfaa18f08c801037d80b *./reftestfile

     $ for i in $(seq 1830); do sudo dd if="./reftestfile" 
of="./testfile${i}" status=none; md5sum -b "./testfile${i}" ;done

     3f2c5fa95492bfaa18f08c801037d80b *./testfile1
     3f2c5fa95492bfaa18f08c801037d80b *./testfile2
     ...
     3f2c5fa95492bfaa18f08c801037d80b *./testfile1830

Obviously, checksum for your "reftestfile" will be different from mine.
If 'for' loop fails at some point, you can count testfiles to see how 
many of them were actually written to disk.


Looks neat. Any chance this will crash my machine? I have other design 
work going on, and I'd hate to have to start from scratch.


--
With kindest regards, Alexander.

Thank you Alexander.

Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Jeffrey Walton
On Thu, Feb 8, 2024 at 11:57 AM Ralph Aichinger  wrote:
>
> On Thu, 2024-02-08 at 15:36 +, Andy Smith wrote:
> > USB storage is for phones and cameras etc, not for serious
> > computing. Many people will disagree with that statement and say
> > they use it all the time and it is fine.
>
> I am clearly in the latter camp. This mail is delivered via a Raspberry
> Pi 4 that has a 500G USB SSD. Before the Pi4 I used a Pi3 and a Pi2 (I
> think) with USB disks (first rotating, then SSD). Probably for 5 years
> or so. Never had a problem (unlike with the SD cards I used before, SD
> cards always died on me from to many writes after a few months).
>
> > They will keep saying that
> > until it isn't fine, and then they'll be in a world of hurt.
>
> This is the same with any hard disk or SSD. If you buy the most
> expensive "enterprise" disk, with SAS or whatever, it still can
> break on the next day, taking all your data with you.
>
> Actually with USB disks, sometimes you can remove the USB
> controller, replace it in case of breakage, giving you more
> or less the same reliability as any "normal" disk.
> I've never had USB controllers break, though, so I do not
> care. I just take backups as with any other disk.
>
> > I learned not to go there a long time ago and have seen plenty of
> > reminders along the way from others' misfortunes to not ever go
> > there again myself.
>
> How does a breaking USB disk differ from a breaking SATA disk?

I may be mistaken, but I believe AS is talking about USB thumb drives,
SDcards and the like. I don't think he's talking about external SSD's
and NVME's over USB. But I don't want to put words in his mouth.

My experience with SDcards and thumb drives is along the lines of
AS's. I own a lot of dev boards (dating back to the early 2010's) for
testing, and I could go through a storage device, like an SDcard, in
about 6 months. But I would also add a swap file to the installation
because the dev boards were so resource constrained. You simply can't
run a C++ compiler on a Beagleboard with 256MB of RAM. The swap file,
even with a low swappiness, would eat up SDcards and thumb drives.

Jeff



Re: D12 Installer does not recognize rtl8xxxu wifi

2024-02-08 Thread Charles Curley
On Thu, 08 Feb 2024 19:24:35 +0100
Felix Natter  wrote:

> If I start a shell from the installer, I can see that the necessary
> module rtl8xxxu is loaded (the same one that is loaded in live
> option). So I guess it is a firmware issue. How can I get an
> installer with non-free firmware (if that is the problem)?
> I just found one page that says the (non-free?) FW is always included
> in the images (starting from bookworm). Is that true?
> Any other idea?

My understanding is that the non-free firmware is now included on
Debian installation media.

I've been using "Debian GNU/Linux 12.2.0 "Bookworm" - Official amd64
NETINST with firmware 20231007-10:28" and had no problems with non-free
firmware on my several computers.

So to diagnose this further, exactly what hardware? Please run lspci,
and run lspci -v for the offending device.

Also, you can run the netinst installer at least through the relevant
installation phase. Then please capture the logs, probably under
/var/log. Searching syslog on the word "firmware" should turn up some
interesting messages.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: testing new sdm drive

2024-02-08 Thread Dan Ritter
David Christensen wrote: 
> 
> Page 1-16 states:
> 
> USB 3.1 Gen 1 connectors (20-1 pin U31G1_12; U31G1_34)
> 
> This connector allows you to connect a USB 3.1 Gen 1 module for additional
> USB 3.1 Gen 1 front or rear panel ports. With an installed USB 3.1 Gen 1
> module, you can enjoy all the benefits of USB 3.1 Gen 1including faster data
> transfer speeds of up to 5 Gb/s, faster charging time for USB-chargeable
> devices, optimized power efficiency, and backward compatibility with USB
> 2.0.
> 
> The USB 3.1 Gen 1 module is purchased separately.
> 
> 
> STFW including asus.com, I am unable to find "USB 3.1 Gen 1 module" or "USB
> 2.0 module" (?).

USB 3.0 Gen 1 is a rename of USB 3.0.

2x Type A from standard motherboard header:
https://www.newegg.com/p/181-0783-00017?Item=9SIAPY9F266548

-dsr-



Re: testing new sdm drive

2024-02-08 Thread David Christensen

On 2/8/24 10:24, David Christensen wrote:

On 2/7/24 23:14, gene heskett wrote:

gene@coyote:/etc$ sudo smartctl --all -dscsi /dev/sdm
...
scsiModePageOffset: response length too short, resp_len=4 offset=4 
bd_len=0
scsiModePageOffset: response length too short, resp_len=4 offset=4 
bd_len=0

 >> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or 
more '-T permissive' options.

...
Please try again with the drive connected directly to a motherboard USB 
3.0 port.



Error:  The motherboard has no USB 3.0 ports.


Correction:  Please try connecting the drive to each and every 
motherboard USB port to see if and which ports work with the drive and 
smartctl(8).



David



Re: testing new sdm drive

2024-02-08 Thread David Christensen

On 2/7/24 23:14, gene heskett wrote:

gene@coyote:/etc$ sudo smartctl --all -dscsi /dev/sdm
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.0-17-rt-amd64] (local 
build)

Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:
Product:  SSD 3.0
Revision: 2.00
Compliance:   SPC-2
User Capacity:    2,097,152,000,000 bytes [2.09 TB]
Logical block size:   512 bytes
scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
 >> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more 
'-T permissive' options.

gene@coyote:/etc$

And then again, it worked, sorta

Cheers, Gene Heskett, CET.



Please try again with the drive connected directly to a motherboard USB 
3.0 port.



I seem to recall that you have a lot of USB devices connected to your 
computer(s).  The Asus PRIME Z370-A II Series manual page ix states:


Intel ® Z370 Chipset
- 6 x USB 3.1 Gen 1 ports (4 ports @mid-board, 2 ports @back panel)
USB
- 6 x USB 2.0/1.1 ports (4 ports @mid-board, 2 ports @back panel)
Asmedia ® USB 3.1 Gen 2 controller
- 1 x USB 3.1 Gen 2 port @back panel (teal blue, Type-A)
- 1 x USB 3.1 Gen 2 port @back panel (USB Type CTM)


Page 1-16 states:

USB 3.1 Gen 1 connectors (20-1 pin U31G1_12; U31G1_34)

This connector allows you to connect a USB 3.1 Gen 1 module for 
additional USB 3.1 Gen 1 front or rear panel ports. With an installed 
USB 3.1 Gen 1 module, you can enjoy all the benefits of USB 3.1 Gen 
1including faster data transfer speeds of up to 5 Gb/s, faster charging 
time for USB-chargeable devices, optimized power efficiency, and 
backward compatibility with USB 2.0.


The USB 3.1 Gen 1 module is purchased separately.


Page 1-17 states:

USB 2.0 connectors (10-1 pin USB910; USB1112)

These connectors are for USB 2.0 ports. Connect the USB module cable to 
these connectors, then install the module to a slot opening at the back 
of the system chassis. This USB connector complies with USB 2.0 
specification that supports up to 480 Mb/s connection speed.


The USB 2.0 module is purchased separately.


STFW including asus.com, I am unable to find "USB 3.1 Gen 1 module" or 
"USB 2.0 module" (?).



Does your chassis have front panel USB 2.0 and/or USB 3.1 Gen 1 ports 
with cables and matching connectors?  Have you connected them to the 
motherboard headers?  Do they work?



Alternatively, if you have an available chassis expansion slot:

https://www.startech.com/en-us/cables/usbplate4


I am unable to find a similar part for the motherboard USB 3.1 Gen 1 
20-pin headers.  Perhaps a USB 3.0 will work (?):


https://www.amazon.com/RIITOP-Female-Connector-Adapter-Bracket/dp/B01KJPUI5W


Or, if you have an available motherboard PCIe slot:

https://www.startech.com/en-us/cards-adapters/usb-30/cards?filter_bustype=pci%2520express


David



D12 Installer does not recognize rtl8xxxu wifi

2024-02-08 Thread Felix Natter
Dear debian-users,

I put this on a stick and booted it:
debian-live-12.4.0-amd64-gnome.iso

When I boot the live option, the network is immediately loaded and I can
connect to a WIFI network. However, if I use the same stick
(or one with debian 12.4.0 netinst) with the installation option,
the LAN is recognized, but WLAN is not.

If I start a shell from the installer, I can see that the necessary
module rtl8xxxu is loaded (the same one that is loaded in live option).
So I guess it is a firmware issue. How can I get an installer with
non-free firmware (if that is the problem)?
I just found one page that says the (non-free?) FW is always included
in the images (starting from bookworm). Is that true?
Any other idea?

Many Thanks and Best Regards,
Felix
-- 
Felix Natter




Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Max Nikulin

On 08/02/2024 22:36, Andy Smith wrote:

On Wed, Feb 07, 2024 at 03:30:29PM -0500, gene heskett wrote:

[629241.074187] scsi host37: usb-storage 1-2:1.0


USB storage is for phones and cameras etc, not for serious
computing.


Do you mean that a proper backup drive should use uas (USB Attached 
Storage) instead of usb-storage driver?





Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Ralph Aichinger
On Thu, 2024-02-08 at 15:36 +, Andy Smith wrote:
> USB storage is for phones and cameras etc, not for serious
> computing. Many people will disagree with that statement and say
> they use it all the time and it is fine. 

I am clearly in the latter camp. This mail is delivered via a Raspberry
Pi 4 that has a 500G USB SSD. Before the Pi4 I used a Pi3 and a Pi2 (I
think) with USB disks (first rotating, then SSD). Probably for 5 years
or so. Never had a problem (unlike with the SD cards I used before, SD
cards always died on me from to many writes after a few months).

> They will keep saying that
> until it isn't fine, and then they'll be in a world of hurt.

This is the same with any hard disk or SSD. If you buy the most
expensive "enterprise" disk, with SAS or whatever, it still can 
break on the next day, taking all your data with you. 

Actually with USB disks, sometimes you can remove the USB 
controller, replace it in case of breakage, giving you more
or less the same reliability as any "normal" disk.
I've never had USB controllers break, though, so I do not
care. I just take backups as with any other disk.

> I learned not to go there a long time ago and have seen plenty of
> reminders along the way from others' misfortunes to not ever go
> there again myself.

How does a breaking USB disk differ from a breaking SATA disk?

/ralph



Re: Home UPS recommendations

2024-02-08 Thread Michael Kjörling
On 8 Feb 2024 16:34 -, from cu...@free.fr (Curt):
> I wonder if he could run the app on one of these virtual machines for
> evaluation purposes:

Using an evaluation copy of Windows with USB pass-through might be the
easiest way to run APC's proprietary software.

Or since that's an option, just return the UPS as a "I changed my
mind". Whether or not it's technically broken, seems to me that it's
clearly not healthy.

-- 
Michael Kjörling  https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Re: Home UPS recommendations (Was Re: rsync --delete vs rsync --delete-after)

2024-02-08 Thread Curt
On 2024-02-08, Charles Curley  wrote:
> On Thu, 8 Feb 2024 15:29:21 +
> Andy Smith  wrote:
>
>> I do not overly want to buy a Windows licence, run it
>> in a VM and pass USB through to that VM just to try this.
>
> You could try wine. You might need the more recent crossover-office,
> which is proprietary (but contributes greatly to wine).
>

I wonder if he could run the app on one of these virtual machines for
evaluation purposes:

https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/





Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Andy Smith
Hi,

On Thu, Feb 08, 2024 at 11:14:24AM -0500, Gremlin wrote:
> On 2/8/24 10:36, Andy Smith wrote:
> > USB storage is for phones and cameras etc, not for serious
> > computing. Many people will disagree with that statement and say
> > they use it all the time and it is fine. They will keep saying that
> > until it isn't fine, and then they'll be in a world of hurt.
> > 
> 
> LOL,  So my main desktop a raspberry pi 4 is not serious computing? Or is it
> that my name server, web server email server which is a raspberry pi 4 not
> serious computing?

Not in my opinion, no¹, but I don't mind at all if you don't agree
and I also wish you the best of ongoing luck!

Thanks,
Andy

¹ Of course, sometimes you just have a device that only has USB and
  there's no way around it. If I have to go there, I try to make it
  serious by preparing for the storage of those devices to just
  disappear one day and take steps to minimise the downtime lost to
  that.

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Home UPS recommendations (Was Re: rsync --delete vs rsync --delete-after)

2024-02-08 Thread Charles Curley
On Thu, 8 Feb 2024 15:29:21 +
Andy Smith  wrote:

> I do not overly want to buy a Windows licence, run it
> in a VM and pass USB through to that VM just to try this.

You could try wine. You might need the more recent crossover-office,
which is proprietary (but contributes greatly to wine).

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Gremlin

On 2/8/24 10:36, Andy Smith wrote:

Hello,

On Wed, Feb 07, 2024 at 03:30:29PM -0500, gene heskett wrote:

[629241.074187] scsi host37: usb-storage 1-2:1.0


USB storage is for phones and cameras etc, not for serious
computing. Many people will disagree with that statement and say
they use it all the time and it is fine. They will keep saying that
until it isn't fine, and then they'll be in a world of hurt.



LOL,  So my main desktop a raspberry pi 4 is not serious computing? Or 
is it that my name server, web server email server which is a raspberry 
pi 4 not serious computing?


They both boot to USB SSDs and only have USB SSD drives, so they are not 
serious computing?  The desktop RPI has an NVME drive as the boot drive 
connected by you guessed it USB.




I learned not to go there a long time ago and have seen plenty of
reminders along the way from others' misfortunes to not ever go
there again myself.







Things I don't touch with a 3.048m barge pole: USB storage (Was Re: Unidentified subject!)

2024-02-08 Thread Andy Smith
Hello,

On Wed, Feb 07, 2024 at 03:30:29PM -0500, gene heskett wrote:
> [629241.074187] scsi host37: usb-storage 1-2:1.0

USB storage is for phones and cameras etc, not for serious
computing. Many people will disagree with that statement and say
they use it all the time and it is fine. They will keep saying that
until it isn't fine, and then they'll be in a world of hurt.

I learned not to go there a long time ago and have seen plenty of
reminders along the way from others' misfortunes to not ever go
there again myself.

> Looks like a reasonable facsimile of a 2T disk to me.

Good luck.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Home UPS recommendations (Was Re: rsync --delete vs rsync --delete-after)

2024-02-08 Thread Andy Smith
Hello,

On Sun, Jan 28, 2024 at 06:55:04PM +, Andy Smith wrote:
> So, I must admit, I am quite tempted by BX1600MI which would cost me
> about £183. The equivalent spec in the Pro range is more than twice
> this price.

[ TL;DR: While free software like apcupsd or nut support all APC
  models that you can buy today, APC (Schneider Electric) the
  company only supports its own Windows-only Powerchute and won't do
  a warranty claim unless you can run that. I therefore question the
  device's suitability to a Linux environment. ]

Just as an update, I bought the APC Back-UPS BX1600MI and while
superficially it seems fine, using "apcupsd" and/or "nut" it reports
a constant stream of short-lived (less than 1 second) battery
detach/re-attach and powerfail/restore events.

The unit itself doesn't show any audible or visual alarm but as
these events are sub-second in duration I don't know if they are
just too quick for that.

Someone on the apcupsd mailing list thinks I have a faulty UPS or
battery and should get a replacement.

APC refuses to proceed with a warranty claim because they don't
support apcupsd or nut, only their own proprietary Powerchute. They
won't proceed unless I can get Powerchute to show these events or a
failed self-test. I can't do that because I don't have any Windows
machines. I do not overly want to buy a Windows licence, run it
in a VM and pass USB through to that VM just to try this.

While in theory if I had heeded the warnings about Back-UPS being of
lesser quality I might have bought a more expensive model that
wasn't faulty (or at least did not have this problem, whatever it
is), I am disappointed to learn that APC will not proceed with
warranty claims unless you can run some Windows software, which puts
me off the entire product range.

Having said that, I don't need to do a warranty claim. As it was
only purchased a couple of weeks ago, consumer law allows me to
return it to the seller as faulty whether they accept that or not,
so I'll likely do that. It's just disappointing and a lot more
hassle.

Thanks,
Andy



Re: testing new sdm drive

2024-02-08 Thread Alexander V. Makartsev

On 08.02.2024 12:14, gene heskett wrote:

gene@coyote:/etc$ sudo smartctl --all -dscsi /dev/sdm
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.0-17-rt-amd64] (local 
build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, 
www.smartmontools.org


=== START OF INFORMATION SECTION ===
Vendor:
Product:  SSD 3.0
Revision: 2.00
Compliance:   SPC-2
User Capacity:    2,097,152,000,000 bytes [2.09 TB]
Logical block size:   512 bytes
scsiModePageOffset: response length too short, resp_len=4 offset=4 
bd_len=0
scsiModePageOffset: response length too short, resp_len=4 offset=4 
bd_len=0

>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or 
more '-T permissive' options.

gene@coyote:/etc$

And then again, it worked, sorta

Cheers, Gene Heskett, CET.


Looks like a scam. Probably a reprogrammed controller to falsely report 
2TB of space to the system.


This is how I would test it.
First create a new GPT partition table and a new 2TB partition:
    $ sudo gdisk /dev/sdX

/!\  Make double sure you've selected the right device by using "lsblk" 
and "blkid" utilities.  /!\
/!\    It could change from 'sdm' to another 
name after reboot.      /!\


At gdisk prompt press "o" to create a new GPT table, next press "n" to 
create a new partition, accept default values by pressing "enter".
To verify setup press "p", to accept configuration and write it to 
device press "w".


Next format partition to ext4 filesystem:
    $ sudo mkfs.ext4 -m 0 -e remount-ro /dev/sdX1

Next mount the filesystem:
    $ sudo mkdir /mnt/disktest
    $ sudo mount /dev/sdX1 /mnt/disktest

Next create reference 1GB file filled with dummy data:
    $ cd /mnt/disktest
    $ sudo fallocate -l 1G ./reftestfile
    $ sudo badblocks -w -s -t random ./reftestfile

Now we can use script to create 1830 1GB files and check their checksum:
    $ for i in $(seq 1830); do sudo dd if="./reftestfile" 
of="./testfile${i}" status=none; md5sum -b "./testfile${i}" ;done


This procedure will take a very long time to complete. "md5sum" will 
output the checksum for each file and they should be equal to checksum 
of "reftestfile":

    $ md5sum -b ./reftestfile
    3f2c5fa95492bfaa18f08c801037d80b *./reftestfile

    $ for i in $(seq 1830); do sudo dd if="./reftestfile" 
of="./testfile${i}" status=none; md5sum -b "./testfile${i}" ;done

    3f2c5fa95492bfaa18f08c801037d80b *./testfile1
    3f2c5fa95492bfaa18f08c801037d80b *./testfile2
    ...
    3f2c5fa95492bfaa18f08c801037d80b *./testfile1830

Obviously, checksum for your "reftestfile" will be different from mine.
If 'for' loop fails at some point, you can count testfiles to see how 
many of them were actually written to disk.



--
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄

Re: Difficulties with PS1.

2024-02-08 Thread Greg Wooledge
On Thu, Feb 08, 2024 at 02:17:54PM +0700, Dmitry wrote:
> Greetings!
> 
> Why variable PS1 dose not change when set it before a command:
> Like this:
> A="a1" LANG="C.UTF-8" PS1="new" B="b2" bash --noprofile
> 
> $A, $B, $LANG -changed, $PS1 - not.

Most likely, you're setting PS1 in .bashrc or /etc/bash.bashrc and you
didn't use the --norc option to suppress it.