-
password : Asharaf#1.618
-
new user password : Abudhabi#1.618
-
*** if you are using 42 Mac for the project then you need to goto the Go->Computer->Macintosh HD->Users then open the folder with your user name inside there will be folder named by "goinfre". Use this folder to do the project. ***
-
*** if you want to run another virtual machine from port 4242 then remove the current ssh from /Users/mkaruvan/.ssh/known_hosts file ***
- Download Virtual Box (if you are using Mac and you don't have administrative permission you can download and install it from "Managed software centre").
- If you are using your own pc Download and install Virtual box from the website.
- Download Debian OS
- Open virtual box and click new.
- type name="you can give it any name" type="linux/windows/Mac etc" version="according to what you downloaded as os in my case it debian (64-bit)", then press continue.
- select Memory size of your virtual Machine, normally 1024MB, then press continue.
- select create a new virtual hard disk, then press create.
- select VDI. then press continue.
- You can select storage on physical hard disk as dynamically allocated, then press continue.
- select hard disk file location (in case of 42 Mac you need to select goinfre folder inside your username folder) since i am doing bonus i am going to select 30.8GB size (if you are only doing mandatory part select 8GB), then press create.
- Now you can your virtual system on the left side section.
- select the virtual system you just created and click settings in the top navigation bar (the settings you see are for the selected virtual system).
- Inside settings you need to select the iso image of the operating system you want. For this you go to storage->attribute->Optical drive->click on the disk shape you see at the end of that row and goto the location where you saved the iso and select the iso image.
- Now select the virtual machine you just created and press start. After this the virtual box will look like as shown in the image below.
- Now new window will pop up with Debian installer menu as shown below, then select install (For this project graphical installation is not allowed).
- Now select the preferred language, then enter.
- Now select the location, since i am in uae iam going to select United Arab Emirates as shown below, then enter.
- Now configure the keyboard, select and enter.
- Now wait until it loads your preferences.
-
Enter the hostname for this system. (For this project you need to enter your + "42", for example if my is asharaf then hostanme will be "asharaf42", press continue.
-
Set the domain name as empty, press continue.
-
Set the root password, press continue.
-
Enter the root password again, press continue.
-
Set the new user name
-
Select Manual disk partitioning.
-
Select the SCSI3 (0, 0, 0) (sda) - 33.1 GB ATA VBOX HARDDISK, then continue.
-
Select yes for creating new partition table on this divice, then enter.
-
Now you have 33.1GB Free space set up that can be partitioned, select it, then press enter.
-
Select create new partition, then press enter.
-
Enter new partition size as shown below, then press continue.
-
Select type of new partition as shown below, then press enter.
-
Choose whether you want to partition at the end or beginning (select beginning), then press enter.
-
Now edit the partition settings as shown below, then select "Done setting up the partition" and press enter.(This partition is setting up as boot partition that's why we need to put boot flag on, normally for boot partition ex2 journal file systems are select since they are old and stable.)
-
Now select the remaining free space of 32.6 GB, then press enter.
-
select create new partition, then press enter.
-
Enter new partition size (just type "max" as maximum remaining space) as shown below, then press continue.
-
Select type of new partition as shown below, then press enter.
-
Now edit the partition settings as shown below, then select "Done setting up the partition" and press enter.
-
Now you have boot primary partition and logical partition setup.
-
Now select the "Configure the encrypted volume and press enter"
-
Select yes to write changes to the disk, then press enter.(Don't worry!)
-
Select "Create Encrypted volume", then press enter.
-
Select the partition you want to encrypt by pressing space bar, then select continue then press enter.
-
Select the Finish, then press enter.
-
Select to yes to erase the partition disk that you are going to encrypt, then press enter.
-
Wait for few minutes until the data is erased.
-
Enter the passphrase to do the encryption. (remember this passphrase, since you need to enter it every time starting the virtual machine.
-
Enter the passphrase again to confirm.
-
If you are using a weak passphrase you will be notified as shown below. select yes then press enter.
-
Now we are going to configure the logical volume manager for logical partion. select "Configure logical volume manager" and press enter.
-
Select yes to confirm.
-
Select "create volume group", then press enter.
-
Type the "volume group name" as shown below. Select continue then press enter.
-
Select device for the new volume group. (Use spacebar to select the device), then select continue and press enter.
-
Select "create logical volume", then press enter.
-
Select the volume group where new logical volume need to be added then press enter.
-
Type the name of new logical volume as shown below, then select continue and press enter.
-
Type the logical volume size as shown below, then select continue and press enter.
-
Select "create logical volume", then press enter.
-
Select the volume group where new logical volume need to be added then press enter.
-
Type the name of new logical volume as shown below, then select continue and press enter.
-
Type the logical volume size as shown below, then select continue and press enter.
-
Select "create logical volume", then press enter.
-
Select the volume group where new logical volume need to be added then press enter.
-
Type the name of new logical volume as shown below, then select continue and press enter.
-
Type the logical volume size as shown below, then select continue and press enter.
-
Select "create logical volume", then press enter.
-
Select the volume group where new logical volume need to be added then press enter.
-
Type the name of new logical volume as shown below, then select continue and press enter.
-
Type the logical volume size as shown below, then select continue and press enter.
-
Select "create logical volume", then press enter.
-
Select the volume group where new logical volume need to be added then press enter.
-
Type the name of new logical volume as shown below, then select continue and press enter.
-
Type the logical volume size as shown below, then select continue and press enter.
-
Select "create logical volume", then press enter.
-
Select the volume group where new logical volume need to be added then press enter.
-
Type the name of new logical volume as shown below, then select continue and press enter.
-
Type the logical volume size as shown below, then select continue and press enter.
-
Select "create logical volume", then press enter.
-
Select the volume group where new logical volume need to be added then press enter.
-
Type the name of new logical volume as shown below, then select continue and press enter.
- Type the logical volume size as shown below, then select continue and press enter.
-
Now you have created the all the logical volume we needed in this project we can select finish and press enter.
-
After finishing configuring LVM we get as shown below.
- Now we are going to change the partition settings of LV home to what we need
- Now we are going to change the partition settings of LV srv to what we need
- Now we are going to change the partition settings of LV swap to what we need
- Now we are going to change the partition settings of LV tmp to what we need
- Now we are going to change the partition settings of LV var to what we need
-
Now we are going to change the partition settings of LV var-log to what we need
-
After making all the changes as shown below select "Finish partitioning and write changes to disk".
- Select yes and press enter to confirm to write changes to the disks.
- wait minute or two to complete partioning of the disk.
-
Select no and press enter since we allready have the installation media selected and no need to add an additional device.
-
Select Debian archive mirror country and press enter.
-
Select the Debian archive mirror and press enter.
-
Keep Http proxy information as empty and select continue then press enter.
-
Select yes or no according to your choice then press enter.
- For this project we don't need any software and we need to unselect all and select continue then press enter.
- Select yes to install the Grub boot loader then press enter.
-
Select the divice for boot loader installation as shown below, then press enter.
- Your installation is complete. Now you can select continue and enter to boot newly installed virtual machine.
- Select Debian and press enter.
- Enter the passphrase you need.
- run lsblk.