首页 > Linux操作系统 > Linux操作系统 > SWAP分区的重新创建
第一种方法:新建一个swap分区
1、对硬盘进行分区。
#fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 69.7 GB, 69793218560 bytes
255 heads, 63 sectors/track, 8485 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Command (m for help): n
Command action
e extended
p primary partition (1-4)
Selected partition 4
First cylinder (1828-8485, default 1828): 5222
Last cylinder or +size or +sizeM or +sizeK (5222-8485, default 8485): 7309
Command (m for help): t
Partition number (1-4): 4
Hex code (type L to list codes): 82
Changed system type of partition 4 to 82 (Linux swap / Solaris)
Command (m for help): p
Disk /dev/sda: 69.7 GB, 69793218560 bytes
255 heads, 63 sectors/track, 8485 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/18841027/viewspace-1061573/ ,如需转载,请注明出处,否则将追究法律责任。