Continue by patching and configuring the kernel as outlined in my previous post. When you get to the menuconfig, in addition to the other options (i.e. the ones described in the last post), also select these:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
File systems --->
[*] Miscellaneous filesystems --->
<*> SquashFS 4.0 - Squashed file system support
File decompression options (Decompress file data into an intermediate buffer) --->
Login with username tc (just type tc and hit enter). Then, become root, format the disk image, and setup the tce directory on the disk image. By having the tce directory on the disk image, we can persist installed extensions across boots.
1
2
3
4
5
sudo su
mkfs.ext4 /dev/sda
mkdir /mnt/sda
mount /dev/sda /mnt/sda/
tce-setdrive -s /mnt/sda
Now, any extensions you install will be stored on the disk image, so they will be automatically loaded when you boot. To check that this works, lets try installing an openssh server and then rebooting:
Just check that ssh is working (change the tc user’s password first):
1
2
passwd tc
ssh tc@localhost
To persist the openssh configuration (and passwd file) across boots, we can back them up by adding their paths to /opt/.filetool.lst and calling filetool.sh -b:
1
2
3
4
5
6
cat <<'EOF' >> /opt/.filetool.lst
/usr/local/etc/ssh
/etc/passwd
/etc/shadow
EOF
filetool.sh -b
The files should now be backed up and stored in /mnt/sda/tce/mydata.tgz. Lets reboot and check that the ssh server is in fact started after booting:
1
reboot
You can also ssh in from your guest machine by forwarding a port with QEMU: