Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

[Solved]Problem with disk partitions

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
choucete
n00b
n00b
Posts: 13
Joined: Thu Jan 05, 2012 4:49 pm

[Solved]Problem with disk partitions

  • Quote

Post by choucete » Sat Feb 04, 2012 12:44 pm

Hi everyone,

Last year a bought a brand new rig, which I have been using mainly for gaming with windows 7, but now it came to mind the idea of actually using it and for that I need Linux, and since I recently started with Gentoo, I though it was a nice opportunity to get to know it better. This is around my fifth Gentoo installation.

My hard drive configuration is 2 500Gb disks together with RAID, so the first thing I did was pick up a partition software and free up 300Gb to use with Linux, I used the EaseUs Partition Manager (picked it up randomly, my bad maybe).

Then I booted up with the Gentoo Minimal Live CD and listed the partition with fdisk and found the first error:

Code: Select all

livecd ~ # fdisk -lu                                                                                                                                                             

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc39a7e2a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848  1339146269   669469711    7  HPFS/NTFS/exFAT
/dev/sda3      1339146270  1953520064   307186897+  83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/md126: 1000.2 GB, 1000210432000 bytes
2 heads, 4 sectors/track, 244192000 cylinders, total 1953536000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 131072 bytes / 262144 bytes
Disk identifier: 0xc39a7e2a

      Device Boot      Start         End      Blocks   Id  System
/dev/md126p1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/md126p2          206848  1339146269   669469711    7  HPFS/NTFS/exFAT
/dev/md126p3      1339146270  1953520064   307186897+  83  Linux
[b]Partition 3 does not start on physical sector boundary.[/b]
So when I mentioned this error to some people at work they told me about GPT and that fdisk doesn't handle it will (yes, I didn't know about GPT), so I started looking into it and decided to check it with parted, but with parted I get another similar error:

Code: Select all

livecd ~ # parted -l
[b]Error: Can't have a partition outside the disk! [/b]                          
Model: ATA WDC WD5000AAKX-0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown

Error: /dev/sdb: unrecognised disk label                                  
Model: ATA WDC WD5000AAKX-0 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown

Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label                                  
Model: ATAPI iHAS122 (scsi)
Disk /dev/sr0: 141MB
Sector size (logical/physical): 2048B/2048B
Partition Table: unknown

Model: Linux Software RAID Array (md)
Disk /dev/md126: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size   Type     File system  Flags
 1      1049kB  106MB   105MB  primary  ntfs         boot
 2      106MB   686GB   686GB  primary  ntfs
 3      686GB   1000GB  315GB  primary  ext2
I googled and when other people got these errors you could see something actually wrong with their partition tables, but I don't seem to be able to find the problem on mine. If anyone could point me in the right direction that would be great.

Do you think it would be better to just format the whole disk and start from scratch?

Also, please let me know if any more information is required.

Thanks in advance!
Last edited by choucete on Fri Feb 10, 2012 12:30 pm, edited 1 time in total.
Top
Kaso_da_Zmok
Apprentice
Apprentice
User avatar
Posts: 189
Joined: Thu Aug 19, 2004 5:30 pm
Location: Zurich, Switzerland

you can't use GPT with windows.

  • Quote

Post by Kaso_da_Zmok » Sat Feb 04, 2012 1:48 pm

you can't use GPT with windows. And you can't mix GPT and Windows partitions on single disk.
What you have to ignore is the /dev/sda and /dev/sdb disks because these are part of your "FAKE Raid"
Fake Raid means it is made by the software Raid on you motherboard. not by real RAID card.
So focus onto your /dev/md device and ignore the error reported on /dev/sda because the partitioning layout is meant for /dev/md and there i do not see any error reported.
also GPT partition is needed on disk larger than 2TB and you are on 1TB only.

have a look at these.

http://en.gentoo-wiki.com/wiki/RAID/NVRAID_with_dmraid

http://en.gentoo-wiki.com/wiki/RAID/Onboard

https://wiki.archlinux.org/index.php/In ... _Fake_RAID
Top
Hu
Administrator
Administrator
Posts: 24389
Joined: Tue Mar 06, 2007 5:38 am

