Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem booting new kernel [RESOLVED, but..... not]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Lenroc
n00b
n00b


Joined: 03 Sep 2004
Posts: 21

PostPosted: Fri Sep 10, 2004 9:19 pm    Post subject: Problem booting new kernel [RESOLVED, but..... not] Reply with quote

Edit: I have my kernel booting now, but still have weird problems. See this post in this thread

I have been using the 2004.2 Minimal LiveCD to (try to) do a Stage 2 install of Gentoo on my B&W G3.

I am using kernel 2.6.7-gentoo-r14 (gentoo-dev-sources).

I believe I followed the Gentoo Handbook installation faithfully, though the Kernel Configuration section of Chapter 7 had a few things that seem to be outdated with the newest Kernels (the guide mentions RTC and "ADB raw keycodes", neither of which I found in the config menu).

However, when I try to boot, yaboot comes up fine, but trying to boot Linux fails with the following error:
Code:
pci@80000000/pci-bridge@d/pci-ata@1/@0/disk@1:3,/boot/kernel-2.6.7-gentoo-r14: Input/output error


I know that the disk is correct, because that's what "ofboot /dev/hdb" returned, and because if I try variations of that device I get "Invalid device" instead of "Input/output error"...

I know that the path is valid, because when I boot with the LiveCD again, I can see the file at /mnt/gentoo/boot/kernel-2.6.7-gentoo-r14 (or, if I am in the 'chroot jail', it's at /boot/kernel-2.6.7-gentoo-r14...).

Where do I start looking for what I did wrong? ;)

Is there some way to try booting the kernel independant of Yaboot to make sure that it's a kernel problem and not a Yaboot problem?

Could it make a difference that / is ext3?

Edit: So, I realized I might not have been as clear as I could have been. What I'm really wondering is if anyone knows what could cause the "Input/output error" before boot. Could that be a kernel misconfiguration, or does that mean yaboot/OF can't find the kernel file, or that something else is wrong? I'd rather not try to reconfigure a kernel (that I don't see any problems with) if it's a yaboot problem, and vice versa ;)


Last edited by Lenroc on Sun Sep 12, 2004 8:09 am; edited 5 times in total
Back to top
View user's profile Send private message
stimuli
Apprentice
Apprentice


Joined: 16 Dec 2002
Posts: 292
Location: Vancouver, BC, Canada

PostPosted: Sat Sep 11, 2004 3:19 am    Post subject: Reply with quote

The problem lies with your /etc/yaboot.conf. Post it. There may also be problems with your kernel config, so you may want to post that as well. However, that is not what is causing this particular issue.
Back to top
View user's profile Send private message
Lenroc
n00b
n00b


Joined: 03 Sep 2004
Posts: 21

PostPosted: Sat Sep 11, 2004 6:08 am    Post subject: Reply with quote

Ok, here's my /etc/yaboot.conf:

Code:
boot=/dev/hdb2
device=/pci@80000000/pci-bridge@d/pci-ata@1/@0/disk@1:
partition=3
root=/dev/hdb3
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.7-gentoo-r14
   label=Linux
   read-only

macosx=/dev/hda7

macos=/dev/hda6


