swap开机时无法激活

其他Linux/Unix/BSD/OSX等发行版讨论
回复
头像
linux5588
帖子: 305
注册时间: 2010-07-05 16:10
系统: Macos

swap开机时无法激活

#1

帖子 linux5588 » 2011-01-09 22:37

开机是提示swap激活失败。
fdisk -l 还能显示swap分区
/dev/sda8 * 573440238 573825734 192748+ 83 Linux
Partition 8 does not start on physical sector boundary.
/dev/sda9 573825798 622647269 24410736 83 Linux
Partition 9 does not start on physical sector boundary.
/dev/sda10 622647333 625137344 1245006 82 Linux swap / Solaris
Partition 10 does not start on physical sector boundary.

df 看不到swap信息

还有开机时几个失败。闪的太快,没有看到呢?
我不知道在/var/log/里看哪个日志可以找到失败的信息呢
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: swap开机时无法激活

#2

帖子 cuihao » 2011-01-09 22:43

代码: 全选

sudo swapon /dev/sda10
看看什么效果。
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
头像
linux5588
帖子: 305
注册时间: 2010-07-05 16:10
系统: Macos

Re: swap开机时无法激活

#3

帖子 linux5588 » 2011-01-10 15:25

cuihao 写了:

代码: 全选

sudo swapon /dev/sda10
看看什么效果。
[arch@arch ~]$ sudo swapon /dev/sda10
swapon: /dev/sda10: swapon failed: Device or resource busy

[arch@arch ~]$ sudo mkswap /dev/sda10
/dev/sda10: Device or resource busy
头像
cnkilior
论坛版主
帖子: 4984
注册时间: 2007-08-05 17:40

Re: swap开机时无法激活

#4

帖子 cnkilior » 2011-01-10 19:32

df 是看不到swap以及未挂载的设备的。
请贴出详细的fdisk -l
头像
cnkilior
论坛版主
帖子: 4984
注册时间: 2007-08-05 17:40

Re: swap开机时无法激活

#5

帖子 cnkilior » 2011-01-10 19:33

以及以及,free -m
头像
linux5588
帖子: 305
注册时间: 2010-07-05 16:10
系统: Macos

Re: swap开机时无法激活

#6

帖子 linux5588 » 2011-01-10 23:29

[arch@arch ~]$ sudo fdisk -l
Password:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xae56ae56

Device Boot Start End Blocks Id System
/dev/sda1 * 63 40965749 20482843+ 7 HPFS/NTFS
Partition 1 does not start on physical sector boundary.
/dev/sda2 40965750 625137344 292085797+ f W95 Ext'd (LBA)
Partition 2 does not start on physical sector boundary.
/dev/sda5 40965813 143364059 51199123+ 7 HPFS/NTFS
Partition 5 does not start on physical sector boundary.
/dev/sda6 143364123 327677804 92156841 7 HPFS/NTFS
Partition 6 does not start on physical sector boundary.
/dev/sda7 327677868 573440174 122881153+ 7 HPFS/NTFS
Partition 7 does not start on physical sector boundary.
/dev/sda8 * 573440238 573825734 192748+ 83 Linux
Partition 8 does not start on physical sector boundary.
/dev/sda9 573825798 622647269 24410736 83 Linux
Partition 9 does not start on physical sector boundary.
/dev/sda10 622647333 625137344 1245006 82 Linux swap / Solaris
Partition 10 does not start on physical sector boundary.
[arch@arch ~]$



[arch@arch ~]$ free -m
total used free shared buffers cached
Mem: 1941 1611 329 0 580 749
-/+ buffers/cache: 281 1659
Swap: 1215 0 1215
[arch@arch ~]$

看吧。。就这么多了
头像
poweroff
帖子: 395
注册时间: 2008-12-13 15:03

Re: swap开机时无法激活

#7

帖子 poweroff » 2011-01-11 12:15

你的swap不是已经激活了吗!!!!
total used free shared buffers cached
Mem: 1941 1611 329 0 580 749
-/+ buffers/cache: 281 1659
Swap: 1215 0 1215

你的/etc/fstab中估计已经写好了swap的自动挂载。
一条狗的马甲!
对不起,我承认我是一只穿着马甲的狗!
头像
linux5588
帖子: 305
注册时间: 2010-07-05 16:10
系统: Macos

Re: swap开机时无法激活

#8

帖子 linux5588 » 2011-01-11 21:09

[arch@arch /]$ cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0

#/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
#/dev/fd0 /media/fl auto user,noauto 0 0

/dev/sda swap swap defaults 0 0
/dev/sda10 swap swap defaults 0 0
/dev/sda8 /boot ext4 defaults 0 1
/dev/sda9 / ext4 defaults 0 1

/dev/sda5 /media/D ntfs-3g locharset=utf8,umask=000 00
/dev/sda6 /media/E ntfs-3g locharset=utf8,umask=000 00
/dev/sda7 /media/F ntfs-3g locharset=utf8,umask=000 00

可是我开机启动时显示的是失败呀。
头像
alpha.gu
帖子: 1456
注册时间: 2006-09-10 16:06
联系:

Re: swap开机时无法激活

#9

帖子 alpha.gu » 2011-01-12 12:50

自从有一次看到用文件方式来做swap之后,我的机器上就再没有过swap分区,只有swap文件。
jtshs256
帖子: 22323
注册时间: 2010-07-19 21:41
系统: OS X

Re: swap开机时无法激活

#10

帖子 jtshs256 » 2011-01-26 23:35

启动时ctl+s定屏,ctl+q取消,定下来慢慢看错误……
躺平
回复