Used swap 0MB of 0MB - why?

Duncan Lithgow duncan at lithgow-schmidt.dk
Wed Jan 19 13:52:47 UTC 2005


Paul Howarth wrote:

> The "-" parameter makes su run as a login shell, so it sets up the 
> environment as if you had logged in as root, including adding /sbin 
> and /usr/sbin to the PATH environment variable.
>
Thanks

>> It didn't help though. I get
>>
>>> [root at 3e6b347a dulithgow]# su -
>>> [root at 3e6b347a ~]# swapon -s
>>> [root at 3e6b347a ~]# mkswap /dev/hda6
>>> /dev/hda6: No such file or directory
>>> [root at 3e6b347a ~]#
>>
>
> Your swap partition is probably somewhere else then. What's the output 
> of "fdisk -l /dev/hda"?
>
> Paul.
>
and here goes:
[root at 3e6b347a ~]# fdisk -l

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1913    15366141    7  HPFS/NTFS
/dev/hda2            1914       14593   101852100    f  W95 Ext'd (LBA)
/dev/hda5            1920       12762    87096366    b  W95 FAT32
/dev/hda6           12763       12788      208813+  83  Linux
/dev/hda7           12789       12853      522081   82  Linux swap
/dev/hda8           13653       14593     7558551   83  Linux
[root at 3e6b347a ~]# mkswap /dev/hda7
/dev/hda7: No such file or directory
[root at 3e6b347a ~]# swapon
usage: swapon [-hV]
       swapon -a [-e] [-v]
       swapon [-v] [-p priority] special|LABEL=volume_name ...
       swapon [-s]
[root at 3e6b347a ~]# swapon -a
swapon: cannot stat /dev/hda6: No such file or directory
[root at 3e6b347a ~]#

So somewhere the system has read fstab and been told that hda6 is swap - 
but it ain't!
I edit and save fstab but that doesn't help, I logout and in again - 
fstab still has my changes but still doesn't make any difference. Still says

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1913    15366141    7  HPFS/NTFS
/dev/hda2            1914       14593   101852100    f  W95 Ext'd (LBA)
/dev/hda5            1920       12762    87096366    b  W95 FAT32
/dev/hda6           12763       12788      208813+  83  Linux
/dev/hda7           12789       12853      522081   82  Linux swap
/dev/hda8           13653       14593     7558551   83  Linux
[root at 3e6b347a ~]#
[root at 3e6b347a ~]# swapon -a
swapon: cannot stat /dev/hda7: No such file or directory




More information about the fedora-list mailing list