And when I run ybin -v:
Code:
ybin: Finding OpenFirmware device path to `/dev/hdb2'...
ybin: Finding OpenFirmware device path to `/dev/hda6'...
ybin: Finding OpenFirmware device path to `/dev/hda7'...
ybin: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto /dev/hdb2...
ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hdb2...
ybin: Installing /etc/yaboot.conf onto /dev/hdb2...
ybin: Setting attributes on ofboot...
ybin: Setting attributes on yaboot...
ybin: Setting attributes on yaboot.conf...
ybin: Blessing /dev/hdb2 with Holy Penguin Pee...
ybin: Updating OpenFirmware boot-device variable in nvram...


Edit: In case it helps, here is my fstab:
Code:
# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $

# <fs>  <mountpoint>    <type>     <opts>         <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hdb3   /   ext3      noatime      0 1
/dev/hdb4   none   swap      sw      0 0
/dev/cdroms/cdrom0 /mnt/cdrom auto   noauto,ro   0 0
#/dev/hdb5   /mnt/socrates   hfs   noatime      0 0
#/dev/hda6   /mnt/oracle   hfs   noatime      0 0
#/dev/hda7   /mnt/macosx   hfs   noatime      0 0


# NOTE: The next line is critical for boot!
none      /proc      proc   defaults   0 0

none      /dev/shm   tmpfs   defaults   0 0


And the listings of mac-fdisk:
Code:
/dev/hda
        #                    type name                 length   base     ( size )  system
dump: name /dev/hda len 8
/dev/hda1     Apple_partition_map Apple                    63 @ 1        ( 31.5k)  Partition map
/dev/hda2        Apple_Driver_ATA Macintosh                54 @ 64       ( 27.0k)  Unknown
/dev/hda3        Apple_Driver_ATA Macintosh                74 @ 118      ( 37.0k)  Unknown
/dev/hda4      Apple_Driver_IOKit Macintosh               512 @ 192      (256.0k)  Unknown
/dev/hda5           Apple_Patches Patch Partition         512 @ 704      (256.0k)  Unknown
/dev/hda6               Apple_HFS untitled           19120982 @ 1216     (  9.1G)  HFS
/dev/hda7               Apple_HFS untitled 2          6328784 @ 19122198 (  3.0G)  HFS
/dev/hda8              Apple_Free Extra                    10 @ 25450982 (  5.0k)  Free space

Block size=512, Number of Blocks=25450991
DeviceType=0x0, DeviceId=0x0
Drivers-
1: @ 64 for 21, type=0x701
2: @ 118 for 34, type=0xf8ff

/dev/hdb
        #                    type name                 length   base     ( size )  system
dump: name /dev/hdb len 8
/dev/hdb1     Apple_partition_map Apple                    63 @ 1        ( 31.5k)  Partition map
/dev/hdb2         Apple_Bootstrap bootstrap              1600 @ 16847968 (800.0k)  NewWorld bootblock
/dev/hdb3         Apple_UNIX_SVR2 root               40735200 @ 17898144 ( 19.4G)  Linux native
/dev/hdb4         Apple_UNIX_SVR2 swap                1048576 @ 16849568 (512.0M)  Linux swap
/dev/hdb5               Apple_HFS Socrates_1         16846144 @ 1824     (  8.0G)  HFS
/dev/hdb6          Apple_Driver43 Macintosh                56 @ 120      ( 28.0k)  Driver 4.3
/dev/hdb7          Apple_Driver43 Macintosh                56 @ 64       ( 28.0k)  Driver 4.3
/dev/hdb8        Apple_Driver_ATA Macintosh                56 @ 176      ( 28.0k)  Unknown
/dev/hdb9        Apple_Driver_ATA Macintosh                56 @ 232      ( 28.0k)  Unknown
/dev/hdb10         Apple_FWDriver Macintosh               512 @ 288      (256.0k)  Unknown
/dev/hdb11     Apple_Driver_IOKit Macintosh               512 @ 800      (256.0k)  Unknown
/dev/hdb12          Apple_Patches Patch Partition         512 @ 1312     (256.0k)  Unknown

Block size=512, Number of Blocks=58633344
DeviceType=0x0, DeviceId=0x0
Drivers-
1: @ 64 for 23, type=0x1
2: @ 120 for 36, type=0xffff
3: @ 176 for 21, type=0x701
4: @ 232 for 34, type=0xf8ff
Back to top
View user's profile Send private message
Lenroc
n00b
n00b


Joined: 03 Sep 2004
Posts: 21

PostPosted: Sat Sep 11, 2004 7:53 pm    Post subject: Better yaboot.conf Reply with quote

Well, I've improved my yaboot.conf:

Code:
boot=/dev/hdb2
magicboot=/usr/lib/yaboot/ofboot
macosx=/dev/hda7
macos=/dev/hda6
enablecdboot
delay=10

timeout=100
root=/dev/hdb3
install=/usr/lib/yaboot/yaboot
device=/pci@80000000/pci-bridge@d/pci-ata@1/@0/disk@1:
partition=3

image=/boot/kernel-2.6.7-gentoo-r14
   label=Gentoo
   read-only


This gives me a working 'multiboot' menu when I boot up. MacOS, MacOSX, and CD all work, but Linux still doesn't work :(

The error is exactly the same: "[device]:[partition],[path/to/kernel]: Input/output error"

I'm really stuck, I don't even know what I can try to make this work.
Back to top
View user's profile Send private message
Lenroc
n00b
n00b


Joined: 03 Sep 2004
Posts: 21

PostPosted: Sun Sep 12, 2004 8:03 am    Post subject: Resolved... but... bug? Reply with quote

Ok, I finally got my kernel to boot!! :) ;)

I reran "ofpath /dev/hdb3" and it said, instead of the long string quoted above, simply "ultra1:3".

I thought... aha! There's my problem. So I quickly changed my yaboot.conf to reflect this, ybin'd, and restarted.

But, I still got the "Input/output error". :(

But, now I knew a shorthand way to mess around with things at yaboot's "boot:" prompt. After messing around a bit, I found that:

  • If I tried boot:ultra1:3,/boot/[anything], I got Input/output error
  • If I tried boot:ultra1:3,/[any real file or directory], I got Not an elf binary (or similar... I didn't write it down)
  • If I tried boot:ultra1:3,/[any non existant filename], I got File not found


The only time I got "Input/output error" was when I told yaboot to look for my kernel in /boot/, but it wasn't restricted to my kernel file! Any file I told it to look at in /boot/ gave the same error, even just /boot/!

So.... I booted off the CD again, then did a little:
Code:
mkdir /mnt/gentoo/toot (ain't I cute? ;))
cp /mnt/gentoo/boot/kernel-2.6.7-gentoo-r14 /mnt/gentoo/toot/
cp /mnt/gentoo/boot/System.map-2.6.7-gentoo-r14 /mnt/gentoo/toot/ (I don't know if this is needed....)
reboot


When I got back to the Yaboot "boot:" prompt, I tried "ultra1:3,/boot/kernel-2.6.7-gentoo-r14" one last time, and got the same error ("Input/output error"). Then I tried "ultra1:3,/toot/kernel-2.6.7-gentoo-r14"... and it worked! Booted right up, no problemo. (Wow! I can configure a kernel!?! ;))

So, I suspect something is wrong with /boot, which is just a folder in my root partition (/dev/hdb3)... but what could be the trouble? Permissions, owner, etc. all check out, and it's not a symlink to anything...

Is this some weird bug, or am I just missing something?

(I then went back and modified my yaboot.conf to point to /toot/, ybin'd, and all is working great...)
Back to top
View user's profile Send private message
stimuli
Apprentice
Apprentice


Joined: 16 Dec 2002
Posts: 292
Location: Vancouver, BC, Canada

PostPosted: Mon Sep 13, 2004 12:50 am    Post subject: Reply with quote

## device is the OpenFirmware device path to the disk containing
## kernel images. if your disk is /dev/hda you can find the
## OpenFirmware path by running the command: ofpath /dev/hda DO NOT
## specify a partition number for this! On IBM hardware you can
## generally comment this out.

Look carefully at your device section of your yaboot.conf, especially the last 12 characters ;)

Hint: The line should end with colon, ie:
Code:
hd:


Last edited by stimuli on Mon Sep 13, 2004 6:32 am; edited 1 time in total
Back to top
View user's profile Send private message
stimuli
Apprentice
Apprentice


Joined: 16 Dec 2002
Posts: 292
Location: Vancouver, BC, Canada

PostPosted: Mon Sep 13, 2004 12:55 am    Post subject: Reply with quote

Off-topic, but I suggest you name your current working kernel "vmlinux" and name your last working kernel "vmlinux.old" so that you do not have to run ybin/yaboot/whatever every time you compile a new kernel. Here's a handy bash script:
Code:

cd /usr/src/linux/ &&
cp ../.config-2.6 ./.config &&
make menuconfig && cp ./.config ../.config-2.6
make && make modules_install &&
rm -f /boot/vmlinux.old ;
cp /boot/vmlinux /boot/vmlinux.old ;
cp vmlinux /boot/ &&
echo "### Kernel is built! Reboot to use it! ###" &&
xmessage 'Kernel is built! Reboot to use it!' &


Copy that to a text file(eg:" 2.6-kernel-build.sh") and then chmod +x the text file. You might want to put it in /usr/local/sbin/

make sure /usr/src/linux points to your latest kernel source code before running this.
Also, you will have to copy /usr/src/linux/.config to /usr/src/.config-2.6 once before running it.
Back to top
View user's profile Send private message
Lenroc
n00b
n00b


Joined: 03 Sep 2004
Posts: 21

PostPosted: Mon Sep 13, 2004 9:10 am    Post subject: Reply with quote

stimuli wrote:
Look carefully at your device section of your yaboot.conf, especially the last 12 characters ;)

Hint: The line should end with colon, ie:
Code:
hd:


I'll be the first to admit that I'm confused...

Is that directed at me? The 2 yaboot.conf's that I posted here both have a colon as the last character of the device line...

Do you think that's what caused my "Input/output error" originally?

stimuli wrote:
I suggest you name your current working kernel "vmlinux" and name your last working kernel "vmlinux.old" so that you do not have to run ybin/yaboot/whatever every time you compile a new kernel.


Thanks for the pointer! :) I think I'll do just that.
Back to top
View user's profile Send private message
stimuli
Apprentice
Apprentice


Joined: 16 Dec 2002
Posts: 292
Location: Vancouver, BC, Canada

PostPosted: Tue Sep 14, 2004 7:28 pm    Post subject: Reply with quote

Lenroc, please post your current working yaboot.conf

Sorry the above advice was a result of me misreading your posted yaboot.conf (I mistook two lines for one line).

Also, if the problem lies with the /boot/ directory, point yaboot.conf to /toot/ instead to see if this solves anything.
Back to top
View user's profile Send private message
Lenroc
n00b
n00b


Joined: 03 Sep 2004
Posts: 21

PostPosted: Tue Sep 14, 2004 8:53 pm    Post subject: Reply with quote

Alright, here's my current working yaboot.conf:

Code:
boot=/dev/hdb2
magicboot=/usr/lib/yaboot/ofboot
macosx=/dev/hda7
macos=/dev/hda6
enablecdboot
delay=10

timeout=10
root=/dev/hdb3
install=/usr/lib/yaboot/yaboot
device=ultra1:
partition=3

image=/toot/kernel-2.6.7-gentoo-r14
        label=Gentoo
        read-only


Yaboot still pukes any time I try to boot from /boot. I have no idea why. Kind of annoying, though... ;)
Back to top
View user's profile Send private message
stimuli
Apprentice
Apprentice


Joined: 16 Dec 2002
Posts: 292
Location: Vancouver, BC, Canada

PostPosted: Wed Sep 15, 2004 2:08 am    Post subject: Reply with quote

But the above config does work with yaboot?
Back to top
View user's profile Send private message
Lenroc
n00b
n00b


Joined: 03 Sep 2004
Posts: 21

PostPosted: Wed Sep 15, 2004 2:20 am    Post subject: Reply with quote

Yes, it does work. Note the "/toot" not "/boot"

I'd really like to find out what's wrong with my "/boot", since AFAIK it was part of the 2004.2 Stage2 tarball I downloaded. If there's something wrong with the release, it would be nice to file a bugreport so it can be fixed, so as not to needlessly cause others the same dilemma.

I just don't know what could be wrong with my /boot directory to cause this problem. Any ideas for things I can try to find out what's wrong with it?
Back to top
View user's profile Send private message
stimuli
Apprentice
Apprentice


Joined: 16 Dec 2002
Posts: 292
Location: Vancouver, BC, Canada

PostPosted: Wed Sep 15, 2004 2:43 am    Post subject: Reply with quote

No but try deleting it then recreating it. Save your vmlinux first, obviously. That's the wackiest problem I've yet seen with yaboot. Sorry i can't help more.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum