[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

linuxc partition seen as swap partition?

Posted on 2006-05-23
10
Medium Priority
?
266 Views
Last Modified: 2013-12-06
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?
0
Comment
Question by:eggster34
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 19

Expert Comment

by:jools
ID: 16743432
The partition type is set to 82 which is identified as Linux Swap.
0
 
LVL 19

Expert Comment

by:jools
ID: 16743443
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
 

Author Comment

by:eggster34
ID: 16743709
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 19

Expert Comment

by:jools
ID: 16743884
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
 
LVL 19

Expert Comment

by:jools
ID: 16743901
hang on a minute, you posted that it was an IDE drive but your posting shows SCSI, can you please check!
0
 

Author Comment

by:eggster34
ID: 16743910
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
 
LVL 2

Expert Comment

by:CapTech
ID: 16744378
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
 
LVL 2

Expert Comment

by:CapTech
ID: 16744451
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
 
LVL 19

Expert Comment

by:jools
ID: 16745583
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
 
LVL 2

Accepted Solution

by:
logic0004 earned 2000 total points
ID: 16745943
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month18 days, 22 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question