Difference between revisions of "Convert your PPC LinkStation into a full-blown Debian system"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m (remove spam link)
 
(14 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
{{Template:Articles|Debian|LS1|HG|Howto|Rescue-Backup}}
 +
 
''<font color=red><small>
 
''<font color=red><small>
 
This article  
 
This article  
Line 5: Line 7:
 
at Linkstationwiki.org
 
at Linkstationwiki.org
 
</small></font>''<br>
 
</small></font>''<br>
 +
{{Postit|I have no free IDE port in my workstation? | It is also possible to use an external USB IDE case, which you open, connect to the linkstation's disk, power on and connect to your workstation. If you use an USB IDE case, you must use "/dev/sdx" instead of "/dev/hdx", also be sure to prevent your distribution from mounting it automatically on your desktop or elsewhereto}}
 +
 +
{{Warning|This article describes how to install [[Debian on the Kurobox]] on a Linkstation.  It was created before [[FreeLink]] existed.  To install Freelink using the Flash Installer (without opening the Linkstation), follow [[:Category:FreeLink|this link]].}}
 +
 +
 
1. Backup all your important data (see [[GeneralBackup]]).
 
1. Backup all your important data (see [[GeneralBackup]]).
  
 
2. If you don't have a Linux workstation you may use the Knoppix bootable Linux CD from http://www.knoppix.org.
 
2. If you don't have a Linux workstation you may use the Knoppix bootable Linux CD from http://www.knoppix.org.
  
3. Download fix_ext2_magic from the downloads area, download the Putty telnet/SSH client from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html, and download the latest PPC Debian LinkStation package from the downloads area.
+
3. Download [[fix_ext2_magic]] from the [http://downloads.nas-central.org/ downloads area], and download the latest PPC Debian LinkStation package from the [http://downloads.nas-central.org/ downloads area].
 
+
4. Disassemble the LinkStation and connect it to a workstation (see [[GeneralDisassemble]]).
+
  
(:note What is hdx? | Replace "x" with whatever letter you have mounted the hard drive as (such as "a" or "b."):)
+
4. Disassemble the LinkStation and connect it to a workstation (see [[Articles/GeneralDisassemble]]).
  
(:note I have no free IDE port in my workstation? | It is also possible to use an external USB IDE case, which you open, connect to the linkstation's disk, power on and connect to your workstation. If you use an USB IDE case, you must use "/dev/sdx" instead of "/dev/hdx", also be sure to prevent your distribution from mounting it automatically on your desktop or elsewhereto:)
 
  
 
5. Run fix_ext2_magic to repair the partition information and make the hard drive mountable. Use the command, where x is the hard drive name:
 
5. Run fix_ext2_magic to repair the partition information and make the hard drive mountable. Use the command, where x is the hard drive name:
Line 30: Line 34:
  
 
8. Partition the LinkStation hard drive according to your preferences. A good choice is a 2GB partition 1 (main), a 512MB partition 2 (swap), and the remaining hard drive space partition 3. Use:
 
8. Partition the LinkStation hard drive according to your preferences. A good choice is a 2GB partition 1 (main), a 512MB partition 2 (swap), and the remaining hard drive space partition 3. Use:
 +
{{Postit|What is hdx? | Replace "x" with whatever letter you have mounted the hard drive as (such as "a" or "b.") }}
  
 
  <font color=red>fdisk /dev/hdx</font>
 
  <font color=red>fdisk /dev/hdx</font>
Line 68: Line 73:
  
 
     <font color=red>mkswap /dev/hda2</font>
 
     <font color=red>mkswap /dev/hda2</font>
     <font color=red>swapon</font>
+
     <font color=red>swapon -a</font>
  
20. Edit <font color=red>/etc/apt/sources.list</font> and add the following line to the beginning of sources.list:
+
20. Edit <font color=red>/etc/apt/sources.list</font> so that it contains the following lines:
  
 
  <font color=red>deb http://security.debian.org stable/updates main contrib non-free</font>
 
  <font color=red>deb http://security.debian.org stable/updates main contrib non-free</font>
Line 111: Line 116:
  
 
29. That should output the new host name. Congratulations, you have successfully installed Debian on your LinkStation. Now wasn't that easy?
 
29. That should output the new host name. Congratulations, you have successfully installed Debian on your LinkStation. Now wasn't that easy?
 
[[Category:Debian]]
 
[[Category:LS1]]
 
[[Category:HG]]
 
[[Category:Howto]]
 
 
<center><font color=red>''Originally by frontalot, edited by Thorongil and andre from linkstationwiki.org''</font></center>
 

Latest revision as of 09:09, 29 October 2010


This article Based on work by andre, Thorongil and frontalot. Originally by frontalot. at Linkstationwiki.org

I have no free IDE port in my workstation?
Bar.png
It is also possible to use an external USB IDE case, which you open, connect to the linkstation's disk, power on and connect to your workstation. If you use an USB IDE case, you must use "/dev/sdx" instead of "/dev/hdx", also be sure to prevent your distribution from mounting it automatically on your desktop or elsewhereto


Nuvola apps important.png 
WARNING!

This article describes how to install Debian on the Kurobox on a Linkstation. It was created before FreeLink existed. To install Freelink using the Flash Installer (without opening the Linkstation), follow this link.



1. Backup all your important data (see GeneralBackup).

2. If you don't have a Linux workstation you may use the Knoppix bootable Linux CD from http://www.knoppix.org.

3. Download fix_ext2_magic from the downloads area, and download the latest PPC Debian LinkStation package from the downloads area.

4. Disassemble the LinkStation and connect it to a workstation (see Articles/GeneralDisassemble).


5. Run fix_ext2_magic to repair the partition information and make the hard drive mountable. Use the command, where x is the hard drive name:

./fix_ext2_magic --fix /dev/hdx1

6. Mount the LinkStation hard drive. Use the command:

mount /dev/hdx1 /mnt/hdx1

7. Unmount the LinkStation hard drive. Use the command:

unmount /dev/hdx1

8. Partition the LinkStation hard drive according to your preferences. A good choice is a 2GB partition 1 (main), a 512MB partition 2 (swap), and the remaining hard drive space partition 3. Use:

What is hdx?
Bar.png
Replace "x" with whatever letter you have mounted the hard drive as (such as "a" or "b.")


fdisk /dev/hdx

9. Build an ext3 file system on partitions 1 and 3. Use the commands:

mke2fs -j /dev/hdx1; mke2fs -j /dev/hdx3

10. Turn off the file system check timers since partitions 1 and 3 are ext3 with journals. Use the commands:

tune2fs -i0 -c0 /dev/hdx1; tune2fs -i0 -c0 /dev/hdx3

11. Build the swap space. Use the command:

mkswap /dev/hdx2

12. Mount partition 1. Use the command:

mount /dev/hdx1 /mnt/hdx1

13. Extract the LinkStation Debian tar. Use the commands:

cd /mnt/hdx1; tar -zxvf ./debian_package_date_dist.tgz

14. Previous versions of this tutorial directed you to replace the kernel modules folder with the updated version available here. The updated kernel modules now come pre-installed in the latest Debian distribution.

15. Correct the networking files so you can connect to the Linkstation. Edit /etc/network/interfaces, /etc/resolv.conf, /etc/hosts, /etc/hosts.allow, and /etc/hosts.deny to your network settings. It is recommended to change /etc/hosts.deny to ALL : PARANOID.

16. Shutdown the computer, remove the LinkStation hard drive, reassemble the LinkStation (make sure to return the hard drive jumper to cable select), and turn it on.

17. Connect to the LinkStation via telnet. The default users are:

tmp-kun:tmp-kun and root:root

18. Log in as tmp-kun and su to root.

19. Now be sure that swap space is activated (your linkstation may fail on you when doing heavy work because of filled up RAM), run "top", it shows you in the upper left corner the available swap space. If it's zero, run:

   mkswap /dev/hda2
   swapon -a

20. Edit /etc/apt/sources.list so that it contains the following lines:

deb http://security.debian.org stable/updates main contrib non-free
deb http://mirrors.kernel.org/debian stable main contrib non-free
deb-src http://security.debian.org stable/updates main contrib non-free
deb-src http://mirrors.kernel.org/debian stable main contrib non-free


21. Now update the list of packages. Use the command:

apt-get update

22. Then upgrade your system by using the command:

apt-get dist-upgrade

23. Reboot the LinkStation. Use the command:

reboot

24. Log in to the LinkStation via telnet and su to root. Make a new user. Use the command:

adduser yournewusername

25. Logout, log back using the new username, and su to root. Then remove the default tmp-kun user. Use the command:

deluser tmp-kun

26. Set a new root password. This is very important. Use the command:

passwd root

27. And enter your new password. Lastly let's change the hostname from the default KURO-BOX to one of your choice. Use the command:

hostname yourhostname

28. However, the changes won't be saved unless we edit 2 more files. First open up /etc/hostname and replace KURO-BOX with the hostname of your choice. Then open up /etc/hosts and again replace KURO-BOX with the hostname of your choice. Reboot your LinkStation and verify the changes by typing the command:

hostname

29. That should output the new host name. Congratulations, you have successfully installed Debian on your LinkStation. Now wasn't that easy?