Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
A Proper Uppercut
Sep 30, 2008

I'm making a backup of my RetroPie image on windows 10. There's two partitions, one's the boot and one's rest of the filesystem or whatever. Do I need to back both of these up separately, and then when restoring do I need to write two separate partitions to the new SD card? Ok using win32diskimager.

Edit: ah nevermind, I just picked the boot one and it backed up the whole thing.

A Proper Uppercut fucked around with this message at 16:49 on Dec 24, 2021

Adbot
ADBOT LOVES YOU

Harminoff
Oct 24, 2005

👽
Anyone using Xbox game pass on a rpi4? If so, what os works best?

Warbird
May 23, 2012

America's Favorite Dumbass

What? Isn’t all that stuff just tied up in the Windows Store or whatever? Do you mean the Xbox controller?

Harminoff
Oct 24, 2005

👽

Warbird posted:

What? Isn’t all that stuff just tied up in the Windows Store or whatever? Do you mean the Xbox controller?

No, you can stream games using chrome.

SlowBloke
Aug 14, 2017

Harminoff posted:

Anyone using Xbox game pass on a rpi4? If so, what os works best?

https://pimylifeup.com/raspberry-pi-xbox-cloud-gaming/

Stock raspberry pi os works fine

Gaz2k21
Sep 1, 2006

MEGALA---WHO??!!??
I’ve been trying to find some information on this but does anyone know the best way to output from a pi zero 2 W to a CRT television with scart or composite????

endlessmonotony
Nov 4, 2009

by Fritz the Horse

Gaz2k21 posted:

I’ve been trying to find some information on this but does anyone know the best way to output from a pi zero 2 W to a CRT television with scart or composite????

You ain't doing that one without soldering. Do you need it to be a Zero 2W?

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

Gaz2k21 posted:

I’ve been trying to find some information on this but does anyone know the best way to output from a pi zero 2 W to a CRT television with scart or composite????

Looks like you solder to these pads for composite:


From this guy's reddit post about it:
https://www.reddit.com/r/raspberry_pi/comments/qq6ep9/composite_video_on_pi_zero_w_2/

Gaz2k21
Sep 1, 2006

MEGALA---WHO??!!??
Ahhhh nice thanks I don’t mind a bit of soldering thanks guys

Looking at that post that sorts the video side of things out now I just need to figure out audio.

Gaz2k21 fucked around with this message at 21:32 on Dec 28, 2021

Coxswain Balls
Jun 4, 2001

I'm kicking myself for not switching to PiVPN+Wireguard sooner from OpenVPN on my router. Managing it is so much easier, especially with the QR codes it can generate.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Check out Tailscale if you’re into WireGuard-based VPNs.

Coxswain Balls
Jun 4, 2001

My primary VPN use case is to securely access stuff on my internal network when I'm away from home. Would there be much benefit in Tailscale if the devices I have on me aren't going to be communicating with each other all that much?

Right now I'm trying to learn how to build a LineageOS kernel with the Wireguard module built in for those sweet sweet performance gains and battery savings on my Pixel 2. I have no idea what I'm doing but I have some free time over the winter break so I figured why not give it a shot.

AlternateAccount
Apr 25, 2005
FYGM
Man did I get scammed with a fake 128GB SD card? Freshly imaged, takes like 60 seconds to respond after pw to ssh login on a 4B 8GB. Formatting it took like five hours.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
What the hell kind of format did you do?

AlternateAccount
Apr 25, 2005
FYGM

Cojawfee posted:

What the hell kind of format did you do?

Just a full format in Windows.

Klyith
Aug 3, 2007

GBS Pledge Week

AlternateAccount posted:

Just a full format in Windows.

lol yeah that would take hours to a SD card. and will mess up your performance for quite some time.

a non-quick format writes zeros to the whole drive. never do that to flash devices.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Never do a full format. Always do a quick format.

xzzy
Mar 5, 2009

