LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Failure to mount swap space on boot (http://www.linuxquestions.org/questions/linux-hardware-18/failure-to-mount-swap-space-on-boot-232574/)

bleedingturnips 09-19-2004 02:33 PM

Failure to mount swap space on boot
 
Hello,

I'm running Fedora Core 1.

I previously had FreeDOS installed on one partition and Fedora Core 1 on another.

My system was running poorly, so I decided to convert the FreeDOS (FAT 16) partition, /dev/hda1, to swap. I did this by just using fdisk to convert the file system type to 82 (Linux swap). I didn't delete the FAT 16 partition and then create the swap space from the freespace. Maybe this was the wrong thing to do?

Fedora _seems_ to be running better with the extra swap, though this could be wishful thinking on my part because on boot up I see


Remounting root filesystem in read-write mode:
Activating swap partitions:
swapon: /dev/hda1: Invalid argument: [Failed]


and then


Mounting local filesystems:
Enabling local filesystem quotas:
swapon: /dev/hda1: Invalid argument:
Enabling swap space: [OK]


fdisk -l outputs:

Device Boot Start End Blocks Id System
/dev/hda1 1 77 310432+ 82 Linux swap
/dev/hda2 * 78 102 100800 83 Linux
/dev/hda3 103 896 3201408 83 Linux
/dev/hda4 897 993 391104 5 Extended
/dev/hda5 897 993 391072+ 82 Linux swap

My fstab is

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda1 swap swap defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0


So my question is are both swap spaces actually being mounted? And how can I get rid of the error messages? Is this a permissions issue on /dev/hda1?

Thanks for your help.

michaelk 09-19-2004 02:46 PM

Look at the output the free command. If total swap is sum of both partitions then it is working.

Did you actually format the swap partition using the mkswap command?

bleedingturnips 09-19-2004 05:19 PM

Oops....nope I didn't use mkswap. But I just tried it and that fixed it! Thanks so much.

I'd only changed the filesystem type using fdisk.

Thanks again.

majolee 11-03-2004 02:07 AM

swap problem
 
Hello,

We are using RedHat 9 since 1 year now.

But we have not researched more on Linux basics yet :(

Recently we changed the system hard disk to a another motherboard, ram and cd rom. The motherboard is of same configuration but the RAM has been reduced and cd drive is changed.

Now the boot loader gives error

/dev/hda3 Activating swap failed

so we searched web for answers to get the things back to normal..and we found this post of yours..

here is our current fdisk -l thing

Disk /dev/hdc: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 4740 37969627+ 83 Linux
/dev/hdc3 4741 4870 1044225 82 Linux swap

whereas the fstab shows ..

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0

Please help..

Majolee InfoTech

AutOPSY 11-03-2004 02:10 AM

change the entry in fstab, from /dev/hda3 to /dev/hdc3


That will fix it.

majolee 11-03-2004 02:19 AM

Hello,

While doing post I just tried to change the same thing you said and after reboot all was working well..

But could not understand why this would have happened..

Thanks a lot for quick reply.

Majolee Infotech


All times are GMT -5. The time now is 06:32 PM.