6 ms·
XCalibur – the microSD in the stone
- 0x0 10y agoSD cards' firmware can be hacked, see http://www.bunniestudios.com/blog/?p=3554 http://www.bunniestudios.com/blog/?p=3554
- ikeboy 10y agoSee also https://spritesmods.com/?art=hddhack https://spritesmods.com/?art=hddhack
- avian 10y agoI have seen similarly weird results with flaky USB flash keys. A lot of those don't do any kind of hardware error detection. The behavior described here can be explained by block device cache: You write a file to a device and the device doesn't report an error, but doesn't actually write the data due to some hardware error. When you read the file back, the content will come from cache in your RAM, not the device itself. Unmounting and mounting the device flushes the cache. When you then read the file again, it will come from the device and have the original content again.
- dmitrygr 10y agoSome of the cheaper cards (and USB keys back in the day) sort of assume you'll use a single FAT[/32] partition and they understand the FAT and use it as poor man's TRIM information. They get super upset if you attempt anything that is not a single FAT[/32] partition. Some will actively forbid it by ignoring writes to the first sector of the disk and of the partition. Perhaps this is one of those cases? EDIT: technically this is kosher as SD spec mandates FAT32 (just like SDXC spec mandates exFAT)
- 0x0 10y agoWow, that's scary. Imagine a file system that kinda sorta passes the "looks like fat" test but works differently, causing the card to TRIM randomly all over your files :O
- digi_owl 10y agoFrankly "active" storage is all manner of scary when you get down to it, as you have not the first clue what the firmware etc sitting between the CPU and the actual bits can get up to.
- desireco42 10y agoThis is pretty cool, I am really liking it.
- ChuckMcM 10y agoSounds hasty. There are so many layers between you and your SD card it is hard to know sometimes which ones are broken. Typically, if you can't use dd(1) to write to it, and the error dd(1) gives is not 'write protected media', then your card is essentially dead.
- ngomez 10y agoThe interesting thing is that dd wouldn't even give us an error, but the write speeds were abysmal. Toward the end of the hackathon, we noticed that blocks would be corrupted here and there, while leaving other pieces of data (even entire MP3 files) intact. I think we ended up pointing to issues with the SD card's bus as the most likely cause for the behavior we saw, but we weren't even certain about this.
- stefs 10y agoJordan messes up and rm -rf / instead of rm -rf /dev/sdb slapstick classic
- zymhan 10y agoI feel like there's some preface here that I'm missing.
- rmellow 10y agoSame here. I get that they're having trouble changing the FS on a MicroSD/writing an image on it. But what is XCalibur?
- zymhan 10y agoMaybe it's all some joke about how this one MicroSD card is just like excalibur? In that you can't get useful data out...
- roytenberg 10y agoAll of the data was read-only, regardless of what adapter we put it in (we tried like five different ones). So you could retrieve the data that was baked onto it, but formatting the card was a lost cause. So getting it to format was like trying to pull Excalibur out of the stone!
- dst79 10y agothe joke became that as we explained the futility of formatting the SD card to any new person, they'd instantly think "oh no, they probably haven't tried x, I bet I could do it" and try it and fail in a similar fashion to how everyone thought pulling excalibur from stone would be an easy feat, but trying it, they failed
- roytenberg 10y agoOf course, my stupidest hackathon project makes it to HN. Great.
- jkot 10y agoI had exactly the same issue (except formatting my system). SD card was broken, and it placed itself into read-only state for data recovery. I could delete files, but those would reappear. Formating would work until restart etc. Write cache was responsible for this weird magic. I got card replaced as part of warranty.