Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

11 месяцев назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #+title: Lab2 Solution
  2. #+title: Amirlan Sharipov (BS21-CS-01)
  3. #+author: Amirlan Sharipov (BS21-CS-01)
  4. #+PROPERTY: header-args :results verbatim :exports both
  5. #+OPTIONS: ^:nil
  6. * Questions 1
  7. ** What is fdisk utility used for?
  8. to manipulate disk partition table
  9. ** Show the bootable device(s) on your machine, and identify which partition(s) are bootable.
  10. *** Output of fdisk -l:
  11. ...
  12. Device Start End Sectors Size Type
  13. /dev/sdb1 2048 34815 32768 16M Microsoft reserved
  14. /dev/sdb2 34816 524285951 524251136 250G Microsoft basic data
  15. /dev/sdb3 524285952 659988479 135702528 64.7G Linux filesystem
  16. /dev/sdb4 659988480 863920127 203931648 97.2G Linux filesystem
  17. /dev/sdb5 958291968 975173631 16881664 8G Linux swap
  18. /dev/sdb6 975173632 976773134 1599503 781M EFI System
  19. /dev/sdb7 863920128 956194815 92274688 44G Linux filesystem
  20. /dev/sdb8 956194816 958291967 2097152 1G EFI System
  21. *** Answer
  22. /dev/sdb6 and /dev/sdb8 are bootable partitions
  23. ** What is logical block address?
  24. is a scheme to index the locations of logical blocks of a device. Starts with LBA 0
  25. ** Why did we specify the count, the bs, and the skip options when using dd?
  26. Number of blocks, block size, and how many blocks to skip
  27. ** Why does a GPT formatted disk have the MBR?
  28. To maintain compatibility and protect GPT disk and from MBR-based disk utilities.
  29. ** Name two differences between primary and logical partitions in an MBR partitioning scheme
  30. There can be only 4 primary partitions in MBR disk, while there can be many logical ones on top of an extended partition. Some operating systems cannot boot from a logical partition.
  31. * Questions 2
  32. ** Why is Shim used to load the GRUB bootloader?
  33. To make Secure Boot mechanism work.
  34. ** Can you locate your grub configuration file? Show the path.
  35. /boot/grub/grub.cfg
  36. Also, there is /etc/default/grub which can be used to generate a grub config using grub-mkconfig
  37. ** According to the boot order, what is the third boot device on your computer? How did you check this?
  38. BootCurrent: 0003
  39. Timeout: 0 seconds
  40. BootOrder: 0003,0004,0009,0001,0002,0000,2001,0006,0005,2002,2003
  41. ...
  42. Boot0009* Artix HD(10,GPT,...
  43. It's Artix on my hard drive, accoding to efibootmgr -v
  44. * Questions 3
  45. ** How many inodes are in use on your system?
  46. #+begin_src bash
  47. df --output=source,iused
  48. #+end_src
  49. #+RESULTS:
  50. #+begin_example
  51. Filesystem IUsed
  52. dev 717
  53. run 1314
  54. /dev/sdb3 720461
  55. tmpfs 1
  56. tmpfs 22
  57. /dev/sdb4 677792
  58. /dev/sdb6 0
  59. tmpfs 71
  60. /dev/sda9 16193
  61. /dev/sda8 33171
  62. #+end_example
  63. ** What is the filesystem type of the EFI partition?
  64. FAT32
  65. ** What device is mounted at your root / directory? Show proof.
  66. #+begin_src bash
  67. lsblk
  68. #+end_src
  69. #+RESULTS:
  70. #+begin_example
  71. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
  72. sda 8:0 0 931.5G 0 disk
  73. ...
  74. sdb 8:16 0 465.8G 0 disk
  75. ├─sdb1 8:17 0 16M 0 part
  76. ├─sdb2 8:18 0 250G 0 part
  77. ├─sdb3 8:19 0 64.7G 0 part /
  78. ├─sdb4 8:20 0 97.2G 0 part /home
  79. ├─sdb5 8:21 0 8G 0 part [SWAP]
  80. ├─sdb6 8:22 0 781M 0 part /boot
  81. ├─sdb7 8:23 0 44G 0 part
  82. └─sdb8 8:24 0 1G 0 part
  83. #+end_example
  84. /dev/sdb3
  85. ** What is your partition UUID?
  86. For PARTUUID:
  87. #+begin_src bash
  88. lsblk -dno PARTUUID /dev/sdb3
  89. #+end_src
  90. #+RESULTS:
  91. : fbef9613-fbf5-8445-8d1c-7a63709d1229
  92. ** Show at least two methods of viewing the UUID of a block device.
  93. lsblk -dno UUID /dev/sdb3
  94. blkid
  95. ** What is the function of /dev/zero?
  96. Source of zero bytes. Can be used with dd to fill a file with zeros.