Skip to content

Latest commit

 

History

History
474 lines (237 loc) · 29.4 KB

README.md

File metadata and controls

474 lines (237 loc) · 29.4 KB

42 Cursus Project: Born2beRoot

  • 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 ***

Initial Setup

  • 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").

Screen Shot 2022-03-13 at 10 07 14 AM

  • If you are using your own pc Download and install Virtual box from the website.

Screen Shot 2022-03-13 at 10 07 14 AM

  • Download Debian OS

Screen Shot 2022-03-13 at 10 05 20 AM

  • 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.

Screen Shot 2022-03-13 at 9 53 49 AM

  • select Memory size of your virtual Machine, normally 1024MB, then press continue.

Screen Shot 2022-03-13 at 9 55 02 AM

  • select create a new virtual hard disk, then press create.

Screen Shot 2022-03-13 at 9 55 50 AM

  • select VDI. then press continue.

Screen Shot 2022-03-13 at 9 56 29 AM

  • You can select storage on physical hard disk as dynamically allocated, then press continue.

Screen Shot 2022-03-13 at 9 57 33 AM

  • 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.

Screen Shot 2022-03-13 at 9 58 31 AM

Screen Shot 2022-03-13 at 9 58 55 AM

  • Now you can your virtual system on the left side section.

Screen Shot 2022-03-13 at 10 00 54 AM

  • 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).

Screen Shot 2022-03-13 at 10 02 02 AM

  • 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.

Screen Shot 2022-03-13 at 10 03 19 AM

  • 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.

after initial setup

Setting up user preferences

  • Now new window will pop up with Debian installer menu as shown below, then select install (For this project graphical installation is not allowed).

Debian Installer menu

  • Now select the preferred language, then enter.

select language

  • Now select the location, since i am in uae iam going to select United Arab Emirates as shown below, then enter.

location 2

location 1

location 3

  • Now configure the keyboard, select and enter.

configure the keyboard

  • Now wait until it loads your preferences.

initial setup final loading

Configure the network

  • 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.

    Screen Shot 2022-03-13 at 10 16 59 AM
  • Set the domain name as empty, press continue.

    Screen Shot 2022-03-13 at 10 21 13 AM
  • Set the root password, press continue.

    Screen Shot 2022-03-13 at 10 22 13 AM
  • Enter the root password again, press continue.

    Screen Shot 2022-03-13 at 10 23 00 AM
  • Set the new user name

Screen Shot 2022-03-13 at 10 23 38 AM

  • Set the new user password.

    Screen Shot 2022-03-13 at 10 24 22 AM
  • Enter the new password again, then continue.

    Screen Shot 2022-03-13 at 10 24 59 AM

Partition disks

  • Select Manual disk partitioning.

    Screen Shot 2022-03-13 at 10 33 03 AM
  • Select the SCSI3 (0, 0, 0) (sda) - 33.1 GB ATA VBOX HARDDISK, then continue.

    Screen Shot 2022-03-13 at 10 36 01 AM
  • Select yes for creating new partition table on this divice, then enter.

    Screen Shot 2022-03-13 at 10 38 56 AM
  • Now you have 33.1GB Free space set up that can be partitioned, select it, then press enter.

    Screen Shot 2022-03-13 at 10 39 58 AM
  • Select create new partition, then press enter.

Screen Shot 2022-03-13 at 10 40 22 AM

  • Enter new partition size as shown below, then press continue.

    Screen Shot 2022-03-13 at 10 41 56 AM
  • Select type of new partition as shown below, then press enter.

    Screen Shot 2022-03-13 at 10 52 47 AM
  • Choose whether you want to partition at the end or beginning (select beginning), then press enter.

    Screen Shot 2022-03-13 at 10 53 05 AM
  • 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.)

    Screen Shot 2022-03-13 at 10 54 35 AM
  • Now select the remaining free space of 32.6 GB, then press enter.

    Screen Shot 2022-03-13 at 10 55 35 AM
  • select create new partition, then press enter.

    Screen Shot 2022-03-13 at 10 56 08 AM
  • Enter new partition size (just type "max" as maximum remaining space) as shown below, then press continue.

    Screen Shot 2022-03-13 at 10 56 29 AM
  • Select type of new partition as shown below, then press enter.

    Screen Shot 2022-03-13 at 10 56 44 AM
  • Now edit the partition settings as shown below, then select "Done setting up the partition" and press enter.

    Screen Shot 2022-03-13 at 10 57 19 AM
  • Now you have boot primary partition and logical partition setup.

    Screen Shot 2022-03-13 at 10 57 47 AM
  • Now select the "Configure the encrypted volume and press enter"

    Screen Shot 2022-03-13 at 10 58 17 AM
  • Select yes to write changes to the disk, then press enter.(Don't worry!)

    Screen Shot 2022-03-13 at 10 58 37 AM
  • Select "Create Encrypted volume", then press enter.

    Screen Shot 2022-03-13 at 10 58 59 AM
  • Select the partition you want to encrypt by pressing space bar, then select continue then press enter.

    Screen Shot 2022-03-13 at 10 59 22 AM
  • Select the Finish, then press enter.

    Screen Shot 2022-03-13 at 10 59 47 AM
  • Select to yes to erase the partition disk that you are going to encrypt, then press enter.

    Screen Shot 2022-03-13 at 11 00 25 AM
  • Wait for few minutes until the data is erased.

    Screen Shot 2022-03-13 at 11 00 58 AM
  • Enter the passphrase to do the encryption. (remember this passphrase, since you need to enter it every time starting the virtual machine.

    Screen Shot 2022-03-13 at 12 18 27 PM
  • Enter the passphrase again to confirm.

    Screen Shot 2022-03-13 at 12 18 56 PM
  • If you are using a weak passphrase you will be notified as shown below. select yes then press enter.

    Screen Shot 2022-03-13 at 12 19 42 PM
  • Now we are going to configure the logical volume manager for logical partion. select "Configure logical volume manager" and press enter.

    Screen Shot 2022-03-13 at 12 20 19 PM
  • Select yes to confirm.

    Screen Shot 2022-03-13 at 12 20 59 PM
  • Select "create volume group", then press enter.

    Screen Shot 2022-03-13 at 12 21 29 PM
  • Type the "volume group name" as shown below. Select continue then press enter.

    Screen Shot 2022-03-13 at 12 22 27 PM
  • Select device for the new volume group. (Use spacebar to select the device), then select continue and press enter.

    Screen Shot 2022-03-13 at 12 22 54 PM
  • Select "create logical volume", then press enter.

    Screen Shot 2022-03-13 at 12 24 38 PM
  • Select the volume group where new logical volume need to be added then press enter.

    Screen Shot 2022-03-13 at 12 25 00 PM
  • Type the name of new logical volume as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 25 48 PM
  • Type the logical volume size as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 26 31 PM
  • Select "create logical volume", then press enter.

    Screen Shot 2022-03-13 at 12 27 33 PM
  • Select the volume group where new logical volume need to be added then press enter.

    Screen Shot 2022-03-13 at 12 27 59 PM
  • Type the name of new logical volume as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 28 46 PM
  • Type the logical volume size as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 29 56 PM
  • Select "create logical volume", then press enter.

    Screen Shot 2022-03-13 at 12 30 26 PM
  • Select the volume group where new logical volume need to be added then press enter.

    Screen Shot 2022-03-13 at 12 30 56 PM
  • Type the name of new logical volume as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 31 30 PM
  • Type the logical volume size as shown below, then select continue and press enter.

Screen Shot 2022-03-13 at 12 32 21 PM

  • Select "create logical volume", then press enter.

    Screen Shot 2022-03-13 at 12 32 54 PM
  • Select the volume group where new logical volume need to be added then press enter.

Screen Shot 2022-03-13 at 12 35 05 PM

  • Type the name of new logical volume as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 35 56 PM
  • Type the logical volume size as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 37 13 PM
  • Select "create logical volume", then press enter.

    Screen Shot 2022-03-13 at 12 38 04 PM
  • Select the volume group where new logical volume need to be added then press enter.

Screen Shot 2022-03-13 at 12 38 25 PM

  • Type the name of new logical volume as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 39 00 PM
  • Type the logical volume size as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 39 27 PM
  • Select "create logical volume", then press enter.

    Screen Shot 2022-03-13 at 12 39 58 PM
  • Select the volume group where new logical volume need to be added then press enter.

    Screen Shot 2022-03-13 at 12 40 14 PM
  • Type the name of new logical volume as shown below, then select continue and press enter.

Screen Shot 2022-03-13 at 12 40 56 PM

  • Type the logical volume size as shown below, then select continue and press enter.

    Screen Shot 2022-03-13 at 12 41 45 PM
  • Select "create logical volume", then press enter.

Screen Shot 2022-03-13 at 12 42 20 PM

  • Select the volume group where new logical volume need to be added then press enter.

    Screen Shot 2022-03-13 at 12 42 37 PM
  • Type the name of new logical volume as shown below, then select continue and press enter.

Screen Shot 2022-03-13 at 12 43 11 PM

  • Type the logical volume size as shown below, then select continue and press enter.

Screen Shot 2022-03-13 at 12 43 56 PM

  • Now you have created the all the logical volume we needed in this project we can select finish and press enter.

    Screen Shot 2022-03-13 at 12 44 24 PM
  • After finishing configuring LVM we get as shown below.

Screen Shot 2022-03-13 at 12 45 39 PM

  • Now we are going to change the partition settings of LV home to what we need

Screen Shot 2022-03-13 at 1 59 49 PM

Screen Shot 2022-03-13 at 2 01 06 PM

  • Now we are going to change the partition settings of LV root to what we need

    Screen Shot 2022-03-13 at 2 02 18 PM

Screen Shot 2022-03-13 at 2 02 40 PM

  • Now we are going to change the partition settings of LV srv to what we need

Screen Shot 2022-03-13 at 2 03 33 PM

Screen Shot 2022-03-13 at 2 04 03 PM

  • Now we are going to change the partition settings of LV swap to what we need

Screen Shot 2022-03-13 at 2 05 12 PM

Screen Shot 2022-03-13 at 2 06 18 PM

  • Now we are going to change the partition settings of LV tmp to what we need

Screen Shot 2022-03-13 at 2 08 00 PM

Screen Shot 2022-03-13 at 2 08 27 PM

  • Now we are going to change the partition settings of LV var to what we need

Screen Shot 2022-03-13 at 2 08 53 PM

Screen Shot 2022-03-13 at 2 09 50 PM

  • Now we are going to change the partition settings of LV var-log to what we need Screen Shot 2022-03-13 at 2 10 43 PM

    Screen Shot 2022-03-13 at 2 11 42 PM
  • After making all the changes as shown below select "Finish partitioning and write changes to disk".

    Screen Shot 2022-03-13 at 2 13 27 PM
    • Select yes and press enter to confirm to write changes to the disks.
    Screen Shot 2022-03-13 at 2 14 10 PM
    • wait minute or two to complete partioning of the disk.
    Screen Shot 2022-03-13 at 2 16 47 PM

Configure the package manager

  • Select no and press enter since we allready have the installation media selected and no need to add an additional device.

    Screen Shot 2022-03-13 at 2 19 03 PM
  • Select Debian archive mirror country and press enter.

    Screen Shot 2022-03-13 at 2 20 48 PM
  • Select the Debian archive mirror and press enter.

    Screen Shot 2022-03-13 at 2 21 17 PM
  • Keep Http proxy information as empty and select continue then press enter.

    Screen Shot 2022-03-13 at 2 22 57 PM
  • wait a minute or two. Screen Shot 2022-03-13 at 2 23 26 PM

  • Select yes or no according to your choice then press enter.

    Screen Shot 2022-03-13 at 2 24 17 PM
    • For this project we don't need any software and we need to unselect all and select continue then press enter.
    Screen Shot 2022-03-13 at 2 26 13 PM
    • Select yes to install the Grub boot loader then press enter.
  • Screen Shot 2022-03-13 at 2 26 45 PM
  • Select the divice for boot loader installation as shown below, then press enter.

    Screen Shot 2022-03-13 at 2 30 32 PM
    • Your installation is complete. Now you can select continue and enter to boot newly installed virtual machine.

Screen Shot 2022-03-13 at 2 31 32 PM

  • Select Debian and press enter.

Screen Shot 2022-03-13 at 2 36 46 PM

  • Enter the passphrase you need.

Screen Shot 2022-03-13 at 2 37 06 PM

  • run lsblk.

Screen Shot 2022-03-13 at 2 36 01 PM