mkswap on every boot

T. 'Nifty New Hat' Mitchell mitch48 at sbcglobal.net
Sun Jun 13 19:34:55 UTC 2004


On Wed, Jun 09, 2004 at 11:54:12PM -0500, Andrew Robinson wrote:
> jludwig wrote:
> >On Wed, 2004-06-09 at 22:48, Steve Pyatt wrote:
> >
> >>>>>I'm running FC2 and have my swap setup on a separate drive. It was 
> >>>>>formatted as a swap and everything looks good in /etc/fstab. However 
> >>>>>every time I reboot I have to run a mkswap and swapon against it. Is 
> >>>>>there any thoughts on this? Or is there anyway I can get that done on
> >>>>>boot?
...
> >>>My fstab has this for swap.  Is yours the same?
> >>
> >>>/dev/hda3               swap                    swap    defaults 0 0
> >>
> >>Except mine is hda1
...
> I'm late to this thread so I hope I'm not spewing nonsense.

Me to.

First what disk hardware.  Is this SATA, IDE, SCSI....
Are you using logical volumes, hardware RAID, software RAID?

What does fdisk for each device tell us?
Example:

    # - - - - - - - - - 
    # fdisk -l

    Disk /dev/hda: 30.0 GB, 30020272128 bytes
    16 heads, 63 sectors/track, 58168 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           1        1016      512032+  83  Linux
    /dev/hda2            1017       31492    15359904   83  Linux
    /dev/hda3           56138       58168     1023624   82  Linux swap
    /dev/hda4           31493       56137    12421080    f  W95 Ext'd (LBA)
    /dev/hda5           31493       56137    12421048+  83  Linux

    Partition table entries are not in disk order

    Disk /dev/sda: 32 MB, 32112640 bytes
    4 heads, 32 sectors/track, 490 cylinders
    Units = cylinders of 128 * 512 = 65536 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1         489       31280    4  FAT16 <32M
    # - - - - - - - - - 

Is the machine dual or multiboot?  If multiboot is the swap partition
used by the other OS (intentionally or unintentionally).

Do you use a mix of absolute device names and LABEL= lines in fstab (I
do).  If so map each LABEL back to a physical device and check for
errors:
      # findfs LABEL=/
      /dev/hda2 
Perhaps a label and another use conflict.

Is devlabel causing things to be mapped funny? see /etc/sysconfig/devlabel
caution RTFM on /sbin/devlabel.

Is the BIOS remapping devices.  This is common for some multiboot
setups.  Same is possible with grub.


-- 
	T o m  M i t c h e l l 
	/dev/null the ultimate in secure storage.





More information about the fedora-list mailing list