Mailing List Archive

yaboot has kicked my butt - 5 times?!
Hi,
OK, I'm dead tired. I admit it - yaboot has kicked my butt this
time around. Can anyone help? I did post this problem here 2-3 weeks
ago but still haven't been able to solve the problem so I'm back to
the well for another drink.

The machine is the original 80GB PPC Mac Mini. I used to run Gentoo
on it and it ran great for years so I know at one time yaboot worked
just fine. For various reasons I hadn't updated it in a long, long
time (2 years) and instead of trying to go through the Gentoo update
process which is difficult after that much time I decided to just do a
new install. I saved copies of my kernel config and etc/make.conf but
unfortunately, being primarily an x86 guy didn't think to save
yaboot.conf and fstab. I've now done 5 complete Gentoo installs,
starting over from scratch in case something I was doing was messing
things up but so far I cannot get the machine to boot. Every time, no
matter what I do at install time, I get a message

"Can't check if filesystem is mounted due to a missing mtab file"

A somewhat out of focus screen shot is shown here:

http://www.flickr.com/photos/29328985@N03/5014227831

Generally speaking I'm following the Gentoo PPC install guide located here:

http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=10

I've tried both the yabootconfig method as well as manual route.
Nothing works for me so far. THey both fail the same way.

It's not in the photo but all the way through the boot the kernel
calls the hard drives /dev/hda so I'm assuming that's correct in
fstab.

The kernel is 2.6.34-gentoo-r2 and the kernel config file is attached.
ext3 is built into the kernel so that shouldn't be a problem. I built
the kernel using the older 2.6.31 kernel config I saved.

As a _hardware_ test I reinstalled the old OS X that came with the
machine and it boots fine. I blew it away and installed Ubuntu 10.04
for the PPC and it boots fine, but Ubuntu uses and initrc which I've
never used before with Gentoo. (And why on this machine as the
hardware is fixed has kernel drivers.)

I'm a long time Gentoo user. The main Gentoo install seems to work
fine on this machine. As best I can tell it's only the yaboot stuff
not booting that's holding me up from using this little machine again.

Can anyone see what I've done wrong?

Thanks,
Mark

livecd ~ # mount /dev/hda4 /mnt/gentoo
livecd ~ # mount -t proc none /mnt/gentoo/proc
livecd ~ # mount -o bind /dev /mnt/gentoo/dev
livecd ~ # mount -o bind /sys /mnt/gentoo/sys
livecd ~ # chroot /mnt/gentoo /bin/bash
livecd / # env-update
>>> Regenerating /etc/ld.so.cache...
livecd / # source /etc/profile
livecd / # export PS1="(chroot) $PS1"
(chroot) livecd / # cat /etc/yaboot.conf

boot=/dev/hda2
#device=/pci@f4000000/ata-6@d/disk@0:
device=hd:
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.34-gentoo-r1
label=Gentoo-2.6.34-r1
partition=4
root=/dev/hda4
read-only
(chroot) livecd / # mac-fdisk -l /dev/hda
/dev/hda
# type name length base
( size ) system
/dev/hda1 Apple_partition_map Apple 63 @ 1
( 31.5k) Partition map
/dev/hda2 Apple_Bootstrap bootstrap 1600 @ 64
(800.0k) NewWorld bootblock
/dev/hda3 Apple_UNIX_SVR2 swap 2097152 @ 1664
( 1.0G) Linux swap
/dev/hda4 Apple_UNIX_SVR2 root 154202672 @
2098816 ( 73.5G) Linux native

Block size=512, Number of Blocks=156301488
DeviceType=0x0, DeviceId=0x0

(chroot) livecd / # cat /etc/fstab
/dev/hda4 / ext3 noatime 0 1
/dev/hda3 none swap sw 0 0

/dev/cdrom /mnt/cdrom auto noauto,user 0 0

proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
(chroot) livecd / # ybin -v
ybin: Finding OpenFirmware device path to `/dev/hda2'...
ybin: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto /dev/hda2...
ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda2...
ybin: Installing /etc/yaboot.conf onto /dev/hda2...
ybin: Setting attributes on ofboot...
ybin: Setting attributes on yaboot...
ybin: Setting attributes on yaboot.conf...
ybin: Blessing /dev/hda2 with Holy Penguin Pee...
ybin: Updating OpenFirmware boot-device variable in nvram...
(chroot) livecd / # ls -al /boot/kernel*
-rwxr-xr-x 1 root root 5547992 Sep 22 11:06 /boot/kernel-2.6.34-gentoo-r1
(chroot) livecd / # exit
exit
livecd ~ # umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo/sys /mnt/gentoo
livecd ~ #
livecd ~ #
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On 09/22/10 18:59, Mark Knecht wrote:
> Hi,
> OK, I'm dead tired. I admit it - yaboot has kicked my butt this
> time around. Can anyone help? I did post this problem here 2-3 weeks
> ago but still haven't been able to solve the problem so I'm back to
> the well for another drink.
>
> The machine is the original 80GB PPC Mac Mini. I used to run Gentoo
> on it and it ran great for years so I know at one time yaboot worked
> just fine. For various reasons I hadn't updated it in a long, long
> time (2 years) and instead of trying to go through the Gentoo update
> process which is difficult after that much time I decided to just do a
> new install. I saved copies of my kernel config and etc/make.conf but
> unfortunately, being primarily an x86 guy didn't think to save
> yaboot.conf and fstab. I've now done 5 complete Gentoo installs,
> starting over from scratch in case something I was doing was messing
> things up but so far I cannot get the machine to boot. Every time, no
> matter what I do at install time, I get a message
>
> "Can't check if filesystem is mounted due to a missing mtab file"
>
> A somewhat out of focus screen shot is shown here:
>
> http://www.flickr.com/photos/29328985@N03/5014227831
>
> Generally speaking I'm following the Gentoo PPC install guide located here:
>
> http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=10
>
> I've tried both the yabootconfig method as well as manual route.
> Nothing works for me so far. THey both fail the same way.
>
> It's not in the photo but all the way through the boot the kernel
> calls the hard drives /dev/hda so I'm assuming that's correct in
> fstab.
>
> The kernel is 2.6.34-gentoo-r2 and the kernel config file is attached.
> ext3 is built into the kernel so that shouldn't be a problem. I built
> the kernel using the older 2.6.31 kernel config I saved.
>
> As a _hardware_ test I reinstalled the old OS X that came with the
> machine and it boots fine. I blew it away and installed Ubuntu 10.04
> for the PPC and it boots fine, but Ubuntu uses and initrc which I've
> never used before with Gentoo. (And why on this machine as the
> hardware is fixed has kernel drivers.)
>
> I'm a long time Gentoo user. The main Gentoo install seems to work
> fine on this machine. As best I can tell it's only the yaboot stuff
> not booting that's holding me up from using this little machine again.
>
> Can anyone see what I've done wrong?
>
> Thanks,
> Mark
>
> livecd ~ # mount /dev/hda4 /mnt/gentoo
> livecd ~ # mount -t proc none /mnt/gentoo/proc
> livecd ~ # mount -o bind /dev /mnt/gentoo/dev
> livecd ~ # mount -o bind /sys /mnt/gentoo/sys
> livecd ~ # chroot /mnt/gentoo /bin/bash
> livecd / # env-update
>>>> Regenerating /etc/ld.so.cache...
> livecd / # source /etc/profile
> livecd / # export PS1="(chroot) $PS1"
> (chroot) livecd / # cat /etc/yaboot.conf
>
> boot=/dev/hda2
> #device=/pci@f4000000/ata-6@d/disk@0:
> device=hd:
> timeout=30
> install=/usr/lib/yaboot/yaboot
> magicboot=/usr/lib/yaboot/ofboot
>
> image=/boot/kernel-2.6.34-gentoo-r1
> label=Gentoo-2.6.34-r1
> partition=4
> root=/dev/hda4
> read-only
> (chroot) livecd / # mac-fdisk -l /dev/hda
> /dev/hda
> # type name length base
> ( size ) system
> /dev/hda1 Apple_partition_map Apple 63 @ 1
> ( 31.5k) Partition map
> /dev/hda2 Apple_Bootstrap bootstrap 1600 @ 64
> (800.0k) NewWorld bootblock
> /dev/hda3 Apple_UNIX_SVR2 swap 2097152 @ 1664
> ( 1.0G) Linux swap
> /dev/hda4 Apple_UNIX_SVR2 root 154202672 @
> 2098816 ( 73.5G) Linux native
>
> Block size=512, Number of Blocks=156301488
> DeviceType=0x0, DeviceId=0x0
>
> (chroot) livecd / # cat /etc/fstab
> /dev/hda4 / ext3 noatime 0 1
> /dev/hda3 none swap sw 0 0
>
> /dev/cdrom /mnt/cdrom auto noauto,user 0 0
>
> proc /proc proc defaults 0 0
> shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
> (chroot) livecd / # ybin -v
> ybin: Finding OpenFirmware device path to `/dev/hda2'...
> ybin: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto /dev/hda2...
> ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda2...
> ybin: Installing /etc/yaboot.conf onto /dev/hda2...
> ybin: Setting attributes on ofboot...
> ybin: Setting attributes on yaboot...
> ybin: Setting attributes on yaboot.conf...
> ybin: Blessing /dev/hda2 with Holy Penguin Pee...
> ybin: Updating OpenFirmware boot-device variable in nvram...
> (chroot) livecd / # ls -al /boot/kernel*
> -rwxr-xr-x 1 root root 5547992 Sep 22 11:06 /boot/kernel-2.6.34-gentoo-r1
> (chroot) livecd / # exit
> exit
> livecd ~ # umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo/sys /mnt/gentoo
> livecd ~ #
> livecd ~ #
After looking at the screen shot, I think I have a different idea as to
why it might be failing and I don't think it's Yaboot. If you've gotten
to init, yaboot's job is already done.

