LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Install linux to usb-powered hdd? (https://www.linuxquestions.org/questions/linux-newbie-8/install-linux-to-usb-powered-hdd-856390/)

newbienumberabillion 01-14-2011 04:41 PM

Install linux to usb-powered hdd?
 
Hello! :)

For a long time now, I've wrestled with how to deal with all my data on various computers. I wonder now if it would be easier to just install linux onto a usb-powered HDD (like my maxtor basics portable), and move it between machines. It seems this way, I could just boot into my drive on whatever machine I'm using (netbook, desktop, parents' machine, etc...) and be using "my own machine" wherever I go.

My main worry is that this will result in speed issues, but if the host machine has enough ram, won't the only delays occur when a program loads? I don't really edit huge images, or do much that results in a lot of paging.

Anyway, am I missing something important? Is this going to kill my portable HDD? Am I getting myself into trouble? Thanks! :)

TobiSGD 01-14-2011 04:58 PM

Should work, if you don't install proprietary drivers and use a somewhat current distro that uses UUIDs for partitions.

jefro 01-14-2011 07:28 PM

See pendrivelinux.com for ideas also. I use an 8G usb flash drive and it serves me for almost any use. Why carry around a clunky external drive?

ubyt3m3 01-14-2011 08:08 PM

How about NAS system? With that you can even access to your drive from outside of your network.

-gibb

newbienumberabillion 01-15-2011 05:15 AM

@TobiSGD Encouraging! Do you have any recommendations on distro? Debian?

@jefro Well, it's just that I have so much data. It doesn't fit on an 8GB or even 128GB. If I could get away with using a thumbdrive, I would. Or better yet, if thumbdrives came in 300GB!

@ubyt3m3 I've considered that, but I don't think I can boot into a NAS system from a foreign machine. I very much want to take around my entire computing environment (programs, OS, settings), not just my data. That's not possible with NAS, right?

Thanks everyone for your responses! :)

MTK358 01-15-2011 08:24 AM

Seems risky to have your data on an external drive, what if you drop it?

newbienumberabillion 01-15-2011 08:32 AM

@MTK358 I do intend to do backups regularly... just a dd with an identical drive as a last resort, though I'd love to set up something like a git repository for my backups. I've tried rsync and unison, and they just "feel icky" to me for some reason.

Another good (I think) reason for installing linux to a HDD (or large enough USB thumbdrive, or whatever), is that instead of carrying around data (which my be lost/stolen), the data can be encrypted but easily accessible from any machine that boots from USB. At least, that's my theory. :P

linus72 01-15-2011 08:52 AM

I was wondering if you have considered using a persistent usb install rather than a full hdd install?

When using a Slax-like derivative built using a modified linux-live-scripts it wll boot on almost any PC because it runs like a livecd and can automatically "find itself" without need to edit fstab, etc.

Additionally it can be booted either in fresh read-only mode or persistent mode.

You can have a either a persistent "file" of whatever size (I have made one as big as 5GB) or you can specify a whole partition to save to.

it must be a slackware or arch system, preferably Slackware 13.1

The other great thing about it is you can use the linux-live scripts as a backup solution to either make a full backup remaster or individual folders (home) into squashfs-lzma-compressed modules.

I made a 2.6.37 version of slackware 13.1 with the autogroup patch and it runs even on my old Toshiba 7000CT with 160mb ram 266mhz pentiumII so even low-ram it works

There also many cheatcodes such as copy2ram, auto configure X and more.

If you wish to check it out before making your own grab one of the Salix OS livecd's, install it to usb-hdd and setup the persistence. Salix uses either grub2 or lilo with grub-legacy also available.
http://www.salixos.org/wiki/index.php/Download

Theirs uses a 13.1 2.6.33.4 kernel,etc but I can show you how to make everything even better with a 2.6.37 kernel also if you wish.

newbienumberabillion 01-15-2011 09:19 AM

@linus72 I have considered it, but honestly I don't understand it all that well. From what little I understand, liveCDs were initially made to boot into a useful linux environment, but with the limitation that everything was immutable. Later, liveUSB systems came into being that allowed files to be stored on the remaining space, but otherwise it was the same as a liveCD. This was all made possible with some image/loop/filesystem black magic that always seemed a bit iffy to me.

What I'm hoping to do is to replicate the experience of running linux on my main machine. This means installing new software, keeping the OS updated despite what host machine I'm on, etc. Is this possible with a persistent usb install? I simply don't know what the advantages/disadvantages are between a "normal" external HDD install vs persistent usb install are. If you could point out the advantages, I'd appreciate it! :)

But the main reason I'm going the external usb-powered HDD route is that no usb thumbdrive in my pricerange has enough capacity to store all the data I carry around with me.

