Differences

This shows you the differences between the selected revision and the current version of the page.

howto:install_debian 2008/10/17 21:00 howto:install_debian 2017/12/04 17:26 current
Line 1: Line 1:
 +**WARNING**: This procedure is horrible.  For a "real" native Debian installation, take a look at http://www.cyrius.com/debian/orion/d-link/dns-323/install.html .
 +
This page described how to get Debian natively running on your This page described how to get Debian natively running on your
DNS-323. DNS-323.
-NOTE: If you follow this procedure, the DNS-323 will no longer run it's+NOTE: If you follow this procedure, the DNS-323 will no longer run its
normal operation.  It will only run debian.  The function can be restored, normal operation.  It will only run debian.  The function can be restored,
details at the end. details at the end.
Line 17: Line 19:
  * A running Debian system   * A running Debian system
  * Fast Internet access (not strictly required, but very helpful)   * Fast Internet access (not strictly required, but very helpful)
-  * Running kermit from http://www.columbia.edu/kermit.  Note that you can use minicom, but you will not be able to transfer kernels to uboot later if you don't have it.+  * Running kermit from http://www.columbia.edu/kermit (On debian just execute apt-get install ckermit and use the command kermit without the path to the executable).  Note that you can use minicom, but you will not be able to transfer kernels to uboot later if you don't have it.
You need a minimal debian image installed on a machine that can act as You need a minimal debian image installed on a machine that can act as
Line 51: Line 53:
The "--foreign" option tell cdebootstrap to only perform unpacking action of the needed packages. All the operations that need to be executed on the destination machine will be executed after the first booting by executing the "fake" init. The "--foreign" option tell cdebootstrap to only perform unpacking action of the needed packages. All the operations that need to be executed on the destination machine will be executed after the first booting by executing the "fake" init.
-Now prepare the nfs export+ 
 +Now create the rtc and ttyS0 devices as to prevent some errors 
 + 
 +<code> 
 +i2:~# cd etch/dev 
 +i2:~/dns/etch/dev# MAKEDEV rtc 
 +i2:~/dns/etch/dev# mknod ttyS0 c 4 64 
 +</code> 
 + 
 +Set up fstab: 
 + 
 +<code> 
 +i2:~/dns/etch/etc# vi fstab 
 +</code> 
 + 
 +Let's use: 
 + 
 +<file> 
 +# <file system> <mount point>          <type>  <options>    <dump>  <pass> 
 +#/dev/sda1      none                    swap    sw              0      0 
 +#/dev/sdb1      none                    swap    sw              0      0 
 +proc            /proc                  proc    defaults        0      0 
 +#/dev/md0        /                      ext3    defaults        0      2 
 +</file> 
 + 
 +You can add other stuff later, but that will be enough to get you 
 +going.  We will uncomment these once we get them on the disk. 
 + 
 +And prepare the nfs export
<code> <code>
Line 172: Line 202:
</code> </code>
-If the device is new and you never have set the clock, you will probably have some little problem due to a wrong clock setting, if not just don't execute the related commands+If the device is new and you never have set the clock, you will probably have some little problem due to a wrong clock setting. If not, just don't execute the related command. 
-Now wait until cdebootstrap have terminated it's work. This will take some times.+ 
 +Now check frequently in "dns/etch/etc" if the file inittab as been extracted, and as soon as you find it edit the file as follow 
 + 
 +<code> 
 +i2:~/dns/etch/etc# vi inittab 
 +</code> 
 + 
 +Find the line that says: 
 +<code> 
 +#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 
 +</code> 
 + 
 +and turn it into: 
 +<code> 
 +T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100 
 +</code> 
 + 
 +Wait until cdebootstrap have terminated it's work. This will take some times.