If you bought sandisk they have a page to confirm the serial number markings are authentic (which could also be counterfeited, but it's a place to start).

There's also a tool out there to confirm the reported storage capacity is accurate.. htest or something like that.

Klyith
Aug 3, 2007

GBS Pledge Week
As an explainer, the full format fucks up performance of flash storage because it writes data to the whole drive. It's all zeros that aren't real data, but the drive is agnostic about this type of thing -- to it writes are writes. You're basically starting from the position of a "full" drive which is worst-case performance for solid state.

On a real SSD this would get fixed pretty fast by the OS sending TRIM commands to let the SSD know that all those blocks full of zeros are junk it can forget about. Or you could fix it instantly using the ATA Secure Erase function, causing it to erase its mapping table, erase / regenerate its encryption key, and reset the drive to uninitialized. (Some SSDs also do nifty things like apply voltage across the entire flash in a way that zeros out the cells all at once.)


On a SD card, uh... they don't support TRIM or Secure Erase. Googling a bit, it looks like you can use blkdiscard in linux to discard sectors in a flash-friendly way (and in practice means wiping the card). That should restore it to fresh state. Some people on the internet say fstrim works with their SD card device, but I just tried on my Pi and it says "operation not permitted". And the other option is to wait for garbage collection to slowly do the job.

PBCrunch
Jun 17, 2002

Lawrence Phillips Always #1 to Me

Gaz2k21 posted:

Ahhhh nice thanks I don’t mind a bit of soldering thanks guys

Looking at that post that sorts the video side of things out now I just need to figure out audio.

Get a hat or a USB sound card because built-in Pi analog audio is god awful.

Rand Brittain
Mar 25, 2013

"Go on until you're stopped."

Klyith posted:

As an explainer, the full format fucks up performance of flash storage because it writes data to the whole drive. It's all zeros that aren't real data, but the drive is agnostic about this type of thing -- to it writes are writes. You're basically starting from the position of a "full" drive which is worst-case performance for solid state.

On a real SSD this would get fixed pretty fast by the OS sending TRIM commands to let the SSD know that all those blocks full of zeros are junk it can forget about. Or you could fix it instantly using the ATA Secure Erase function, causing it to erase its mapping table, erase / regenerate its encryption key, and reset the drive to uninitialized. (Some SSDs also do nifty things like apply voltage across the entire flash in a way that zeros out the cells all at once.)


On a SD card, uh... they don't support TRIM or Secure Erase. Googling a bit, it looks like you can use blkdiscard in linux to discard sectors in a flash-friendly way (and in practice means wiping the card). That should restore it to fresh state. Some people on the internet say fstrim works with their SD card device, but I just tried on my Pi and it says "operation not permitted". And the other option is to wait for garbage collection to slowly do the job.

Couldn't you just fill the card up agaon and then delete it all?

A Proper Uppercut
Sep 30, 2008

PBCrunch posted:

Get a hat or a USB sound card because built-in Pi analog audio is god awful.

I'll second this. I was ready to chuck my Pi in the trash trying to get the analog audio working through GPIO, I finally did and it sounded like total poo poo. Either get a I2S DAC or a USB sound card.

Klyith
Aug 3, 2007

GBS Pledge Week

Rand Brittain posted:

Couldn't you just fill the card up agaon and then delete it all?

Not really. When you delete stuff in the OS, you're just changing the file system to remove the files. That's why you can use data recovery software to undelete things. TRIM is how you tell a SSD that some space is free and it doesn't have to keep it any more. But SD cards don't have TRIM.


All of this stems from the fact that file systems are kinda built on top of a hard drive system of doing things (which us the same as floppies before them). SSDs are not at all like hard drives, but it was much easier to make SSDs that pretend to store data just like a HDD, rather than make all-new file systems. Internally, they don't store data like a HDD and keep a map table for where things really are in their flash vs where the pretend-HDD location is.

TRIM didn't exist before SSDs, and in fact the first SSDs didn't have it either. They only had garbage collection, and had problems just like AlternateAccount's sd card. People used to recommend partitioning a SSD to only use 80% of its total space. It's still a bad idea to fill a modern SSD to near-100% full, even though they're much better.

EoRaptor
Sep 13, 2003

by Fluffdaddy

Klyith posted:

Not really. When you delete stuff in the OS, you're just changing the file system to remove the files. That's why you can use data recovery software to undelete things. TRIM is how you tell a SSD that some space is free and it doesn't have to keep it any more. But SD cards don't have TRIM.


All of this stems from the fact that file systems are kinda built on top of a hard drive system of doing things (which us the same as floppies before them). SSDs are not at all like hard drives, but it was much easier to make SSDs that pretend to store data just like a HDD, rather than make all-new file systems. Internally, they don't store data like a HDD and keep a map table for where things really are in their flash vs where the pretend-HDD location is.

TRIM didn't exist before SSDs, and in fact the first SSDs didn't have it either. They only had garbage collection, and had problems just like AlternateAccount's sd card. People used to recommend partitioning a SSD to only use 80% of its total space. It's still a bad idea to fill a modern SSD to near-100% full, even though they're much better.

Okay, what?

Hard drives long predate floppies, though they were called drum storage back then, and were drum shaped. Because in most* hard drives, a write operation and an overwrite operation take the exact same amount of time, it was easier to keep deletes as quick as possible so the hard drives limited seek ability was available to the user as much as possible. So, a deleted file was flagged as such in the file systems allocation table, but left 'on disk'. When the space was eventually needed, there was no penalty to overwriting the data at that instant, so this worked fine.

With SSD's, a write and an overwrite operation take very different amounts of time, with an overwrite frequently an order of magnitude slower than a write. Telling the drive about deleted data ahead of time lets it clear that used space, and prepare it for a new write operation. Trim was used here to pass that knowledge from the file system to the SSD controller.

Trim as a concept/function long predates SSD's. Whenever you had storage provided by a controller combining multiple storage sources (eg: RAID, but also NFS/SAN), it was helpful to tell the controller you were 'done' with some data, so it could eject that data from future redundancy calculations and overwrite it the next time the opportunity came up. Trim exists in the NTFS standard from the first version, though it wasn't enabled until consumer SSD's became common enough to make it a performance/longevity enhancement.

(* SMR type hard drives also need to prepare 'write space' ahead of time, and have similar overwrite penalties as SSD's)

EoRaptor fucked around with this message at 03:17 on Jan 5, 2022

Hadlock
Nov 9, 2004

EoRaptor posted:

(* SMR type hard drives also need to prepare 'write space' ahead of time, and have similar overwrite penalties as SSD's)

gently caress SMR drives forever

Klyith
Aug 3, 2007

GBS Pledge Week

EoRaptor posted:

Okay, what?
I was trying to keep technical detail to a minimum, for the question "why not just write data and delete it?"


EoRaptor posted:

Trim as a concept/function long predates SSD's. Whenever you had storage provided by a controller combining multiple storage sources (eg: RAID, but also NFS/SAN)

I did not know this -- I have only ever heard of TRIM in the context of SSDs, and as far as I knew did not predate them.

(Though in fact, looking at wikipedia it says that the TRIM command became part of the ATA standard in 2009. And SCSI UNMAP wasn't earlier either. I know nothing about pro-grade RAID systems, so if there is some similar thing I can see that would make sense. But it's not common knowledge, and I've never seen tech articles reference it before. Is there a doc with more info about this? Sounds interesting.)

PBCrunch
Jun 17, 2002

Lawrence Phillips Always #1 to Me

Klyith posted:

Flash thumb drives are a better than sd cards for the scenario where you have power loss during writes, but no better for endurance.
In my experience, the microSD physical interface doesn't handle vibration gracefully. Thumb drives win because they just stay in better.

priznat
Jul 7, 2009

Let's get drunk and kiss each other all night.
Maybe a weird request, but does anyone know of a ribbon cable for the regular pi (40 pin header) that goes to a much smaller connector on the other side?

Looking at using RPis to control development boards in pcie form factor and would be nice to have something a bit denser so to not take up as much real estate. Realistically all that is required are the SPI, I2C, UART and a couple more gpios.

Been looking all over with no luck so far.

Alternatively something like a compute module with the dense b2b connectors but with power input and an RJ45 ethernet jack on the board would be cool too :haw: The RockPi S looks interesting for something small.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Use individual female to female headers, then hot glue them into whatever square configuration you like.


Your request seems nebulous, as in, you don't quite know exactly what you want yet, so there won't really be any products that fit the bill.

priznat
Jul 7, 2009

Let's get drunk and kiss each other all night.

ante posted:

Use individual female to female headers, then hot glue them into whatever square configuration you like.


Your request seems nebulous, as in, you don't quite know exactly what you want yet, so there won't really be any products that fit the bill.

Well, we know the interfaces we want but it's still in the spec design phase so form factor is open. Would probably get a cable custom made if there's no good options. It's the classic development card that has to have everything and the kitchen sink on it but also be able to sell it to customers as a reference design so can't stick too much on the board, otherwise I would just push for a compute module and then put the RJ45 on the main board.

Simplest solution is just use a RPi 4B, 40 pin header with female header on the pcie and plug the card in directly (like a really big hat) but not sure yet if we'll have the space for that.

SlowBloke
Aug 14, 2017

AlternateAccount posted:

Just a full format in Windows.

NEVER FORMAT A SD CARD USING NORMAL FORMAT TOOLS!! It will take ages spinning the wheels at best or cook the sd card at worst.

Always use the SD format tools from https://www.sdcard.org/downloads/formatter/

spiny
May 20, 2004

round and round and round

priznat posted:

Well, we know the interfaces we want but it's still in the spec design phase so form factor is open. Would probably get a cable custom made if there's no good options. It's the classic development card that has to have everything and the kitchen sink on it but also be able to sell it to customers as a reference design so can't stick too much on the board, otherwise I would just push for a compute module and then put the RJ45 on the main board.

Simplest solution is just use a RPi 4B, 40 pin header with female header on the pcie and plug the card in directly (like a really big hat) but not sure yet if we'll have the space for that.

3.5 IDE to 2.5 IDE cable? , though I have no idea if the pins on the Pi line up with the 3.5 IDE spacing.

some kinda jackal
Feb 25, 2003

 
 

SlowBloke posted:

It will take ages spinning the wheels at best or cook the sd card at worst.

Always use the SD format tools from https://www.sdcard.org/downloads/formatter/

sorry I'm not doubting this statement but can you cite a source or give a iittle more detail? I've never really given it a second thought -- really curious what is detrimental about Windows formatting a card vs a bespoke utility, and whether it could explain some or any of my lovely SD card experiences over the years.

e: Oh the link actually might answer:

quote:

SD/SDHC/SDXC Cards have a “Protected Area” for SD Card security purposes. The SD Memory Card Formatter does not format the protected area in the SD/SDHC/SDXC Cards. The protected area shall be formatted by an appropriate PC application or SD host devices that provide SD security function.

some kinda jackal fucked around with this message at 19:27 on Jan 7, 2022

endlessmonotony
Nov 4, 2009

by Fritz the Horse

Martytoof posted:

sorry I'm not doubting this statement but can you cite a source or give a iittle more detail? I've never really given it a second thought -- really curious what is detrimental about Windows formatting a card vs a bespoke utility, and whether it could explain some or any of my lovely SD card experiences over the years.

e: Oh the link actually might answer:

Windows makes lovely filesystem decisions for SD cards, because it treats them like any other device.

Linux-side you get more control so you can get the settings right, it's just that it's a bunch of lovely math. SD association's formatter is a lot easier.

You recognize poo poo going real bad by massive write amplification and half the expected read speed.

some kinda jackal
Feb 25, 2003

 
 
If that’s the symptom it definitely sounds familiar.

SlowBloke
Aug 14, 2017

Martytoof posted:

sorry I'm not doubting this statement but can you cite a source or give a iittle more detail? I've never really given it a second thought -- really curious what is detrimental about Windows formatting a card vs a bespoke utility, and whether it could explain some or any of my lovely SD card experiences over the years.

e: Oh the link actually might answer:

Most sd reader chips won’t expose the drive as thin/trim aware, meaning it will do write amplification if it does windows format ops. SD formatter will do the equivalent of a trim aware format/opal wipe, meaning it will scrap the mbr/gpt and crypto key while not stressing the nand cells.

endlessmonotony
Nov 4, 2009

by Fritz the Horse

SlowBloke posted:

Most sd reader chips won’t expose the drive as thin/trim aware, meaning it will do write amplification if it does windows format ops. SD formatter will do the equivalent of a trim aware format/opal wipe, meaning it will scrap the mbr/gpt and crypto key while not stressing the nand cells.

This ain't it.

SlowBloke
Aug 14, 2017

endlessmonotony posted:

This ain't it.

SD formatter won’t touch the cells unless explicitly told so, the quick format will just destroy the current partitions by regenerating the mbr/gpt table and making a new fat/fat32/exfat partition. Which is far less damaging to the overall device lifetime by zeroing wildly as windows format tools will do.

endlessmonotony
Nov 4, 2009

by Fritz the Horse

SlowBloke posted:

SD formatter won’t touch the cells unless explicitly told so, the quick format will just destroy the current partitions by regenerating the mbr/gpt table and making a new fat/fat32/exfat partition. Which is far less damaging to the overall device lifetime by zeroing wildly as windows format tools will do.

Barely relevant.

The big deal is partition alignment and having the right formatting options.

Adbot
ADBOT LOVES YOU

Gorson
Aug 29, 2014

Looking for literally any Pi model to make a PiHole but stock is wiped out, anyone have a Pi shop they like that has good stock notifications?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply