Jump to content

Problem mounting Swap partition


iphitus
 Share

Recommended Posts

Hi

A few days ago I shrunk my swap partition a bit. Fom about 360mb to 200mb with DiskDrake in MCC. I've just noticed that on startup of Linux it says:

Activating Swap partition: Swapon /dev/hda6/: invalid argument

Everything is working fine, haven't been having problems otherwise. I have 160mb RAM and i use Enlightenment. I don't use any KDE applications.

 

James

Link to comment
Share on other sites

Here's my /etc/fstab

/dev/hda5 / ext3 defaults 1 1

none /dev/pts devpts mode=0620 0 0

none /mnt/cdrom supermount dev=/dev/hdc,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0

none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0

/dev/hda1 /mnt/windows vfat iocharset=iso8859-1,codepage=850,umask=0 0 0

none /proc proc defaults 0 0

/dev/hda6 swap swap defaults 0 0

Link to comment
Share on other sites

I've done some formatting and things to prepare for my Linux From Scratch install. My hard drive is now:

 

| Windows Fat32 2.8gb | Linux Ext3 2gb | Swap 199mb | Linux Ext2 /lfs 967mb |

 

The swap still won't mount at startup. When i'm in diskdrake and i click mount it won't mount. No errors or anything, just won't mount. My LFS partition is HDA7, swap is HDA6, root HDA5 and Windows HDA1.

 

What the commandline command to mount a swap partition?

It might give an error or something

 

James

Link to comment
Share on other sites

When i restarted it came up with some eerors about the superblock on /dev/hda7 It gave me a commandline and after looking in my Linux from scratch instructions i found i'd forgotten to 'mke2fs /dev/hda7' so i did that. I did the equivalent 'mkswap /dev/hda6' for my swap partition and it worked. I expected that DiskDrake would have done this for me. All works now

 

Thanks for your help!!

 

James

Link to comment
Share on other sites

wooo are you gonna have fun with ext2 :shock:

 

...anyway, yes, disdrake does it for you but for some reason, sometimes you have to tell it to format a partition 2 times b4 it does it, and sometimes it will tell you that you need to reboot for changes to take effect after the first time of telling it to format. So you think "ok" and reboot. Then upon reboot you get errors. Some users have attempted to move data and done this, resulting a complete loss of data., because the data is never 'really' copied. Always format 2 times>one after the other (in a row)> regardless of what diskdrake tells you about rebooting, or seeming like it formated. Also, double check that data was mv'd or cp'd if you have done so. I also learned this the hard way. Heck, I've had this happen on a fresh install...."the machine needs to reboot" crap....then it wants to start from the beginning and format again :shock:

 

SEE: man swapon

swapon /dev/hdx (x being the desired swap to mount)

swapoff /dev/hdx (x being the desired swap to umount)

Link to comment
Share on other sites

In my experience, if you modify the partition table (add, change, delete a partition), you need to immediately reboot after saving the changes. You can't add a partition and then attempt to format it. After reboot, you can then format the partition.

 

If LFS allows you to use ext3, it may be better since its a journaled file system.

Link to comment
Share on other sites

Whats wrong with Ext2, it's what i'm going to use for my LFS install
It's slow for one, which defeats the main reason most try LFS. It's also a horror should you ever shutdown improperly. If you think having to run scandisk stinks, it's a picnic compared to ext2.

 

(or at least what the instructions use)
I guess they figure it's the easiest from the commandline. I did LFS with reiserfs. You simply have to make sure to include reiserfs support in the kernel at the kenel compile portion of the instructions, but the same holds true with any fs. (if I remember correctly)

 

By the copy/move, always check, was that regarding Ext2?
I was referring to diskdrake for any operation.

 

In my experience, if you modify the partition table (add, change, delete a partition), you need to immediately reboot after saving the changes. You can't add a partition and then attempt to format it. After reboot, you can then format the partition.
True for fdisk, but this is 2003. Partition Magic doesn't reboot then format....and diskdrake doesn't alway ask for a reboot either. IMO it a bug, because there's no consistancy with diskdrake in ML9.1. I didn't have these probs in 9.0 and 8.1. I have used diskdrake many times to create a partition>format>format again>mount new partition>cp/mv info and it's there no prob. No need to reboot, though it couldn't hurt either.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...