Difference between revisions of "Debian install"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(Get an Debian image)
m (Get a Debian image)
(23 intermediate revisions by 17 users not shown)
Line 1: Line 1:
<p style="border:dashed 1px red;background:Lemonchiffon;text-align:center;margin:0 5px">
+
{{warning|'''Backup ANY Data, because during the installation all partitions will be deleted and your DATA WILL BE LOST.  
'''Backup ANY Data, because during the installation all partitions will be deleted and your DATA WILL BE LOST.  
+
<br>Use this guide at your own risk!'''}}
'''<br>Use this guide at your own risk!
+
 
</p>
+
  
  
 
This is a small Guide to replace the original Linux (and its WebInterface) with a Debian 3.0 Woody Installation  
 
This is a small Guide to replace the original Linux (and its WebInterface) with a Debian 3.0 Woody Installation  
  
== Get an Debian image ==
+
== Get a Debian image ==
Get an Debian image from one of the following locations:
+
Get a Debian image from one of the following locations:
*[http://genbako.vodapone.com/ genbako.vodapone.com/]
+
*[http://www.genbako.com/ genbako.com/]
*[http://210.166.208.216/kuro-box/archive/ 210.166.208.216/kuro-box/archive/]
+
*[http://210.166.208.216/kuro-box/archive/ 210.166.208.216/kuro-box/archive/] (most recent image dating from 2005)
*[http://kurobox.com/debian/downloads kurobox.com/debian/downloads]
+
*[http://kurobox.com/debian/downloads kurobox.com/debian/downloads] (most recent image dating from 2005)
 
*[[debian_sylver|Improved Debian image made by Sylver]]
 
*[[debian_sylver|Improved Debian image made by Sylver]]
  
Tip: Use Firefox for download due to the fact IE will download a .tgz as a .tar
+
Tip: Use Firefox for download because IE will download a .tgz as a .tar
  
 
== Prepare the harddisk ==
 
== Prepare the harddisk ==
* Put your Kurobox in EM mode
+
* Put your Kurobox in EM mode (login via telnet with default username/password. For the Kuro standard it is '''root/kuro''' and for the Kuro HG it is '''root/kuroadmin''').
 
:* When you just installed a harddisk, the box will start automatically in EM mode
 
:* When you just installed a harddisk, the box will start automatically in EM mode
:* Push the red button on the back of the unit while turning it on to go into EM mode
+
:* If you have already partitioned the HDD, then telnet into the kurobox and run the following command followed by a reboot:
* Telnet into your box and follow the these steps
+
echo "NGNG" > /dev/fl3
 +
* Telnet into your box and follow the these steps
 
:* Delete ALL partitions and data with the command  
 
:* Delete ALL partitions and data with the command  
  # mfdisk -e /dev/hda  
+
  mfdisk -e /dev/hda  
  
 
:* Then recreate partitions manually via the command  
 
:* Then recreate partitions manually via the command  
  # mfdisk -c /dev/hda  
+
  mfdisk -c /dev/hda  
   (this is the menue-driven interactive mode)  
+
   (this is the menu-driven interactive mode)  
  
 
::Our goal is to create the following partiton-table:  
 
::Our goal is to create the following partiton-table:  
Line 99: Line 99:
 
== Prepare Debian ==
 
== Prepare Debian ==
 
* Transfer the fetched Debian image via FTP from another computer to the directory /mnt on the Kuro.  
 
* Transfer the fetched Debian image via FTP from another computer to the directory /mnt on the Kuro.  
 
+
* First, set the correct date in the system.  (This is important since many systems start with a date of October 2004 and the tgz file has files that contain newer datestamps.)  You may have to create a symlink for date. The date is in '''MMDDhhmmCCYY''' format. For the following example, it is setting the date to September 26, 2006, 1515hrs
 +
# ln -s /bin/busybox /bin/date
 +
# date -s "092615152006"
 
* Back in the Telnet session, unpack the Debian image
 
* Back in the Telnet session, unpack the Debian image
 
  # cd /mnt  
 
  # cd /mnt  
  # tar xvfz debian_2004_12_26_dist.tgz  
+
  # tar xvfz debian_2005_04_09_dist.tgz  
  
 
* Now is a good time to change some settings
 
* Now is a good time to change some settings
Line 108: Line 110:
 
  # vi etc/network/interfaces
 
  # vi etc/network/interfaces
 
:: Example of static address interface settings
 
:: Example of static address interface settings
 +
auto eth0 lo
 
  iface eth0 inet static  
 
  iface eth0 inet static  
 
  address 192.168.0.100  
 
  address 192.168.0.100  
Line 116: Line 119:
 
  iface lo inet loopback  
 
  iface lo inet loopback  
 
:: Example of dynamic address interface settings
 
:: Example of dynamic address interface settings
 +
auto eth0 lo
 
  iface eth0 inet dhcp  
 
  iface eth0 inet dhcp  
 
  iface lo inet loopback  
 
  iface lo inet loopback  
Line 129: Line 133:
  
 
  Jeeves
 
  Jeeves
 +
 +
:* Update your hosts file with your new IP & hostname (if using static IP)
 +
# vi etc/hosts
 +
 +
127.0.0.1 localhost
 +
192.168.0.100 Jeeves
 +
 +
[It has been reported that FTP (proftpd) will not work unless the hosts file matches your hostname.]
 +
 
:* Have a look at the ''hosts.allow'' file to make sure you will not be able to login again
 
:* Have a look at the ''hosts.allow'' file to make sure you will not be able to login again
 
  # vi etc/hosts.allow
 
  # vi etc/hosts.allow
Line 138: Line 151:
 
  # write_ok (This is IMPORTANT! Kurobox will not leave EM mode on reboot unless you do this command)
 
  # write_ok (This is IMPORTANT! Kurobox will not leave EM mode on reboot unless you do this command)
 
  # reboot
 
  # reboot
 +
(Note - I just got a kurobox, and write_ok was not required at this stage, booted straight up into Debian)
  
 
== The first boot of debian: ==
 
== The first boot of debian: ==
Line 151: Line 165:
 
  # adduser  
 
  # adduser  
  
delete the standard-user tmp-kun with  
+
delete the standard-user tmp-kun (exit and logout first, login as new user then SU) with  
 
  # deluser tmp-kun  
 
  # deluser tmp-kun  
  
Line 160: Line 174:
 
  # date                <--------to display the current date and time
 
  # date                <--------to display the current date and time
  
  # date [MMDDhhmmCCYY]  <--------to change (minus the brakets of course)
+
  # date [MMDDhhmmCCYY]  <--------to change (minus the brackets of course)
  
 
Change the Time Zone as well.
 
Change the Time Zone as well.
Line 179: Line 193:
 
  Mem: 127088K total, 61644K used, 65444K free, 1508K buffers  
 
  Mem: 127088K total, 61644K used, 65444K free, 1508K buffers  
 
  Swap: 265064K total, 0K used, 265064K free, 48800K cached
 
  Swap: 265064K total, 0K used, 265064K free, 48800K cached
 +
 +
==What to do from now==
 +
For more information on how to tune your new Debian system, check [[Debian on the Kurobox]]
 +
[[Category: Debian]]

Revision as of 00:24, 28 October 2008

Nuvola apps important.png 
WARNING!

Backup ANY Data, because during the installation all partitions will be deleted and your DATA WILL BE LOST.
Use this guide at your own risk!



This is a small Guide to replace the original Linux (and its WebInterface) with a Debian 3.0 Woody Installation

Contents

Get a Debian image

Get a Debian image from one of the following locations:

Tip: Use Firefox for download because IE will download a .tgz as a .tar

Prepare the harddisk

  • Put your Kurobox in EM mode (login via telnet with default username/password. For the Kuro standard it is root/kuro and for the Kuro HG it is root/kuroadmin).
  • When you just installed a harddisk, the box will start automatically in EM mode
  • If you have already partitioned the HDD, then telnet into the kurobox and run the following command followed by a reboot:
echo "NGNG" > /dev/fl3
  • Telnet into your box and follow the these steps
  • Delete ALL partitions and data with the command
mfdisk -e /dev/hda 
  • Then recreate partitions manually via the command
mfdisk -c /dev/hda 
  (this is the menu-driven interactive mode) 
Our goal is to create the following partiton-table:
/dev/hda1 Bootable Typ 83(Linux) 2GB 
/dev/hda2 Typ 82(LinuxSwap) 256MB 
/dev/hda3 Typ 83(Linux) the rest of the Disk 
Creating the first partition:
Command (m for help):  n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4):  1
First cylinder (1-<last sector>, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-<last sector>), default <last sector>):  +2048M
Now we need to make this first partition bootable:
Command (m for help):  a
Partition number (1-4):  1
Next partition 2 aka the Swap Partition:
Command (m for help):  n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4):  2
First cylinder (<sector x>-<last sector>, default <sector x>):
Using default value <sector x>
Last cylinder or +size or +sizeM or +sizeK (1-<last sector>), default <last sector>):  +256M
The system ID for partition 2 needs to be set to "Linux Swap"
Command (m for help):  t
Partition number (1-4):  2
Hex code (type L to list codes):  82
Changed system type of partition 2 to 82 (Linux swap)
The 3rd and final partition will take the remainder of the disk.
Command (m for help):  n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4):  3
First cylinder (<sector y>-<last sector>, default <sector y>):
Using default value <sector y>
Last cylinder or +size or +sizeM or +sizeK (1-<last sector>), default <last sector>):  
Using default value <last sector>

Now print the partition table and verify that there are 3 partitions. The first one should be marked as bootable, the second should be the swap partition, the the last should just have the remainder. To check this just type p at the prompt
Command (m for help):  p
The partitions are created and need to be saved
Command (m for help):  w


  • Now it's time to make the filesystems:
Format the file system on the system partition:
# mkfs -j /dev/hda1 
Format the file system on the data partition:
# mkfs -j /dev/hda3 
Format the swap partition:
# mkswap /dev/hda2 
Mount the system partition:
# mount /dev/hda1 /mnt

Prepare Debian

  • Transfer the fetched Debian image via FTP from another computer to the directory /mnt on the Kuro.
  • First, set the correct date in the system. (This is important since many systems start with a date of October 2004 and the tgz file has files that contain newer datestamps.) You may have to create a symlink for date. The date is in MMDDhhmmCCYY format. For the following example, it is setting the date to September 26, 2006, 1515hrs
# ln -s /bin/busybox /bin/date
# date -s "092615152006"
  • Back in the Telnet session, unpack the Debian image
# cd /mnt 
# tar xvfz debian_2005_04_09_dist.tgz 
  • Now is a good time to change some settings
  • Network settings
# vi etc/network/interfaces
Example of static address interface settings
auto eth0 lo
iface eth0 inet static 
address 192.168.0.100 
network 192.168.0.0 
netmask 255.255.255.0 
broadcast 192.168.0.255 
gateway 192.168.0.1 
iface lo inet loopback 
Example of dynamic address interface settings
auto eth0 lo
iface eth0 inet dhcp 
iface lo inet loopback 
  • If a static address is used, you might want to change resolv,conf
# vi etc/resolv.conf
search 
nameserver <DNS ip address> 
  • Change your hostname:
# vi etc/hostname
Jeeves
  • Update your hosts file with your new IP & hostname (if using static IP)
# vi etc/hosts
127.0.0.1 localhost
192.168.0.100 Jeeves

[It has been reported that FTP (proftpd) will not work unless the hosts file matches your hostname.]

  • Have a look at the hosts.allow file to make sure you will not be able to login again
# vi etc/hosts.allow
There you should add your network :
ALL : 192.168.x.0/255.255.255.0 
ALL : 127.0.0.1 
  • Reboot the Kuro
# write_ok (This is IMPORTANT! Kurobox will not leave EM mode on reboot unless you do this command)
# reboot

(Note - I just got a kurobox, and write_ok was not required at this stage, booted straight up into Debian)

The first boot of debian:

Because of the user root has no right to telnet in you have to use the user tmp-kun with the password tmp-kun. After you logged in as tmp-kun you may su to the root-user and the password root

For editing and some lowend terminal you should set your terminal-enviroment to vt100

# export TERM=vt100 


For security-reasons you should add your own personal user with

# adduser 

delete the standard-user tmp-kun (exit and logout first, login as new user then SU) with

# deluser tmp-kun 

Set a new password for root while you are logged in as root

# passwd 

If this is a new Kuro, you should set the correct time and date.

# date                 <--------to display the current date and time
# date [MMDDhhmmCCYY]  <--------to change (minus the brackets of course)

Change the Time Zone as well.

#tzconfig

Now you could update the debian-package list via

#apt-get update 

and then update your currently installed packages via

#apt-get upgrade 


Debian seems to use a little amount of memory in the Kurobox:

14:04:40 up 1:06, 1 user, load average: 0.00, 0.00, 0.00 
23 processes: 22 sleeping, 1 running, 0 zombie, 0 stopped 
CPU states: 1.0% user, 1.4% system, 0.0% nice, 97.6% idle 
Mem: 127088K total, 61644K used, 65444K free, 1508K buffers 
Swap: 265064K total, 0K used, 265064K free, 48800K cached

What to do from now

For more information on how to tune your new Debian system, check Debian on the Kurobox