Can you boot the install CD and chroot into the install again? When you
get it up and running, check to see if fsck.ext3 exists. Even if it
does, re-emerge e2fsprogs and see if that helps.
-Joe
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Wed, Sep 22, 2010 at 6:33 PM, Joseph Jezak <josejx@gentoo.org> wrote:
>  On 09/22/10 18:59, Mark Knecht wrote:
>> Hi,
>>   OK, I'm dead tired. I admit it - yaboot has kicked my butt this
>> time around. Can anyone help? I did post this problem here 2-3 weeks
>> ago but still haven't been able to solve the problem so I'm back to
>> the well for another drink.
>>
>>   The machine is the original 80GB PPC Mac Mini. I used to run Gentoo
>> on it and it ran great for years so I know at one time yaboot worked
>> just fine. For various reasons I hadn't updated it in a long, long
>> time (2 years) and instead of trying to go through the Gentoo update
>> process which is difficult after that much time I decided to just do a
>> new install. I saved copies of my kernel config and etc/make.conf but
>> unfortunately, being primarily an x86 guy didn't think to save
>> yaboot.conf and fstab. I've now done 5 complete Gentoo installs,
>> starting over from scratch in case something I was doing was messing
>> things up but so far I cannot get the machine to boot. Every time, no
>> matter what I do at install time, I get a message
>>
>> "Can't check if filesystem is mounted due to a missing mtab file"
>>
>> A somewhat out of focus screen shot is shown here:
>>
>> http://www.flickr.com/photos/29328985@N03/5014227831
>>
>> Generally speaking I'm following the Gentoo PPC install guide located here:
>>
>> http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=10
<SNIP>

> After looking at the screen shot, I think I have a different idea as to
> why it might be failing and I don't think it's Yaboot.  If you've gotten
> to init, yaboot's job is already done.
>
> Can you boot the install CD and chroot into the install again? When you
> get it up and running, check to see if fsck.ext3 exists. Even if it
> does, re-emerge e2fsprogs and see if that helps.
> -Joe

Very interesting. OK - I'm in the chroot now and reinstalling
e2fsprogs as you suggest. I'll reboot in a minute and check if it
helped. (OK - I rebooted and it didn't fix anything unfortunately. Too
bad. Thanks for the idea though.)

I was wondering if this was one of those things where device names
were changing. They were hda all through the install, which is
different from the Install Guide. I've tried to adjust my yaboot.conf
file accordingly but maybe it cannot find the disk at that point
because the name changed or something. I cannot see anything in the
boot screen to indicate that but I suppose it's possible.

While I'm here in the chroot I decided to poke around a bit. Note that
section 9d of the install guide says that e2fsprogs is already
installed as part of the system and indeed it appears to be as shown
below. However I note that I cannot run updatedb for slocate without
also getting a message about /etc/mtab not existing. Should mtab exist
withing the chroot?

(chroot) livecd / # emerge -pv e2fsprogs

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] sys-fs/e2fsprogs-1.41.11 USE="nls" 4,368 kB

Total: 1 package (1 reinstall), Size of downloads: 4,368 kB
(chroot) livecd / # slocate fsck.*
slocate: fatal error: Could not find user database
'/var/lib/slocate/slocate.db': No such file or directory
(chroot) livecd / # updatedb
updatedb: fatal error: load_file: Could not open file: /etc/mtab: No
such file or directory
updatedb: fatal error: parse_fs_exclude: Could not load file data: /etc/mtab
^C
(chroot) livecd / #


Indeed, on a different system /etc/mtab exists:

gandalf ~ # cat /etc/mtab
/dev/sda3 / ext3 rw,noatime,commit=0 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
/dev/sda5 /home/herb ext3 rw,noatime,commit=0 0 0
shm /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0
none /proc/fs/vmblock/mountPoint vmblock rw 0 0
gandalf ~ #

However on my MacMini it simply doesn't exist:

(chroot) livecd / # ls -la /etc/mtab
ls: cannot access /etc/mtab: No such file or directory
(chroot) livecd / #

So the question is what provides mtab? Have I missed some step in the
install process 5 times? Man, that would be embarrassing but I'd
gladly suffer the shame if I got the machine working! ;-)

Thanks for your help. Still looking.

Cheers,
Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
Mark,

> However I note that I cannot run updatedb for slocate without
> also getting a message about /etc/mtab not existing. Should mtab exist
> withing the chroot?

For certain things, it seems to be needed --- the amd64 handbook includes a
way to get it among the grub instructions.

By the way, if I recall correctly, you once mentioned you had an ubuntu on
that machine with grub working --- I would just reuse that grub for booting
gentoo. (I have done this before on amd64, but not on any Mac.)


