Re: Used swap 0MB of 0MB - why?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



try (after you "su -") 
# mkswap /dev/hda7
# swapon /dev/hda7
# swapon -s

Originally, the fstab was pointing to the wrong partition for the
swap. Since you changed it, the commands above will format the
partition as swap and mount it. the last command will tell you if it
mounted correctly.

Steven


On Wed, 19 Jan 2005 14:52:47 +0100, Duncan Lithgow
<duncan@xxxxxxxxxxxxxxxxxx> wrote:
> 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@3e6b347a dulithgow]# su -
> >>> [root@3e6b347a ~]# swapon -s
> >>> [root@3e6b347a ~]# mkswap /dev/hda6
> >>> /dev/hda6: No such file or directory
> >>> [root@3e6b347a ~]#
> >>
> >
> > Your swap partition is probably somewhere else then. What's the output
> > of "fdisk -l /dev/hda"?
> >
> > Paul.
> >
> and here goes:
> [root@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@3e6b347a ~]# mkswap /dev/hda7
> /dev/hda7: No such file or directory
> [root@3e6b347a ~]# swapon
> usage: swapon [-hV]
>        swapon -a [-e] [-v]
>        swapon [-v] [-p priority] special|LABEL=volume_name ...
>        swapon [-s]
> [root@3e6b347a ~]# swapon -a
> swapon: cannot stat /dev/hda6: No such file or directory
> [root@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@3e6b347a ~]#
> [root@3e6b347a ~]# swapon -a
> swapon: cannot stat /dev/hda7: No such file or directory


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux