Jump to content

Howto: create your own linux home server using Debian

I'm not sure if this is the right place to post it but I'm about to assemble a NAS and I'm planning on running Debian as my OS. I really want to install Debian on an USB stick that will be permanently stuck in the back I/O. I want this to prevent as much cable clutter in the case as possible.

 

Is this possible?

WiiManic suggested this tool to make a persistent Live Disk on an USB stick with this tool.

I simply want to double check that it's possible before I buy a SanDisk Cruzer Fit 16GB.

 

Cheers Shaqalac.

NAS build log: Gimli, a NAS build by Shaqalac.

Mechanical keyboards: Ducky Mini YotH - Ducky Mini

Link to comment
Share on other sites

Link to post
Share on other sites

<s it possible to run Debian of a flash drive?>

Short answer: yes.

 

Long(er) answer:

It's possible, but don't expect it to be fast. I've ran Ubuntu from a USB stick in the first iteration of my server.

The way to do it is by using the aformentioned tool to create a bootable stick. When that's done, you simply

plug both the boot drive and the drive you want to install the OS on (that 16GB model you were talking about)

into your server and install the OS like you normally would on a hard drive on the USB drive.

 

When you do this, make sure to either don't use swap or put the swap on one of the storage drives. Things

like /tmp, /var and /home could probably be moved to the storage drives as well, in order to make your

processes work faster.

Link to comment
Share on other sites

Link to post
Share on other sites

Short answer: yes.

 

Long(er) answer:

It's possible, but don't expect it to be fast. I've ran Ubuntu from a USB stick in the first iteration of my server.

The way to do it is by using the aformentioned tool to create a bootable stick. When that's done, you simply

plug both the boot drive and the drive you want to install the OS on (that 16GB model you were talking about)

into your server and install the OS like you normally would on a hard drive on the USB drive.

 

When you do this, make sure to either don't use swap or put the swap on one of the storage drives. Things

like /tmp, /var and /home could probably be moved to the storage drives as well, in order to make your

processes work faster.

So slow boot times of the system and of different applications? Transfer speed should be the same as it's handled by the IBM M1015 and MDADM right?

Wouldn't I be able to install the OS on the 16GB USB stick from my Windows machine, or is it necessary to install it while plugged in to the server?

 

My intentions was to install the OS on the USB stick without any other drives connected to the system. I've previously experienced, from a Windows installation, that during the installation boot files were transferred to another drive than the one I've chosen to install the OS on.

NAS build log: Gimli, a NAS build by Shaqalac.

Mechanical keyboards: Ducky Mini YotH - Ducky Mini

Link to comment
Share on other sites

Link to post
Share on other sites

So slow boot times of the system and of different applications? Transfer speed should be the same as it's handled by the IBM M1015 and MDADM right?

Anything that's loaded into RAM and that doesn't touch files on the USB drive will be fast. It's loading times that are going to be long.

 

 

Wouldn't I be able to install the OS on the 16GB USB stick from my Windows machine, or is it necessary to install it while plugged in to the server?

During the installation, a lot of parameters are set, based on what hardware is detected. It's always best to install on the actual

machine itself.

 

 

My intentions was to install the OS on the USB stick without any other drives connected to the system. I've previously experienced, from a Windows installation, that during the installation boot files were transferred to another drive than the one I've chosen to install the OS on.

ALWAYS disconnect every drive that isn't supposed to have the OS on it. It makes sure you don't make small mistakes and overwrite drives that have data on them.

Link to comment
Share on other sites

Link to post
Share on other sites

Anything that's loaded into RAM and that doesn't touch files on the USB drive will be fast. It's loading times that are going to be long.

From what you've experienced, do you think the speed is too slow for a NAS use. As it is right now the NAS will primarily be used for media sharing.

Will it be hard/difficult to transfer from a USB stick to a SSD without having to reinstall the OS and set up all the features and settings all over again?

 

During the installation, a lot of parameters are set, based on what hardware is detected. It's always best to install on the actual

machine itself.

I'll just install it with the boot drive and USB stick plugged into the server.

 

ALWAYS disconnect every drive that isn't supposed to have the OS on it. It makes sure you don't make small mistakes and overwrite drives that have data on them.

Yup, like I said I learned this the hard way. Had two drives connected to the system and some boot files get transferred to the drive that I didn't choose as OS drive.

NAS build log: Gimli, a NAS build by Shaqalac.

Mechanical keyboards: Ducky Mini YotH - Ducky Mini

Link to comment
Share on other sites

Link to post
Share on other sites

From what you've experienced, do you think the speed is too slow for a NAS use. As it is right now the NAS will primarily be used for media sharing.

