PDA

View Full Version : Triple Boot: Linux doesn't find /dev/sda3


jazzesnee
8th July 2006, 03:35 PM
Hello,

I'm having troubles with triple booting via Boot Camp. After I repartitioned my HD and finished my Windows installation, I wanted to install Ubuntu Dapper. But I made a mistake: I ran the integrated installer. It installed Ubuntu on my /dev/sda3-Partition just fine, but after copying the files it automatically tried to install Grub into the MBR of /dev/sda.

I can still boot OS X via rEFI, but when I boot Linux from CD (I have already tried Gentoo, Knoppix and Ubuntu) and run 'fdisk /dev/sda' it only displays the /dev/sda1-Partition and nothing else. I am also unable to mount /dev/sda3 or /dev/sda4 from Linux, although the partitions are still there (at least I can see all 3 partitions in the Disk Utility as well as access my Windows partition in the Finder).

I think that Grub somehow messed up my partition table - is there a way to restore it in the way it was after I ran the 'diskutil resizeVolume'-command? Is it possible to simply re-run the command or would that destroy even more?

Thanks for your help!

chrisp
9th July 2006, 09:45 AM
This looks like Ubuntu ran parted as part of the install process, and it restored the hybrid GPT/MBR partition table to a pure GPT one (as per the spec). Try the "Partitioning Tool" button in rEFIt. It runs a tool called gptsync that restores the hybrid GPT/MBR scheme. (You may have to run fdisk in Linux afterwards to set the partition type for the Linux partition; Linux stupidly uses the same "Microsoft Basic Data" type as Windows in GPT tables...)

Re-running diskutil won't help because it only fixes the partition table as a side effect of resizing partitions.

And no, GRUB never ever changes partition tables, and it has code that checks if the disk area between the MBR and the first partition is really free, so on an intact GPT or GPT+MBR partitioned disk it won't overwrite the GPT table area. (That's the reason that a plain GPT table has a dummy MBR table with an "EFI Protective" entry starting at sector 1 in it.)

BTW, you should be able to mount /dev/sda3 from an Ubuntu Live CD because its kernel understands GPT.

jazzesnee
9th July 2006, 01:49 PM
That's odd. Yesterday, I booted into OS X and ran 'diskutil resizeVolume disk0s2 56.2G' (56.2 GB was exactly the same size as the partition had before). After this command I was able to boot Windows via rEFIt again as well as I could see and mount my partitions in Linux again...