Difficulty: Easy
Correct Answer: 82 and 83
Explanation:
Introduction / Context:
On MBR-partitioned disks, fdisk assigns a one-byte hexadecimal type to each partition. Correctly labeling partitions ensures the operating system recognizes their intended use, such as swap or a Linux filesystem. Although GPT now uses GUIDs, many legacy systems and exams still reference these classic MBR codes.
Given Data / Assumptions:
Concept / Approach:
The standard codes are: 0x82 = Linux swap and 0x83 = Linux native filesystem (for ext2/3/4, xfs when using MBR). Setting these correctly helps tools like the initramfs, swapon, and mount identify partitions at boot.
Step-by-Step Solution:
Create partitions with fdisk.Use the “t” command to set types: enter 82 for swap and 83 for native.Format swap via mkswap and filesystems via mkfs.ext4 or similar.Add entries to /etc/fstab for persistence and test with swapon --show and findmnt.
Verification / Alternative check:
Use blkid to confirm types and UUIDs. lsblk -f also displays filesystem and mount information for quick verification.
Why Other Options Are Wrong:
92/93 and 63/64: not standard Linux swap/native MBR codes.82 and 85: 85 is typically Linux extended partition on some tools, not Linux native filesystem.
Common Pitfalls:
Final Answer:
82 and 83
Discussion & Comments