<code> <code>
Removing `local diversion of /sbin/init to /sbin/init.REAL' Removing `local diversion of /sbin/init to /sbin/init.REAL'
INIT: version 2.86 booting INIT: version 2.86 booting
-/etc/rcS.d/S10checkroot.sh: line 44: /etc/fstab: No such file or directory+Activating swap...done.
Setting the system clock.. Setting the system clock..
-Cannot access the Hardware Clock via any known method. 
-Use the --debug option to see the details of our search for an access method. 
Cleaning up ifupdown.... Cleaning up ifupdown....
Loading kernel modules...FATAL: Could not load /lib/modules/2.6.12.6-arm1/modules.dep: No such file or directory Loading kernel modules...FATAL: Could not load /lib/modules/2.6.12.6-arm1/modules.dep: No such file or directory
Loading device-mapper support. Loading device-mapper support.
Checking file systems...fsck 1.40-WIP (14-Nov-2006) Checking file systems...fsck 1.40-WIP (14-Nov-2006)
-WARNING: couldn't open /etc/fstab: No such file or directory 
done. done.
Setting kernel variables...done. Setting kernel variables...done.
-Mounting local filesystems...warning: can't open /etc/fstab: No such file or directory +Mounting local filesystems...done.
-done.+
Activating swapfile swap...done. Activating swapfile swap...done.
Setting up networking.... Setting up networking....
Line 199: Line 242:
* Not starting internet superserver: no services enabled. * Not starting internet superserver: no services enabled.
Starting periodic command scheduler: crond. Starting periodic command scheduler: crond.
-</code> 
-As you can see you have no login shell because you have to modify "inittab" and probably to create the "ttyS0" device on the dev directory.+Debian GNU/Linux 4.0 lynk ttyS0
-On the pc where you store the system, create the node: +lynk login:
-<code> +
-i2:~/dns/etch# mknod dev/ttyS0 c 4 64+
</code> </code>
-Now modify the inittab +If you modify &quot;inittab&quot; too late you will not find the login prompt, and you'll have to repeat the boot process. Only the boot process using the same method as before, getting the u-boot prompt and setting the bootargs variable.
-&lt;code> +
-i2:~/dns/etch# vi etc/inittab +
-&lt;/code>;+
-Find the line that says: +When you get the login prompt login as &quot;root&quot;, and first of all set the clock to an acceptable date.
-&lt;code&gt; +
-#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 +
-</code>;+
-and turn it into: 
<code> <code>
-T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100 
-</code> 
- 
-Now reboot just disconneting the power supply. Use the same method as before, getting the u-boot prompt and setting the bootargs variable. 
- 
-When you get the login prompt login as "root", and first of all create the "rtc" device and set the clock to an acceptable date. 
- 
-<code> 
-192:~# MAKEDEV /dev/rtc 
192:~# date --set 2008-10-17 192:~# date --set 2008-10-17
</code> </code>
-Now set up fstab: +Create the remaining needed devices
- +
-<code> +
-192:/etc# vi fstab +
-</code> +
- +
-Let's use: +
- +
-<file> +
-# <file system> <mount point>          <type>  <options>    <dump>  <pass> +
-#/dev/sda1      none                    swap    sw              0      0 +
-#/dev/sdb1      none                    swap    sw              0      0 +
-proc            /proc                  proc    defaults        0      0 +
-#/dev/md0        /                      ext3    defaults        0      2 +
-</file> +
- +
-You can add other stuff later, but that will be enough to get you +
-going.  We will uncomment these once we get them on the disk. +
- +
-And create the remaining needed devices+
<code> <code>
Line 277: Line 282:
<code> <code>
-sh-3.1# cd /root/ +192:# cd /root/ 
-sh-3.1# mkdir oldmtd +192:# mkdir oldmtd 
-sh-3.1# cd oldmtd/ +192:# cd oldmtd/ 
-sh-3.1# dd if=/dev/mtdblock0 of=mtd0+192# dd if=/dev/mtdblock0 of=mtd0
128+0 records in 128+0 records in
128+0 records out 128+0 records out
65536 bytes (66 kB) copied, 0.076184 seconds, 860 kB/s 65536 bytes (66 kB) copied, 0.076184 seconds, 860 kB/s
-sh-3.1# dd if=/dev/mtdblock1 of=mtd1+192:# dd if=/dev/mtdblock1 of=mtd1
128+0 records in 128+0 records in
128+0 records out 128+0 records out
65536 bytes (66 kB) copied, 0.076254 seconds, 859 kB/s 65536 bytes (66 kB) copied, 0.076254 seconds, 859 kB/s
-sh-3.1# dd if=/dev/mtdblock2 of=mtd2+192:# dd if=/dev/mtdblock2 of=mtd2
3072+0 records in 3072+0 records in
3072+0 records out 3072+0 records out
1572864 bytes (1.6 MB) copied, 1.71174 seconds, 919 kB/s 1572864 bytes (1.6 MB) copied, 1.71174 seconds, 919 kB/s
-sh-3.1# dd if=/dev/mtdblock3 of=mtd3+192:# dd if=/dev/mtdblock3 of=mtd3
12672+0 records in 12672+0 records in
12672+0 records out 12672+0 records out
6488064 bytes (6.5 MB) copied, 6.89164 seconds, 941 kB/s 6488064 bytes (6.5 MB) copied, 6.89164 seconds, 941 kB/s
-sh-3.1# dd if=/dev/mtdblock4 of=mtd4+192:# dd if=/dev/mtdblock4 of=mtd4
384+0 records in 384+0 records in
384+0 records out 384+0 records out
Line 308: Line 313:
<code> <code>
-sh-3.1# cd .. +192:# cd .. 
-sh-3.1# dd if=oldmtd/mtd3 of=olddnsfs.gz bs=64 skip=1+192:# dd if=oldmtd/mtd3 of=olddnsfs.gz bs=64 skip=1
101375+0 records in 101375+0 records in
101375+0 records out 101375+0 records out
6488000 bytes (6.5 MB) copied, 6.6507 seconds, 976 kB/s 6488000 bytes (6.5 MB) copied, 6.6507 seconds, 976 kB/s
-sh-3.1# gzip -d olddnsfs.gz+192:# gzip -d olddnsfs.gz
gzip: olddnsfs.gz: decompression OK, trailing garbage ignored gzip: olddnsfs.gz: decompression OK, trailing garbage ignored
-sh-3.1# mount -o loop olddnsfs /mnt/+192:# mount -o loop olddnsfs /mnt/
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
-sh-3.1# mkdir dns323-oldfs +192:# mkdir dns323-oldfs 
-sh-3.1# cp -a /mnt/* dns323-oldfs/ +192:# cp -a /mnt/* dns323-oldfs/ 
-</code> +192:# umount /mnt
- +
-Now reboot.  Remember, press space then "1" to stop at uboot. +
- +
-<code> +
-sh-3.1# sync +
-sh-3.1# reboot -f +
-+
-+
-+
-Marvell>> setenv bootargs root=/dev/nfs nfsroot=192.168.27.126:/root/dns/etch ip=dhcp console=ttyS0,115200 +
-Marvell>> bootm FF820000 +
-## Booting image at ff820000 ... +
-</code> +
- +
-You should eventually get to the following: +
- +
-<code> +
-Debian GNU/Linux 4.0 192.168.27.54 ttyS0 +
- +
-192.168.27.54 login: +
-</code> +
- +
-Now log in as "root" +
- +
-<code> +
-192.168.27.54 login: root +
-Linux 192.168.27.54 2.6.12.6-arm1 #4 Sat Sep 8 01:23:18 CDT 2007 armv5tejl +
- +
-The programs included with the Debian GNU/Linux system are free software; +
-the exact distribution terms for each program are described in the +
-individual files in /usr/share/doc/*/copyright. +
- +
-Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent +
-permitted by applicable law.+
</code> </code>
Line 399: Line 370:
<code> <code>
-192:/etc# cd /etc+192:/# cd /etc
192:/etc# vi rc.local 192:/etc# vi rc.local
</code> </code>
Line 586: Line 557:
192:/initrd# cp /lib/ld-linux.so.2 lib 192:/initrd# cp /lib/ld-linux.so.2 lib
192:/initrd# cp /lib/libc.so.6 lib/ 192:/initrd# cp /lib/libc.so.6 lib/
 +192:/initrd# cp /lib/libgcc_s.so.1 lib/
192:/initrd# cp /lib/libcrypt.so.1 lib 192:/initrd# cp /lib/libcrypt.so.1 lib
192:/initrd# cp /lib/libm.so.6 lib 192:/initrd# cp /lib/libm.so.6 lib
Line 726: Line 698:
<code> <code>
-192:/etc# umount /mnt +192:/# umount /mnt 
-192:/etc# mount /dev/md0 /mnt+192:/# cd /mnt 
 +192:/mnt# mkdir hd_root nfs_root 
 +192:/mnt# mount /dev/md0 hd_root
kjournald starting.  Commit interval 5 seconds kjournald starting.  Commit interval 5 seconds
EXT3 FS on md0, internal journal EXT3 FS on md0, internal journal
EXT3-fs: mounted filesystem with ordered data mode. EXT3-fs: mounted filesystem with ordered data mode.
-192:/etc# cp -a /bin /boot /dev /etc /home /initrd /lib /media /opt /root /sbin /srv/ /usr /var /mnt +192:/mnt# mount -o bind / nfs_root 
-192:/etc# mkdir /mnt/mnt /mnt/proc /mnt/sys /mnt/tmp +192:/mnt# cp -a nfs_root/* hd_root 
-192:/etc# chmod 777 /mnt/tmp +192:/mnt# mkdir hd_root/old_root
-192:/etc# chmod +t /mnt/tmp +
-192:/etc# mkdir /mnt/old_root+
</code> </code>
Line 741: Line 713:
<code> <code>
-192:/etc# vi /mnt/etc/fstab+192:/mnt# vi hd_root/etc/fstab
</code> </code>
Line 749: Line 721:
<code> <code>
-192:/etc# vi /mnt/etc/network/interfaces+192:/mnt# vi hd_root/etc/network/interfaces
</code> </code>
Line 757: Line 729:
<code> <code>
-192:/etc# cd /root+192:/mnt# cd /root
192:~# ./make_uinitrd 192:~# ./make_uinitrd
1024+0 records in 1024+0 records in
Line 792: Line 764:
<code> <code>
192:~# dd if=/root/initrd.uImage of=/dev/mtdblock3 192:~# dd if=/root/initrd.uImage of=/dev/mtdblock3
-192:~# umount /mnt 
192:~# reboot 192:~# reboot
</code> </code>
Line 805: Line 776:
A few other things you might want to do: A few other things you might want to do:
- 
-Makes the hwclock work right: 
-<code> 
-server:~/dns323-oldfs# cd /dev 
-server:/dev# MAKEDEV rtc 
-</code> 
Provide access to the temperature sensor: Provide access to the temperature sensor:

Navigation

Personal Tools