Linux Server on a USB Pen?

Soldato
Joined
6 Dec 2002
Posts
3,400
Location
North East
I've got an Intel Atom machine with a 1TB Hard Drive and was planning on a Linux file server (Samba?). However, I was thinking that rather than use any of the 1TB drive for the OS, I was planning on install it onto a USB pen instead. I'd also like to be able to add a web server as well, perhaps LAMP would be the best approach? I presume Webmin can be used in conjunction?

The question is which linux would be best suited to running off a USB pen? I've download Ubuntu Desktop 8.10 and tried LiveCD which worked fine with all the hardware including the network (using wired). Not entirely sure the difference between Desktop and Server but opted for Desktop - worth switching?

Sorry for all the simple questions, I've not really used linux to much extent. Have used Mac OS X so not too afraid of getting my hands dirty in terminal ;)

Also, what is the best approach in remotely connected to a linux box from Windows? :)

Any help would be greatly appreciated :)
 
The difference between Server and desktop is that the server comes with a LAMP stack by default and no GUI. You can convert one into the other so it's no big deal. Since you're new you might find it easier to stick with the desktop version and live with the slightly higher memory use.

There are loads of ways to do the job. You could just throw all the stuff you want to share into a directory, right click it, tell it to share it, and have a nice day. You'd be able to do whatever you liked from a Windows rig.

For remote access install ssh on your server and use puTTY on Windows to get a remote shell. It's the best way.

There are loads of guides on how to do this so if you get stuck ask here or seek guidance from the Googles. :)

EDIT: Oh, when setting it up you should set aside a little (equal to the amount of RAM you have installed should do) partition of the hard disk for swap. Swapping to the flash media will wear it out much quicker that it should. No point in breaking it for the sake of partition cleanliness. :p

Oh, and I also recommend you use XFS or JFS for the big partition.

So all together you should have to make 2 partitions.
ext3 on the USB disk
swap on the HDD
XFS on the HDD
 
Last edited:
Cheers BillytheImpaler, really informative post :)

I've got 2 external 500Gb hard drives which I backup the 1Tb so I'll split it into 2x 499Gb (2Gb RAM :p) partitions using XFS which will make it easier to backup. The easiest way is to do the transfer is:
1) Sync the 1Tb to the 500Gb drives
2) Install Ubuntu and so forth
3) Format the 1Tb into 2/499/499 partitions (XFS for swap aswell? or ext3?)
4) Resync the 500Gb drives to the 499Gb partitions

I'm assuming this will retain the metadata for the files? The drives are in NTFS so will they be OK been read on a Linux machine (only more chance errors on writing?)
 
I'm assuming this will retain the metadata for the files? The drives are in NTFS so will they be OK been read on a Linux machine (only more chance errors on writing?)
It depends what you mean by metadata. If you mean permissions, etc, you will need to use cp -dPr (copy deference preserve recursive), and I'm not even sure this will work.

NTFS can be read fine with Ubuntu's NTFS-3g driver. You can also write using this driver as well.

Samba is what you will use to share files to Windows machines, yeah. You might want to try and learn to use the smb.conf file, or just use Webmin. The LAMP stack is also fairly easy to install and configure. I'm used to Debian rather than Ubuntu for servers, so I don't know what's on by default, but in general installing apache2 php5 and mysql-server will give you everything you need. There's also tutorials which will tell you how to enable HTTPS and generate an SSL key if you want to go down that route.

Finally, for remote desktop, I agree with Billy. SSH + PuTTY = awesome.
 
Welcome and cheers andrewdodd13 :) By metadata I meant the date when the file was created/modified and such. That sounds like it could work, assuming it keeps that data intact.

Ubuntu 8.10 seemed to mount the NTFS drive fine and read without the need to add any additional drivers, which seems ideal :) Webmin I'm really interested in and need to look up exactly what it has to offer. I'll have a look around for some tutorials then try and get started on the installation :cool:

Is there an alternative remote desktop that is GUI based out of interest? :)
 
VNC in that case. It's more work to set up though.

So you're going to use 2 500 GiB disks? Do you want to treat them separately, as Windows would. Each would contain a different set of data that you the user would have to manage.

For my own purposes I tend to prefer lumping multiple storage disks together so that I can just throw everything into one big directory.
 
Last edited:
Sorry for the lack of updates, snowed under with uni work :( Hopefully sometime over the weekend *touchwood* I'll have begun so testing on a spare box. A quick question, how stable is x64 under Linux and is it worth it? I've got an Intel Atom D945GCLF board with 2Gb RAM but I believe it supports 64bit so there could be benefits to be had? However, 32bit is normally a safer tried and test option...

Thanks for the additional help BillytheImpaler :) Well, the reasoning behind the partition is due to have 2 external 500Gb drives which ideally would map to internal 500Gb drives for a backup 1:1

Would this be the best approach? I'm also a little unsure on the backup side of things - how safe is NTFS under Linux? I'd like to keep the external drives under NTFS incase anything was to happen to the Linux box and it would allow recovery under Windows. Although after typing this, I'm thinking that it may be best to stick with the file system which would suit the external drives. I mean, there is support on Windows for ext3 so recovery would be possible that way?

Thanks again for help and support :)
 
generally 64 bit isn't too far off in linux now, but some things like weird/unhelpful drivers (such as those for some canon printers) are only available as 32 bit binaries.

If 32 bit works on your hardware without any major hassles then 64 bit will too, but if its a pain to get 32 bit working then 64 bit likely won't.
 
Back
Top Bottom