Booting Linux from a portable hard disk

Hi all,

Does anyone know the performance of Linux if I boot it from a portable hard-disk via. USB? I intending to use it for a C++ project Operating System project (Nachos).

Is booting Linux from a portable hard disk possible in the first place?

Thanks in advance!

It should be pretty reasonable. It could even be faster than a conventional install, since most small Linux distributions are designed to run fully in RAM, as opposed to disk and RAM.

Yes. A couple of popular distributions that include instructions for installation on USB flash drives are Puppy and Damn Small Linux. Do some Google searches and see if you can find one that includes the tools you need (I’m assuming a compiler and possibly an IDE).

On re-reading the OP, it sounds like you might be using an external hard disk drive instead of a USB flash drive (my initial assumption). In that case, yes, some things will be slower than an installation on an internal hard drive, unless you use a distribution that runs completely from RAM (as I mentioned before). The difference isn’t an order of magnitude, but if you anticipate doing a lot of I/O (disk reads and writes), it won’t be fast.

Also, I forgot to mention that most modern PC BIOSes are capable of booting from any USB mass storage device, which includes flash drives and external hard drives.

Only if you can boot anything else from an external hard disk. Even some new computers won’t let you boot from USB (although most do).

If you can boot from USB, it should act like any other disk, except for the speed issues. In my experience, you do pay a significant penalty from running Linux off external drives (I did it for a couple days off a USB2 hard drive before I got fed up and installed it locally).

Firewire might be less irritating, or you might have a higher threshold of irritation than I do, but I’d consider buying a cheap second hard drive and toss it in the computer (assuming it’s not a laptop). $50 would probably by a big enough drive to do everything you could ever want in Linux, but you can also probably get a free one from someone tossing an old computer – I scavenge lots of old, obscenely small drives from computers on their way to the dump/recycler. Most Linux distros are either very small or have an optional very small install.

Unfortunately, I need it for my laptop.

If I run a LiveCD off a Flash USB Drive, is it possible to let it store data on my laptop, instead of the USB? What are some of the distributions that can do that?

If your laptop drive is formatted in some variation of FAT, you can store information to it from Linux easily – the drive will probably be detected automatically and just be sitting around, probably at /media/<something>. Ubuntu will probably put it on the desktop.

However, the odds aren’t very good that you’ve got a FAT-formatted drive on a recent laptop. NTFS drives are visible from most Linuxes, but they’ll usually mount them read-only, and even if they don’t, you won’t want to write to them, apparently writing to an NTFS drive carries a small but non-zero chance of corrupting the entire drive.

If you’ve got something like Acronis Disk Directory or Partition Magic, that can repartition a disk on the fly without losing data, your best bet is to repartition the disk to shrink the existing NTFS partition. You can then either install Linux partitions in the empty space, or add a FAT32 partition and use it from the Live CD.

At this point, probably your initial idea (install to an external drive) is the best plan. But be aware that Linux hardware support is (depending on the device) years to decades behind that of Windows, and most devices in a laptop are customized for low power/space/speed. You may find that you can’t get any version of Linux to work acceptably on your laptop at all – so try a Live CD first before you go around repartitioning things.

I’ve used cd versions and can boot from a removable drive. I normaly don’t have Linux installed to a hard drive, and use cd version exclussively. It’s Mempis Linux if you want to know the one I’ve got.