Wolfram
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On 09/22/10 23:33, Mark Knecht wrote:
> On Wed, Sep 22, 2010 at 6:33 PM, Joseph Jezak <josejx@gentoo.org> wrote:
>> On 09/22/10 18:59, Mark Knecht wrote:
>>> Hi,
>>> OK, I'm dead tired. I admit it - yaboot has kicked my butt this
>>> time around. Can anyone help? I did post this problem here 2-3 weeks
>>> ago but still haven't been able to solve the problem so I'm back to
>>> the well for another drink.
>>>
>>> The machine is the original 80GB PPC Mac Mini. I used to run Gentoo
>>> on it and it ran great for years so I know at one time yaboot worked
>>> just fine. For various reasons I hadn't updated it in a long, long
>>> time (2 years) and instead of trying to go through the Gentoo update
>>> process which is difficult after that much time I decided to just do a
>>> new install. I saved copies of my kernel config and etc/make.conf but
>>> unfortunately, being primarily an x86 guy didn't think to save
>>> yaboot.conf and fstab. I've now done 5 complete Gentoo installs,
>>> starting over from scratch in case something I was doing was messing
>>> things up but so far I cannot get the machine to boot. Every time, no
>>> matter what I do at install time, I get a message
>>>
>>> "Can't check if filesystem is mounted due to a missing mtab file"
>>>
>>> A somewhat out of focus screen shot is shown here:
>>>
>>> http://www.flickr.com/photos/29328985@N03/5014227831
>>>
>>> Generally speaking I'm following the Gentoo PPC install guide located here:
>>>
>>> http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=10
> <SNIP>
>
>> After looking at the screen shot, I think I have a different idea as to
>> why it might be failing and I don't think it's Yaboot. If you've gotten
>> to init, yaboot's job is already done.
>>
>> Can you boot the install CD and chroot into the install again? When you
>> get it up and running, check to see if fsck.ext3 exists. Even if it
>> does, re-emerge e2fsprogs and see if that helps.
>> -Joe
> Very interesting. OK - I'm in the chroot now and reinstalling
> e2fsprogs as you suggest. I'll reboot in a minute and check if it
> helped. (OK - I rebooted and it didn't fix anything unfortunately. Too
> bad. Thanks for the idea though.)
>
> I was wondering if this was one of those things where device names
> were changing. They were hda all through the install, which is
> different from the Install Guide. I've tried to adjust my yaboot.conf
> file accordingly but maybe it cannot find the disk at that point
> because the name changed or something. I cannot see anything in the
> boot screen to indicate that but I suppose it's possible.
>
> While I'm here in the chroot I decided to poke around a bit. Note that
> section 9d of the install guide says that e2fsprogs is already
> installed as part of the system and indeed it appears to be as shown
> below. However I note that I cannot run updatedb for slocate without
> also getting a message about /etc/mtab not existing. Should mtab exist
> withing the chroot?
>
> (chroot) livecd / # emerge -pv e2fsprogs
>
> These are the packages that would be merged, in order:
>
> Calculating dependencies... done!
> [ebuild R ] sys-fs/e2fsprogs-1.41.11 USE="nls" 4,368 kB
>
> Total: 1 package (1 reinstall), Size of downloads: 4,368 kB
> (chroot) livecd / # slocate fsck.*
> slocate: fatal error: Could not find user database
> '/var/lib/slocate/slocate.db': No such file or directory
> (chroot) livecd / # updatedb
> updatedb: fatal error: load_file: Could not open file: /etc/mtab: No
> such file or directory
> updatedb: fatal error: parse_fs_exclude: Could not load file data: /etc/mtab
> ^C
> (chroot) livecd / #
>
>
> Indeed, on a different system /etc/mtab exists:
>
> gandalf ~ # cat /etc/mtab
> /dev/sda3 / ext3 rw,noatime,commit=0 0 0
> proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
> sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
> udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0
> devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
> /dev/sda5 /home/herb ext3 rw,noatime,commit=0 0 0
> shm /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0
> none /proc/fs/vmblock/mountPoint vmblock rw 0 0
> gandalf ~ #
>
> However on my MacMini it simply doesn't exist:
>
> (chroot) livecd / # ls -la /etc/mtab
> ls: cannot access /etc/mtab: No such file or directory
> (chroot) livecd / #
>
> So the question is what provides mtab? Have I missed some step in the
> install process 5 times? Man, that would be embarrassing but I'd
> gladly suffer the shame if I got the machine working! ;-)
>
> Thanks for your help. Still looking.
>
> Cheers,
> Mark
>
>

mtab is generated on boot as you mount devices. It's not the problem here.

Can you try adding this line to your yaboot config? It will make the
system boot directly into a shell instead of starting init:
### Put this in the kernel section
append="init=/bin/bash"

Once this boots, does hda* exist in /dev? How about /dev/null and /dev/zero?

-Joe
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Thu, Sep 23, 2010 at 7:10 AM, Joseph Jezak <josejx@gentoo.org> wrote:
<SNIP>
>
> mtab is generated on boot as you mount devices. It's not the problem here.
>
> Can you try adding this line to your yaboot config? It will make the
> system boot directly into a shell instead of starting init:
> ### Put this in the kernel section
> append="init=/bin/bash"
>
> Once this boots, does hda* exist in /dev? How about /dev/null and /dev/zero?
>
> -Joe

OK, so I did it like this:

boot=/dev/hda2
#device=/pci@f4000000/ata-6@d/disk@0:
device=hd:
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.34-gentoo-r1
label=Gentoo-2.6.34-r1
append="init=/bin/bash"
partition=4
root=/dev/hda4
read-only

and ran ybin -v

When I reboot I have no keyboard and cannot probe around. The screen is showing

(none) / #

The kernel boots with printk timing info on each line, and then
finishes with two messages:

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

and at that point the machine is hung.

So this seems like it's just not finding the hardware at this point?
No disk? No keyboard?

If you want to see the whole screen I can post another screen shot on Flickr.

Thanks for the interest and help. I'm sure we'll figure it out.

- Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Thu, Sep 23, 2010 at 5:05 AM, <kahl@cas.mcmaster.ca> wrote:
> Mark,
>
>  > However I note that I cannot run updatedb for slocate without
>  > also getting a message about /etc/mtab not existing. Should mtab exist
>  > withing the chroot?
>
> For certain things, it seems to be needed --- the amd64 handbook includes a
> way to get it among the grub instructions.
>
> By the way, if I recall correctly, you once mentioned you had an ubuntu on
> that machine with grub working --- I would just reuse that grub for booting
> gentoo. (I have done this before on amd64, but not on any Mac.)
>
>
> Wolfram
>
>
Wolfram,
On first reading I would have said 'he's crazy!' because grub is
for x86/PC architecture only, right? At least I think that's the case
with the original grub.

However apparently grub2 does now run (sort of) on PowerPC:

http://grub.enbug.org/TestingOnPowerPC

I think it's more in a testing phase, and if Joe or others help me
work out what I'm doing wrong then I won't need grub2, but given a bit
of time it might be interesting to try out. Unfortunately the known
bug list might make it hard for someone at my experience level.

Looking in portage it doesn't seem to be available so I'd have to
look for an overlay that might have it.

Thanks,
Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On 09/23/10 13:55, Mark Knecht wrote:
> On Thu, Sep 23, 2010 at 5:05 AM, <kahl@cas.mcmaster.ca> wrote:
>> Mark,
>>
>> > However I note that I cannot run updatedb for slocate without
>> > also getting a message about /etc/mtab not existing. Should mtab exist
>> > withing the chroot?
>>
>> For certain things, it seems to be needed --- the amd64 handbook includes a
>> way to get it among the grub instructions.
>>
>> By the way, if I recall correctly, you once mentioned you had an ubuntu on
>> that machine with grub working --- I would just reuse that grub for booting
>> gentoo. (I have done this before on amd64, but not on any Mac.)
>>
>>
>> Wolfram
>>
>>
> Wolfram,
> On first reading I would have said 'he's crazy!' because grub is
> for x86/PC architecture only, right? At least I think that's the case
> with the original grub.
>
> However apparently grub2 does now run (sort of) on PowerPC:
>
> http://grub.enbug.org/TestingOnPowerPC
>
> I think it's more in a testing phase, and if Joe or others help me
> work out what I'm doing wrong then I won't need grub2, but given a bit
> of time it might be interesting to try out. Unfortunately the known
> bug list might make it hard for someone at my experience level.
>
> Looking in portage it doesn't seem to be available so I'd have to
> look for an overlay that might have it.
>
> Thanks,
> Mark
>
>
Yeah, grub2 isn't really user ready yet. It does work on ppc, but cannot
boot OSX (at least last time I tried it it couldn't).

-Joe
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On 09/23/10 12:17, Mark Knecht wrote:
> On Thu, Sep 23, 2010 at 7:10 AM, Joseph Jezak <josejx@gentoo.org> wrote:
> <SNIP>
>> mtab is generated on boot as you mount devices. It's not the problem here.
>>
>> Can you try adding this line to your yaboot config? It will make the
>> system boot directly into a shell instead of starting init:
>> ### Put this in the kernel section
>> append="init=/bin/bash"
>>
>> Once this boots, does hda* exist in /dev? How about /dev/null and /dev/zero?
>>
>> -Joe
> OK, so I did it like this:
>
> boot=/dev/hda2
> #device=/pci@f4000000/ata-6@d/disk@0:
> device=hd:
> timeout=30
> install=/usr/lib/yaboot/yaboot
> magicboot=/usr/lib/yaboot/ofboot
>
> image=/boot/kernel-2.6.34-gentoo-r1
> label=Gentoo-2.6.34-r1
> append="init=/bin/bash"
> partition=4
> root=/dev/hda4
> read-only
>
> and ran ybin -v
>
> When I reboot I have no keyboard and cannot probe around. The screen is showing
>
> (none) / #
>
> The kernel boots with printk timing info on each line, and then
> finishes with two messages:
>
> bash: cannot set terminal process group (-1): Inappropriate ioctl for device
> bash: no job control in this shell
>
> and at that point the machine is hung.
>
> So this seems like it's just not finding the hardware at this point?
> No disk? No keyboard?
>
> If you want to see the whole screen I can post another screen shot on Flickr.
>
> Thanks for the interest and help. I'm sure we'll figure it out.
>
> - Mark
>
>
Okay, that all looks fine. Are you sure that you built USB keyboard
support into your kernel? This might be why it wouldn't let you type. I
wouldn't mind seeing another screen shot either. Once you get keyboard
support working, check to see if those device nodes exist.

-Joe
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Thu, Sep 23, 2010 at 1:02 PM, Joseph Jezak <josejx@gentoo.org> wrote:
>  On 09/23/10 12:17, Mark Knecht wrote:
>> On Thu, Sep 23, 2010 at 7:10 AM, Joseph Jezak <josejx@gentoo.org> wrote:
>> <SNIP>
>>> mtab is generated on boot as you mount devices. It's not the problem here.
>>>
>>> Can you try adding this line to your yaboot config? It will make the
>>> system boot directly into a shell instead of starting init:
>>> ### Put this in the kernel section
>>> append="init=/bin/bash"
>>>
>>> Once this boots, does hda* exist in /dev? How about /dev/null and /dev/zero?
>>>
>>> -Joe
>> OK, so I did it like this:
>>
>> boot=/dev/hda2
>> #device=/pci@f4000000/ata-6@d/disk@0:
>> device=hd:
>> timeout=30
>> install=/usr/lib/yaboot/yaboot
>> magicboot=/usr/lib/yaboot/ofboot
>>
>> image=/boot/kernel-2.6.34-gentoo-r1
>>         label=Gentoo-2.6.34-r1
>>         append="init=/bin/bash"
>>         partition=4
>>         root=/dev/hda4
>>         read-only
>>
>> and ran ybin -v
>>
>> When I reboot I have no keyboard and cannot probe around. The screen is showing
>>
>> (none) / #
>>
>> The kernel boots with printk timing info on each line, and then
>> finishes with two messages:
>>
>> bash: cannot set terminal process group (-1): Inappropriate ioctl for device
>> bash: no job control in this shell
>>
>> and at that point the machine is hung.
>>
>> So this seems like it's just not finding the hardware at this point?
>> No disk? No keyboard?
>>
>> If you want to see the whole screen I can post another screen shot on Flickr.
>>
>> Thanks for the interest and help. I'm sure we'll figure it out.
>>
>> - Mark
>>
>>
> Okay, that all looks fine. Are you sure that you built USB keyboard
> support into your kernel? This might be why it wouldn't let you type. I
> wouldn't mind seeing another screen shot either. Once you get keyboard
> support working, check to see if those device nodes exist.
>
> -Joe

Two pictures posted:

Top half of boot screen:
http://www.flickr.com/photos/29328985@N03/5018717650/

Bottom half of boot screen
http://www.flickr.com/photos/29328985@N03/5018718202/

Full USB HID support is built as modular. I don't seem to be able to
change it to built in. make menuconfig is only giving me modular or
not set. (Kernel config USB info this is set is at the end)

lspci says the controller is an Apple controller and the driver is
'macio' which seems sensible. I see it in the boot screen I think.
That driver is built in, but the PATA_MACIO driver is not:

(chroot) livecd linux # cat .config | grep MACIO
# CONFIG_PATA_MACIO is not set
CONFIG_ADB_MACIO=y
(chroot) livecd linux #

Maybe I've mistakenly left the right disk driver out of the kernel
thinking the hardware was SATA based? Does the PATA_MACIO option need
to be set for the Mac Mini? I don't understand how this kernel config
would have ever worked befor unless I'm confusing where it came from.

Does the append="init=/bin/bash" command allow the kernel to load
drivers or do I need to build USBHID into the kernel to get the
keyboard to work at this level of boot?

Thanks,
Mark

(chroot) livecd linux # lspci -k
0000:00:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 AGP
Kernel driver in use: agpgart-uninorth
0000:00:10.0 VGA compatible controller: ATI Technologies Inc RV280
[Radeon 9200] (rev 01)
Subsystem: ATI Technologies Inc RV280 [Radeon 9200]
Kernel driver in use: radeonfb
0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 PCI
0001:10:12.0 Network controller: Broadcom Corporation BCM4318
[AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)
Subsystem: Apple Computer Inc. Device 4318
0001:10:17.0 Class ff00: Apple Computer Inc. KeyLargo/Intrepid Mac I/O
Kernel driver in use: macio
0001:10:18.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
0001:10:19.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
0001:10:1a.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
Kernel driver in use: ohci_hcd
0001:10:1b.0 USB Controller: NEC Corporation USB (rev 43)
Subsystem: NEC Corporation Hama USB 2.0 CardBus
Kernel driver in use: ohci_hcd
0001:10:1b.1 USB Controller: NEC Corporation USB (rev 43)
Subsystem: NEC Corporation Hama USB 2.0 CardBus
Kernel driver in use: ohci_hcd
0001:10:1b.2 USB Controller: NEC Corporation USB 2.0 (rev 04)
Subsystem: NEC Corporation USB 2.0
Kernel driver in use: ehci_hcd
0002:20:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 Internal PCI
0002:20:0d.0 Class ff00: Apple Computer Inc. UniNorth/Intrepid ATA/100
Kernel driver in use: ide-pmac
0002:20:0e.0 FireWire (IEEE 1394): Apple Computer Inc. UniNorth 2
FireWire (rev 81)
Subsystem: Apple Computer Inc. iBook G4 2004
Kernel driver in use: ohci1394
0002:20:0f.0 Ethernet controller: Apple Computer Inc. UniNorth 2 GMAC
(Sun GEM) (rev 80)
Kernel driver in use: gem
(chroot) livecd linux #



(chroot) livecd linux # cat .config | grep USB | grep =
CONFIG_BT_HCIBFUSB=m
CONFIG_USB_CATC=m
CONFIG_USB_KAWETH=m
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8150=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_ZAURUS=m
CONFIG_SND_USB=y
CONFIG_USB_HID=m
CONFIG_USB_HIDDEV=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=m
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
CONFIG_USB_MON=m
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_HCD_PPC_OF=y
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
CONFIG_USB_OHCI_HCD_PPC_OF=y
CONFIG_USB_OHCI_HCD_PCI=y
CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=m
CONFIG_USB_U132_HCD=m
CONFIG_USB_STORAGE=m
CONFIG_USB_STORAGE_FREECOM=m
CONFIG_USB_STORAGE_ISD200=m
CONFIG_USB_STORAGE_USBAT=m
CONFIG_USB_STORAGE_SDDR09=m
CONFIG_USB_STORAGE_SDDR55=m
CONFIG_USB_STORAGE_JUMPSHOT=m
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_AIRCABLE=m
CONFIG_USB_SERIAL_IPW=m
CONFIG_USB_SERIAL_MOS7720=m
CONFIG_USB_SERIAL_MOS7840=m
CONFIG_USB_SERIAL_SIERRAWIRELESS=m
CONFIG_USB_SERIAL_OMNINET=m
CONFIG_USB_FTDI_ELAN=m
CONFIG_USB_APPLEDISPLAY=m
(chroot) livecd linux #
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
My responses are inline this time. It's easier when there's so much
going on!

On 09/23/10 16:41, Mark Knecht wrote:
> Two pictures posted:
>
> Top half of boot screen:
> http://www.flickr.com/photos/29328985@N03/5018717650/
>
> Bottom half of boot screen
> http://www.flickr.com/photos/29328985@N03/5018718202/
>

Okay, these look exactly as expected. You've booted into the shell fine
and the kernel does detect the hard drive fine. It appears that the disk
was not cleanly unmounted, which is what the messages in the bottom
picture indicate. Once you get USB working so we can type into the
console, we'll take a look at what's actually going on.

> Full USB HID support is built as modular. I don't seem to be able to
> change it to built in. make menuconfig is only giving me modular or
> not set. (Kernel config USB info this is set is at the end)
If you use menuconfig and you go to the "Help" option, it will tell you
what dependencies need to be set in order to build the module. Most
likely, you did not set the USB subsystem itself to be built in.
> lspci says the controller is an Apple controller and the driver is
> 'macio' which seems sensible. I see it in the boot screen I think.
> That driver is built in, but the PATA_MACIO driver is not:
>
> (chroot) livecd linux # cat .config | grep MACIO
> # CONFIG_PATA_MACIO is not set
> CONFIG_ADB_MACIO=y
> (chroot) livecd linux #
>
> Maybe I've mistakenly left the right disk driver out of the kernel
> thinking the hardware was SATA based? Does the PATA_MACIO option need
> to be set for the Mac Mini? I don't understand how this kernel config
> would have ever worked befor unless I'm confusing where it came from.
>

You're using the old style driver which results in devices named hdX#.
It's called IDE_PMAC. The new driver which uses the sdX# naming
convention (and uses libpata), is called PATA_MACIO.

> Does the append="init=/bin/bash" command allow the kernel to load
> drivers or do I need to build USBHID into the kernel to get the
> keyboard to work at this level of boot?

I would built it in for now, it'll be easier since there's no good way
to get into the system to tell it to load the drivers.

-Joe
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Thu, Sep 23, 2010 at 10:04 PM, Joseph Jezak <josejx@gentoo.org> wrote:
>  My responses are inline this time. It's easier when there's so much
> going on!
>
> On 09/23/10 16:41, Mark Knecht wrote:
>> Two pictures posted:
>>
>> Top half of boot screen:
>> http://www.flickr.com/photos/29328985@N03/5018717650/
>>
>> Bottom half of boot screen
>> http://www.flickr.com/photos/29328985@N03/5018718202/
>>
>
> Okay, these look exactly as expected. You've booted into the shell fine
> and the kernel does detect the hard drive fine. It appears that the disk
> was not cleanly unmounted, which is what the messages in the bottom
> picture indicate. Once you get USB working so we can type into the
> console, we'll take a look at what's actually going on.
>
>> Full USB HID support is built as modular. I don't seem to be able to
>> change it to built in. make menuconfig is only giving me modular or
>> not set.  (Kernel config USB info this is set is at the end)
> If you use menuconfig and you go to the "Help" option, it will tell you
> what dependencies need to be set in order to build the module. Most
> likely, you did not set the USB subsystem itself to be built in.
>> lspci says the controller is an Apple controller and the driver is
>> 'macio' which seems sensible. I see it in the boot screen I think.
>> That driver is built in, but the PATA_MACIO driver is not:
>>
>> (chroot) livecd linux # cat .config | grep MACIO
>> # CONFIG_PATA_MACIO is not set
>> CONFIG_ADB_MACIO=y
>> (chroot) livecd linux #
>>
>> Maybe I've mistakenly left the right disk driver out of the kernel
>> thinking the hardware was SATA based? Does the PATA_MACIO option need
>> to be set for the Mac Mini? I don't understand how this kernel config
>> would have ever worked befor unless I'm confusing where it came from.
>>
>
> You're using the old style driver which results in devices named hdX#.
> It's called IDE_PMAC. The new driver which uses the sdX# naming
> convention (and uses libpata), is called PATA_MACIO.
>
>> Does the append="init=/bin/bash" command allow the kernel to load
>> drivers or do I need to build USBHID into the kernel to get the
>> keyboard to work at this level of boot?
>
> I would built it in for now, it'll be easier since there's no good way
> to get into the system to tell it to load the drivers.
>
> -Joe
>
>

Hi Joe,
OK - I got USB working and with the append="init=/bin/bash" in I
can at least do cd and ls commands.

All the devices you asked about exist - /dev/hda1 through 20,
/dev/hdb1 through 20, /dev/null and /dev/zero - all exist.

Doing know if it's a clue but in this append="init=/bin/bash"
state I was unable to do a reboot or a shutdown as it complained about
missing initctl I think?

Being that I made a number of changes to the kernel config to get
USB working I remove the append line from yaboot.conf and tried
booting into Gentoo proper but it's still stopping at the same place
with the same message about no mtab file.

I'll put the append back in and wait for further ideas.

Thanks for sticking with me!

Cheers,
Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Sep 24, 2010, at 4:30 PM, Mark Knecht wrote:

> On Thu, Sep 23, 2010 at 10:04 PM, Joseph Jezak <josejx@gentoo.org>
> wrote:
>> My responses are inline this time. It's easier when there's so much
>> going on!
>>
>> On 09/23/10 16:41, Mark Knecht wrote:
>>> Two pictures posted:
>>>
>>> Top half of boot screen:
>>> http://www.flickr.com/photos/29328985@N03/5018717650/
>>>
>>> Bottom half of boot screen
>>> http://www.flickr.com/photos/29328985@N03/5018718202/
>>>
>>
>> Okay, these look exactly as expected. You've booted into the shell
>> fine
>> and the kernel does detect the hard drive fine. It appears that the
>> disk
>> was not cleanly unmounted, which is what the messages in the bottom
>> picture indicate. Once you get USB working so we can type into the
>> console, we'll take a look at what's actually going on.
>>
>>> Full USB HID support is built as modular. I don't seem to be able to
>>> change it to built in. make menuconfig is only giving me modular or
>>> not set. (Kernel config USB info this is set is at the end)
>> If you use menuconfig and you go to the "Help" option, it will tell
>> you
>> what dependencies need to be set in order to build the module. Most
>> likely, you did not set the USB subsystem itself to be built in.
>>> lspci says the controller is an Apple controller and the driver is
>>> 'macio' which seems sensible. I see it in the boot screen I think.
>>> That driver is built in, but the PATA_MACIO driver is not:
>>>
>>> (chroot) livecd linux # cat .config | grep MACIO
>>> # CONFIG_PATA_MACIO is not set
>>> CONFIG_ADB_MACIO=y
>>> (chroot) livecd linux #
>>>
>>> Maybe I've mistakenly left the right disk driver out of the kernel
>>> thinking the hardware was SATA based? Does the PATA_MACIO option
>>> need
>>> to be set for the Mac Mini? I don't understand how this kernel
>>> config
>>> would have ever worked befor unless I'm confusing where it came
>>> from.
>>>
>>
>> You're using the old style driver which results in devices named
>> hdX#.
>> It's called IDE_PMAC. The new driver which uses the sdX# naming
>> convention (and uses libpata), is called PATA_MACIO.
>>
>>> Does the append="init=/bin/bash" command allow the kernel to load
>>> drivers or do I need to build USBHID into the kernel to get the
>>> keyboard to work at this level of boot?
>>
>> I would built it in for now, it'll be easier since there's no good
>> way
>> to get into the system to tell it to load the drivers.
>>
>> -Joe
>>
>>
>
> Hi Joe,
> OK - I got USB working and with the append="init=/bin/bash" in I
> can at least do cd and ls commands.
>
> All the devices you asked about exist - /dev/hda1 through 20,
> /dev/hdb1 through 20, /dev/null and /dev/zero - all exist.
>
> Doing know if it's a clue but in this append="init=/bin/bash"
> state I was unable to do a reboot or a shutdown as it complained about
> missing initctl I think?
>
> Being that I made a number of changes to the kernel config to get
> USB working I remove the append line from yaboot.conf and tried
> booting into Gentoo proper but it's still stopping at the same place
> with the same message about no mtab file.
>
> I'll put the append back in and wait for further ideas.
>
> Thanks for sticking with me!
>
> Cheers,
> Mark
>
Assuming you are still stopping near:
fsck.ext3...

Can you confirm that /sbin/fsck.ext3 exists?
If not, then emerge e2fsprogs.

Barry
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Fri, Sep 24, 2010 at 3:43 PM, Enlightened User <linux@nc.rr.com> wrote:
> On Sep 24, 2010, at 4:30 PM, Mark Knecht wrote:
>
>> On Thu, Sep 23, 2010 at 10:04 PM, Joseph Jezak <josejx@gentoo.org> wrote:
>>>
>>>  My responses are inline this time. It's easier when there's so much
>>> going on!
>>>
>>> On 09/23/10 16:41, Mark Knecht wrote:
>>>>
>>>> Two pictures posted:
>>>>
>>>> Top half of boot screen:
>>>> http://www.flickr.com/photos/29328985@N03/5018717650/
>>>>
>>>> Bottom half of boot screen
>>>> http://www.flickr.com/photos/29328985@N03/5018718202/
>>>>
>>>
>>> Okay, these look exactly as expected. You've booted into the shell fine
>>> and the kernel does detect the hard drive fine. It appears that the disk
>>> was not cleanly unmounted, which is what the messages in the bottom
>>> picture indicate. Once you get USB working so we can type into the
>>> console, we'll take a look at what's actually going on.
>>>
>>>> Full USB HID support is built as modular. I don't seem to be able to
>>>> change it to built in. make menuconfig is only giving me modular or
>>>> not set.  (Kernel config USB info this is set is at the end)
>>>
>>> If you use menuconfig and you go to the "Help" option, it will tell you
>>> what dependencies need to be set in order to build the module. Most
>>> likely, you did not set the USB subsystem itself to be built in.
>>>>
>>>> lspci says the controller is an Apple controller and the driver is
>>>> 'macio' which seems sensible. I see it in the boot screen I think.
>>>> That driver is built in, but the PATA_MACIO driver is not:
>>>>
>>>> (chroot) livecd linux # cat .config | grep MACIO
>>>> # CONFIG_PATA_MACIO is not set
>>>> CONFIG_ADB_MACIO=y
>>>> (chroot) livecd linux #
>>>>
>>>> Maybe I've mistakenly left the right disk driver out of the kernel
>>>> thinking the hardware was SATA based? Does the PATA_MACIO option need
>>>> to be set for the Mac Mini? I don't understand how this kernel config
>>>> would have ever worked befor unless I'm confusing where it came from.
>>>>
>>>
>>> You're using the old style driver which results in devices named hdX#.
>>> It's called IDE_PMAC. The new driver which uses the sdX# naming
>>> convention (and uses libpata), is called PATA_MACIO.
>>>
>>>> Does the append="init=/bin/bash" command allow the kernel to load
>>>> drivers or do I need to build USBHID into the kernel to get the
>>>> keyboard to work at this level of boot?
>>>
>>> I would built it in for now, it'll be easier since there's no good way
>>> to get into the system to tell it to load the drivers.
>>>
>>> -Joe
>>>
>>>
>>
>> Hi Joe,
>>  OK - I got USB working and with the append="init=/bin/bash" in I
>> can at least do cd and ls commands.
>>
>>  All the devices you asked about exist - /dev/hda1 through 20,
>> /dev/hdb1 through 20, /dev/null and /dev/zero - all exist.
>>
>>  Doing know if it's a clue but in this  append="init=/bin/bash"
>> state I was unable to do a reboot or a shutdown as it complained about
>> missing initctl I think?
>>
>>  Being that I made a number of changes to the kernel config to get
>> USB working I remove the append line from yaboot.conf and tried
>> booting into Gentoo proper but it's still stopping at the same place
>> with the same message about no mtab file.
>>
>>  I'll put the append back in and wait for further ideas.
>>
>>  Thanks for sticking with me!
>>
>> Cheers,
>> Mark
>>
> Assuming you are still stopping near:
> fsck.ext3...
>
> Can you confirm that /sbin/fsck.ext3 exists?
> If not, then emerge e2fsprogs.
>
> Barry
>
>

The chroot is currently doing an emerge -e @world so I've shelled into
the machine and am showing from that perspective. All the typical fsck
programs are there and I rebuilt e2fsprogs a couple of days ago.


livecd gentoo # ls /mnt/gentoo/sbin/fsck*
fsck fsck.ext2 fsck.ext4 fsck.minix
fsck.cramfs fsck.ext3 fsck.ext4dev
livecd gentoo #

When emerge -e @world completes I'll give it a reboot but somehow I
don't have much faith that it will have fixed anything. Right now I
feel it's either something missing from my kernel config, or some
critical install step that I keep missing because of the way I read
the document and maybe some step that listed inside a paragraph
instead of being called out in purple like most of them are. (They are
in there, like the locale-gen step and a few others...)

I'll check back later when the rebuild is complete.

Thanks!

Cheers,
Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Thu, Sep 23, 2010 at 10:04 PM, Joseph Jezak <josejx@gentoo.org> wrote:
>  My responses are inline this time. It's easier when there's so much
> going on!
>
> On 09/23/10 16:41, Mark Knecht wrote:
>> Two pictures posted:
>>
>> Top half of boot screen:
>> http://www.flickr.com/photos/29328985@N03/5018717650/
>>
>> Bottom half of boot screen
>> http://www.flickr.com/photos/29328985@N03/5018718202/
>>
>
> Okay, these look exactly as expected. You've booted into the shell fine
> and the kernel does detect the hard drive fine. It appears that the disk
> was not cleanly unmounted, which is what the messages in the bottom
> picture indicate. Once you get USB working so we can type into the
> console, we'll take a look at what's actually going on.
>
>> Full USB HID support is built as modular. I don't seem to be able to
>> change it to built in. make menuconfig is only giving me modular or
>> not set.  (Kernel config USB info this is set is at the end)
> If you use menuconfig and you go to the "Help" option, it will tell you
> what dependencies need to be set in order to build the module. Most
> likely, you did not set the USB subsystem itself to be built in.
>> lspci says the controller is an Apple controller and the driver is
>> 'macio' which seems sensible. I see it in the boot screen I think.
>> That driver is built in, but the PATA_MACIO driver is not:
>>
>> (chroot) livecd linux # cat .config | grep MACIO
>> # CONFIG_PATA_MACIO is not set
>> CONFIG_ADB_MACIO=y
>> (chroot) livecd linux #
>>
>> Maybe I've mistakenly left the right disk driver out of the kernel
>> thinking the hardware was SATA based? Does the PATA_MACIO option need
>> to be set for the Mac Mini? I don't understand how this kernel config
>> would have ever worked befor unless I'm confusing where it came from.
>>
>
> You're using the old style driver which results in devices named hdX#.
> It's called IDE_PMAC. The new driver which uses the sdX# naming
> convention (and uses libpata), is called PATA_MACIO.
>
>> Does the append="init=/bin/bash" command allow the kernel to load
>> drivers or do I need to build USBHID into the kernel to get the
>> keyboard to work at this level of boot?
>
> I would built it in for now, it'll be easier since there's no good way
> to get into the system to tell it to load the drivers.
>
> -Joe
>
>

Hi Joe,
OK, I finished the emerge -e @world. No changes. Still doesn't boot.

I've put the append="init=/bin/bash" back in and booted. I'm at the
console and this is confusing. It seems that /dev/hda4 is probably
mounted. I can do

ls -al /

I see all the stuff I'd expect to see - /bin, /boot, etc. - and also
the two downloads necessary to do the install - portage-latest.tar.bz2
& stage3-ppc-20100919.tar.bz2 - so I must be looking at the right
physical hard drive.

However even though I see that stuff simple commands like df don't
work yielding something like this:

(none)/ #df
df: cannot read table of mounted file systems: No such file or directory

Additionally, there is nothing at all under /proc. It's empty!

Cheers,
Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On 09/25/10 07:45, Mark Knecht wrote:
> On Thu, Sep 23, 2010 at 10:04 PM, Joseph Jezak <josejx@gentoo.org> wrote:
>> My responses are inline this time. It's easier when there's so much
>> going on!
>>
>> On 09/23/10 16:41, Mark Knecht wrote:
>>> Two pictures posted:
>>>
>>> Top half of boot screen:
>>> http://www.flickr.com/photos/29328985@N03/5018717650/
>>>
>>> Bottom half of boot screen
>>> http://www.flickr.com/photos/29328985@N03/5018718202/
>>>
>> Okay, these look exactly as expected. You've booted into the shell fine
>> and the kernel does detect the hard drive fine. It appears that the disk
>> was not cleanly unmounted, which is what the messages in the bottom
>> picture indicate. Once you get USB working so we can type into the
>> console, we'll take a look at what's actually going on.
>>
>>> Full USB HID support is built as modular. I don't seem to be able to
>>> change it to built in. make menuconfig is only giving me modular or
>>> not set. (Kernel config USB info this is set is at the end)
>> If you use menuconfig and you go to the "Help" option, it will tell you
>> what dependencies need to be set in order to build the module. Most
>> likely, you did not set the USB subsystem itself to be built in.
>>> lspci says the controller is an Apple controller and the driver is
>>> 'macio' which seems sensible. I see it in the boot screen I think.
>>> That driver is built in, but the PATA_MACIO driver is not:
>>>
>>> (chroot) livecd linux # cat .config | grep MACIO
>>> # CONFIG_PATA_MACIO is not set
>>> CONFIG_ADB_MACIO=y
>>> (chroot) livecd linux #
>>>
>>> Maybe I've mistakenly left the right disk driver out of the kernel
>>> thinking the hardware was SATA based? Does the PATA_MACIO option need
>>> to be set for the Mac Mini? I don't understand how this kernel config
>>> would have ever worked befor unless I'm confusing where it came from.
>>>
>> You're using the old style driver which results in devices named hdX#.
>> It's called IDE_PMAC. The new driver which uses the sdX# naming
>> convention (and uses libpata), is called PATA_MACIO.
>>
>>> Does the append="init=/bin/bash" command allow the kernel to load
>>> drivers or do I need to build USBHID into the kernel to get the
>>> keyboard to work at this level of boot?
>> I would built it in for now, it'll be easier since there's no good way
>> to get into the system to tell it to load the drivers.
>>
>> -Joe
>>
>>
> Hi Joe,
> OK, I finished the emerge -e @world. No changes. Still doesn't boot.
>
> I've put the append="init=/bin/bash" back in and booted. I'm at the
> console and this is confusing. It seems that /dev/hda4 is probably
> mounted. I can do
>
> ls -al /
>
> I see all the stuff I'd expect to see - /bin, /boot, etc. - and also
> the two downloads necessary to do the install - portage-latest.tar.bz2
> & stage3-ppc-20100919.tar.bz2 - so I must be looking at the right
> physical hard drive.
>
> However even though I see that stuff simple commands like df don't
> work yielding something like this:
>
> (none)/ #df
> df: cannot read table of mounted file systems: No such file or directory
>
> Additionally, there is nothing at all under /proc. It's empty!
>
> Cheers,
> Mark
>
>
None of these things are weird, they're expected!

When you start the system with "init=/bin/bash", the only thing your
system does is start bash as the only process. Things like mounting
proc, remounting the root file system r/w (and setting up mtab) aren't
done because they're part of the normal startup process.

Can you run fsck.ext3 from the shell that starts when you replace init?

Also, which version of udev are you using? I forgot to ask if you're
running ~ppc instead of ppc, you may want to try switching to the
PATA_MACIO driver in order for the system to work properly.

-Joe
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Sat, Sep 25, 2010 at 8:12 AM, Joseph Jezak <josejx@gentoo.org> wrote:
<SNIP>
> None of these things are weird, they're expected!
>

Really? OK - cool then.

> When you start the system with "init=/bin/bash", the only thing your
> system does is start bash as the only process. Things like mounting
> proc, remounting the root file system r/w (and setting up mtab) aren't
> done because they're part of the normal startup process.
>

I need to find a good _SIMPLE_ book on how Linux boots. I'm just a
long time use with no real sys admin background so for a decade or
longer I just want the things go by at boot and then use my system.

> Can you run fsck.ext3 from the shell that starts when you replace init?
>

I cannot due to the same sort of message I get when trying to boot:

e2fsck_check_if_mount: Can't check if filesystem is mounted due to
missing mtab file
fsck.ext3: Device or resource busy while trying to open /dev/hda4
Filesystem mounted or opened exclusively by another program?

For kicks I tried umount /dev/hda4 but that complains about the
missing mtab file also. It seems from the man page I could force it
but I didn't want to do that, and again if I did and it even worked
then where would the system read fsck.ext3 from to do the check since
it's on /dev/hda4 itself?

> Also, which version of udev are you using? I forgot to ask if you're
> running ~ppc instead of ppc, you may want to try switching to the
> PATA_MACIO driver in order for the system to work properly.

udev would be whatever comes with a stable ppc system these days.

Other than running ~ppc portage and sandbox the machine is currently
all stable with no USE flags. The make.conf file is pretty much empty
other than the stuff the install has me put in. (Which mirrors to sync
from, etc.)

I've gone back and done a couple more experiments:

1) So far anything I try that refers to the drive as /dev/sda4 results
in a VFS not syncing type error so at least as far as the boot process
goes hda4 seems to be the right device.

