如何让Deepin开机自动挂载SWAP分区?
Tofloor
poster avatar
166******72
deepin
2016-02-24 03:39
Author
启用SWAP成功,但是重启后又变成“禁用”了,需再次手动启用。网上说要编辑一下fstab文件才能实现开机自动挂载SWAP分区,但我不知怎么改。
附图:
/dev/sdb3是当前正在使用的SWAP分区。

这是系统的fstab文件的当前内容。

顺便问问,能不能多个Linux系统共用同一个SWAP分区?如果能就直接用/dev/sdb6的那个,那个是Ubuntu Kylin的。

Reply Favorite View the author
All Replies
avatar
android
deepin
2016-02-24 03:59
#1
swap分区可以公用的
Reply View the author
avatar
166******72
deepin
2016-02-24 04:02
#2
https://bbs.deepin.org/post/37416
swap分区可以公用的

哦,那如何让Deepin开机自动挂载SWAP分区?
Reply View the author
avatar
android
deepin
2016-02-24 04:12
#3
本帖最后由 android 于 2016-2-23 20:17 编辑

在fstab 后面加/dev/sdb3              none          swap      defaults                0      0
Reply View the author
avatar
android
deepin
2016-02-24 04:17
#4
重新 编辑了 第一次的应该错了
Reply View the author
avatar
166******72
deepin
2016-02-24 04:42
#5
本帖最后由 angrysnowbear 于 2016-2-23 20:59 编辑
https://bbs.deepin.org/post/37416
重新 编辑了 第一次的应该错了

你是说
/deepin/disks/swap.disk none            swap    loop,sw         0       0
这一段?这一段是系统自己加上去的。
还有,这样可以不
/dev/sdb6              none          swap      defaults                0      0
因为/dev/sdb6的那个是Ubuntu Kylin的,既然SWAP分区可以共用,那我直接使用/dev/sdb6这个行不?
Reply View the author
avatar
Ethan
deepin
2016-02-24 04:48
#6
哥们,swap不用挂载的。直接二进制用的。没有文件系统格式
Reply View the author
avatar
166******72
deepin
2016-02-24 05:00
#7
https://bbs.deepin.org/post/37416
哥们,swap不用挂载的。直接二进制用的。没有文件系统格式

重启就无效了,不懂别瞎bb。
Reply View the author
avatar
android
deepin
2016-02-24 05:06
#8
https://bbs.deepin.org/post/37416
重启就无效了,不懂别瞎bb。

重装系统的时候会自动启用swap分区吧
Reply View the author
avatar
android
deepin
2016-02-24 05:08
#9
https://bbs.deepin.org/post/37416
你是说
/deepin/disks/swap.disk none            swap    loop,sw         0       0
这一段?这一段是系 ...

嗯 sdb3也是swap分区啊?
Reply View the author
avatar
166******72
deepin
2016-02-24 05:10
#10
https://bbs.deepin.org/post/37416
重装系统的时候会自动启用swap分区吧

没用,Deepin默认禁用SWAP。
Reply View the author
avatar
android
deepin
2016-02-24 05:14
#11
https://bbs.deepin.org/post/37416
没用,Deepin默认禁用SWAP。

你用的是类似虚拟磁盘的安装方式,所以swap也是用的swap.disk这个文件模拟的
Reply View the author
avatar
166******72
deepin
2016-02-24 05:16
#12
https://bbs.deepin.org/post/37416
嗯 sdb3也是swap分区啊?

这样可以么?


Reply View the author
avatar
android
deepin
2016-02-24 05:23
#13

你复制上面的一行 把前面的分区换掉 然后倒数第三行的 ‘loop,’删除
Reply View the author
avatar
166******72
deepin
2016-02-24 05:31
#14
本帖最后由 angrysnowbear 于 2016-2-23 22:05 编辑
https://bbs.deepin.org/post/37416
你复制上面的一行 把前面的分区换掉 然后倒数第三行的 ‘loop,’删除

/dev/sdb6              none          swap       defaults                0      0
13楼的那样就行了。
Reply View the author
avatar
166******72
deepin
2016-02-24 06:08
#15
https://bbs.deepin.org/post/37416
你用的是类似虚拟磁盘的安装方式,所以swap也是用的swap.disk这个文件模拟的 ...

也许是,但是那个文件不知为何挂载不了。然后我自己重新设置了SWAP,倒是行了。
Reply View the author