Java Mailing List Archive

http://www.redhatconfig.com/

Home » Ubuntu Technical Support »

Re: Hibernation woes

Derek Broughton

2008-05-08

Replies:

Author LoginPost Reply
Pastor JW wrote:

> swapon: cannot
> canonicalize /dev/disk/by-uuid/52810d5c-61ab-4942-afa2-9e6e953f83
> 9d: No such file or directory
> swapon: cannot stat
> /dev/disk/by-uuid/52810d5c-61ab-4942-afa2-9e6e953f839d: No such file or
> directory

OK. That simplifies things. What's probably happened is that you _have_ a
swap partition, but "mkswap" has been run on it since /etc/fstab was
created. Every time mkswap is run, like mkfs on a filesystem, the
partition gets a new UUID and it breaks fstab, which controls the mount
points. Now, putting the UUIDs in the fstab was a really good idea when
the kernel developers were changing the /dev/ names we usually use for
mounting, but it causes headaches now.
>
> I am not all that comfortable with this system yet and don't know how one
> would go about creating a swap partition on this Operating System.

First, look in /etc/fstab and you should see a line that says:
UUID=59722752810d5c-61ab-4942-afa2-9e6e953f839d none swap sw 0 0
(at least approximately). With luck, the previous line is a comment showing
what the real device name is (these got placed there in an earlier upgrade
process).

So then, you'd want to check that nothing else was actually mounting a file
system on that partition.

Do something like this (I'm not certain sfdisk is present by default, and of
course you need to use the correct name for your drive):

$ sudo sfdisk /dev/sda -l

Disk /dev/sda: 14593 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

 Device Boot Start   End  #cyls   #blocks  Id System
/dev/sda1  *    0+  2674   2675- 21486906  83 Linux
/dev/sda2    13542  14592   1051   8442157+  7 HPFS/NTFS
/dev/sda3       0     -     0       0   0 Empty
/dev/sda4     2675  13541  10867  87289177+  5 Extended
/dev/sda5    13168+ 13541   374-  3004123+ 82 Linux swap / Solaris
/dev/sda6     2675+  2917   243-  1951834+ 83 Linux
/dev/sda7     2918+ 13167  10250- 82333093+ 8e Linux LVM

If you see something saying "Linux swap / Solaris", that's your swap
partition, if it matches the one in /etc/fstab, even better! In either
case, you can replace the UUID=59722752810d5c-61ab-4942-afa2-9e6e953f839d
part of the line in /etc/fstab with the /dev/ name, save fstab, then "sudo
swapon -a" should give you a swap partition.

> Besides,
> I have not found a backup system for this machine yet. Wouldn't creating
> a swap mean I'd have to cut it out of an existing partition? I'd suspect
> then the existing data is in danger of being damaged. This was a factory
> install of 7.10 from directly from Dell and it has no foreign Operating
> Systems on
> it. It was upgraded to 8.04 on-line using update manager.

I'd be hugely surprised if it didn't have a swap partition when they created
it. If it doesn't, you should complain. Hopefully, as a pastor, you have
better complaint skills than I do, because I gave up on them when they
flatly refused to honor my warranty.
--
derek


--
ubuntu-users mailing list
ubuntu-users@(protected)
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.