Help! Tried to install Ubuntu, now OS X won't boot!

Discussion in 'macOS' started by Invizzible, Jan 7, 2009.

  1. Invizzible macrumors regular

    Joined:
    Feb 9, 2003
    #1
    I'm running 10.5.6 on a 24" iMac. I tried to install Ubuntu on an external drive (new at this). It seemed to work, except after the install, it said I had to reboot so I did but instead of booting into Ubuntu (or OS X for that matter), I just got a folder with a question mark (where normally the grey apple is when booting into OS X). I then disconnected the external drive and restarted, thinking I could boot into OS X on my internal drive but once again I got the folder/question mark icon. So right now I'm running off my OS X backup firewire drive. Strange thing is, when I am booted into the backup drive, I can see my iMac's internal drive on the desktop and when I look inside, everything seems to be there. Did Ubuntu screw up a system file?? I've tried selecting the internal drive in "System Preferences>Startup Disk", and it allows me to select it as the startup disk, but when I restart it won't boot to the internal drive. I either get the folder/question mark, or if my backup drive is connected then it reverts to booting to that one. Is there any way to fix this besides copying my backup drive over to the internal drive? I'd prefer to avoid that, since it will take a while and also my backup is a week old. Anyone who can help will be saving my iLife!!!
     
  2. r.j.s Moderator emeritus

    r.j.s

    Joined:
    Mar 7, 2007
    Location:
    Texas
    #2
    Ubuntu may have screwed up the bootloader.

    You will probably have to clone the backup back, unless someone else knows how to fix it ...
     
  3. cablebob1 macrumors newbie

    Joined:
    Aug 27, 2008
    #3
    Re:

    What happens when you hold down the option button while booting?
     
  4. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #4
    When I boot up holding the option key, it shows me an icon for the backup drive only.

    What's a bootloader? Is it a file? Can I just copy that file from the backup over to the internal drive?

    I tried repairing permissions, no luck.
     
  5. r.j.s Moderator emeritus

    r.j.s

    Joined:
    Mar 7, 2007
    Location:
    Texas
    #5
    I have no idea where to find the boot info for OS X, but if you can hold out for a little while, either I or someone else may be able to find the info for you.
     
  6. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #6
    I can definitely hold out for a while, and thanks for the help! I'm online now trying to figure this out, and I'm over my head! I'm wondering if I can just copy the Preferences folder over....or the System folder....or....like I said, over my head!
     
  7. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #7
    Found this online, no idea what it means but maybe someone here does:

    OSX uses Darwin as a bootloader, at least in my system, and it will allow multiple OS boot options.
    Ubuntu uses Grub, which will also allow multiple boot options.
    It appears that Grub, on setup, will not see the OSx boot, so you have to manually enter it.
    If you install Ubuntu, you will get Grub as the bootloader, but you have to add a new set of lines that has the appearance:

    Title OSX Leopard
    Root (hd0,1)
    MakeActive
    Chainloader +1
     
  8. r.j.s Moderator emeritus

    r.j.s

    Joined:
    Mar 7, 2007
    Location:
    Texas
    #8
    So that means, all you have to do is edit the grub files, but I don't know where to find them.
     
  9. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #9
    Ok, suddenly this problems appears to be worse than I originally thought. I tried to restore my internal HD using Carbon Copy Cloner, to clone the backup drive (this is how I originally made the backup drive, it worked perfectly), and after copying only about 700mb (of approx 150 gb), CCC told me it was done and the clone was complete. Still can't boot to the internal drive. I'm totally at a loss now. And it's late so I gotta crash and then go to work. I'll be back tomorrow eve to see if anyone can throw a miracle my way and help me recover from Ubuntu hell.
     
  10. msjones macrumors 6502

    msjones

    Joined:
    Oct 18, 2007
    Location:
    Nottinghamshire, UK
    #10
    OK to edit grub, boot into ubuntu.

    Open a terminal and type:

    sudo gedit /boot/grub/menu.lst

    This is the boot list for OS/Memtest etc.

    Scroll to the bottom of the grub menu and enter the following under where it says ### END DEBIAN AUTOMAGIC KERNELS LIST

    title MacOS X
    rootnoverify (hd0,*)
    makeactive
    chainloader +1

    Substitute the * for the partition number, in your case it maybe (hd0,1).

    If you struggle post me the contents of your /boot/grub/menu.lst file and ill fix it for you. Also a list of whats found in /dev would be handy.
     
  11. r.j.s Moderator emeritus

    r.j.s

    Joined:
    Mar 7, 2007
    Location:
    Texas
    #11
    Does he need to be root for this, or will any admin work?
     
  12. msjones macrumors 6502

    msjones

    Joined:
    Oct 18, 2007
    Location:
    Nottinghamshire, UK
    #12
    Log in as any user, the sudo command emulates root permissions.
     
  13. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #13
    Thanks very much for the help, but....tried it, no dice. Couldn't be sure if there's a space after "gedit", so I tried both ways. First with no space, says "command not found". So then with a space, it opened up a opened up a document "menu.lst" but the page is totally blank.

    In case it wasn't clear in my original post, I do not have a functioning installation of Ubuntu. Even though, when installing it on the external FW drive, it told me the installation had completed, when I restarted it failed to boot. So, in order to follow the first instruction above, I booted into Ubuntu from the install disc. Is that why my menu.lst is blank?

    I'm thinking at this point I should just wipe the iMac's internal HD with Disk Utility, and then try CCC again, to clone my backup over to the internal drive. Only problem with that is, if CCC continues to fail, then I'm really hosed.
     
  14. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #14
    Ok, made some progress. I discovered that even though my iMac won't boot to the Ubuntu FW drive (and in fact says it can't even read it), once I'm booted into Ubuntu using the install disc, I can then mount the Ubuntu FW drive. So by doing that, I was able to open the menu.lst file. I tried typing in what you said, and I assume the next step is to just save the edited file, but it wouldn't let me save it. Said something about I didn't have those permissions.

    Anyway, I copy/pasted the contents of the menu.lst into a text file, which I'm attaching here. Hopefully this works. I'm in Ubuntu right now, and saved this file with Ubuntu's text editor. Not sure this file type is attachable here, but here goes.

    Ok, that didn't work. I'll just paste the whole thing in here:

    # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.

    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    #
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not use 'savedefault' or your
    # array will desync and will not let you boot your system.
    default 0

    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 3

    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    hiddenmenu

    # Pretty colours
    #color cyan/blue white/blue

    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret

    #
    # examples
    #
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    #
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    #

    #
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below

    ## DO NOT UNCOMMENT THEM, Just edit them to your needs

    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=UUID=43f03931-a1ad-4085-8529-773751727091 ro

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=43f03931-a1ad-4085-8529-773751727091

    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true

    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false

    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=quiet splash

    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false

    ## Xen hypervisor options to use with the default Xen boot option
    # xenhopt=

    ## Xen Linux kernel options to use with the default Xen boot option
    # xenkopt=console=tty0

    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery) single
    # altoptions=(recovery mode) single

    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all

    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true

    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false

    ## should update-grub add savedefault to the default options
    ## can be true or false
    # savedefault=false

    ## ## End Default Options ##

    title Ubuntu 8.10, kernel 2.6.27-7-generic
    uuid 43f03931-a1ad-4085-8529-773751727091
    kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=43f03931-a1ad-4085-8529-773751727091 ro quiet splash
    initrd /boot/initrd.img-2.6.27-7-generic
    quiet

    title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
    uuid 43f03931-a1ad-4085-8529-773751727091
    kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=43f03931-a1ad-4085-8529-773751727091 ro single
    initrd /boot/initrd.img-2.6.27-7-generic

    title Ubuntu 8.10, memtest86+
    uuid 43f03931-a1ad-4085-8529-773751727091
    kernel /boot/memtest86+.bin
    quiet

    ### END DEBIAN AUTOMAGIC KERNELS LIST

    title MacOS X
    rootnoverify (hd0,1)
    makeactive
    chainloader +1
     
  15. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #15
    Ok, more update: I managed to save the edited menu.lst file in the boot/grub folder of the installed Ubuntu on the FW drive. However, doesn't seem to have changed anything. I rebooted the Mac and it still can't boot to OS X, and still doesn't see the Ubuntu drive. Just gives me the folder with the question mark.
     
  16. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #16
    Oh, you wanted a list of stuff in the dev folder. Here it is [this is from the Ubuntu drive's dev folder. The iMac's OS X internal drive has nothing in its dev folder]. The last 3 on this list are folders, all others appear to be files.....Sorry I can't be of more help. This is all Greek to me.

    /media/disk/dev/zero
    /media/disk/dev/xconsole
    /media/disk/dev/urandom
    /media/disk/dev/tty9
    /media/disk/dev/tty8
    /media/disk/dev/tty7
    /media/disk/dev/tty6
    /media/disk/dev/tty5
    /media/disk/dev/tty4
    /media/disk/dev/tty3
    /media/disk/dev/tty2
    /media/disk/dev/tty1
    /media/disk/dev/tty0
    /media/disk/dev/tty
    /media/disk/dev/stdout
    /media/disk/dev/stdin
    /media/disk/dev/stderr
    /media/disk/dev/sndstat
    /media/disk/dev/smpte3
    /media/disk/dev/smpte2
    /media/disk/dev/smpte1
    /media/disk/dev/smpte0
    /media/disk/dev/sequencer
    /media/disk/dev/rmidi3
    /media/disk/dev/rmidi2
    /media/disk/dev/rmidi1
    /media/disk/dev/rmidi0
    /media/disk/dev/random
    /media/disk/dev/ram16
    /media/disk/dev/ram15
    /media/disk/dev/ram14
    /media/disk/dev/ram13
    /media/disk/dev/ram12
    /media/disk/dev/ram11
    /media/disk/dev/ram10
    /media/disk/dev/ram9
    /media/disk/dev/ram8
    /media/disk/dev/ram7
    /media/disk/dev/ram6
    /media/disk/dev/ram5
    /media/disk/dev/ram4
    /media/disk/dev/ram3
    /media/disk/dev/ram2
    /media/disk/dev/ram1
    /media/disk/dev/ram0
    /media/disk/dev/ram
    /media/disk/dev/ptmx
    /media/disk/dev/port
    /media/disk/dev/null
    /media/disk/dev/mpu401stat
    /media/disk/dev/mpu401data
    /media/disk/dev/mixer3
    /media/disk/dev/mixer2
    /media/disk/dev/mixer1
    /media/disk/dev/mixer
    /media/disk/dev/midi03
    /media/disk/dev/midi3
    /media/disk/dev/midi02
    /media/disk/dev/midi2
    /media/disk/dev/midi01
    /media/disk/dev/midi1
    /media/disk/dev/midi00
    /media/disk/dev/midi0
    /media/disk/dev/mem
    /media/disk/dev/loop7
    /media/disk/dev/loop6
    /media/disk/dev/loop5
    /media/disk/dev/loop4
    /media/disk/dev/loop3
    /media/disk/dev/loop2
    /media/disk/dev/loop1
    /media/disk/dev/loop0
    /media/disk/dev/kmem
    /media/disk/dev/i2c-7
    /media/disk/dev/i2c-6
    /media/disk/dev/i2c-5
    /media/disk/dev/i2c-4
    /media/disk/dev/i2c-3
    /media/disk/dev/i2c-2
    /media/disk/dev/i2c-1
    /media/disk/dev/i2c-0
    /media/disk/dev/full
    /media/disk/dev/dsp3
    /media/disk/dev/dsp2
    /media/disk/dev/dsp1
    /media/disk/dev/dsp
    /media/disk/dev/core
    /media/disk/dev/console
    /media/disk/dev/audioctl
    /media/disk/dev/audio3
    /media/disk/dev/audio2
    /media/disk/dev/audio1
    /media/disk/dev/audio
    /media/disk/dev/apm_bios
    /media/disk/dev/agpgart
    /media/disk/dev/shm
    /media/disk/dev/pts
    /media/disk/dev/fd
     
  17. drichards macrumors 6502a

    drichards

    Joined:
    Nov 30, 2008
    #17
    You have a perfectly good Unix system to work with... and you messed it all up with Ubuntu Linux. What lesson have we learned?
     
  18. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #18
    Yeah, tell me about it! Someone told me Ubuntu is really cool, and harmless. Thought I'd check it out.

    I still don't understand two things:

    1) Why did Ubuntu do anything at all to my iMac's internal hard drive?

    2) How can a menu.lst file on my external Ubuntu drive have any effect on whether or not my iMac will boot to OS X on its internal HD?

    If anyone can recommend a good source for beginners to learn about this voodoo, I'd love to educate myself.
     
  19. msjones macrumors 6502

    msjones

    Joined:
    Oct 18, 2007
    Location:
    Nottinghamshire, UK
    #19
    Grub is a boot loader. On a Windows box it writes itself to the MBR of the hardrive, I would assume it to do the same on a Mac, however I could be wrong.

    If OS X is still on the internal drive, and grub on the external, when you boot the external for ubuntu (press option when you hear the chime and select your exernal) you should see OS X in the boot list. This means you can then point the installation to the OS X partition, a sort of target mode. I know this would become a pain when wanting to boot into OS X having to boot ubuntu first.

    You have correctly amended you meny.lst, so the above should work. With the folder and ?, does this mean the OS is gone from the drive? When installing ubutnu you may have wiped both drives in the partition manager.
     
  20. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #20
    OS X is still on my internal drive. All my files, far as I can tell, are still there. I just can't boot to it. Also, I tried holding "Option" down when booting, while having the Ubuntu drive plugged in, and I get no options - neither my internal OS X drive nor my external Ubuntu drive shows up. Something went wrong with my Ubuntu installation. The only way I can boot into Ubuntu is to boot to the install disc. Once I'm in that, I can open the external Ubuntu drive, see all the files, edit its menu.lst, save it, etc..... But it still won't let me boot to it. And I can also see my internal OS X drive. But I can't boot to that one either. I suspect the Ubuntu installation did two things: Changed something on the OS X drive, and screwed up the Ubuntu installation. I'm beginning to think I should just cross my fingers, wipe my OS X drive, and hope CCC behaves itself and properly clones my backup onto my iMac's internal drive.
     
  21. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #21
    I don't know if this helps anyone understand what happened, but I see that in the Ubuntu partition manager, the first partition is /dev/sda1, its filesystem is fat32, it's 200mb (20.22 used), and under flags it says "boot". The next partition is obviously my internal drive [500mb drive], the partition is /dev/sda2, filesystem is hfs+, and the third partition is greyed out and says "Unallocated" and 125.53mb.

    All three of these show up when I select my internal HD.

    I don't know why the first partition is there. Does that mean Ubuntu installed a boot loader on my OS X drive, and formatted it for fat 32? Is that a problem?
     
  22. MacAficionado macrumors 6502

    Joined:
    Oct 5, 2002
    Location:
    An awesome place
    #22
    Wow - I can't believe all the bad advise.

    Just put the OS X restore disk into the drive, boot into it and do an archive and install.

    Hopefully you did not damage it enough to make this impossible!!!

    http://support.apple.com/kb/HT1710
     
  23. Invizzible thread starter macrumors regular

    Joined:
    Feb 9, 2003
    #23
    My iMac came with Tiger install discs, and a Leopard "Drop in Kit" disc. As luck would have it, I have the Tiger discs here I can't find the Leopard disc. Gotta be here somewhere. But you've given me another idea. Do you think if I run the 10.5.6 combo updater (assuming there is one), that might fix it?


    Oh wait....can't do that if I can't boot to it.

    ...Or maybe I can. If I boot to the backup OS X drive, maybe the update file will see OS X is installed on the internal drive and offer it as an option..... Gonna give it a whirl.
     
  24. ercanbas macrumors regular

    Joined:
    Feb 15, 2008
    #24

    My question is what is the point of having Ubuntu when you have Leopard :p
    I can understand why people install Windows (for gaming) but I don't see a point in any other OS IMHO.
     
  25. msjones macrumors 6502

    msjones

    Joined:
    Oct 18, 2007
    Location:
    Nottinghamshire, UK
    #25
    well, all I can say is sh*t. I have linux running on my macbook, dual booting with OS X. However I used bootcamp and rEfit as a boot selector.

    Probably your best bet would be to re-install OS X (if you can fond the disk) I think you are able to install over the top of current installation and not lose any work, can anybody verify this?

    When your back and running, try bootcamp or VM for linux.

    I use linux as its a hell of a lot more open than OS X. But I must admit, no distro I have come across is as smooth as mac, But i dont really care for the X11 sub system in OSX.
     

Share This Page