Sunteți pe pagina 1din 9

Course 3: Operating Systems and You:

Becoming a Power User

Week 4: Partitioning and Formatting a Disk Drive in Linux


Urmariti instructiunile intocmai.
Primul exercitiu
Comanda: lsblk o adaugam in dashboard-ul din partea stanga (fundalul negru) + Enter
Vor aparea 2 disk drives: sda si sdb
Atentie la notite:
Note: These may be swapped for you, and your VM may be mounted on sda instead of
sdb. This will change the commands used in the lab, so when you see \[MOUNT DRIVE\]
replace it with your mount drive (sda or sdb) and when you see \[SECOND DRIVE\] replace
it with the other one. If your VM is mounted on sda, the screenshots will also be flipped
from what you will see.
Adica, daca la sda – apare /etc/hosts , atunci acest disk este partitionat. Noi va trebui sa il
partitionam pe celalalt DISK DRIVE, sdb. Sau invers. Verificati, poate fi diferit, decat in
screenshot-ul dat la instructiuni.
Comanda: sudo fdisk /dev/[SECOND DRIVE] – in loc de [SECOND DRIVE], notam sdb –
comanda va fi sudo fdisk /dev/sdb +Enter (sau disk drive-ul care nu e mounted/partitionat
– cel care nu are /etc/hosts la Mountpoint)

Scrieti in prompt – fondul negru q pentru a va aduce inapoi la user-ul dvs.

Comanda: sudo fdisk /dev/[SECOND DRIVE] – adica sudo fdisk /dev/sdb

Stergem cele 12 partitii prin comanda d + Enter + Enter


Repetam comanda de 12 ori - pana cand ultima partitie este stearsa - cand apare Partition 1 has
been deleted.

Apoi cream o noua partitie folosind comnada n + Enter + Enter + Enter – pana cand apare Last sector:
la Last sector .... scriem 2097200 – exact dupa modelul de mai jos + Enter.

Apoi cream o noua partitie tot prin comanda n + Enter + Enter + Enter+ Enter- exact dupa modelul de
mai jos.

Schimbam partitia prin comanda t + Enter

La Partition number : scriem 1 + Enter


Apoi scriem L pentru a listat toate tipurile de partitii
Etc.

La Partition type scriem 19

Comanda v +Enter – pentru a vizualiza modificarile realizate

Comanda w + Enter – pentru a valida modificarile realizate


Verificati prin Check my progress -

Verificati sa fi primit punctajul pentru primul exercitiu – 10/10 – patratul galben din partea stanga

sus. - Click pe patrat.

Exercitiul 2: Formatting partitions using mkfs

Comanda: lsblk + Enter

Format the second partition in your unmounted drive (sdb2 or sda2) to ext4 using this command:
Adica in acest screenshot sda1 este formatat – deoarece apare unde este disk drive-ul formatat – in
Mountpoint /etc/hosts . Atunci trebuie sa formatat second partition from my unmounted drive –
adica daca sdb este neformatat, alegem sdb2 (second partition). Atentie cum va aparea la voi.

Comanda: sudo mkfs -t ext4 /dev/[SECOND DRIVE]2 – adica sudo mkfs -t ext4 /dev/sdb2 + Enter

Click check my progress – apare bifa verde – OK.

Verificam si puctajul pentru exercitiu 2 – 10/10

Exercitiul 3: Mount – se merge mai departe

Comanda: sudo mount /dev/[SECOND DRIVE]2 /home/my_drive – adica sudo mount /dev/sda2
/home/my_drive

Comanda lsblk
Check my progress + la puncte un total de 30/30 .

End lab.

S-ar putea să vă placă și