当前位置: 技术问答>linux和unix
请教:使用mkswap /dev/hdaX 之后可使用任意数字来规定swap分区大小
来源: 互联网 发布时间:2014-12-06
本文导语: 如:mkswap /dev/hdaX 2000000 | Hi Kelamayi, As said in manual of mkswap, it is "unwise" to specify size to invoke mkswap. What you need to do is mkswap /dev/hdaX to initialize this partition as a swap partition. and...
如:mkswap /dev/hdaX 2000000
|
Hi Kelamayi,
As said in manual of mkswap, it is "unwise" to specify size
to invoke mkswap. What you need to do is
mkswap /dev/hdaX to initialize this partition as a swap partition.
and then you can use "swapon" to activate it. Or add a swap entry
in /etc/fstab, then use "swapon -a" to activate it.
/dev/hdaX swap swap defaults 0 0
And "swapon -a" will be run automatically after reboot.
Enjoy!
Orsino
As said in manual of mkswap, it is "unwise" to specify size
to invoke mkswap. What you need to do is
mkswap /dev/hdaX to initialize this partition as a swap partition.
and then you can use "swapon" to activate it. Or add a swap entry
in /etc/fstab, then use "swapon -a" to activate it.
/dev/hdaX swap swap defaults 0 0
And "swapon -a" will be run automatically after reboot.
Enjoy!
Orsino
|
你先用fdisk划一个分区,大小随你定,然后再用mkswap转一下,如何?