Ubuntu/Kubuntu on Mac G5.

Larry Grover lgrover at zoominternet.net
Mon Jan 23 13:07:52 UTC 2006


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.

Regards,
Larry




More information about the ubuntu-users mailing list