VectorLinux
August 30, 2014, 10:15:40 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Swap file not accessible.. [SOLVED]  (Read 840 times)
olewilly
Member
*
Posts: 14



« on: August 21, 2011, 01:30:53 pm »

Hi

On VL 6 Light installation I have 1gb swap file. But kinfocenter reports that swap is not accessible and gkrellm Swap says 0 swap an 0 used  Huh Swapon -a has no effect  Shocked

OW
« Last Edit: August 22, 2011, 06:23:52 am by olewilly » Logged

VL 6.0 Light default wm on Compaq 5838 AMD K7 cpu.
Geforce3 Ti200 video. 192 Mb ram 40Gb hd.
nightflier
Administrator
Vectorian
*****
Posts: 4022



« Reply #1 on: August 21, 2011, 02:21:58 pm »

We need some more info. As root run the following commands and post the output here.
Code:
fdisk -l
cat /etc/fstab

You can capture the output by copying from a terminal window, or you can pipe the output to a file like this:
Code:
cat /etc/fstab > fstab-contents.txt
Logged
olewilly
Member
*
Posts: 14



« Reply #2 on: August 22, 2011, 01:25:16 am »

Hi nightflier

Thank You for reply. Here comes:

root:# fdisk -l

Disk /dev/hda: 41.1 GB, 41110142976 bytes
16 heads, 63 sectors/track, 79656 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1       16253     8191480+  83  Linux
/dev/hda2           16254       79656    31955112    5  Extended
/dev/hda5           16254       18278     1020127+  82  Linux swap
/dev/hda6           24380       79656    27859576+  83  Linux
vector://home/ole


and..

# /etc/fstab: static file system information.
#
# The following is an example. Please see fstab(5) for further details.
# Please refer to mount(1) for a complete description of mount options.
#
# Format:
# <file system>   <mount point>   <type>   <options>   <dump>   <pass>
#
# dump(Cool uses the <dump> field to determine which file systems need
# to be dumped. fsck(Cool uses the <pass> column to determine which file
# systems need to be checked--the root file system should have a 1 in
# this field, other file systems a 2, and any file systems that should
# not be checked (such as MS-initrd/mnt or NFS file systems) a 0.

# The Linux partitions
/dev/hda1 / reiserfs  noatime  0  1

# Shared Windows/Linux partition
#/dev/hda1   /mnt/dos  msdos  umask=0   0  0
#/dev/hda1   /mnt/win  vfat   fmask=111,dmask=0,quiet,shortname=mixed,user  0  0
#/dev/hda1   /mnt/win  ntfs   umask=0   0  0

# Floppy disks
# The 'noauto' option indicates that the file system should not be mounted
# with 'mount -a' 'user' indicates that normal users are allowed to mount
# the file system.
/dev/fd0   /mnt/floppy   auto   defaults,noauto,user   0 0
#/dev/fd1  /mnt/floppy   auto   defaults,noauto,user   0 0

# If you have a ls-120 floppy drive, it could be on /dev/hda b c d etc.
#/dev/hdd   /mnt/ls120   auto   defaults,noauto,user   0 0

# CDROM, CDWRITER, DVD
/dev/cdrom    /mnt/cdrom   iso9660   defaults,noauto,ro,user   0 0
#/dev/cdwriter /mnt/cdwriter   iso9660   defaults,noauto,rw,user   0 0
#/dev/dvd      /mnt/dvd    auto   defaults,noauto,ro,user   0 0

# NFS file systems:
#linux01.gwdg.de:/suse/6.3/i386.de  /mnt/nfs  nfs  defaults  0 0

# proc file system:
proc   /proc   proc   defaults   0 0

# Unix98 devpts filesystem:
none  /dev/pts  devpts  gid=5,mode=666  0 0

# Shared memory filesystem:
tmpfs   /dev/shm    tmpfs defaults 0  0

# Basic USB filesystem
sysfs  /sys  sysfs  defaults  0 0
usbfs /proc/bus/usb usbfs rw,devmode=0666 0 0

