so many operating systems, so little time

Sometimes you need to do many things with the same hardware. Say, for example, you might need both Windows 10 and a Linux-type of operating system on the same computer. Here are some of your options for this.

You might say, “why would I want that?” There are times when you want to try out something new. You might need to test software compatibility with something you don’t have currently. You might purchase some new software or a printer which isn’t compatible with your current setup. Or, like me, you might be endlessly curious about the possibilities. You might want to create a smartphone app and need to see how that looks on a variety of phones.

Boot from a “Live” media

In this case, you have Ubuntu on a CD or on a USB thumb drive. You boot to this media and select the live option from the menu (“Try Ubuntu without installing”). You then get a Desktop experience running Ubuntu (Linux) on your existing hardware and you don’t even have to install it in the classical sense. Once you shutdown this system and remove the media, nothing whatsoever has changed on your original hard drive.

TryUbuntu

I’ve used both methods (CD and USB) and will attest that the latter will boot up faster than anything you’ve seen before, I’d guess.

Pros:

  • It’s very fast to boot this way from the USB drive.
  • You can try another operating system without making any changes whatsoever to your existing computer.
  • It makes short work of hacking a Windows-based computer if you don’t know the password(s) and accessing the files on its partitions.
  • It seems to be wonderfully compatible with a variety of computers and laptops without fussing with drivers.
  • Each session takes advantage of all the available RAM.

Cons:

  • Unless you change the defaults, any changes to your Desktop and configuration are lost upon restarting this session.

Set up two partitions and select one upon startup

In this case, you shrink the size of your existing hard drive’s partition to make room for another operating system.  You then install the new operating system to this second partition.

Upon restarting the computer, you then select which partition (operating system) you’d prefer.

GRUB

This technique is often called “dual booting”.

Pros:

  • The settings you change will be saved from one session to the next.
  • In many cases, you can access files on the other partition(s) if you know where to look.
  • You can take advantage of fast hardware like that on an Apple computer to use other operating systems like Linux.
  • Technically, you could install Windows 7 on one partition and Windows 10 on another.
  • This technique can be extended to many operating systems on many partitions.
  • Each session gets all the available RAM.

Cons:

  • You have to reboot in order to get back to the other operating system to use its tools and software.
  • In the case of OS X, major version upgrades usually try to overwrite the menu at the beginning which would normally allow you to select the other partitions. It’s almost as if Apple doesn’t want you to do this and breaks things on purpose, of course. If you’re technically-minded, you can fix this each time however.

Set up a virtual manager (VM) and “spin up” an operating system

This seems to be the preferred and newest method these days. You run a virtual machine manager, create a virtual computer using this technique and then install the new operating system to this.

QEMU

You then boot up the virtual computer and you see this as a window on your Desktop.

XP

Pros:

  • You can copy/paste from a Windows application into a Linux session’s Terminal session or any similar combination of from/to.
  • For demonstrations, you can easily show that something works with multiple operating systems (without rebooting or bringing multiple laptops).
  • Depending upon how much hard drive space, RAM and processor speed you have, you could potentially run several virtual machines at once.

Cons:

  • Technically, it’s the most challenging of the various options and the learning curve is steep.
  • It may require more RAM memory than what you currently have for this to run well.

Progress so far

I have plenty of experience using the first two methods above (live- and dual-boot) but have recently been working with the VM option, as described below.

Dual-boot MacBook

I’ve setup my MacBook Pro to boot both OS X and Ubuntu. It seems to work great so far. I hope to next setup a VM so that I can emulate a Raspberry Pi computer within the MacBook itself (for development purposes).

HP Laptop

I’ve setup my HP laptop to boot Ubuntu and have added a VM which has Windows 10 loaded in it. Remarkably, the Windows 10 install actually works better than the original (native) installation on this laptop.

Multi-boot Raspberry Pi computers (IoT re-purposing)

Since the Raspberry Pi (3 and Zero) computers have an easily-replaceable microSD card in them, I now have a small library of different images with which I may boot any individual computer. It’s just important to label each to avoid confusion.

So I might pull the microSD card for the robotic tank project out of a Raspberry Pi, replace it with the card for the closed ecosystem or for a different project altogether. Once it boots, it’s now a completely different computer, if you will.

microSD

Multi-boot 3D printer

Technically, the Robo C2 printer has a Raspberry Pi computer inside so it makes it easy to boot to different versions of the software. This is useful when you’re modifying things to add on new features, for example.

Smartphone software on a workstation

I’ve also had the opportunity of installing Android on a standard Dell Vostro 200 desktop computer. (It’s good for testing software and websites.)

Cloud-based alternatives

There are entire services available at Microsoft, Amazon and presumably Google in which you “spin up” a virtual computer and remote into it.

