[问题]关于swap [已解决]

为当前最终发行版之前的所有版本提供支持
回复
头像
ipv6now
帖子: 759
注册时间: 2006-09-30 1:08
来自: QingDao
送出感谢: 0
接收感谢: 0
联系:

[问题]关于swap [已解决]

#1

帖子 ipv6now » 2006-11-01 22:32

启动时swap无法激活,提示could not found swap signature
我的分区表:
Device Boot Start End Blocks Id System
/dev/sda1 1 13 104391 83 Linux
/dev/sda2 14 143 1044225 82 Linux swap / Solaris
/dev/sda3 144 9730 77007577+ 5 Extended
/dev/sda5 144 335 1542208+ 83 Linux
/dev/sda6 336 589 2040223+ 83 Linux
/dev/sda7 590 1354 6144831 83 Linux
/dev/sda8 1355 9730 67280188+ 83 Linux


我的/etc/fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda7 -- converted during upgrade to edgy
UUID=c8b9069c-4a70-4995-9272-51ef81c0f42d / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1 -- converted during upgrade to edgy
UUID=bf62f00d-ee36-4c59-9d37-a3ee1e84ac3b /boot ext3 defaults 0 2
# /dev/sda8 -- converted during upgrade to edgy
UUID=fea78d68-05c4-434a-a3e4-4498f41351b6 /home ext3 defaults 0 2
# /dev/sda5 -- converted during upgrade to edgy
UUID=9811800d-bf24-49ba-b3a7-03502c2878cd /tmp ext3 defaults 0 2
# /dev/sda6 -- converted during upgrade to edgy
UUID=570d3144-4e2b-46e6-aad9-c009db5f7aa4 /var ext3 defaults 0 2
# /dev/sda2 -- converted during upgrade to edgy
UUID=74fb50d2-225e-4431-abb7-7b92a452987d none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0


6.10的fstab怎么改成UUID表示的啦,不明白什么意思
头像
ipv6now
帖子: 759
注册时间: 2006-09-30 1:08
来自: QingDao
送出感谢: 0
接收感谢: 0
联系:

#2

帖子 ipv6now » 2006-11-01 22:58

已经解决啦, 原来执行 sudo swapon /dev/sda2 总是报错。然后我试着执行了sudo mkswap /dev/sda2 ,就成功了
头像
toomanystars
帖子: 168
注册时间: 2006-09-12 17:01
送出感谢: 0
接收感谢: 0

#3

帖子 toomanystars » 2006-11-02 1:02

我于到了想同的问题,起动的时候无法激活,也导致无法进入休眠状态,机器运行耗内存的软件时会提示内存不足!不知道楼主解决了没有,请详细讲讲。
头像
toomanystars
帖子: 168
注册时间: 2006-09-12 17:01
送出感谢: 0
接收感谢: 0

#4

帖子 toomanystars » 2006-11-02 1:06

swapon -a 显示:
swapon: cannot stat /dev/disk/by-uuid/8240f251-a1a0-4623-9855-30ef7cfd4d6d: No such file or directory

fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/hda1 -- converted during upgrade to edgy
UUID=967ce7c0-a634-40cd-98fa-fc0f83d3729a / ext3 defaults,errors=remount-ro 0 1
# /dev/hda2 -- converted during upgrade to edgy
UUID=360f38af-a0f6-4cee-b957-1343dfaff9d2 /home ext3 defaults 0 2
# /dev/hda3 -- converted during upgrade to edgy
UUID=8240f251-a1a0-4623-9855-30ef7cfd4d6d none swap sw 0 0
#/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto,ro,iocharset=utf8 0 0
头像
toomanystars
帖子: 168
注册时间: 2006-09-12 17:01
送出感谢: 0
接收感谢: 0

#5

帖子 toomanystars » 2006-11-02 1:36

似乎是个大bug,用下面的办法试过,但用完之后用了一下休眠,又重启了,之后就又找不到swap了,气死我了
https://launchpad.net/distros/ubuntu/+b ... omments/23

ben - uuid changes are not always reflected until after a reboot...

follow THESE instructions and report back

1, determine your swap with 'fdisk -l'
2, do mkswap on your swap partition - RECORD THE UUID WHICH THIS COMMAND
OUTPUTS
3, now use this UUID to put into fstab and resume
files...(RESUME=UUID=<the-swap-partition-uuid-from-vol_ID
should go in /etc/initramfs-tools/conf.d/resume
4, update-initramfs -u
5, reboot normally after this finishes

when the system has restarted again - do 'swapon -s' to check if your
swap is active...and do 'ls -la /dev/disk/by-uuid/'

dont change any symlinks etc. just try these instructions
头像
toomanystars
帖子: 168
注册时间: 2006-09-12 17:01
送出感谢: 0
接收感谢: 0

#6

帖子 toomanystars » 2006-11-02 1:44

再来一遍又好了,uuid已经改变了,谁能告诉我怎样休眠?大家的都没问题吗?
回复

回到 “老旧版本支持”