LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-15-2012, 08:44 AM   #1
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Mandriva 2008 Spring
Posts: 652

Rep: Reputation: 31
Which partition is which Linux and which windows


I have on my PC two partitions one Windows vista (which I can't boot into but is there but that is another story) one Oracle Linux.
I want to replace Oracle Linux with Mint.
When I try to install it it tells me this is the current set up
/dev1/sdb1 65.8 Mb
/dev1/sdb2 10.7 Gb
/dev1/sdb3 243.9 Gb
/dev1/sdb5 745.5 Gb

The Mint installer wants to reduce /dev1/sdb3 to 148.4 Gb and make the rest Linux Mint. However I want to completely replace Oracle Linux.
How can I tell which sdb3 or sdb5 is windows and which Linux?
 
Old 11-15-2012, 08:55 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
In Linux, run "fdisk -l" as root.
 
Old 11-15-2012, 09:13 AM   #3
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,051

Rep: Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100
Quote:
Originally Posted by davholla View Post
How can I tell which sdb3 or sdb5 is windows and which Linux?
How have you narrowed it down to sdb3 vs. sdb5?

sdb5 is not your Windows C: partition. If you have a Windows D: partition, that might be sdb5, but sdb5 is not C:

sdb3 could be C: (I don't know that it is, but it could be).

It is better to take a good look (with some tool such as acid_kewpie suggested) and see the partition types to have more confidence which is which. But if you know that the Windows partition you are trying to identify was C:, I'm sure your C: was a primary partition, while sdb5 is a logical partition.

Last edited by johnsfine; 11-15-2012 at 09:15 AM.
 
Old 11-15-2012, 02:58 PM   #4
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Mandriva 2008 Spring
Posts: 652

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by acid_kewpie View Post
In Linux, run "fdisk -l" as root.
Thanks I get
Code:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           8       64228+   6  FAT16
/dev/sda2               9        1314    10485760    7  HPFS/NTFS
/dev/sda3   *        1314       30965   238176090+   7  HPFS/NTFS
/dev/sda4           30966       60801   239657670    5  Extended
/dev/sda5           30966       30978      104391   83  Linux
/dev/sda6           30979       60801   239553216   8e  Linux LVM

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1           8       64228+   6  FAT16
/dev/sdb2               9        1314    10490445    7  HPFS/NTFS
/dev/sdb3   *        1315       30966   238179690    7  HPFS/NTFS
/dev/sdb4           30967      121601   728025637+   5  Extended
/dev/sdb5           30967      121601   728025606   8e  Linux LVM

Disk /dev/dm-0: 985.2 GB, 985225232384 bytes
255 heads, 63 sectors/track, 119780 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 5536 MB, 5536481280 bytes
255 heads, 63 sectors/track, 673 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-1 doesn't contain a valid partition table
I guess /dev/sdb5 is the soon to be replaced Oracle Linux.
Thanks for the quick reply.
 
Old 11-15-2012, 02:59 PM   #5
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Mandriva 2008 Spring
Posts: 652

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by johnsfine View Post
How have you narrowed it down to sdb3 vs. sdb5?

sdb5 is not your Windows C: partition. If you have a Windows D: partition, that might be sdb5, but sdb5 is not C:

sdb3 could be C: (I don't know that it is, but it could be).

It is better to take a good look (with some tool such as acid_kewpie suggested) and see the partition types to have more confidence which is which. But if you know that the Windows partition you are trying to identify was C:, I'm sure your C: was a primary partition, while sdb5 is a logical partition.
I thought it was because of sizes. However I guess that sdb5 is Linux.
 
Old 11-15-2012, 03:10 PM   #6
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,051

Rep: Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100
Quote:
Originally Posted by davholla View Post
Code:
/dev/sda5           30966       30978      104391   83  Linux
/dev/sda6           30979       60801   239553216   8e  Linux LVM
...
/dev/sdb5           30967      121601   728025606   8e  Linux LVM
I guess /dev/sdb5 is the soon to be replaced Oracle Linux.
I think it is more likely that sda5 is your Oracle Linux and then both sda6 and sdb5 are extra space used by that Linux.

Since sdb5 is the biggest of those, that is a reasonable choice if you want the new Linux in a single place and don't mind trashing the old Linux.

But it might be cleaner to delete all of sda5, sda6 and sdb5 before installing a new Linux, so you don't have fragments of the old one lying around.

However, it also looks like your two drives were at some point a RAID1 and that you have messed with the partition tables in Linux while Linux did not understand the nature of that RAID1. If Windows continues to see the two drives as RAID1 (so both sda3 and sdb3 are your Windows C: partition) while Linux doesn't understand the RAID1, you will be at risk for some very strange malfunctions.

Quote:
Windows vista (which I can't boot into but is there but that is another story)
Or maybe it is the same story. Maybe Windows Vista is messed up because of something done in Oracle Linux, while Windows saw your two drives as a RAID1 but Oracle saw them as two separate drives.

Last edited by johnsfine; 11-15-2012 at 03:17 PM.
 
Old 11-15-2012, 03:24 PM   #7
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Mandriva 2008 Spring
Posts: 652

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by johnsfine View Post
I think it is more likely that sda5 is your Oracle Linux and then both sda6 and sdb5 are extra space used by that Linux.

Since sdb5 is the biggest of those, that is a reasonable choice if you want the new Linux in a single place and don't mind trashing the old Linux.

But it might be cleaner to delete all of sda5, sda6 and sdb5 before installing a new Linux, so you don't have fragments of the old one lying around.

However, it also looks like your two drives were at some point a RAID1 and that you have messed with the partition tables in Linux while Linux did not understand the nature of that RAID1. If Windows continues to see the two drives as RAID1 (so both sda3 and sdb3 are your Windows C: partition) while Linux doesn't understand the RAID1, you will be at risk for some very strange malfunctions.



Or maybe it is the same story. Maybe Windows Vista is messed up because of something done in Oracle Linux, while Windows saw your two drives as a RAID1 but Oracle saw them as two separate drives.
What happened was I had Mandriva installed Oracle linux overhead and now I get the option to boot into Windows when I turn on the machine but get strange messages. I lost my windows cd and I have it now it just that I thought I would change my linux install first and fixing windows is even more unpleasant than installing a new distro.

In case anyone is interested I installed Oracle linux because I wanted a new Oracle R12 test system but a) it is has stopped working and b) I don't need it any more (I know R12) and c) Oracle Linux is not really any good as a sole distro - too difficult to install software etc.

Thank you for all your help.
 
Old 11-15-2012, 03:32 PM   #8
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,051

Rep: Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100
You haven't commented on the RAID1 part of your problem. Did you understand that your system has two hard drives that were paired into RAID1? Do you understand that this is now messed up? You do not now have a working RAID1.

Do you want to try to salvage the RAID1? For Windows alone or for both Windows and Linux?

Or would you prefer to finish splitting up the RAID1 so you have twice as much disk space, but lose some insurance against hardware failure?

I think finishing splitting them would be easier than salvaging the RAID1. I'm not sure exactly how to do either. I don't think it is wise to leave the problem unresolved.
 
Old 11-15-2012, 03:40 PM   #9
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Mandriva 2008 Spring
Posts: 652

Original Poster
Rep: Reputation: 31
Quote:
You haven't commented on the RAID1 part of your problem. Did you understand that your system has two hard drives that were paired into RAID1? Do you understand that this is now messed up? You do not now have a working RAID1.
I didn't because I am not very good at this.

I think I want to salvage my RAID1 for both windows and linux but have no idea how to.
 
Old 11-15-2012, 03:48 PM   #10
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,051

Rep: Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100
Quote:
Originally Posted by davholla View Post
I think I want to salvage my RAID1 for both windows and linux but have no idea how to.
Is there a BIOS option to repair the RAID1?

That would be very slow if it is there, but I think might be the best starting point.

If you could back up elsewhere, or lose, all your data, then I'm sure there is a BIOS option to destroy the RAID1 and then recreate it.

If you destroy and recreate the RAID1, it would be simplest to reinstall Windows before Linux, and it would be nice to figure out how to tell the Windows installer how much of the drive to use vs. leave unpartitioned for later Linux install.

Once you either repair or recreate the RAID1, when you use a Linux liveCD you should ignore (and not try to use) sda and sdb. Some other dev such as dm-0 should have a valid partition table and that is the dev onto which you should install Linux.

Either the main BIOS or some extra BIOS has a menu to look at and manipulate the RAID. If it is a secondary BIOS, probably during boot it flashes on the screen for a moment which keys you need to cord at that moment to get access to the RAID configuration.

Once you see what kind of RAID it is (brand and model of RAID "controller") post that in case it lets someone give you more specific advice.

Last edited by johnsfine; 11-15-2012 at 03:54 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I delete my Windows partition and re-install without affecting Linux partition? Whatshisface Linux - Hardware 6 07-26-2010 01:18 AM
extending existing windows-partition and changing os on linux partition ungua General 8 05-05-2009 11:01 AM
Removing Linux Partition and merging that space with my other Windows Partition RamenBooko Linux - General 3 10-11-2007 02:47 PM
How can I access files in my Windows 98 partition from my Linux partition, /w BASH? Fabyfakid Linux - Newbie 4 09-17-2004 11:05 PM
What is the code to copy a file from my windows partition to my linux partition? THEBIGFISH Linux - Newbie 3 03-15-2004 10:14 PM


All times are GMT -5. The time now is 09:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration