Bug 32661 - error while activating swap partitions: swapon: cannot stat ...
error while activating swap partitions: swapon: cannot stat ...
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: anaconda (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-03-22 01:47 EST by Ben Levenson
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-22 11:01:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ben Levenson 2001-03-22 01:47:42 EST
(wasn't sure if this should be filed against mount, initscripts, or
anaconda)
build qa0321.2
The following error message occurs at boot on a system that has been 
upgraded from 6.2 --> 7.1.

Activating swap partitions:  swapon: cannot stat /space/SWAP: No such file
or directory
[FAILED]
 
The system was originally built with about 265 Megs of swap space.
The '/space/SWAP' file (about 255 Megs) was added by Anaconda during
the upgrade.
I repeated the install to see if the placement of the newly added SWAP file
had anything to do with the error message.  This time I created the SWAP
file on the same partition as '/'.
***There is no error message at boot time when the SWAP file is placed in 
the '/' directory.***  It only appears to cause the error message when the
SWAP file is added to a non-root partition. 

according to 'free', the SWAP file is functional (regardless of placement):
             total       used       free     shared    buffers     cached
Mem:        249052      26656     222396          0       4980      13860
-/+ buffers/cache:       7816     241236
Swap:       524920          0     524920
--------------------
FWIW, 'fdisk -l' and 'fstab' from the 'broken' system (SWAP on 
non-root partition):
fdisk -l /dev/hda:
Disk /dev/hda: 255 heads, 63 sectors, 1027 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1         4     32098+  83  Linux
/dev/hda2             5      1027   8217247+   5  Extended
/dev/hda5             5       387   3076416   83  Linux
/dev/hda6           519       535    136521   82  Linux swap
/dev/hda7           536       552    136521   82  Linux swap
/dev/hda8           388       451    514048+  83  Linux

fstab:
/dev/hda5               /                       ext2    defaults        1 1
/dev/hda1               /boot                   ext2    defaults        1 2
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro 0 0
/dev/hda8               /space                  ext2    defaults        1 2
/dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/pts                devpts  gid=5,mode=620  0 0
/dev/hda6               swap                    swap    defaults        0 0
/dev/hda7               swap                    swap    defaults        0 0
/space/SWAP             swap                    swap    defaults        0 0
-------------------------
'fdisk -l' and 'fstab' with SWAP on '/' partition:

fdisk -l /dev/hda:
Disk /dev/hda: 255 heads, 63 sectors, 1027 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1         4     32098+  83  Linux
/dev/hda2             5      1027   8217247+   5  Extended
/dev/hda5             5       387   3076416   83  Linux
/dev/hda6     519       535    136521   82  Linux swap
/dev/hda7           536       552    136521   82  Linux swap

fstab:
/dev/hda5               /                       ext2    defaults        1 1
/dev/hda1               /boot                   ext2    defaults        1 2
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/pts                devpts  gid=5,mode=620  0 0
/dev/hda6               swap                    swap    defaults        0 0
/dev/hda7               swap                    swap    defaults        0 0
/SWAP                   swap                    swap    defaults        0 0
Comment 1 Bernhard Rosenkraenzer 2001-03-22 08:17:56 EST
Anaconda should either remove the swap file from fstab or make sure it isn't 
deleted...
Comment 2 Erik Troan 2001-03-22 10:58:19 EST
Fixed in latest initscripts/util-linux combination.
Comment 3 Erik Troan 2001-03-22 11:01:52 EST
Ummm, make that a new initscripts and mount
Comment 4 Ben Levenson 2001-04-05 19:52:32 EDT
fix verified qa0405.0. 
closing.

Note You need to log in before you can comment on or make changes to this bug.