[Andy France] built his computer into a Windows XP box. (Yes, this is from the past.) He needed to run windows most of the time, but it was nice to boot into Linux every now and then. That’s where the problem lay. If he was running Linux on his Windows XP case mod, he’d get made fun of. The only solution was to make a Linux sleeve for his computer. He would slide the sleeve over the case whenever he ran Linux, and hide his shame from wandering eyes. Once his plan was fully formed, he went an extra step and modified the computer so that if the sleeve was on, it would automatically boot Linux, and if it was off it would boot Windows.
The Linux sleeve could only slide on if the computer was flipped upside down. So he needed to detect when it was in this state. To do this he wired a switch into one of the com ports of his computer, and attached it to the top of the case mod. He modified the assembly code in the MBR to read the state of the switch. When the Linux sleeve is on (and therefore the computer is flipped over) it boots Linux. When the sleeve is off, Windows. Neat. It would be cool to put a small computer in a cube and have it boot different operating systems with this trick. Or maybe a computer that boots into guest mode in one orientation, and the full system in another.
[via HackerNews]
Holy crap! I remember this! It’s probably older than a lot of the readership of this site!
12 years at least, Without reading this article, the original poster had a mercury switch connected to a mobo pin the Grub loader read on startup.
I miss these days of Hackaday. It’s not the same or as simple anymore.
Yep I too remember this. Damn we must be getting old :/
I remember this too, browsing some mini itx mods website as a youngen lusting after a pico-itx board.
Ah yes. Boot shenanigans.
I remember writing a floppy boot sector that would write a special signature byte in low memory somewhere and then load and execute the MBR from the hard disk. The code in the MBR would boot DOS from the hard disk and somewhere in config.sys it had a device driver called clear.sys which would clear the screen and check if the signature byte was there. If not it would give an error message and halt the machine (and there was no way out because during config.sys loading, DOS didn’t check for Ctrl-Break). That way the computers in the lab at my university would (appear to) only boot if they had a student disk inserted.
But what about disks you hadn’t tinkered with? This presumably only tripped up when the dos system files had been copied onto a new disk (and maybe not even then, depending on how DOS makes new boot disks form old ones, and if it copies the MBR).
But does it work in Austra… never mind :)
Yes, but in reverse.
And the sleeve is a Kangaroo
nowadays AV software would scream fire and murder just because the MBR record was non-standard or has some code appended with a long jump at the start.
I did this a long time ago in a computer with two bootable ISA harddrives. But I built a cable that plugged into the master/slave headers on both of the drives. Each had a different OS installed. The toggle switch on the front of the computer would control which drive was master and which was slave, which in turn controlled which one was booted from on power up. Worked great, as neither OS knew about the other one.
ISA hard drive?
ISA was more used to describe the internal BUS architecture.
Do you mean ATA hard drive that was borne from ISA architecture?
He meant his ST-506s.
HA. It HAS been a long time! ATA indeed. I suppose it’s a.k.a. PATA now, to distinguish it from SATA.
I thought you may have been talking about the very first common drives and controllers. We just called them MFM and RLL back then.
But yes (P)ATA DMA33 DMA66 and UDMA133 – the later being 133 MB/s. I just ordered a SSD and it’s 550MB/s so I don’t know what needed UDMA133 20 years ago.
From the days when you could actually buy Redhat in a box.
the beautiful intersection of dumb and awesome
Indeed!
Next up on Hackaday….. new modern invention… THE WHEEL!!!!! Can’t wait for the kickstarter!
Connects to the internet!
Cute, but this would get old quick. How many times have you tried to pull a PC a few inches forward on your desktop, to find that a cable somehow got stuck on something? Same would happen when you try to flip this, because the cables need to go a few inches further up when the PC is upside-down. Even with good cable management, you’d have to remember to alternately rotate clockwise/counterclockwise, else they’ll get twisted together. And to maintain the facade that is the whole reason behind this odd design, you need to keep the Linux sleeve handy. Usually empty, but taking up room in your limited “readily accessible” space all the same. Not practical. Might even be bad Feng Shui, if you’re into that.
I’d like to point out that apparently adding a switch to a serial port is more of a hack than MODIFYING YOUR BOOTLOADER??? Am I the only one way more interested in that than a dinky little switch?
Agreed.
“He modified the assembly code in the MBR to..” he did what now!?
Hooking up a switch to a serial port is easy, I’ve done that myself and didn’t even need to code anything. But changing an MBR’s assembly code? That takes some knowledge and skills.
Of course this was in the olden days, when programming got lowlevel pretty quick.
Dilbert did this better:
http://assets.amuniversal.com/4237f7509fb1012f2fe600163e41dd5b
Really. 2003 hackaday. Can’t find any new hacks?
http://youtu.be/8Zrx1paCIUA
Here’s one I did that’s not from 2003
Upside down? All the bits are going to fall out!