Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam EX200 topic 1 question 49 discussion

Actual exam question from RedHat's EX200
Question #: 49
Topic #: 1
[All EX200 Questions]

SIMULATION -
Make a swap partition having 100MB. Make Automatically Usable at System Boot Time.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
Use fdisk /dev/hda ->To create new partition.

Type n-> For New partition -
It will ask for Logical or Primary Partitions. Press l for logical.
It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.
Type the Size: +100M ->You can Specify either Last cylinder of Size here.
Press P to verify the partitions lists and remember the partitions name. Default System ID is 83 that means Linux Native.
Type t to change the System ID of partition.

Type Partition Number -
Type 82 that means Linux Swap.
Press w to write on partitions table.
Either Reboot or use partprobe command.
mkswap /dev/hda? ->To create Swap File system on partition.
swapon /dev/hda? ->To enable the Swap space from partition.
free -m ->Verify Either Swap is enabled or not.
vi /etc/fstab/dev/hda? swap swap defaults 0 0
Reboot the System and verify that swap is automatically enabled or not.

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
cytron
Highly Voted 3 years, 5 months ago
In RHEL8 for fstab configuration is not more recommended to use absolute patch to the device like /dev/sda7. The recommendation is to use the UUID identifier instead. To get the swap or any other filesystem's UUID use the command blkid. This will show you all filesystems UUIDs in example: /dev/sda7: UUID="361ed5b5-872a-4e49-ba70-91efb28b2bb4" TYPE="swap" PARTUUID="caa5e8f6-01" Copy the section UUID="361ed5b5-872a-4e49-ba70-91efb28b2bb4" and use it in fstab as follows. UUID="361ed5b5-872a-4e49-ba70-91efb28b2bb4" swap swap defaults 0 0 reboot and verify swap is on free -m
upvoted 5 times
kitkat
1 year, 10 months ago
We will need to create 100MB partition. Those steps are missing.
upvoted 1 times
kitkat
1 year, 10 months ago
However what you mentioned is correct that we should use UUID in fstab.
upvoted 1 times
...
...
...
kenkct
Highly Voted 2 years, 1 month ago
$sudo su #lsblk -psf #fdisk /dev/sd[x] #n #t #82 #mkswap /dev/sd[x] #swapon /dev/sd[x] #echo '/dev/sd[v] swap swap defaults 0 0' >> /etc/fstab #systemctl daemon-reload #mount -a #lsblk -psf
upvoted 5 times
...
ANI_04
Most Recent 2 years, 6 months ago
$ fdisk /dev/sda # change the partition type to swap $ partprobe $ echo " /dev/sdb1 swap swap defaults 0 0 " >> /etc/fstab $ mkswap /dev/sdb1 $ swapon -a
upvoted 2 times
...
nickoftime
2 years, 11 months ago
parted /dev/sdx mklabel msdos parted /dev/sdx mkpart linux-swap 1MiB 100Mib udevadm settle mkswap /dev/sdx1 (UUID checked) fstab add UUID=XXX swap swap defaults 0 0 systemctl daemon-reload swapon -a swapon --show
upvoted 4 times
noobmaster96
2 years, 4 months ago
my problem with parted is that if i do 1MiB to 100Mib, will that be just 99MiB? Are they particular with that area?
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...