Will it be hard/difficult to transfer from a USB stick to a SSD without having to reinstall the OS and set up all the features and settings all over again?

If it's CLI and you have enough RAM (so there's no need for swapping), it should go allright, but don't quote me on that, I can't give you hard guarantees, of course.

You should be able to just plug them both in a Linux or Mac system, even with just a live CD or something similar and issue the command

dd if=/mnt/oldOSdrive of=/mnt/newOSdrive bs=64MB

After that, you'd only need to resize the partition and you're done. Again, I know this should work, but I might be wrong.

At any rate, reinstalling your setup from scratch can go quite fast if you keep a backup of all config files you edited.

Simply `apt-get install` all needed packages, copy over the config files and you're done.

Link to comment
Share on other sites

Link to post
Share on other sites

At any rate, reinstalling your setup from scratch can go quite fast if you keep a backup of all config files you edited.

Simply `apt-get install` all needed packages, copy over the config files and you're done.

Well, this sounds like the way to go for a transfer from a USB stick to a SSD.

 

Thanks for your help!

NAS build log: Gimli, a NAS build by Shaqalac.

Mechanical keyboards: Ducky Mini YotH - Ducky Mini

Link to comment
Share on other sites

Link to post
Share on other sites

No problem, if you make a build log, please do tag (@MG2R) me, I'd like to see it.

The build log is already up and running.

Did actually tag you a couple of times when I've mentioned this guide for Debian (this will be my first experience with Linux). Why you haven't received any notifications I'm unsure of.

 

Here is a link for it. If you have any feedback, good or bad, I'd love to hear it.

NAS build log: Gimli, a NAS build by Shaqalac.

Mechanical keyboards: Ducky Mini YotH - Ducky Mini

Link to comment
Share on other sites

Link to post
Share on other sites

Very nice, ty for this. Will be needing this once I got more freetime ^^

Frost upon these cigarettes.... lipstick on the window pane...

Link to comment
Share on other sites

Link to post
Share on other sites

The build log is already up and running.

Did actually tag you a couple of times when I've mentioned this guide for Debian (this will be my first experience with Linux). Why you haven't received any notifications I'm unsure of.

I discovered about two weeks ago that my notifications for tags were disabled. So if the tags were before that discovery, I didn't get a notification about it, sorry. Got your latest, though :) will read through it either tonight or tomorrow ;)

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

It has taken a while, but I finally got around to it: the installation section is improved... a lot!

Maybe funny to mention, but I am using this guide at this very moment! :D

I did encounter a problem, after the whole installation and reboot to log in for the first time, I got a boot failure - press any key to continue :(

Maybe because I installed the 64-bit version on an old machine, so right now I am starting over (with 32-bit)

New to Star Citizen? Look no further!

Link to comment
Share on other sites

Link to post
Share on other sites

Well debian is kinda meeeeh. Ubuntu or just Windows Server :D

 

Debian is as to Ubuntu as a Genetic Dad is to its Genetic Son... :rolleyes:

I roll with sigs off so I have no idea what you're advertising.

 

This is NOT the signature you are looking for.

Link to comment
Share on other sites

Link to post
Share on other sites

Well debian is kinda meeeeh. Ubuntu or just Windows Server :D

Got any reasoning behind that statement? I'm interested!

 

 

Maybe funny to mention, but I am using this guide at this very moment! :D

Good to know! Please do report anything that isn't clear, could be improved, is missing/wrong, ... :)

 

 

I did encounter a problem, after the whole installation and reboot to log in for the first time, I got a boot failure - press any key to continue :(

Maybe because I installed the 64-bit version on an old machine, so right now I am starting over (with 32-bit)

Shouldn't be the issue, as the 64-bit installer gives you an error if you're running on a 32-bit machine.

To be certain, though: what CPU are you running?

Link to comment
Share on other sites

Link to post
Share on other sites

How on earth do you have the time to type all of this? This easily took you 2+ hours!

 

If only I had that kind of patience.

Link to comment
Share on other sites

Link to post
Share on other sites

This easily took you 2+ hours!

If 'this' is referring to the recently updated installation section, then yes, that took a little over three hours from start to finish.

 

If 'this' refers to the complete guide, then, no. The complete guide isn't counted in hours, rather days :P

 

I don't have much time, but it helps to simply only sleep 4 hours a night ;)

Link to comment
Share on other sites

Link to post
Share on other sites

Got any reasoning behind that statement? I'm interested!

 

I see debian mostly on web hosting if you do everything by hand (Configure apache2, mysql, php etc) Windows server has good backup functions + DHCP an DNS support. Also if you take like Windows Home Server as an OS, it has automatic backups to the server and stuff like that. And most of the pepole i know use NAS. It already has some good auto-backup features and stuff. I mean that is the easy way. But if you want to go hardcore über 1337 h4x0r code under linux, i aint stopping you :D

Link to comment
Share on other sites

Link to post
Share on other sites

I see debian mostly on web hosting if you do everything by hand (Configure apache2, mysql, php etc) Windows server has good backup functions + DHCP an DNS support. Also if you take like Windows Home Server as an OS, it has automatic backups to the server and stuff like that. And most of the pepole i know use NAS. It already has some good auto-backup features and stuff. I mean that is the easy way. But if you want to go hardcore über 1337 h4x0r code under linux, i aint stopping you :D

Debian can be installed with a GUI as well, you know ;) If you do that, it's simply the lighter-weight and less sponsored father of Ubuntu.

 

Also, everything you said about Windows Server can be configured in Debian as well. Usually with 1/3 the needed resources and 1/3 the security holes :P

Link to comment
Share on other sites

Link to post
Share on other sites

The updated installation section looks really good, can't wait for my USB OS drive to arrive so I can get started. Will make sure to take nodes throughout the installation if I think, as a noob, anything should be added and/or corrected.

NAS build log: Gimli, a NAS build by Shaqalac.

Mechanical keyboards: Ducky Mini YotH - Ducky Mini

Link to comment
Share on other sites

Link to post
Share on other sites

Debian can be installed with a GUI as well, you know ;) If you do that, it's simply the lighter-weight and less sponsored father of Ubuntu.

 

