1. To make the swap: # mkswap /dev/sdf 2. To check the device (if it is a block device) for bad blocks: # mkswap -c /dev/sdf 3. To Force – go ahead even if the command is stupid: # mkswap -f /def/sdf 4. To Specify the page size to use: # mkswap -p PAGESIZE 5. ...
Command (m for help):t修改分区类型 Partition number (1-9):9选择需要修改类型的分区 Hex code (type L to list codes):L 查看系统支持的所有分区类型 0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris 1 FAT12 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT- 2 XENIX root 3c Partitio...
Command (m for help):t (调整文件系统类型) Partition number (1-8): L Partition number (1-8): 8 Hex code (type L to list codes): 82(调整文件系统类型为 Linux swap / Solaris) Changed system type of partition 8 to 82 (Linux swap / Solaris) Command (m for help): p Disk /dev/sdb...
Note:In the output of swapon -s command, the Type column will say “file” if the swap space is created from a swap file. If you don’t want to reboot to verify whether the system takes all the swap space mentioned in the /etc/fstab, you can do the following, which will disable ...
if it is omitted. Specifying it is unwise – a typo may destroy your disk.) After creating the swap area, you need theswaponcommand to start using it. Usually swap areas are listed in/etc/fstabso that they can be taken into use at boot time by aswapon-acommand in some boot script....
Partition table entries are not in disk order 可以看到我的磁盘又一个/dev/sdb2的windows扩展分区,其中sdb5-sdb8属于该扩展分区。/dev/sdb1,dev/sdb3属于Linux系统分区。现在我删除/dev/sdb1作为swap分区。 Command (m for help): d Partition number (1-8): 1 ...
Partition table entries are not in disk order 可以看到我的磁盘又一个/dev/sdb2的windows扩展分区,其中sdb5-sdb8属于该扩展分区。/dev/sdb1,dev/sdb3属于Linux系统分区。现在我删除/dev/sdb1作为swap分区。 Command (m for help): d Partition number (1-8): 1 ...
Note:In the output of swapon -s command, the Type column will say “partition” if the swap space is created from a disk partition. Method 2: Use a File for Additional Swap Space If you don’t have any additional disks, you can create a file somewhere on your filesystem, and use th...
Let's a swap file within our filesystem. We will create a file calledswapfilein our root (/) directory. First, we must allocate the amount of space that we want for our swap file usingfallocatecommand which creates a file of a preallocated size (2G): ...