« Previous | Next»

Installing Debian on the Thecus N2100 -- PART 3 -- Installing Debian

Posted by coldtobi | 19 Feb, 2008, 01:21

Unfortuantly, the last time was very busy, so I simply did not find the time to continue with this HOWTO. Well, it is still tight, but today I want spend some minutes in completing at least the second part. Before I go forward learning phyton as I might have use for it in the NAS project...

Just  repeating my self, please note, that this VOIDS YOUR WARRANTY. So the usual disclaimer apply: You brick, you repair it. I do not recommend installing linux on the box, if you are not sure you can handle it. Linux requires more hand-on than the GUI -- you won't have a GUI anyway -- but on the other side, it reveals the real power.

Table of Contens

  1. Part 1: Get Prepared
  2. Part 2: Installing the Installer
  3. Part 3: Installing Debian I  (start the installer and configure RAID) -- this article
  4. Part 4: Installing Debian II
  5. Part 5: Fine tuning after the installation

 

Let the party begin continue 

_ASIP_ 

After the last part, the debian installer has been in-flash, ready for rumble. So the third part of the guide is due -- *really* bringing debian to the hard drives.

Please note, that there is also the debian-arm installer manual at http://www.debian.org/releases/stable/arm, if you need more background informations. 

Okay, back to the topic. SSH to your Thecus now: Of course is the identity unknown to the ssh client, so the warning can be ignored.  

ssh installer@192.168.1.147
The authenticity of host '192.168.1.147 (192.168.1.147)' can't be established.
RSA key fingerprint is ad:13:6a:02:21:a8:2a:d9:b5:2c:65:84:a5:6c:fb:5a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.147' (RSA) to the list of known hosts.
installer@192.168.1.147's password:

(By the way, the installer needs the password for the user "installer" is "install").

After the credentials are accepted, life gets more colorful. Not because that step is hard, but the debian isntaller uses libncurses, and therefore it is more colorful.  See yourself:

Yes, you want to start the menu for the installation. You could also choose "Start Shell" to get dropped to one. This can be useful, if you want to have access to the installer logs. Just fire up a second ssh connection..

Well, this is only for the curious, and maybe to troubleshoot the installer. For now, we don't need that and can just continue with selecting an appropiate Debian mirror. You usually want to select one in your region. The next two screen shots show that you have first to select your country,  

and then a mirror in this country. Just choose one, as usually the all connected very well.  

If you are behind a proxy server, and have to authenticate against it, you can enter this information in the next dialog. Usually you don't need that, so it has to be empty. And if not so you or your administrator knows what to enter.  

On a smalle connection, this is probably the first good time to get yourself some refreshments, especially if you are on a smaller connection: The installer bootstraps some packages from the net, and this might take some minutes. 

But eventually, all the needed parts are loaded, and you are asked to wait to start wiping out all data from your harddrive.  Well, I will give you notice when your data is really gone: The installer does first everything in memory, and it will write it to the drive later.

Please note, that at my first try, the partitioner failed to load. It hung at 49% and didn't made any progress anymore. Only a reboot fixed that, but the second time it succeeded. 

After the partitioner loads, it will also try to detect all other storage devices. So be patient and wait till its done.

And afterwards, the installer wants your attention again: Setup the harddrive automatically or manually? Automatic is fine, if you don't have any special wishes.

Well,  I don't go standard, I choosed "Manual".

But first lets take a look at who I planned to partion the harddrives. As I want redudancy, I go for a software RAID-1 Array.

In total, I need three partitions:

  1. The root filesystem
  2. Some swap
  3. NAS Area.  

You probably wonder, why the partion for the OS and swap also  have to go into the RAID, but the explanation quite simple: In case of a harddrive error, you have to have the OS working, and as you cannot predict which harddrive will fail, you have the OS on both. 

Swap is also important to have mirrored: In case of the harddrive failure, the operating system needs still be able to react. But if it used the broken drive for swapping out memory, it will be unable to page it in again. The result will be a kernel panic, and all cached but not yet safed data will be lost. 

(Additionally, I want to protect my data: The NAS Section should be encrypted. However, due to a bug in the installer, I was unable to set this up at install time. Netherless, this is later not a problem at all, so it is just postponed. )

First, you have to clean up. If you want the partitions your way, you have to delete all of them to recreate the partition table to your wishes.

To delete them, you have to select the hardrive itself, not the individual partitions. Press enter and confirm the following warning:

Afterwards, you have to do that also for the other hardrive. But please let the /dev/mtdblock devices alone: They contain the bootloader and currently also the debian installer. Messing around with them has a hight potential to brick the box: This might not be recoverable. Just don't mess with it. 

