linuxc partition seen as swap partition?

Hello
I have an IDE drive that I took from another Linux Red Hat server.

fdisk -l shows this:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          13      104391   83  Linux
/dev/sdc2              14         143     1044225   82  Linux swap

when I try to mount it, I get this error

mount /dev/sdc2
/dev/sdc2 looks like swapspace - not mounted
mount: you must specify the filesystem type

the fstab entry is this:

/dev/sdc2                /mnt/oldlos            auto    defaults 0 0
for some reason linux is seeing it as a swap partition. why do you think it's this way?
eggster34Asked:
Who is Participating?
 
logic0004Connect With a Mentor Commented:
Well, here is the useful information for u to read and perform the required task of changing the ID from 82 to 83, but i would recommend u to backup the stuff from that partition incase of any trouble.

http://www.freeos.com/articles/3935/
0
 
joolsCommented:
The partition type is set to 82 which is identified as Linux Swap.
0
 
joolsCommented:
If you're sure it's not a swap partition you could try using fdisk and change the partition type to 83 then give it another go.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
eggster34Author Commented:
would this damage / delete the partition in any way?
this is the only copy of the data I have so I must not crash it :(
0
 
joolsCommented:
If it's set to swap there is a chance it may have already been done, however, changing the partition type should not affect what is there, just make sure its the only change you make.

Once you'v changed the partition do you know what file system it was/is supposed to be?
0
 
joolsCommented:
hang on a minute, you posted that it was an IDE drive but your posting shows SCSI, can you please check!
0
 
eggster34Author Commented:
I thinik it was ext2 but I'm not sure.
it wasn't LVM I'm sure of that.

which command would I need to convert it to being a Linux partition and not Linux Swap?
0
 
CapTechCommented:
To change the file system type, go into a terminal, and type:

fdisk /dev/sdc

If the partition is already mounted, it won't let you modify it, so don't worry about losing anything.  Unless you FORMAT the drive, you shouldn't lose any existing data by changing the Linux system type.

Type: p
This will list the current partitions on the disk

Then, type: t
This command will allow you to change the partition type, select the partition number from the p list (if your looking at /dev/sdc2, it's probably the 2nd, so type 2 if that is correct).

Now, type: 82

To save your changes and exit, type: w

Hope this helps.   :)

D
0
 
CapTechCommented:
Unbelievable.  I can't believe I did that, try code: 83, not 82 if it is ext2.

So, when you type: t

You type: 83 ... not 82.

Sorry for the confusion.

Regards,

D
0
 
joolsCommented:
You need to make sure you are using the correct device file, you said it was IDE which would be /dev/hd(a etc etc), SCSI is /dev/sd(a etc etc).

Do not change this unless you have confirmed the type of disk you are using...

J

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.