2) I tried building in the PATA_MACIO driver but that by itself didn't
change anything:

(chroot) livecd / # cat /usr/src/linux/.config | grep MACIO
CONFIG_PATA_MACIO=y
CONFIG_ADB_MACIO=y
(chroot) livecd / #

The boot still fails at the same point with the same message. Possibly
some other ATA driver is being selected ahead of this one and maybe it
needs to be removed from the kernel? I don't know what to remove
though so I'm sort of stuck on that account.

3) If this is a kernel config issue - and it seem plausible that it is
- then I'll point out that the kernel config page of the Gentoo PPC
Istall Guide had a possible command that didn't work for me:

http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=7

Specifically:

make pmac32_defconfig

which supposedly will make a config file that would boot most 32-bit
machines. Unfortunately the command doesn't work for me on current
kernels. The install guide should be updated to either remove this or
make it more clear if I need to do anything more than that command in
the /usr/src/linux directory.

I've looked around at lots more stuff in my kernel config and compared
it to what the Install guide says. I don't see any differences but I
suspect there probably are.

Thanks!

- Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Sat, Sep 25, 2010 at 1:40 PM, Mark Knecht <markknecht@gmail.com> wrote:
<SNIP>
> 3) If this is a kernel config issue - and it seem plausible that it is
> - then I'll point out that the kernel config page of the Gentoo PPC
> Istall Guide had a possible command that didn't work for me:
>
> http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=7
>
> Specifically:
>
> make pmac32_defconfig
>
> which supposedly will make a config file that would boot most 32-bit
> machines. Unfortunately the command doesn't work for me on current
> kernels. The install guide should be updated to either remove this or
> make it more clear if I need to do anything more than that command in
> the /usr/src/linux directory.
<SNIP>

Nix this comment. I got the command to work and am going back to
ground zero on the kernel config. We'll see what happens.

Sorry for the noise. Just frustrated after weeks of this. Mac is just
harder than PC I suppose...

Thanks,
Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Sat, Sep 25, 2010 at 1:40 PM, Mark Knecht <markknecht@gmail.com> wrote:
<SNIP>
>
>> Also, which version of udev are you using? I forgot to ask if you're
>> running ~ppc instead of ppc, you may want to try switching to the
>> PATA_MACIO driver in order for the system to work properly.
>
> udev would be whatever comes with a stable ppc system these days.
>

No change at all using the kernel created by 'make pmac32_defconfig'.
Fails at the same place.

udev is version 151-r4. I haven't created any rules for it. It's all
default Gentoo.

While I'm sure I won't actually do it I feel very close to burying a
ball-peen hammer right in the middle of this little box and being done
with this mess... ;-)

- Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
Am 23.09.10 00:59, Mark Knecht wrote:
>[snip]
>Can anyone see what I've done wrong?

Most likely nothing at all.

Your hd may be faulty.
I had a problem with such a hd some time ago
(not on PPC, and a really old hd btw).

No error was found by any hd-check.

[X]Ubuntu and Puppy installed, booted and worked fine,
Gentoo installed fine but refused to boot.