Now, as your drives are now unpartioned, we'll add the partitions on every drive. My planned setup is this:

  1.    rootfs     10 GByte
  2.    swap        2 GByte
  3.    NAS Area  remaining space

To consider that this will be a RAID setup, all the drives will get the same layout. This will give you the best result, as the for RAID1 you only waste space if the RAID partners have different sizes. So the best approach is, first to create one partition on the first disk and do the same on the other. In other words, you need partition-twins. 

Creating them is quite easy. Select the "FREE SPACE" entry, like in the picture above, and press enter to get these choices:  

Installung Debian on the Thecus N2100 -- Image blog_me18.jpg 

Of course, you want to "Create a new partition", and as we don't want to let it use up all space, we have to tell this the installer in the next screen: 

If you already did partitioning for example on a PC, you know, that you have the choice of primary and logical (extended) partitions. As you can only have four primary ones on a standard PC, this can matter there . But as our plans only include three, we can go safely for a "Primary-Only" Setup. So choose "Primary" for every partition you gonna create. 

The next question is, where it should be placed. I always selected "Beginning. But it does not really matter, it just have to be consistent with the other drive. 

Now, the layout is fixed. You get the following prompt to setup the file system options. However, it is not yet the time to setup the filesystems, because of the RAID setup: The setup partition will not host a filesystem directly, instead it will contain a RAID container, which will be setup next. So, in this dialog, select "Use as:" and enter that menu.

by pressing "enter". Here, you have to select "physical volume for RAID".

After entering that settings, the menu will change. The one now displayed has some fewer options, but that is ok. As written already, file system as well as the other features are setup later after the RAID is configured. 

 
After this, this partition is ready, so you can select "Done setting up the partition". However, did you this also on the other driver? Also, you have two others to prepare. Go on, the instructions are the same, I'll wait here for you.

   

Back. Fine. Probably, you should now have a layout like the following: Select "Configure software RAID".

WARNING: THIS IS THE LAST STEP BEFORE ERASING THE DATA ON THE DISKS !!! 

Read the warning? "These changes cannot be undone." OK, this is the point of no return. At least for the data on your drives.

But if you want debian on it, you have to continue here. Continue with "Yes" or abort the installation. 



After the partition table is written, software RAID can be configured. To do this, you have first to create a multidisk device. Yes, choose that option:

At that point, you have to decide, which type of RAID you want. As RAID5 needs at least 3 drives for benefits, it makes no sense on the Thecus to select this. So, the only real options are RAID0 or RAID1. I told you already, that my primary goal is reliability, so I did go for RAID1.   

The next number is also already fixed: You have only two drives, and RAID1 needs at least two active partitions, you have only the choice to enter "2" here.  

As 2-minus-2 is nothing, we have also that much of spare devices:  

"Bind them". But not into darkness. Now it time to hook up the two identical partions to finally create the RAID partition. In the following, select your matching partitions. This is if you followed the instructions, /dev/sda1 and /dev/sdb1, as shown in the picture:  

After you did this, you will be prompted again if you want to created another MD. Yes, you want that for the others, too. The procedure is same, but this time you have to select the other parts: 

And repeat for last time, you have to do that.

Then, finally you are done and should select "Finish":

 


And this is also the finish of the third part. But this also a good point of time to split, because after the RAID is created, Linux first has to build the RAID. This is a lengthy process and will take seveal hours. Okay, you do not have to wait for it, but if you reboot before it is done, linux will restart it until it gets a chance to finish. Until that, system performance is impaired.

(However, the next part is not yet ready, so this is a good splitting point anyway.)

 

Linux / Debian, Thecus N2100 | Comments (2) | Trackbacks (0)

Related Articles:

2 Comments | "Installing Debian on the Thecus N2100 -- PART 3 -- Installing Debian" »

  1. Flo : NICE!!!!

    05/03/2008, at 15:00 [ Reply ]

    I love this tutorial.
    Please continue with part 4!

    THX so much

  2. John Little : Stable is Lenny

    04/07/2009, at 13:37 [ Reply ]

    Great tutorial, thanks! a couple of things:

    The n2100.bin should be downloaded from http://ftp.uk.debian.org/debian/dists/lenny/main/installer-arm/current/images/iop32x/netboot/n2100.bin

    I found that the daily link you posted for the n2100.bin binary fails on the RAID creation.

    Also, installer doesn't find any of the mirrors out of the box, because you need to drop into a shell and nano /etc/resolv.conf to change the nameserver to 192.168.1.1 (or whatever). Default ip for the n2100 installer is 192.168.1.100 but the nameserver is on 192.168.2.0 subnet, that's why it fails miserably.

    Finally, teraterm is a great way to ssh into the n2100 from windows: http://ttssh2.sourceforge.jp/