schneidz 01-15-2011 09:35 AM

Quote:

Originally Posted by newbienumberabillion (Post 4224661)
Hello! :)

For a long time now, I've wrestled with how to deal with all my data on various computers. I wonder now if it would be easier to just install linux onto a usb-powered HDD (like my maxtor basics portable), and move it between machines. It seems this way, I could just boot into my drive on whatever machine I'm using (netbook, desktop, parents' machine, etc...) and be using "my own machine" wherever I go.

My main worry is that this will result in speed issues, but if the host machine has enough ram, won't the only delays occur when a program loads? I don't really edit huge images, or do much that results in a lot of paging.

Anyway, am I missing something important? Is this going to kill my portable HDD? Am I getting myself into trouble? Thanks! :)

any live usb distro should work... (i recomend fedora).
but there mite be issues with different hardware on different pc's (like wifi drivers).
as far as speed goes: internal ssd > internal sata > internal ide-hd > sd-card > usb-hd > cd-rom

linus72 01-15-2011 09:36 AM

ok
it's kinda hard to explain...

a livecd is simply the installed-to-hdd system compressed into a read-only bootable version
and so when you boot a livecd usually the read-only compressed filesystem decompresses and boots into ram where it then becomes read-write.
but, once you reboot/shutdown all settings, etc are lost because any changes you made were in ram.

so, different distros uses differing ways to have a persistent file or partition that saves all changes made while in ram and in this way it runs just like a real installed-to-hdd system.

almost everything except the kernel can be upgraded when running persistent, the kernel can be but is best to remaster at that point.

so, I really like the Slax prsistence way because you can have either a persistent file or partition. simply a predetermined empty space to store the changes.

the advantages of this way are

it can be read-only or persistent

boots on almost any PC automatically

auto X configuration and ability to install drivers

ability to create "modules" that can be loaded at boot or after and unloaded
modules can be apps, libs, setting,etc

biggest advantage is you can make whatever distro fits your need and have multiple versions on same drive

any data in the "slxsave.xfs" persistent file can only be accessed by mounting the file correctly
any data inside the save file can also be encrypted using whatever app you wish.

the save file can be put on almost any partition, even the same one your booting from
and it will also auto find the save file on any computer.

you can also create "modules" of whatever data you want, thus super-compressing the data using lzma and the data cannot be accessed unless you know how to decompress it, most people wouldn't know.

basically, you can turn a 3GB slackware 13.1 install into a 700mb livecd/usb with persistence and the ability to also be installed to hdd in the traditional way

You could have a number of these bootable clones also inside a existing linux install
like, for instance I boot mine off my ubuntu or slackware partition as they dont interfere with the existing installs

newbienumberabillion 01-15-2011 10:21 AM

@linus72 Thank you for all the information! :) Ok, I think I understand (vaguely) how this usb persistence works, but are you saying that a normal external HDD install will not boot on most PCs? Do normal installs not do auto X configuration? How are modules better than just running a normal install with apps, libs, settings, etc? Can this slxsave.xfs be 300GB and still be efficient? Really I just want one install. I just want to move my install from place to place.

I can see that usb persistence is pretty cool, but I don't see how it is *better* than just installing directly to the external HDD. USB persistence is certainly an alternative, but is it a better alternative? It *seems* much more complicated (maybe it's not), and the benefits (multiple installs, optional read-only) are not benefits to me.

jefro 01-15-2011 12:37 PM

Go to pendrivelinux and try a few.

You can do a real install to a usb drive too be it flash or external hard drive if you want. As posted above you may have to watch some things.

The usual pendrive install with persistence is all I ever use. Boots to almost any system and I can use my data each place.

You can also consider using a qemu install. It is a virtual machine that on faster systems works ok if you want to run the original OS and yours at the same time.

newbienumberabillion 01-15-2011 01:04 PM

@jefro Thanks for the reply! I'm still a little confused though. What exactly am I gaining by doing pendrive install with persistence? What advantages does going this way have over simply installing linux (as normal) to a usb hdd? Am I missing something big here? If I install linux to a usb hdd like normal, will it not "boot to almost any system" and can I not "use my data each place"? Is it not possible with a standard linux install? If it is, what benefit do I get from going the pendrivelinux route?

schneidz 01-15-2011 02:38 PM

^ this reminds me of when i took an internal ide-hd out of my old redhat-9 pc and put it in a new one.
the only problems is that the old pc had an ati card and the new one had an nvidia gpu so the xorg.conf didnt work.

also i had to download and install drivers for graphics, ethernet (no wifi at the time), ...


All times are GMT -5. The time now is 10:45 PM.