After replacing the hd, Gentoo installed, booted and works.
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On 09/25/10 16:40, Mark Knecht wrote:

(snip)

> I cannot due to the same sort of message I get when trying to boot:
>
> e2fsck_check_if_mount: Can't check if filesystem is mounted due to
> missing mtab file
> fsck.ext3: Device or resource busy while trying to open /dev/hda4
> Filesystem mounted or opened exclusively by another program?
>
> For kicks I tried umount /dev/hda4 but that complains about the
> missing mtab file also. It seems from the man page I could force it
> but I didn't want to do that, and again if I did and it even worked
> then where would the system read fsck.ext3 from to do the check since
> it's on /dev/hda4 itself?
>

Okay, let's try a few things now that we can boot the machine (even if
it's not all the way!).

First, lets mount proc:
# mount -t procfs none /proc

Now, try fsck.ext3 again. Does it work?

Next, let's remount the root file system read/write so we can modify files:
# mount -o remount,rw /

We'll copy the current mount information from proc to /etc/mtab and see
if that helps:
# cp /proc/self/mounts /etc/mtab
# mount -o remount,ro /

Now, try fsck.ext3 again. Does it work?

If so, try rebooting the system again. Does it boot now?

(snip)

> I've gone back and done a couple more experiments:
>
> 1) So far anything I try that refers to the drive as /dev/sda4 results
> in a VFS not syncing type error so at least as far as the boot process
> goes hda4 seems to be the right device.
>