Amazon’s offering is called EC2 and I’ve had the opportunity to use it in the past. In the span of two hours, I was able to spin up or “instantiate” a virtual SQL Server in a datacenter somewhere, to upload a corrupt database, fix it there and then to download it back to me. I then killed that virtual server. The total cost was something like $4 to “borrow” their virtual hardware for a couple of hours. Compare this to the cost of purchasing an actual server, paying for Microsoft licensing, waiting for everything to arrive, setting it up, etc. I literally saved thousands of dollars with a service like this.

Microsoft’s offering is called Azure. I can’t say that I’ve used it yet but it works essentially in the same way that EC2 does: define an instance, spin it up and remote into it.

Looks like Google’s offering is their Compute Engine. It sounds like they’re trying to play “catch up” to both Amazon/Microsoft on this one.

There’s another player in this space, MacInCloud.com appears to be offering remote sessions into what are likely discreet/physical Apple computers. For all practical purposes, it would likely behave like a virtual computer might.

Private cloud

And finally, I had the opportunity to re-purpose about eight Dell Vostro 200 computers from work into a MaaS (metal as a service) private cloud. The underlying layer of software which did the cloud part is called OpenStack which allows you—like Amazon itself perhaps—to be the host for spinning up virtual servers.

It takes a lot of work to get the initial one or two computers running for this. But then, using a concept called Juju charms, you select what are essentially recipes of things to install which have complicated inter-dependencies and it seems to make it all work for you. Seeing these things run is pretty impressive given that this is in the free, open-space world.

The future

It’s hard to guess what’s next in this series of events. We may soon be running a VM with Windows 10 on a wearable single-board computer like the Raspberry Pi 3 or similar. In theory, then, you might wear a pair of Google Glass(es) or the Microsoft HoloLens which would interface with the Pi computer via Bluetooth. Given the lack of a keyboard, presumably the interface might be like the Amazon Echo/Alexa service: you ask for something, the system must recognize the command, submit it to a server and display the results or iterate through them via voice.

And yet, given the augmented reality (AR) side of things, you might say “keyboard” and a virtual reality keyboard could appear on the physical horizontal space in front of you and you just “type” on an imaginary keyboard to input data.

The interfaces could evolve to project these virtual keyboard-type interfaces onto an imaginary glass wall in front of you, much the same as you see in sci-fi movies these days. These glass-like devices probably would incorporate an outward-facing camera to catch and interpret your hand movements into discreet commands like typing, page-forward, scroll-down, dismiss window, etc.

GoogleGlassHololens

Advertisements

tommy can you hear me?

Okay, so this week’s invention involves me being uncharacteristically-cheap. If you usually read about the gadgets I buy, you should know that I’m seriously into making things and using a variety of tools that I need to get these projects done. I’m happy to buy something if it’s worth the cost.

For these monthly talks I’ve been giving, I wanted to have a hands-free option for the Sennheiser FM transmitter. Because when you’re giving a talk and you’re also typing on the computer it just makes sense that both hands need to be free to do that. And yet, the Sennheiser has a propriety 1/8″ jack that makes it difficult to shop anywhere but their website for accessories.  And their cheapest headset is still hella expensive (~$180) and it’s just a standard headset with a standard microphone with a propriatary plug.  <_<  So I decided to try to build an entire rig instead.

The Gear

Of course, I’m starting things with a Raspberry Pi 3 at the moment but will likely port this over to a Raspberry Pi Zero W when I get things working.

raspberry-pi-3

I just picked up a digital USB microphone from Radio Shack (since they’re closing almost all the stores here in San Diego) so that was a mere $10 and has great quality in a tiny package.

mic

At REI, I snagged an FM radio so that I could do the development and listen in on the transmitted signal.

midland

The Sennheiser at the venue looks like this.  At the last monthly talk I took a photo using my phone so that I could record their tuning for their setup.

sennheiser

You can’t see the hand-held microphone on a cable from this stock photo but it’s kind of a pain, as it is right now.

Progress

So far, things are looking pretty good. I’m able to record from the microphone using the alsa-utils arecord program. I’m able to convert the output WAV file into something suitable for re-transmission. And I’m able to broadcast the signal from a GPIO pin on the Raspberry on a selected FM frequency. I believe I can make a longer antenna that should work out.

What’s missing at the moment is a way to (correctly) daisy-chain each of the commands together so that things will continuously transmit, say, upon startup.

arecord -D plughw:1 -f S16_LE -r 48000 - | ./pifm - - | sudo ./rpitx -m RF -i - -f 87900

Something like that, anyway. Any yet, it doesn’t seem to work like this.  The various, raw “-” hyphens as seen throughout are supposed to represent STDIN/STDOUT for streaming commands from one to the next. Many times this works as expected, albeit with the odd hyphen showing up here and there.

Anyway, things like this take a lot of hacking at the problem to get it solved. Perserverance usually wins a game like this.

Update

And of course the solution was a slight tweak to the earlier attempt.

arecord -D plughw:1 -f S16_LE -r 48000 /dev/stdout 2> /dev/null | ./pifm /dev/stdin /dev/stdout | sudo ./rpitx -m RF -i /dev/stdin -f 87900