add docu for installing APU to README.md
This commit is contained in:
110
README.md
110
README.md
@ -84,4 +84,114 @@ enp3s0=off # disabled
|
||||
available on control boxes (MLZ type) only. must therefore not be present on bare apu boxes.
|
||||
|
||||
|
||||
## Installation of a Fresh Control Box or bare APU
|
||||
|
||||
### Tools / Resources needed
|
||||
|
||||
#### progress bar
|
||||
|
||||
On mac use ``brew install pv`` to install. If you do not want it, you may leve it out,
|
||||
it is a matter of convenience. In this case omit ``| pv `` in the commands
|
||||
|
||||
|
||||
|
||||
## install image by means of an USB stick
|
||||
|
||||
The stick has TinyLinux and on it and some additional scripts
|
||||
|
||||
If you do not have one, you may create it logging to an other box as root
|
||||
|
||||
### a) create a USB stick with TinyLinux (omit if you have the stick already)
|
||||
|
||||
to verify that /dev/sdb is your stick, use the following command before and after plugging the stick
|
||||
```
|
||||
apu> ls /dev/sdb
|
||||
```
|
||||
|
||||
copy the stick image to the stick (32 GB should be enough)
|
||||
|
||||
```
|
||||
mac> dd if=apuinstall.lz4 bs=512k | pv | ssh root@<ip or hostname> "lz4 -d | dd of=/dev/sdb bs=512k"
|
||||
```
|
||||
|
||||
### b) mount with TinyLinux from USB stick
|
||||
|
||||
Connect a Mac with an USB to serial adapter (and null-modem!).
|
||||
If no such adapter is available, you might try to connect LAN and search for computer name box,
|
||||
do the registration in PacketFence and reboot, login with root/root).
|
||||
```
|
||||
mac> screen /dev/tty.usbserial-130 115200
|
||||
```
|
||||
|
||||
Do not yet connect LAN, plug USB stick and start the box, wait for prompt 'tc@box:'
|
||||
```
|
||||
apu> cd /media/CENTOS7_APU (or /media/CENTOS_APU)
|
||||
apu> sh reg
|
||||
```
|
||||
|
||||
enter new hostname (HWaddr will be on the output)
|
||||
register to PacketFence (if not yet done) and set role to sinq-samenv
|
||||
connect LAN to rightmost socket on a bare APU or the leftmost socket an a control box
|
||||
```
|
||||
apu> sh tiny
|
||||
...
|
||||
some random art images are shown ...
|
||||
...
|
||||
inet addr:129.168.1.43 Bcast:192.168.1.255 Mask:255.255.255.0
|
||||
inet addr:127.0.0.1 Mask:255.0.0.0
|
||||
```
|
||||
|
||||
Use the displayed ip address for the following step.
|
||||
|
||||
|
||||
### c) Copy Image to APU SSD
|
||||
```
|
||||
mac> cd ~/switchdrive/apu/images
|
||||
mac> dd if=apumaster.lz4 bs=512k | pv | ssh root@192.168.1.43 "lz4 -d | dd of=/dev/sda bs=512k"
|
||||
```
|
||||
|
||||
(you are asked for root password, which is root, ``| pv `` may be omitted)
|
||||
|
||||
remove the stick, power off/on
|
||||
|
||||
login with root/FrappyLinse
|
||||
```
|
||||
> cd aputools
|
||||
> git pull
|
||||
> python3 install.py
|
||||
...
|
||||
enter host name:
|
||||
...
|
||||
|
||||
> reboot now
|
||||
```
|
||||
|
||||
DONE!
|
||||
|
||||
|
||||
### d) Cloning an Image from an Existing Box
|
||||
|
||||
Use (b) above to boot from TinyLinux (replace the IP address by the one from the box!)
|
||||
First make sure that a copy of the last apumaster.lz4 is saved with its date.
|
||||
```
|
||||
mac> ssh root@192.168.1.43 "dd if=/dev/sda bs=512k | lz4" | pv | dd of=apumaster.lz4 bs=512k
|
||||
```
|
||||
|
||||
|
||||
### e) Appendix
|
||||
|
||||
Source of scripts on TinyLinux:
|
||||
```
|
||||
apu> cat tini.sh
|
||||
tce-load -wi nano
|
||||
tce-load -wi lz4
|
||||
tce-load -wi openssh
|
||||
sudo /usr/local/etc/init.d/openssh start
|
||||
sudo chpasswd << EOF
|
||||
tc:tc
|
||||
root:root
|
||||
EOF
|
||||
ifconfig | grep 'inet addr'
|
||||
```
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user