Also, everything you said about Windows Server can be configured in Debian as well. Usually with 1/3 the needed resources and 1/3 the security holes :P

I mean its my opinion, and this is kinda opinion question.
Link to comment
Share on other sites

Link to post
Share on other sites

Got any reasoning behind that statement? I'm interested!

 

 

Good to know! Please do report anything that isn't clear, could be improved, is missing/wrong, ... :)

 

 

Shouldn't be the issue, as the 64-bit installer gives you an error if you're running on a 32-bit machine.

To be certain, though: what CPU are you running?

I got it figured out, it seemed to be a problem with the RAID configuration. It got in "degraded" mode. It took me many formats and installs before I knew what the problem was, I had to "rebuild" the RAID array, which took some hours, and finally she booted :D

Now I am discovering the world of Linux and Debian etc.

 

I got my hands on an old server from my dads work. It has an Intel 3200ah motherboard + Core 2 Duo E6420 altogether in an Intel SC5650WS case, so that's real nice!

Are there many differences between the 32 and 64-bit versions?

New to Star Citizen? Look no further!

Link to comment
Share on other sites

Link to post
Share on other sites

Are there many differences between the 32 and 64-bit versions?

Just had to answer a "what should I pick, 32 or 64 bit?" question. This was my answer:

 

 

How much RAM do you have in your machine? 32-bit vs. 64-bit doesn't inherently carry a performance difference (unless you're doing calculations on high-precision foating point number that use 64-bit word length), but it limits how much memory can be addressed. 32-bit processors and kernels can address 2^32 (~4 billion or 4 G) addresses, with each address representing a byte in memory, you can thus address about 4GB of memory. 64-bit processors and kernels can address 2^64 or about 18.4 billion billion (yes, two times billion) addresses whiich, in plain terms equals to about 18.4 exabytes.

 

The only reason to go for a 32-bit OS when you have a 64-bit processor would be situations where you have less than 2GB of RAM and you want to make the absolute most use of that. 64-bit programs tend to take up a tad more RAM, because the instructions are now 64 bit instead of 32 bit in length. However, I would reccommend to just go for a 64-bit OS, even if you have only 2GB of RAM... If you ever add more RAM, it would be a pain to have to reinstall with a 64-bit OS, so it's nice to be prepared ;)

 

Most notable differences:

  • 64-bit lets you address more RAM
  • 64-bit instructions take up more RAM
  • 32-bit can run on 64-bit, but not vice versa
Link to comment
Share on other sites

Link to post
Share on other sites

 

Just had to answer a "what should I pick, 32 or 64 bit?" question. This was my answer:

 

 

Most notable differences:

  • 64-bit lets you address more RAM
  • 64-bit instructions take up more RAM
  • 32-bit can run on 64-bit, but not vice versa

 

Oh... I got it all running on the 32-bit version. It seems to be running fine (although I can't make encrypted partitions), but the thing I am really stuck on right now is the owncloud setup. I got it installed and moved to /var/owncloud/owncloud, but when I try to access it, it says that it can't write into the config directory. I need to give rights to the webserver to access it, but I can't seem to find out how.

I looked up some other guides on the internet, but they don't work either. Maybe you know something?

New to Star Citizen? Look no further!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×