How to setup and use the PIE VM

Warning

No support is done by the CRI on the PIE VM. If you do not succeed in making it work by your own means, you must work on the school computers.

This method allow you to have the PIE environment running in a VM on your computer.

There exists two installation : Virtualbox and VMWare. Note that VirtualBox has shown numerous bugs on MacOS. VMWare is thus recommended for MacOS users.

VirtualBox Installation

First step

Install Virtual Box.

On linux you can install it with your package manager (Debian or ArchLinux).

Second step

Download our VirtualBox appliance.

Open VirtualBox and go to File > Import Appliance and import the file you just downloaded.

appliance

import

folder

When getting to the Appliance settings page, you may adjust the RAM and CPU parameters. Be careful to have a least 2048 MB of RAM.

You can then click the Import button.

settings

Third step

Inside Virtual Box select your newly created virtual machine and click on the Start button.

select

In the familiar PXE menu, choose the Prepare disk entry.

Let it boot, a script will run automatically and your VM will shutdown once its done.

menu

Fourth step

You can now Start your VM again. You can now use the PXE menu as usual to boot Archlinux image.

You can use the skip-download image to avoid downloading the image each time. Be wary that this image may not be up to date and then have bugs. You should re-download the VM every once in a while to be sure to have all the latest tools and potential bugs fixes. You will find more information on this in the cri.news newsgroup.

Warning

Be careful ! You should log with epita user and no password. Your data is in /home/epita, this directory is kept between reboot, you will not lose files each time you stop your VM.

VMWare Installation

First step

Install VMWare Workstation : VMWare Workstation On Linux you can download it with your package manager (Debian or Archlinux).

Second step

Download our VMWare appliance. Unzip the folder in an appropriate location (you can use unzip vmware-cri-vm.zip).

Click on Open a Virtual Machine.

import

Select the CRI_VM folder. import1

Select the CRI VM.vmx file. import2

Third step

You now have an imported VM. You can now run it by double clicking on it. imported

In the familiar PXE menu, choose the Prepare disk entry.

Let it boot, a script will run automatically and your VM will shutdown once its done.

ipxemenu

Fourth step

You can now Start your VM again. You can now use the PXE menu as usual to boot Archlinux image.

You can use the skip-download image to avoid downloading the image each time. Be wary that this image may not be up to date and then have bugs. You should re-download the VM every once in a while to be sure to have all the latest tools and potential bugs fixes. You will find more information on this in the cri.news newsgroup.

Warning

Be careful ! You should log with epita user and no password. Your data is in /home/epita, this directory is kept between reboot, you will not lose files each time you stop your VM.

Mac VMWare Installation

First step

For MacOS, install VMWare Fusion : VMWare Fusion.

Second step

Download the iso file ISO.

Click on Installer à partir du disque ou de l'image.

import

Select the cri-vm.iso file. import1

Select Linux > Autre noyau Linux 5.x et version ultérieur 64 bits. import2

Select "BIOS hérité". import2

Click on "Terminer" and save the VM. import2

Before launching the VM, you need to edit the configuration. Go to Machine Virtuelle > Paramètres. import2

Then edit "Processeurs et mémoires". import2

Put 4096 Mo (at least) of memory. If you can put more - if you have enough RAM available. (Note that 4Go will probably be the maximum on a 8Go Mac). import2

Go back to the previous menu and click "Disque Dur (SCSI)". import2

Put (at least) 64 Go of disk space. Note that the disk format is optimized not to take that much space on your disk. import2

Third step

You now have an imported VM. You can now run it by double clicking on it. imported

In the familiar PXE menu, choose the Prepare disk entry.

Let it boot, a script will run automatically and your VM will shutdown once its done.

ipxemenu

Fourth step

You can now Start your VM again. You can now use the PXE menu as usual to boot Archlinux image.

You can use the skip-download image to avoid downloading the image each time. Be wary that this image may not be up to date and then have bugs. You should re-download the VM every once in a while to be sure to have all the latest tools and potential bugs fixes. You will find more information on this in the cri.news newsgroup.

Warning

Be careful ! You should log with epita user and no password. Your data is in /home/epita, this directory is kept between reboot, you will not lose files each time you stop your VM.

Common issues

Error: failed to start Switch Root.

error-switch-root

You probably didn't start the Prepare disk image, please do the third step again.

Black screen after starting the VM

Please ensure you are using VirtualBox 6.1 (you can check in Help -> About VirtualBox).

Not in a hypervisor partition

virt-disabled

You need to enable Vt-x or AMD-V in your BIOS.

Cannot enable nested VT-x/AMD-V without nested-paging

nested

Go to the VM settings window and in the System page and Processor tab, uncheck the Enable nested Vt-x/AMD-V box.

FATAL: Could not read from the boot medium! System halted

no-boot-medium-display

This issue often happens if you tried to install VBoxGuestAdditions. The tools provided by VirtualBox are given as an ISO file. When you try to install the tools, the ISO will replace your boot device.

To fix this issue, you need to re-attach the original boot device to your VM.

Go into your VM settings (Settings -> Storage)

Warning

Be careful ! You should only edit the Controller: IDE section of the Storage settings.

In the Controller: IDE section, you will either see nothing or the VBoxGuestAdditions iso.

Controller: IDE section is empty

no-boot-medium

Click on the little CD/ROM button on the Controller: IDE line.

add-boot-iso

Choose the iso called PIE-disk001.iso, it should have a size of ~1MB.

add-boot-iso-menu

You should now be able to boot your VM.

VBoxGuestAdditions iso is present in the Controller: IDE section

guest-additions

  1. Select VBoxGuestAdditions iso.

  2. Click on the disk icon on the right of the menu.

guest-additions

Choose the iso called PIE-disk001.iso.

guest-additions

You should now be able to boot your VM.

Small tips for a better environment

Screen resolution

You can use the command xrandr to change the resolution.

You can see the available resolutions with xrandr as following : resolution

You can change it using xrandr --output Virtual-1 --auto --mode WIDTHxHEIGHT xrandr

Term size

A command line program allows you to change the font size in your terminal.

You can use it with term_size SIZE. SIZE being the font size (12, 14, ... for instance)