[TriLUG] [newbie][swap] why does `mount` not match /etc/fstab?

David Black dave at jamsoft.com
Sun Aug 2 21:17:56 EDT 2009


This thread may be of help - sounds like almost exactly the same problem:

http://ubuntuforums.org/archive/index.php/t-915659.html

Your hibernation config file may still point to your old wubi swap file.

Dave

----- "Tom Roche" <Tom_Roche at pobox.com> wrote:

> Tom Roche Sun Aug 2 12:55:37 EDT 2009
> >> I didn't notice that wubi was unable to hibernate (as designed).
> 
> David Black Sun Aug 2 15:37:53 EDT 2009
> > Your current swap partition may not have a matching UUID (as called
> > for in /etc/fstab), e.g. when you moved it from wubi to physical
> > partitions.
> 
> No, the partitions were created for the migration. The reason why
> wubi
> won't hibernate is that it loopbacks from files (in windows space),
> and partitions are required for hibernation. Wubi's fstab line for
> the
> swap was
> 
> /host/ubuntu/disks/swap.disk               none           swap    
> loop,sw                         0       0
> 
> The UUID lines in my fstab
> 
> >> $ cat /etc/fstab
> >> > # <file system>                            <mount point>  <type> 
>  <options>                    <dump>  <pass>
> >> > proc                                       /proc          proc   
>  defaults                        0      0
> >> > UUID=a2aed1eb-0801-4780-bcdf-48fcd8f164b8  /              ext3   
>  defaults,errors=remount-ro      0      1
> >> > #/host/ubuntu/disks/boot                    /boot          none  
>   bind                            0      0
> >> > UUID=2e73b542-1cb7-439a-b6a7-046dc4011372  none           swap   
>  sw                              0      0
> >> > # mounts of original NTFS partitions
> >> > # mount /c read-only in case of windows hibernation?
> >> > UUID=F8FCC29BFCC25412                      /media/Preload ntfs-3g
>  defaults,locale=en_US.UTF-8,ro  0      0
> >> > UUID=136C9F91B524AE31                      /media/PMagic1 ntfs-3g
>  defaults,locale=en_US.UTF-8     0      0
> 
> are all new, and by me, since the wubi migrator (lvpm) failed to
> create them. (Hence I'm wondering if I screwed something up.)
> 
> > The easiest likely fix is to set the UUID of the swap partition to
> > match the original one by running
> 
> >   mkswap -U 2e73b542-1cb7-439a-b6a7-046dc4011372
> /dev/<swap_partition_device>
> 
> > Then you should be able to run 'swapon -a' again and have it
> attach.
> 
> Sounds good, but when I did
> 
> $ sudo fdisk -l | fgrep -ie 'swap'
> > /dev/sda7           12019       12296     2101648+  82  Linux swap /
> Solaris
> $ ls /dev/disk/by-uuid -alh | fgrep -e 'sda7'
> > lrwxrwxrwx 1 root root  10 2009-08-02 07:12
> 2e73b542-1cb7-439a-b6a7-046dc4011372 -> ../../sda7
> $ sudo mkswap -U 2e73b542-1cb7-439a-b6a7-046dc4011372 /dev/sda7
> > /dev/sda7: Device or resource busy
> $ sudo swapoff -a
> $ sudo mkswap -U 2e73b542-1cb7-439a-b6a7-046dc4011372 /dev/sda7
> > Setting up swapspace version 1, size = 2101644 KiB
> > no label, UUID=2e73b542-1cb7-439a-b6a7-046dc4011372
> $ sudo swapon -a
> $ cat /proc/swaps 
> > Filename				Type		Size	Used	Priority
> > /dev/sda7                               partition	2101640	0	-1
> 
> and tried to hibernate, I got the same error:
> 
> >> > PM: Cannot find swap device, try swapon -a.
> 
> What am I missing? Alternatively, what could be wrong with my swap
> partition?
> 
> TIA, Tom Roche <Tom_Roche at pobox.com>
> --
> TriLUG mailing list        :
> http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions



More information about the TriLUG mailing list