Re: you can't use GPT with windows.

  • Quote

Post by Hu » Sat Feb 04, 2012 7:09 pm

Kaso_da_Zmok wrote:you can't use GPT with windows.
Could you elaborate on this statement? Recent versions of 64-bit Windows use GPT with no problems.
Top
Kaso_da_Zmok
Apprentice
Apprentice
User avatar
Posts: 189
Joined: Thu Aug 19, 2004 5:30 pm
Location: Zurich, Switzerland

Windows and GPT FAQ

  • Quote

Post by Kaso_da_Zmok » Sat Feb 04, 2012 7:19 pm

Windows and GPT FAQ
http://msdn.microsoft.com/en-us/windows ... e/gg463525


Windows XP x64 Edition can use GPT disks for data only.

32-bit version of Windows XP cannot read, write, and boot from GPT disks

Starting with Windows Server 2003 Service Pack 1, all versions of Windows Server can use GPT partitioned disks for data. Booting is only supported for 64-bit editions on Itanium-based systems.

Windows 7, Windows Vista, and Windows Server 2008 can use GPT partitioned disks for data.
Booting is only supported for 64-bit editions on UEFI-based systems.

So unless you have UEFI based system which is pretty rare at this date.

We can safely assume that if you want to dual boot from single RAID0 disk you have to use MBR
Top
Hu
Administrator
Administrator
Posts: 24389
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Feb 04, 2012 7:59 pm

The FAQ you quoted states that you can use GPT with Windows.

In fact, I do have a UEFI system. I did not go out of my way to get it. The system that I wanted happened to be UEFI based and it works fine.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Feb 04, 2012 8:03 pm

choucete,

Your patririon table if fine, if a bit odd.

You have a raid0 fakeraid setup, which accounts for

Code: Select all

   Device Boot      Start         End      Blocks   Id  System 
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT 
/dev/sda2          206848  1339146269   669469711    7  HPFS/NTFS/exFAT 
/dev/sda3      1339146270  1953520064   307186897+  83  Linux
Notice that the final block 1953520064 is well off the end of a 500Gb disk ... Thats around 1TB.
This also accounts for the

Code: Select all

 Disk /dev/sdb doesn't contain a valid partition table
because sda and sdb are being striped together in raid0.
The partition table on sda describes all the space on both drives.

Code: Select all

      Device Boot      Start         End      Blocks   Id  System 
/dev/md126p1   *        2048      206847      102400    7  HPFS/NTFS/exFAT 
/dev/md126p2          206848  1339146269   669469711    7  HPFS/NTFS/exFAT 
/dev/md126p3      1339146270  1953520064   307186897+  83  Linux
shows you have made partitions on your raid0 set.
Thats OK as linux understands that now. Its fairly recent though.

Getting this setup to work will be a bit more challenging that a normal install as your kernel needs to make the raid work before it can do very much.
How you do that depends on on how you made the raid0 set in the first place.
You could have used BIOS raid, which is known as fakeraid, or you could have used Windows dynamic disks.
Linux understands both.

This has nothng to do with GPT - fdisk would have shown you a single partition of type 0xEE if your system was partitioned using GPT.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
choucete
n00b
n00b
Posts: 13
Joined: Thu Jan 05, 2012 4:49 pm

  • Quote

Post by choucete » Tue Feb 07, 2012 9:38 am

Thanks to all of you for replying. You have helped me gain a lot of understanding about what is going on.

BTW, I did not set the fake RAID, it is just how I purchased the box (yeah, I was lazy and got it set up for me :oops: )

It took me a couple of days to reply because it also took me some time to go ahead and try this. Turns out I recently lost a whole windows partition on another box while installing Gentoo because of a typo, so I am kind of stigmatized about it. :oops:

This is how my disks look now:

Code: Select all

Disk /dev/md126: 1000.2 GB, 1000210432000 bytes
2 heads, 4 sectors/track, 244192000 cylinders, total 1953536000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 131072 bytes / 262144 bytes
Disk identifier: 0xc39a7e2a

      Device Boot      Start         End      Blocks   Id  System
