Ubuntu/Kubuntu on Mac G5.

Brian Durant RoadTripDK at MyRealBox.Com
Mon Jan 23 15:22:46 UTC 2006


On 23. jan 2006, at 14.07, Larry Grover wrote:

> Brian Durant wrote:
>> On 23. jan 2006, at 0.21, Larry Grover wrote:
>>> Brian Durant wrote:
>>>
>>>> On 22. jan 2006, at 20.50, Larry Grover wrote:
>>>>
>>>>> To my eyes your yaboot.conf file looks OK, *except* that I  
>>>>> think   your hard drives should probably be sda and sdb, not  
>>>>> sdb and  sdc.  Information from gparted for each of your drives  
>>>>> would  help, or  else the output from fdisk:
>>>>>
>>>>> sudo fdisk -l /dev/sda
>>>>> sudo fdisk -l /dev/sdb
>>>>> sudo fdisk -l /dev/sdc
>>>>>
>>>>> If you can fix your yaboot.conf file, you can install yaboot   
>>>>> using  the "ybin" command.  This may be as simple as changing   
>>>>> "sdb" to  "sda" and "sdc" to "sdb", but let's see some   
>>>>> information on how  your drives are partitioned first.
>>>>
>>>> OK, here is the output:
>>>> ubuntu at ubuntu:~$ sudo fdisk -l /dev/sda
>>>> /dev/sda
>>>>         #                    type name                   
>>>> length     base      ( size )  system
>>>> /dev/sda1     Apple_partition_map Apple                     63  
>>>> @   1         ( 31.5k)  Partition map
>>>> /dev/sda2         Apple_Bootstrap untitled                1954  
>>>> @   64        (977.0k)  NewWorld bootblock
>>>> /dev/sda3         Apple_UNIX_SVR2 untitled           150386719  
>>>> @   2018      ( 71.7G)  Linux native
>>>> /dev/sda4         Apple_UNIX_SVR2 swap                 5912751  
>>>> @   150388737 (  2.8G)  Linux swap
>>>> Block size=512, Number of Blocks=156301488
>>>> DeviceType=0x0, DeviceId=0x0
>>>> ubuntu at ubuntu:~$ sudo fdisk -l /dev/sdb
>>>> /dev/sdb
>>>>         #                    type name                   
>>>> length     base      ( size )  system
>>>> /dev/sdb1     Apple_partition_map Apple                     63  
>>>> @   1         ( 31.5k)  Partition map
>>>> /dev/sdb2              Apple_Free                       262144  
>>>> @   64        (128.0M)  Free space
>>>> /dev/sdb3               Apple_HFS Untitled           319910838  
>>>> @   262208    (152.5G)  HFS
>>>> /dev/sdb4              Apple_Free                           10  
>>>> @   320173046 (  5.0k)  Free space
>>>> Block size=512, Number of Blocks=320173056
>>>> DeviceType=0x0, DeviceId=0x0
>>>> ubuntu at ubuntu:~$ sudo fdisk -l /dev/sdc
>>>> ubuntu at ubuntu:~$
>>>> Hope this helps. Please advise as to what I should do to get   
>>>> Ubuntu  on track.
>>>
>>>
>>> OK, it looks like sda is your linux drive:  sda2 is the  
>>> bootstrap  partition and sda3 is the /  partition (sda4 is your  
>>> linux swap  partition).  OSX looks to be on sdb3.
>>>
>>> If you can get access to sda3, you can probably fix things.  I   
>>> haven't worked with the live-CD much, but I think you should be   
>>> able to do use it for this.  You will need to get into /etc/  
>>> yaboot.conf on the sda3 partition and edit it.  I've edited the   
>>> yaboot.conf.copy file you posted earlier -- I think the changes  
>>> I  made will allow yaboot to install -- and I'll include it at  
>>> the end  of this email.
>>>
>>> Once you've edited the yaboot.conf file, and saved it, you will   
>>> need to get to a command line (open a terminal window) and run  
>>> the  ybin command.   Because the live-CD is not running from your  
>>> hard  dirve, you will need to give ybin the full, correct path to  
>>> your  yaboot.conf file.  The command you run should be like this:
>>>
>>> sudo ybin --config /full/path/to/yaboot.conf -v
>>>
>>> You will need to substitute in the correct path to your  
>>> yaboot.conf  file.  I'm not sure where the live-CD will mount  
>>> your sda3  partition -- or even if it will automatically mount  
>>> it.  You can  find out if sda3 is mounted by opening a terminal  
>>> window and  running the commant:
>>>
>>> mount
>>>
>>> ...with no options:  it will list all the mounted partitions.   
>>> If  sda3 is not automatically mounted, you can manually mount it:
>>>
>>> sudo mkdir /mnt/linux
>>> sudo mount -t ext3 /dev/sda3 /mnt/linux
>>>
>>> In this case, the file you edit will be in /mnt/linux/etc and  
>>> the  full path to your yaboot.conf file will be /mnt/linux/etc/ 
>>> yaboot.conf
>>>
>>> Make a note of the output from the ybin command -- post the  
>>> output  if you have troubles.
>> OK, everything up to this point went fine and dandy. The output  
>> of  the above command was as follows:
>> ubuntu at ubuntu:~$ sudo ybin --config /mnt/linux/etc/yaboot.conf -v
>> ybin: Finding OpenFirmware device path to `/dev/sda2'...
>> ybin: Finding OpenFirmware device path to `/dev/sdb3'...
>> hmount: /dev/sda2: not a Macintosh HFS volume (Invalid argument)
>> ybin: /dev/sda2 appears to have never had a bootstrap installed,   
>> please run mkofboot
>> I haven't done anything in this area as I decided the safest bet  
>> was  to wait for a reply to this error.
>
> It sounds like you need to run the "mkofboot" command.  You can  
> look at the man pages for mkofboot and ybin to seen the difference  
> between the two.  Open a terminal window and type:
>
> man mkofboot
> man ybin
>
> I've never had to run the mkofboot command, but from the man pages,  
> it sounds like it does the same thing as ybin, except that before  
> it installs the bootloader (yaboot) it prepares the bootstrap  
> partition (creates a filesystem).  I believe mkofboot is normally  
> run during the install, but it sounds like this didn't happen  
> (probably related to the failure to install the bootloader).
>
> The man page says that mkofboot takes the same arguements as ybin,  
> so I suggest doing basically what you did before:  boot the live- 
> CD, make sure your sda3 partition is mounted, but no need to re- 
> edit the yaboot.conf file.  Then run the mkofboot command:
>
> sudo mkofboot --config /full/path/to/yaboot.conf -v
>
>>> Before you reboot from the live-CD, you should probably check  
>>> the / etc/fstab file (on the sda3 partition).  It should include  
>>> a line  that reads:
>>>
>>> /dev/sda3     /       ext3    defaults,errors=remount-ro    0     1
>> Both of the lines read "sdb", so I changed them to read "sda" and   
>> left the number of the partitions the same.
>>>
>>> ...assuming your / partition is ext3 and not some other filesystem.
>>>
>>> Let us know how things go.
>> You are hereby notified ;-) I hope you know where we can go from   
>> here. BTW, when I booted into OS X, there was no yaboot dialog or   
>> anything. I don't know if that is part of what the error message  
>> was  telling me.
>
> The ybin command bailed before it installed the bootloader  
> (yaboot), apparently because your bootstrap partition was not  
> formated.  I think the mkofboot command will take care of this.
>
> If the mkofboot/ybin command succeeds, you should see something  
> like this:
>
> ybin: Finding OpenFirmware device path to `/dev/hda9'...
> ybin: Finding OpenFirmware device path to `/dev/hda12'...
> ybin: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto / 
> dev/hda9...
> ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/ 
> hda9...
> ybin: Installing /etc/yaboot.conf onto /dev/hda9...
> ybin: Setting attributes on ofboot...
> ybin: Setting attributes on yaboot...
> ybin: Setting attributes on yaboot.conf...
> ybin: Blessing /dev/hda9 with Holy Penguin Pee...
> ybin: Updating OpenFirmware boot-device variable in nvram...
>
> with your sda2, sda3, etc partitions instead of my hdaX partitions.

