Ubuntu on a second disk

Discussion in 'Linux Virtual Machine' started by michel, Sep 21, 2010.

  1. michel

    michel Junior Member

    Messages:
    12
    Hi,

    Using a MacPro, I was finaly able to install Ubuntu Desktop on the second HDD along side with WinXP. Had WinXP installed before using Boot Camp, no problem, but adding Ubuntu was blowing the entire install (messing up the boot loader). I came across a mean to install both XP and Ubuntu on a second HD using this process (http://www.youtube.com/watch?v=6SRKnWC3BDo) and then had to do some trick to have rEFIt to see my partition (http://wiki.debian.org/DebianOnIntelMacPro#line-187). It's working perfect!

    My question is about Parallels 6. Was able to create a VM of my Ubuntu partition on second HDD (through Boot Camp option in Parallels) as I did for WinXP, but Ubuntu doesn't start: error message - not OS found.

    Any idea?

    Thanks
     
  2. joevt

    joevt Forum Maven

    Messages:
    1,229
    rEFIt does have a fix to run legacy OS's on multiple disks but you have to recompile/rebuild rEFIt from source code. If you only have one OS on each disk, then you don't need rEFIt. You can use the Mac OS X Startup Disk preference to select between different disks or you can hold down option key at startup and use the Startup Manager to choose between disks.
    http://support.apple.com/kb/HT1310?viewlocale=en_US

    Ubuntu can be installed on the same disk without messing up the boot code in the MBR by using the Advanced button in the installer and selecting the Ubuntu partition as the location for grub.
    https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation
    That way, the MBR boot code will work for either your Windows partition or your Linux partition - it will run the boot code on the partition that is set as the active partition (which rEFIt sets for you every time you boot one of the partitions).

    You have GRUB or LILO on the first disk. Do you have any boot code on the second disk? If not, then your VM setup will need to include the first disk. Preferably, you should add boot code to the second disk so you don't need to do that. Read the GRUB2 documentation to find out how.

    You need to check your partition tables. Run the following commands (replace 1 with the number for your Ubuntu disk):
    Code:
    diskutil list /dev/disk1
    sudo fdisk /dev/rdisk1
    sudo gpt -r show -l /dev/disk1
    
    Does the partition table in the MBR (fdisk) and the guid partition table (gpt) both include the Ubuntu partition? Is the Ubuntu partition set as the active partition?

    Do you have a swap partition? If you do then it should be included in your VM Hard Disk configuration (Edit Partitions). The swap partition does not need to be in the MBR but it should be in the GPT.

    Check the boot code on the MBR:
    Code:
    sudo dd if=/dev/disk1 count=1 | xxd
    
    You should see some strings like "Invalid partition table" or "Error loading operating system", etc.

    Check the boot code on the Ubuntu partition (replace 1234 with the start block of the partition):
    Code:
    sudo dd if=/dev/disk1 count=1 skip=1234 | xxd
    
    You should see some GRUB strings.

    If you get it booting, then you can install Parallels Tools to Ubuntu.
     
  3. michel

    michel Junior Member

    Messages:
    12
    Thanks much I'll try that and let you know.
     

Share This Page