PIXEL(Raspbian)-Virtual Box-Persistence Drive

Please note that this is not officially approved by the PI team but the MagPi magazine offers a similar tutorial using a pendrive.

Step 1

Download the Pixel (Jessie Raspbian) image file: http://downloads.raspberrypi.org/pixel_x86/images/pixel_x86-2016-12-13/2016-12-13-pixel-x86-jessie.iso

Step 2:

Open Virtual Box, press new and create the following settings:

step1

Press Create and enter the following settings

step2

Press Start

step3

 

Step 3:

Browse to the downloaded ISO file and press Start

step4

Pixel is loaded

step5.JPG

Step 4:

To test persistence, create a new folder on your desktop and restart your OS.

step6

step7

Once your OS is restarted, you will notice that the folder you created is lost. This is because there is no persistence drive present.

step8.JPG

Step 5 (to create persistence drive):

Open terminal window and enter sudo apt install gparted

step9.JPG

When installation is finished, enter sudo gparted

step10.JPG

Click on Device > Create Partition Table and press Apply

step11.JPG

Right Click on the unallocated partition and press New

step13.JPG

Enter label name persistence with the following default settings and press Add

step14

Press the green very good sign and press Apply to any warning messages

step15

Press Close and close everything

step16

Now we are going to copy  the whole operating system from the virtual optical drive to
the hard drive.

Open the terminal window and enter sudo dd if=/dev/sr0 of=/dev/sda bs=1M

step17

Close the virtual machine (shutdown the OS)

Step 6:

Create a new Virtual Machine with the following settings. It is very important that you use your previously created virtual hard disk file. Do no create a new virtual hard disk.

 step18

Step 7:

Start your new machine and create a new python script to test persistence. I saved my file in the desktop. Restart your OS.

step19

Step 8:

Test file is still there. Persistence worked 🙂

step20

References: