If needed, to retrieve or upload files, you can access your
ENIB
Linux lab account from outside the school following
this
procedure provided by ENIB's SNUM (IT service).
If you wish to repeat the tutorials on your own computer, you will need to
retrieve these three files from the ENIB
Linux Lab rooms:
- /home/TP/tools/S7NSA_base.img
- /home/TP/tools/s7nsa_machine.py
- /home/TP/tools/s7nsa_hub_switch.py
The
s7nsa_machine.py script uses the
QEMU
software to emulate a PC-type computer.
Be aware that some
Linux distributions are shipped with versions of
QEMU that do not support the options required here.
In such cases, the simplest solution is to compile this tool yourself;
this is what was done (with a few minor differences) in the ENIB Linux
Lab rooms:
$ sudo apt update ↵
$ sudo apt install gcc make bzip2 pkg-config libgtk-3-dev libcap-dev libattr1-dev ↵
$ wget https://download.qemu.org/qemu-4.2.1.tar.xz ↵
$ tar xvJf qemu-4.2.1.tar.xz ↵
$ cd qemu-4.2.1 ↵
$ sed -i 's/nopie/no-pie/' ./configure ↵
$ ./configure --target-list=x86_64-softmmu --disable-sdl --enable-gtk --enable-virtfs ↵
$ make ↵
$ sudo make install ↵
The version indicated here is quite old, but sufficient for what we are
doing; it is of course possible to use a more recent version.
If you use
WSL
on
Windows, the previous installation is also possible.
To make the
s7nsa_hub_switch.py and
s7nsa_machine.py scripts
executable, enter the following command:
$ chmod +x s7nsa_*.py ↵
When starting
QEMU, you may encounter an error indicating that you do
not have the required permissions to use
KVM; in that case, simply
run the
s7nsa_machine.py script again with
sudo.