Formating Disk in Linux (revision 151117-r01)¶
First Part: Disk formatting tutorial
- In Lab00, we had created three different partitions in our flash disks. Please look at the device disk list.
$cat /proc/partitions|grep sd*
Find out which one is the flash disk by counting the number of partitions. Your flash disk, for example, if positioned in sdc, will result in sdc1, sdc2, sdc3.
- Please save the output above in "hasil.txt" by using:
$cat /proc/partitions|grep sd > hasil.txt
- sda, sdb, sdc, sdd are well known as block device file. Those file are representation of I/O devices such as hard disk, flash disk, memory card, and CD/DVD ROM. Those devices write the data in block in hard disk. Block is byte sequence with a particular size like 512 bytes or 4 kilobytes.
- Block device's file is located in /dev. Please cek for sda's file in /dev
$ls -lah /dev/sda*
- Please save the output into "hasil.txt".
$ls -lah /dev/sda* >> hasil.txt
- Your task is to FORMAT the first partition of your flash disk (the one that contains YUMI, around 3,5 GB size) from FAT32 to EXT3 and change the name to be your NPM.
- Afterwards, please mount the partition and go to the partition in Terminal.
$ Please download Tiny Core iso from Kambing into the partition.
$ sudo wget http://kambing.ui.ac.id/tinycorelinux/4.x/x86/release/TinyCore-current.iso
- Please do the command below to save the result list to your directory. Important: REPLACE sdc on the second line of command with your flash disk partition, should your partition is positioned on different block such as sdd. Also replace your_username with your username in the Ubuntu, [KELAS] with your class, [NPM] with your student ID/NPM.
$ ls -al >> /home/your_username/[KELAS]/[NPM]/Lab09/hasil.txt $ sudo /sbin/blkid | grep /dev/sdc >> /home/your_username/[KELAS]/[NPM]/Lab09/hasil.txt
- Please look the content of "hasil.txt".
$ cd /home/your_username/[KELAS]/[NPM]/Lab09 $ cat hasil.txt
- Please write the steps to format the partition on WHAT-IS-THIS.txt.