# example of a VFAT USB pendrive
#/dev/sda1  /mnt/pendrive vfat   fmask=111,dmask=0,noauto,user,quiet,shortname=mixed 0 0


# Swap partitions
# The 'sw' option means auto activating with 'swapon -a'.
shm            /dev/shm     tmpfs  defaults        0     0


OW
Logged

VL 6.0 Light default wm on Compaq 5838 AMD K7 cpu.
Geforce3 Ti200 video. 192 Mb ram 40Gb hd.
roarde
Vectorian
****
Posts: 526


move the needle


« Reply #3 on: August 22, 2011, 03:39:20 am »

That fstab info's very helpful.

We should make sure that things are as they appear. Post the output of the following commands, please.
Code:
/sbin/vol_id --type /dev/hda5
/sbin/vol_id --type /dev/hda6

Someone else will probably help you with the rest before I log on again. Due to time local time differences, thought this info might give them a head start. If the first command says "swap" and you're comfortable with turning it on, I don't see why not -- but your fstab will have to be adapted to make it "permanent".

Note: Mounting /dev/hda6 as /home right now will make your home "disappear". It's recoverable, but it's better to wait until you're sure of how to put what you want there.

I hope whoever helps will be able to tell me how to determine used/unused space on an unmounted reiserfs Tongue   If sda6 turns out to be ext2 or ext3, posting the result of "/sbin/dumpe2fs -h /dev/sda6" would be helpful. Don't worry if they both turn out to be unformatted -- I'm sure help is on the way.
Logged

Robert
VL STD 7.1 RC2.2.2, icewmvmods
nightflier
Administrator
Vectorian
*****
Posts: 4022



« Reply #4 on: August 22, 2011, 04:36:52 am »

You need to add an entry in fstab to reference the swap partition, like this:
Code:
/dev/hda5   none   swap   sw   0  0
Then issue command "swapon -a" and see if it takes.
---
Now, about the current line in your swap section:
Code:
shm            /dev/shm     tmpfs  defaults        0     0
I believe it is not right. Comment it out by putting a # at the beginning and test things out.
---
As Roarde mentioned; if you meant for /dev/sda6 to be your /home dir, let us know and we'll talk you through making that happen.
---
@roarde: gparted will show disk usage of unmounted partitions. From the command line, I would just mount it temporarily and use "df -h".
Logged
olewilly
Member
*
Posts: 14



« Reply #5 on: August 22, 2011, 06:13:10 am »

Hi roarde

Here comes:

ole:$ /sbin/vol_id --type /dev/hda5
swap
vector:/~
ole:$ /sbin/vol_id --type /dev/hda6
ext3
vector:/~
ole:$

OW
Logged

VL 6.0 Light default wm on Compaq 5838 AMD K7 cpu.
Geforce3 Ti200 video. 192 Mb ram 40Gb hd.
olewilly
Member
*
Posts: 14



« Reply #6 on: August 22, 2011, 06:22:58 am »

Hi nightflier

I did Your recommendations and now the swap is on.  Cheesy

I tried different distros before this one and I did not use this command as I normally do when I try a new installation:

dd if=/dev/zero of=/dev/hda bs=4096

I am told that this would leave the hd fresh as a new one.

Instead I used existing partitions, because there was something in my home that I hoped would remain.

Thank You very much for help.  Wink

OW  Smiley
Logged

VL 6.0 Light default wm on Compaq 5838 AMD K7 cpu.
Geforce3 Ti200 video. 192 Mb ram 40Gb hd.
roarde
Vectorian
****
Posts: 526


move the needle


« Reply #7 on: August 25, 2011, 04:50:11 pm »

Instead I used existing partitions, because there was something in my home that I hoped would remain.
Chances are, that something you wanted to keep is still there Smiley  As nightflier suggested, post back if you'd like some help with getting it to show up where you want it.

Sorry to be slow getting back.
Logged

Robert
VL STD 7.1 RC2.2.2, icewmvmods
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!