OK, I followed your instructions to the letter. and here is the output:

ubuntu at ubuntu:~$ sudo mkdir /mnt/linux
ubuntu at ubuntu:~$ sudo mount -t ext3 /dev/sda3 /mnt/linux
ubuntu at ubuntu:~$ sudo mkofboot --config /mnt/linux/etc/yaboot.conf -v
mkofboot: Finding OpenFirmware device path to `/dev/sda2'...
mkofboot: Finding OpenFirmware device path to `/dev/sdb3'...

mkofboot: Create hfs filesystem on /dev/sda2? [y/N] y
mkofboot: Creating HFS filesystem on /dev/sda2...
mkofboot: Installing first stage bootstrap /usr/lib/yaboot/ofboot  
onto /dev/sda2...
mkofboot: Installing primary bootstrap /usr/lib/yaboot/yaboot onto / 
dev/sda2...
mkofboot: Installing /mnt/linux/etc/yaboot.conf onto /dev/sda2...
mkofboot: Setting attributes on ofboot...
mkofboot: Setting attributes on yaboot...
mkofboot: Setting attributes on yaboot.conf...
mkofboot: Blessing /dev/sda2 with Holy Penguin Pee...
mkofboot: Updating OpenFirmware boot-device variable in nvram...
mkofboot: Installation complete.

Everything looks fine and dandy, but in Open Firmware (after a  
restart), neither Ubuntu nor OS X will boot successfully. I then went  
back to the live-CD and followed the exact same instructions for  
ybin. The output was the same as above. I checked all of the paths in  
yaboot.conf and everything seemed OK. Then I tried again to get into  
OS X, this time just waiting for it to default. No luck, I tried  
Ubuntu and still no go. Here is the output when I try to boot into  
Ubuntu:

/k2-sata at 0/disk at 0: /boot/vmlinux: Unablet to open file. Invalid device.

At this time I would like to repeat that I have visually checked to  
make sure that everything has the right path. I even checked to see  
if /boot/vmlinux, which is an alias, actually pointed to the actual  
kernel. It did. I don't understand this at all. The only way that I  
can boot into OS X to send you this e-mail, is that I physically  
unplugged the other SATA drive (sda). I hope you have some good ideas...

Cheers,

Brian





More information about the ubuntu-users mailing list