Midnight Pub

take that, windows!

~fallenriver

Good evening ~bartender, a filter coffee please.

I wanted to try some distros on my pc today, but apparently I don't have any USB sticks at home. None with more than 1 GB of space at least. Because of this, I acquired the most cursed USB drive in my possession. I've found an old windows 10 installation USB stick. One of those official ones. APPARENTLY, they have some really annoying write-protection going on. Like, not even just a "oh, let's give the volume a read-only attribute" type of thing. The firmware straight up forces the volume to be read-only. I had to go *flash* the *flash drive* firmware through some shady software I found on a Russian website. Hopefully didn't get anything problematic from it.

On the upside, I now have a USB stick that says "windows" which boots up Debian :p

Oh hey Smudge! Did I tell you I'm like one of those lactose intolerant people that eat cheese anyways? Yeah, I pay the price of petting you with some scratchy eyes and sneezes but the that's well worth it. I think I'll chill in the corner with you for a while...


theoddballphilosopher

Now I hear that Windows is getting rid of the control panel. WTF Bill Gates?

reply

detritus

Firmware, huh? One would expect a simple dd to be enough, after all, it's just a block device. How does one work around the firmware? I can imagine a rather simple C program should be enough, as long as one finds the appropriate entry point, do we have to write to some specific location within the device? VERY interesting.

A fun little bit, in my language 'to dd' translates into an obscenity. I always enjoy the very few opportunities I get to talk to people in my country to mention "dd'ing" a usb drive.

I went through a bit of a phase of buying old tech from pawn shops, I got a very little netbook with an ARM processor that ran some very watered down version of Windows, yes, I was amazed that there existed an ARM-based windows distribution! As you can imagine, it didn't have any BIOS, so the problem was, how to get linux to run on it to push out the windows? My idea was that I would have had to find an entry into the kernel, and once in kernelspace, I could just inject the code to write the new OS directly into disk, of course, making sure to know how that processor loads the OS from disk to begin with!

I never really tried, however, I could hardly find any info on that ARM-based windows, let alone find a vulnerability in it. The thing is still lying there, somewhere, probably, I think.

~bartender, a coffee, with some adderall in it if prossible, thank you.

reply

fallenriver

Yeah! I followed a tutorial specifically about these Windows retail USB sticks and had to flash the controller in the stick (a Phison 2251-07, using this program called Phison MPALL). I'm new to these kinds of works anyway so I couldn't have figured it alone.

Oh? Which language would that be, if I may ask? Also, ARM-based windows sound crazy! You got me interested but also I bricked my pc just today so I'll stay away from OS related stuff for a while :p

reply

detritus

So I was left thinking about this last night as I struggled to sleep. It probably requires one to enter some sort of ioctl, a flash drive ought to have at least two ioctls, for reading and writing, probably one more for getting meta information about it (block size, number of blocks, etc). And then, there is probably some additional ioctls I wouldn't know about. Of course I could just go look it up, but I like to think about it first, as you may understand.

Bricking your computer is the best moment to get your hands dirty and mess with the disk! I like to keep a spare usb stick with a linux distro that I know for sure that it works. I used to wipe periodically the disk on my little hackerbook to try different OSes, and the great majority of them wouldn't boot after I installed them, either the kernel panicked, or the grub was misconfigured, or something in the root filesystem was wrong... the possibilities were endless! So I kept a spare usb stick with a "recovery" linux system.

The language is Spanish, you may have heard of it. The word in question is "dedear", literally, "to dd (dee dee)", it can be translated with another standard utility, finger(1).

reply

fallenriver

Yeah, I get why you'd want to think about the thing first. I'm new to Linux in general so I don't really know (yet) how one would go about changing controller-level software. But yeah, I'd guess that those would be the block too. I'm sure there would be other ways to deal with this, but I couldn't find enough information either, let alone how to do it myself in a more "manual" way.

Bricking my computer is nice, but I don't want to play games on it lol. I was trying to make a clean start for windows again after some persistent problems with search indexing and general performance issues. Did the hard reset, then tried to install NixOS, and failed :P Another hard reset was required. Now it's back to normal, maybe I'll try to install some other distro again before leaving town.

Ah, muy bien! I'd try to get every excuse to talk about 'dd'ing a drive too :p

reply