hda4 will be the right device as long as you have the old ide driver in
your kernel.

> 2) I tried building in the PATA_MACIO driver but that by itself didn't
> change anything:
>
> (chroot) livecd / # cat /usr/src/linux/.config | grep MACIO
> CONFIG_PATA_MACIO=y
> CONFIG_ADB_MACIO=y
> (chroot) livecd / #
>
> The boot still fails at the same point with the same message. Possibly
> some other ATA driver is being selected ahead of this one and maybe it
> needs to be removed from the kernel? I don't know what to remove
> though so I'm sort of stuck on that account.
>
The old PMAC_IDE driver is getting picked before the PATA_MACIO driver.
If you'd like to try the newer driver, you'll need to disable the old
one first.

-Joe
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Sun, Sep 26, 2010 at 9:48 AM, Klaus Müller <mk.2001@web.de> wrote:
> Am 23.09.10 00:59, Mark Knecht wrote:
>>[snip]
>>Can anyone see what I've done wrong?
>
> Most likely nothing at all.
>
> Your hd may be faulty.
> I had a problem with such a hd some time ago
> (not on PPC, and a really old hd btw).
>
> No error was found by any hd-check.
>
> [X]Ubuntu and Puppy installed, booted and worked fine,
> Gentoo installed fine but refused to boot.
>
> After replacing the hd, Gentoo installed, booted and works.
>
>

Well, that's sort of scary but exactly describes my predicament!

Thanks,
Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Sun, Sep 26, 2010 at 10:36 AM, Joseph Jezak <josejx@gentoo.org> wrote:
>  On 09/25/10 16:40, Mark Knecht wrote:
<SNIP>
>
> Okay, let's try a few things now that we can boot the machine (even if
> it's not all the way!).
>
> First, lets mount proc:
> # mount -t procfs none /proc
>

OK - to me this doesn't look good:

# mount -t procfs none /proc
mount:none has wrong device number or fs type procfs not supported

on the off chance you menat proc instead of procfs I tried it that way
and got a slightly more reasonable message:

# mount -t proc none /proc
can't create lock file /etc/mtab~1038: Read-only file system (use -n
flag to override)

> Now, try fsck.ext3 again. Does it work?
>

Worked fine. fsck.ext3 said it was clean

> Next, let's remount the root file system read/write so we can modify files:
> # mount -o remount,rw /
>
Seemed to work. Got this message:

EXT3-fs: (hda4):using internal journal

> We'll copy the current mount information from proc to /etc/mtab and see
> if that helps:
> # cp /proc/self/mounts /etc/mtab
> # mount -o remount,ro /
>
> Now, try fsck.ext3 again. Does it work?
>
> If so, try rebooting the system again. Does it boot now?
>

Didn't boot but got a little farther. Doesn't complain about mtab
anymore but still complains:

* Checking root filesystem...
fsck.ext3: No such file or directory while trying to open /dev/hda4
/dev/hda4:
The superblock could not be read......


<SNIP>

>> The boot still fails at the same point with the same message. Possibly
>> some other ATA driver is being selected ahead of this one and maybe it
>> needs to be removed from the kernel? I don't know what to remove
>> though so I'm sort of stuck on that account.
>>
> The old PMAC_IDE driver is getting picked before the PATA_MACIO driver.
> If you'd like to try the newer driver, you'll need to disable the old
> one first.

OK - I'll go back in and look at my kernel config again. Thought I'd
post these results for now.

Please remember, I'm extremely thankful for all your help and the help
of others on this frustrating little problem.

Cheers,
Mark
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
On Sun, Sep 26, 2010 at 1:52 PM, Mark Knecht <markknecht@gmail.com> wrote:
> On Sun, Sep 26, 2010 at 10:36 AM, Joseph Jezak <josejx@gentoo.org> wrote:
<SNIP>
>> The old PMAC_IDE driver is getting picked before the PATA_MACIO driver.
>> If you'd like to try the newer driver, you'll need to disable the old
>> one first.
>
> OK - I'll go back in and look at my kernel config again. Thought I'd
> post these results for now.
>

OK, I switched to the newer PMAC_MACIO driver built into the kernel.
Names changed but the result is the same - now it fails /dev/sda4

* Checking root filesystem...
fsck.ext3: No such file or directory while trying to open /dev/sda4
/dev/sda4:
The superblock could not be read or does not describe...

Note one interesting difference with the newer driver is that I
couldn't run fsck.ext3 until I rebuilt the kernel without all the
power management stuff. Seems that by default fsck thought we were
using the battery and deferred the check.

Possibly I could have used fsck -f but I didn't want to take any chances.

Anyway, the current state is that /dev/sda4 fails to mount. With the
newer driver and modified kernel I had no problems with your bash
instructions other than the procfs issue.

Can I go further booting the machine by hand? If booting using the
init=/sbin/bash allows me to check the disk but booting automatically
does then it seems I should be able to walk through by hand doing all
the steps until I get to the same failure point, correct? I think I'll
Google around for web pages that describe that sort of thing. Sounds
like an interesting thing to get educated on after using Linux for
more than a decade... :-)

Here's my current yaboot.conf and fstab files. Note that for now the
use of /dev/hda2 is due to using the install CD. I suppose those will
have to change to 'sd' if I ever get this machine to boot Gentoo
again. (Still hoping Klaus' comment this morning about bad drives
isn't the root cause here. The MacMini doesn't look easy to open for
disk replacements...)

Again, thanks for the ideas.

Cheers,
Mark

(chroot) livecd / # cat /etc/yaboot.conf
## yaboot.conf generated by yabootconfig 1.0.8
##
## run: "man yaboot.conf" for details. Do not make changes until you have!!
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ

boot=/dev/hda2
#device=/pci@f4000000/ata-6@d/disk@0:
device=hd:
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.34-gentoo-r1
label=Gentoo-2.6.34-r1
#append="init=/bin/bash"
partition=4
root=/dev/sda4
read-only
(chroot) livecd / #


(chroot) livecd / # cat /etc/fstab
/dev/sda4 / ext3 noatime 0 1
/dev/sda3 none swap sw 0 0

/dev/cdrom /mnt/cdrom auto noauto,user 0 0

proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
(chroot) livecd / #
Re: yaboot has kicked my butt - 5 times?! [ In reply to ]
Sorry, I've had a busy week and didn't have time to respond!

> OK - to me this doesn't look good:
>
> # mount -t procfs none /proc
> mount:none has wrong device number or fs type procfs not supported

Sorry, that was my mistake, I was running from memory. :) You have the
right invocation below.

> on the off chance you menat proc instead of procfs I tried it that way
> and got a slightly more reasonable message:
>
> # mount -t proc none /proc
> can't create lock file /etc/mtab~1038: Read-only file system (use -n
> flag to override)
>
>> Now, try fsck.ext3 again. Does it work?
>>
> Worked fine. fsck.ext3 said it was clean
>

Cool, so now we know that fsck is fine.

>> Next, let's remount the root file system read/write so we can modify files:
>> # mount -o remount,rw /
>>
> Seemed to work. Got this message:
>
> EXT3-fs: (hda4):using internal journal
>
>> We'll copy the current mount information from proc to /etc/mtab and see
>> if that helps:
>> # cp /proc/self/mounts /etc/mtab
>> # mount -o remount,ro /
>>
>> Now, try fsck.ext3 again. Does it work?
>>
>> If so, try rebooting the system again. Does it boot now?
>>
> Didn't boot but got a little farther. Doesn't complain about mtab
> anymore but still complains:
>
> * Checking root filesystem...
> fsck.ext3: No such file or directory while trying to open /dev/hda4
> /dev/hda4:
> The superblock could not be read......
>
>
Okay, so we fixed the first thing. That's good. :) Can you attach your
whole kernel config? I'm wondering if maybe udev isn't running properly
due to a misconfiguration.

-Joe

1 2  View All