LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Invalid swapfile (http://www.linuxquestions.org/questions/linux-software-2/invalid-swapfile-877446/)

Basher52 04-27-2011 02:24 PM

Invalid swapfile
 
After this: http://www.linuxquestions.org/questi...k-size-875386/ was done, next problem came up.

The swap partition I created is not valid for my F14 upgrade it says.

fdisk says:
Code:

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1          39      313236  83  Linux
/dev/sda2              40        3956    31463302+  83  Linux
/dev/sda3            3957        4088    1060290  83  Linux
/dev/sda4            4089      24321  162521572+  83  Linux

Command (m for help):

parted says:

Code:

GNU Parted 1.9.0
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                               
Model: ATA WDC WD2000JD-00H (scsi)
Disk /dev/sda: 200GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size    Type    File system    Flags
 1      32.3kB  321MB  321MB  primary  ext3
 2      321MB  32.5GB  32.2GB  primary  ext3
 3      32.5GB  33.6GB  1086MB  primary  linux-swap(v1)
 4      33.6GB  200GB  166GB  primary  ext3

(parted)

So which one is correct?
I tried mkswap/swapon but always getting "Device or resource busy" no matter if I boot from CD.

And this "little" error makes not able to upgrade to F14.

Any clues what more I can do?


UPDATE:
Just tried the swapoff then the mkswap worked but fdisk shows the same info, but I'll try the F14 CD anyway and see...

UPDATE2: Nope still same error.
Quote:

Error enabling swap device LABEL=SWAP-sda3: device has not been created

The etc/fstab on your update partition does not reference a
valid swap device.

business_kid 04-27-2011 02:56 PM

Looks like both FATS differ. You have F14 cdrom/dvd?
If you can boot on F14, I would be tempted to try
df -h

that might tell you what's real. The swap should be type 82 - change that and it might fix a lot. Here's the line for fstab
/dev/sda2 swap swap defaults 0 0

Basher52 04-27-2011 03:36 PM

:doh:

I knew I could change the type to 82 but no matter how many times I looked at the commands in fdisk I just didn't see the 't' :o
Changed it to 82 and now it sure looks better as a swap partition :)

Tried the upgrade again and it works :D

Think I need even stronger glasses :p


All times are GMT -5. The time now is 11:41 AM.