Differences
This shows you the differences between the selected revision and the current version of the page.
howto:armedslack 2008/10/19 16:51 | howto:armedslack 2017/09/06 18:38 current | ||
---|---|---|---|
Line 8: | Line 8: | ||
- This HOWTO assumes that you have configured two separate disks. If you're running RAID, you're on your own. | - This HOWTO assumes that you have configured two separate disks. If you're running RAID, you're on your own. | ||
+ | |||
+ | ==== Download files ==== | ||
+ | |||
+ | Telnet into your DNS-323, and download ARMedslack packages from the slackware.pl mirror: | ||
+ | |||
+ | # mkdir -p /mnt/HD_a2/home/armedslack | ||
+ | # cd /mnt/HD_a2/home/armedslack | ||
+ | # rsync -avP inreto.de::dns323/armedslack/get-armedslack.sh . | ||
+ | # ./get-armedslack.sh | ||
+ | |||
+ | Get kernel and ramdisks: | ||
+ | |||
+ | # cd /ffp/boot | ||
+ | # rsync -avP inreto.de::dns323/armedslack/ramdisks . | ||
+ | |||
+ | |||
+ | ==== Installer ==== | ||
+ | |||
+ | Boot the installer ramdisk: | ||
+ | |||
+ | # cd /ffp/boot/ramdisks | ||
+ | # ./installer.sh | ||
+ | |||
+ | As usual, wait a few seconds, open a new telnet session and login as | ||
+ | root (no password required). If you cannot establish a new connection | ||
+ | within a minute or two, the loader might have failed due to memory | ||
+ | fragmentation. Reboot your box and retry. | ||
+ | |||
+ | We install to a 'linux' directory on /dev/sda2, and set the ROOT | ||
+ | environment variable for installpkg: | ||
+ | |||
+ | # mount /dev/sda2 /mnt | ||
+ | # mkdir -p /mnt/linux | ||
+ | # export ROOT=/mnt/linux | ||
+ | |||
+ | We're going to chroot to /mnt/linux later for the main package | ||
+ | installation. Make sure we can access the packages, then: | ||
+ | |||
+ | # mkdir -p /mnt/linux/old | ||
+ | # mount /dev/sda2 /mnt/linux/old | ||
+ | |||
+ | Some packages (e.g. sysvinit) need to know that we're installing | ||
+ | Slackware: | ||
+ | |||
+ | # touch /etc/slack-installer | ||
+ | |||
+ | |||
+ | ==== Package tools ==== | ||
+ | |||
+ | We first unpack the package tools to get the installpkg utility: | ||
+ | |||
+ | # cd /mnt/linux | ||
+ | # tar xzf /mnt/linux/old/home/armedslack/armedslack-current/slackware/a/pkgtools*.tgz | ||
+ | # rm -rf install | ||
+ | |||
+ | Next, we prepare the chroot by installing a few essential packages: | ||
+ | |||
+ | # cd /mnt/linux/old/home/armedslack/armedslack-current/slackware | ||
+ | # /mnt/linux/sbin/installpkg a/*.tgz | ||
+ | |||
+ | Ignore the warnings. | ||
+ | |||
+ | |||
+ | ==== Chroot ==== | ||
+ | |||
+ | We can now mount the usual virtual filesystems and enter the chroot. | ||
+ | |||
+ | # cd /mnt/linux | ||
+ | # mount -t proc proc proc | ||
+ | # mount -t sysfs sysfs sys | ||
+ | # chroot . /bin/bash -ls | ||
+ | |||
+ | Ignore the 'cat' error. | ||
+ | |||
+ | |||
+ | ==== ARMedslack packages ==== | ||
+ | |||
+ | Unset $ROOT now: | ||
+ | |||
+ | # unset ROOT | ||
+ | |||
+ | Ready to install ARMedslack packages. First, properly reinstall | ||
+ | the a series: | ||
+ | |||
+ | # cd /old/home/armedslack/armedslack-current/slackware | ||
+ | # upgradepkg --reinstall a/*.tgz | ||
+ | |||
+ | Continue with: | ||
+ | |||
+ | # installpkg ap/*.tgz d/*.tgz l/*.tgz n/*.tgz tcl/*.tgz | ||
+ | |||
+ | This takes a while and installs about 2GB. | ||
+ | |||
+ | Finally, remove the following packages which are specific to a different | ||
+ | hardware platform: | ||
+ | |||
+ | # removepkg kernel-modules kernel_versatile | ||
+ | |||
+ | |||
+ | ==== Network Configuration ==== | ||
+ | |||
+ | We start with the network config: | ||
+ | |||
+ | # cd | ||
+ | # netconfig | ||
+ | |||
+ | Next, activate the telnet or ssh server: | ||
+ | |||
+ | For telnet, enable telnet via inetd: | ||
+ | |||
+ | # sed -i '/^#telnet/ s@^#@@' /etc/inetd.conf | ||
+ | # chmod a+x /etc/rc.d/rc.inetd | ||
+ | |||
+ | Double check with: | ||
+ | |||
+ | # grep telnet /etc/inetd.conf | ||
+ | telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd | ||
+ | |||
+ | To activate the ssh server: | ||
+ | |||
+ | # chmod a+x /etc/rc.d/rc.sshd | ||
+ | |||
+ | |||
+ | ==== root password ==== | ||
+ | |||
+ | Now, set a root password: | ||
+ | |||
+ | # passwd | ||
+ | |||
+ | To allow root login over telnet/serial, change /etc/securetty: | ||
+ | |||
+ | # sed -i '/^#[pt]/ s/#//' /etc/securetty | ||
+ | |||
+ | |||
+ | |||
+ | ==== Time zone ==== | ||
+ | |||
+ | To select your timezone, run | ||
+ | |||
+ | # timeconfig | ||
+ | |||
+ | |||
+ | ==== System initialization ==== | ||
+ | |||
+ | Next, we adjust the boot files. Since the DNS-323 is headless, we | ||
+ | don't need the standard virtual consoles: | ||
+ | |||
+ | # sed -i 's@^c@#&@' /etc/inittab | ||
+ | |||
+ | But we want the serial console. The following sed command removes | ||
+ | the comment character from the 's1' entry: | ||
+ | |||
+ | # sed -i '/^#s1:/ s@#@@' /etc/inittab | ||
+ | |||
+ | We also need to disable automatic filesystem checks at boot. We do | ||
+ | this by simply replacing /sbin/fsck with /bin/true in rc.S: | ||
+ | |||
+ | # sed -i 's@/sbin/fsck@/bin/true@' /etc/rc.d/rc.S | ||
+ | |||
+ | Also, rc.S will complain if the root filesystem is mounted read-write. | ||
+ | Make it continue with: | ||
+ | |||
+ | # sed -i '/read junk/d' /etc/rc.d/rc.S | ||
+ | |||
+ | |||
+ | ==== Disable unneeded services ==== | ||
+ | |||
+ | By default, ARMedslack starts a number of services that we don't | ||
+ | need on the DNS-323. To disable them, do: | ||
+ | |||
+ | # cd /etc/rc.d | ||
+ | # chmod a-x rc.acpid rc.alsa rc.pcmcia rc.wireless rc.yp.new | ||
+ | # rm rc.modules-* rc.font.new | ||
+ | |||
+ | |||
+ | |||
+ | ==== fstab ==== | ||
+ | |||
+ | Get the inital /etc/fstab: | ||
+ | |||
+ | # cd /etc | ||
+ | # rsync -avP inreto.de::dns323/armedslack/etc/fstab . | ||
+ | |||
+ | It looks like this: | ||
+ | |||
+ | # cat fstab | ||
+ | /dev/sda1 swap swap defaults 0 0 | ||
+ | |||
+ | sysfs /sys sysfs defaults 0 0 | ||
+ | proc /proc proc defaults 0 0 | ||
+ | devpts /dev/pts devpts mode=0620 0 0 | ||
+ | tmpfs /dev/shm tmpfs defaults 0 0 | ||
+ | |||
+ | |||
+ | |||
+ | ==== fan controller ==== | ||
+ | |||
+ | Get and unpack the fanctl source code: | ||
+ | |||
+ | # cd | ||
+ | # wget http://www.inreto.de/dns323/utils/fanctl-2.tar.gz | ||
+ | # tar xzvf fanctl-2.tar.gz | ||
+ | |||
+ | Compile and install: | ||
+ | |||
+ | # cd fanctl-2 | ||
+ | # make | ||
+ | # cp fanctl /usr/sbin | ||
+ | # cp fan.conf /etc | ||
+ | |||
+ | Add fanctl to /etc/rc.d/rc.local, so it's started automatically on | ||
+ | boot: | ||
+ | |||
+ | # echo 'fanctl /etc/fan.conf >/dev/null 2>&1 </dev/null &' >>/etc/rc.d/rc.local | ||
+ | |||
+ | |||
+ | |||
+ | ==== Done ==== | ||
+ | |||
+ | Finally, exit the chroot, and reboot into the firmware: | ||
+ | |||
+ | # exit | ||
+ | # reboot | ||
+ | |||
+ | Start ARMedslack with: | ||
+ | |||
+ | # cd /ffp/boot/ramdisks | ||
+ | # ./linux.sh | ||
+ | |||
+ | Because SSH keys are generated during the initial boot, it takes a few | ||
+ | minutes. | ||
+ | |||
+ | The linux initramfs will search partitions for linux/sbin/init, and if found, | ||
+ | chroot and exec sbin/init. | ||