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.
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
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
...
...
Log in to ExamTopics
Sign in:
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.
cytron
Highly Voted 2 years, 2 months agokitkat
6 months, 4 weeks agokitkat
6 months, 4 weeks agokenkct
Highly Voted 10 months, 2 weeks agoANI_04
Most Recent 1 year, 3 months agonickoftime
1 year, 8 months agonoobmaster96
1 year, 1 month ago