If your laptop was manufactured after 2007, it’s guaranteed to have at least one USB 2.0 port on it and probably also has a SD or CF (CompactFlash) slot on it.
Someday at some point the laptop’s hard drive is going to die on you. However you can prepare for the worst by having a fully-loaded flash card or stick with a Linux OS ready to go for that type of emergency situation. All that’s required is a cheap flash card/stick and a few hours of your time to set up the Linux-based OS.
- 1 USB 2.0 stick of at least 4GB (the Linux OS will be installed from this)
- A second USB 2.0 of at least 16GB, or an SD or CF or 16GB
"Which flash type should I go with for my backup OS?"
Even though USB 2.0 would probably be the fastest of the three, I’d suggest going with SD or CF just because it’s more convenient. Most USB sticks when plugged in stick out quite a bit and can get in your way. SDs and CFs on the other hand are flatter, smaller and fit snugly into their respective slots without getting in your way.
Step 1. Prepare the 4GB USB stick to install Linux
Insert the 4GB USB 2.0 stick into your laptop (or whatever computer you’re working on at the moment).
Format the stick so it’s blank.
Go and download Unetbootin. In Windows this will download as a single executable file.
Run Unetbootin. Select your distribution and version like this:
At the bottom of Unetbootin, select your USB’s drive letter and click OK.
Wait a while. Unetbootin will download the distro you chose, then install itself to the USB stick and make the USB stick bootable.
After that’s done, you’ll be prompted to reboot. Don’t, because you don’t have to. Exit the program, then safely disconnect the 4GB USB stick as it’s ready to go.
Step 2. Power off your laptop, unplug it, physically take out the hard drive and set it aside for now.
The reason you do this is so there is absolutely no way that the Linux installer can place any sort of Linux bootloader on it once you start the process. While true you could go into the BIOS and disable the hard drive that way, that may not necessarily prevent Linux from installing the bootloader. You are better off by simply removing the laptop’s hard drive and putting it aside.
Step 3. Insert the 4GB stick and your blank 16GB USB stick, SD or CF into your laptop.
Step 4. Plug in a wired internet connection.
I’ll explain why you needed to do this in a moment.
Step 5. Turn the laptop on and purposely interrupt the startup by selecting which boot device you want.
This is where things can get a little confusing for some people, but it’s not difficult to figure out.
On Dell laptops for example, when you power on the laptop, you’ll see the "Dell" logo before the OS starts. On that screen it will state something like "Press F2 for SETUP or F12 for Boot Options". The one you want is boot options. This screen will go by really fast and you may miss it the first time. That’s fine, just reboot again if that happens. Assuming you had to hit F12 for boot options, the moment you see that, press F12 repeatedly.
At this point a screen should show up asking you which device you want to boot from. One of them should be USB. Select it with your up/down arrow keys and press Enter.
Linux should boot off the 4GB USB stick at this point. If it doesn’t, power off the laptop, unplug the 16GB stick/card but leave the 4GB stick in, boot again, hit F12, choose USB and then it should boot into Linux.
If it still doesn’t boot at this point, it’s probably true you have 4 USB ports on your laptop, with a configuration of 2 ports in the back and 2 on the side. Power off the laptop. If the 4GB stick is in one of the side ports, move to the back. If in the back, move to the side, then power up and it should boot from the USB stick at that point. (On some laptops, weirdness happens where only very specific USB ports are actually bootable while the others aren’t. This is rare, but it does happen sometimes.)
Step 6. Boot into Linux.
Once Linux starts, you’ll be dropped at a terminal prompt. Simply press Enter and the Linux-based OS will start.
Step 7. Install Linux to the 16GB stick/card.
Once the OS loads completely and you’re on the desktop, it’s time to install the OS.
If you had to boot with the 16GB stick/card out of the laptop, once the desktop is seen, plug it back in and Linux should recognize and mount the drive automatically.
There should be an icon right on the desktop to install the Linux OS. In most Linux distributions (no matter which one you chose), this should be there.
Once the installer starts, at some point you will be asked what media you want to install the OS to. Since the 16GB stick/card is the only thing in your laptop Linux could install itself to, this should be the only listed option available. When you see this, proceed with the OS installation.
During the installation, you will most likely be asked if you want to download updates while the OS is installing. Select YES for this.
The entire reason why you booted with the wired internet connection in place is because most Linux distributions absolutely will not recognize your wireless card until after the updates are installed first during initial installation. Of course, the only way to get the updates from the internet is to have an active connection, hence the reason you install the Linux OS with the wired internet connection plugged in.
It will take time for the OS installation to complete. Usually between 30 minutes to an hour.
Step 8. Once the OS installation is complete, reboot, then power off.
You will be prompted to reboot once the OS is done installing.
When the laptop powers off and reboots, hit the power button and hold it until the laptop shuts off completely.
Disconnect the 4GB USB stick you used to install the Linux OS as you don’t need it anymore at this point – but leave the wired network connection plugged in.
Step 9. Boot, perform updates.
Power on the laptop again, this time with the 16GB stick/card being the only media inserted into the laptop. Remember to press the appropriate key (usually F12 on Dell laptops) to get your boot options screen and select the appropriate boot device. (Tip: If you see USB but don’t see "SLOT", "CARD" or otherwise, USB should also be able to boot even if using an SD or CF card.)
What should happen is that your newly-installed Linux-based OS should start with no problems.
Two things should happen once you get to the desktop. The first will be that the OS will prompt you to install "updated drivers", and that should enable your wireless card. The second will be to download system updates, and that will take a while. Probably another 20 minutes to download and install all that.
Step 10. Reboot and try connecting to the internet via wireless.
All drivers and software updates are in place at this point, so shut down Linux properly and reboot.
As the laptop reboots, remember to get to the boot options screen again to select the appropriate boot device, and also disconnect the wired network cable; it does not harm the computer to do this, and you need to test your wireless connection.
If all goes well, your Linux-based OS should start up the same as before, and you should be able to click the network icon in the panel area next to the clock to select a wireless network, your router should show up in the list and you should be able to connect to it and get internet connectivity.
Once all that stuff is working, you’re officially done and now you have a card/stick with a complete Linux-based OS on it with plenty of room to download and install all the apps you need.
Step 11. Shut down Linux, power off laptop, unplug, reinstall hard drive.
Once all your stuff in Linux is completed to your liking, shut down the OS, power off the laptop, unplug it and reconnect your hard drive to get it back to the way it was.
Can you boot into Linux even with the hard drive attached?
Of course you can. The only reason you disconnected it is to ensure Linux didn’t install any sort of bootloader on there. Now that your Linux-based OS is completely installed on the stick/card, you can reboot at any time even with the hard drive connected and no bootloader will be installed on the primary hard drive.
Can you stay running in Linux off a flash stick/card for extended periods of time?
You may want to purposely use Linux this way just to learn it and to get your apps installed and so on, and just leave the laptop running that OS off the stick/card. This is safe to do as long as the stick/card you’re using isn’t old. If it’s a new card, it’ll take a good long while before write failures start to happen (around 3 to 5 years assuming you ran the OS off the card full-time).
Remember however that USB sticks and SD/CF cards can get hot. Not hot enough to melt the chassis, but you will notice it after a while. Laptops weren’t designed to run off sticks/cards inserted into outboard slots all the time. You could run it all day without a problem, but I would suggest turning the computer off at night to let it cool off and extend the life of your laptop.
A workaround is to buy an extender cable that goes into the slot and connect the stick/card that way so the heat generated by the stick/card itself doesn’t transfer into the laptop chassis. Heat will still be generated by the slot itself, but not nearly as much when the stick/card isn’t connected directly to it as the cable plug alone generates no heat.
The PCMech.com weekly newsletter has been running strong for over 8 years. Sign up to get tech news, updates and exclusive content - right in your inbox. Also get (several) free gifts.