/dev/md126p1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/md126p2          206848  1113866774   556829963+   7  HPFS/NTFS/exFAT
/dev/md126p3      1113866775  1953535999   419834612+   5  Extended
Partition 3 does not start on physical sector boundary.
/dev/md126p5      1113868823  1114277887      204532+  83  Linux                 --> /boot
Partition 5 does not start on physical sector boundary.
/dev/md126p6      1114279936  1135251455    10485760   83  Linux                 --> /
/dev/md126p7      1135253504  1156225023    10485760   82  Linux swap / Solaris  --> swap
/dev/md126p8      1156227072  1953535999   398654464   83  Linux                 --> /home
The installation was all right and I am utterly amazed at the processor speed (compiled the kernel on 1m 22s :D ), but I found an error when trying to install grub, first it was Error 17 when trying to set the root to hd(0,0) (Windows) and then Error 18 when trying to set the root to hd(0,4) (/boot). I checked and I am still available to access windows without issues (what had me worried).

I am seriously thinking of just formatting the whole and getting rid of the fake RAID, using one disk for Windows and another for Linux, not because I want to take the easy way out, but because at this point I'm feeling that this configuration is highly impractical. It worked for the only Windows to play role, but since the box will be switching roles, it might be also good to change its configuration.

What do you guys think?
Top
Kaso_da_Zmok
Apprentice
Apprentice
User avatar
Posts: 189
Joined: Thu Aug 19, 2004 5:30 pm
Location: Zurich, Switzerland

  • Quote

Post by Kaso_da_Zmok » Tue Feb 07, 2012 10:02 am

did you follow wiki?
http://en.gentoo-wiki.com/wiki/RAID/Onb ... stall_Grub
http://en.gentoo-wiki.com/wiki/RAID/NVR ... lling_GRUB
Top
choucete
n00b
n00b
Posts: 13
Joined: Thu Jan 05, 2012 4:49 pm

  • Quote

Post by choucete » Wed Feb 08, 2012 10:23 pm

Well, following the wiki links provided I stumble against the same wall:

Code: Select all

grub> device (hd0) /dev/mapper/isw_chcgebbdc_Raid00

grub> root (hd0,
 Possible partitions are:
   Partition num: 0,  Filesystem type unknown, partition type 0x7
   Partition num: 1,  Filesystem type unknown, partition type 0x7

grub> root (hd0,0)
 Filesystem type unknown, partition type 0x7

grub> setup (hd0)

Error 17: Cannot mount selected partition
The problem is (if I understand correctly) that hd(0,0) is the boot partition for windows, and the gentoo /boot is partition 5 (isw_chcgebbdc_Raid005) which is way out of range for the BIOS. Is this correct?
Top
Kaso_da_Zmok
Apprentice
Apprentice
User avatar
Posts: 189
Joined: Thu Aug 19, 2004 5:30 pm
Location: Zurich, Switzerland

  • Quote

Post by Kaso_da_Zmok » Thu Feb 09, 2012 3:04 pm

Did you try to set the C H S ?

Boot-partition-not-first Method
Run fdisk on the raid drive, and note C/H/S informations for later usage in grub.
grub> geometry (hd0) C H S
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Feb 09, 2012 7:17 pm

choucete,

Try it, you should be pleasently surprised. All modern BIOSes can cope with 48 bit LBA, so they can eassily read aly of todays HDD.

You don'tt even need to edit anything, not right away away anyway.

At the grub splash screen, press the 'e' key. This takes you into edit mode, where you can edit int in memory copy of of grub.conf before you use it to boot. Changes are not saved.

In your Gentoo boot stanza, change the

Code: Select all

root (hd0,0)
to whatevr you like and allow the boot to continue.
root (hd0,4) looks like it might work.

The hard bit is getting device mapper working in the initrd and you appear to have done that.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
choucete
n00b
n00b
Posts: 13
Joined: Thu Jan 05, 2012 4:49 pm

  • Quote

Post by choucete » Fri Feb 10, 2012 12:29 pm

Ok guys, it worked!

The grub> geometry (hd0) C H S did it wonderfully, I am now able to boot without any loss on my windows, though Gentoo has a kernel panic, I will try to solve it myself or I will create a new thread.

Thanks a lot!
Top
Post Reply

12 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic