Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Yabootconfig error during installation, can't find kernel
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
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Sat Feb 03, 2007 8:29 pm    Post subject: Yabootconfig error during installation, can't find kernel Reply with quote

Hello,

I am a gentoo n00b, but I'm trying to install it on an iMac G3. Everything has been going smoothly until the yaboot and yabootconfig step. When I run yabootconfig (yabootconfig --chroot /mnt/gentoo) as root, it continually asks for me to "enter path to a kernel image". I wrote down the path to my kernel image as
/boot/kernel-genkernel-ppc-2.6.10-gentoo-r3 ... I've tried just about everything I could think of, typo wise, as well as adding /mnt/gentoo in front of that. It would be really nice if I could just go and look in the boot directory myself, but I can't get yabootconfig to quit! It just keeps asking me where the kernel image is, and I have no idea how to get it to stop (any command I would think might work is just interpreted as a path to kernel, and it tells me that there is no such file or directory, of course!) So, I'd like to get out of yabootconfig to either edit the .conf file manually or find the kernel image and figure out what I really should be typing. Any ideas?

Thank you very much!

-Colin
Back to top
View user's profile Send private message
Dan
Veteran
Veteran


Joined: 25 Oct 2005
Posts: 1301

PostPosted: Sat Feb 03, 2007 8:36 pm    Post subject: Reply with quote

Normally, the initial boot configuration is created while in a ramdisk installer environment, with the system being installed being mounted under /target or /mnt. To run yabootconfig under these conditions, supply the path to the target system with -t or --chroot option. For example: yabootconfig --chroot /target
_________________
- Failure is not an option. It's bundled with your software.
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Sat Feb 03, 2007 8:39 pm    Post subject: Reply with quote

Thanks, but I can't get out of yabootconfig. I can't do any commands or anything because everything is interpreted as a path to the kernel image. How do I get out of yabootconfig, first off?

-Colin
Back to top
View user's profile Send private message
buddha007
n00b
n00b


Joined: 22 Jan 2007
Posts: 21
Location: London

PostPosted: Sun Feb 04, 2007 11:48 am    Post subject: Reply with quote

I myself tried getting out of yabootconfig by typing in a "fake" path, after which it threw my out.

I think you can do:
Code:
 Ctrl+c


Yabootconfig didn't work for me at all. Instead I set the bootloader up manually. It's not as hard as it seems, just follow the examples in the handbook. Make sure you're out of the chroot environment though, or else it won't work!
_________________
Windows?? I'd rather rub my nostrils down a cactus :)
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Sun Feb 04, 2007 6:28 pm    Post subject: Reply with quote

buddha007 wrote:
I myself tried getting out of yabootconfig by typing in a "fake" path, after which it threw my out.

I think you can do:
Code:
 Ctrl+c


Yabootconfig didn't work for me at all. Instead I set the bootloader up manually. It's not as hard as it seems, just follow the examples in the handbook. Make sure you're out of the chroot environment though, or else it won't work!


Thanks, control C worked like a charm.

So I ran yabootconfig again (it was an 18, not a 10...) and rebooted. Now I'm getting two errors that I'm almost positive are because I gave an hda5 instead of an hda6 in one of the config files. What happens is it starts booting fine, then it says:

>>Mounting root...
Mount: Mounting /dev/hda5 on /newroot failed: Invalid Argument
!! Could not mount specified ROOT, try again
!! The root block device is unspecified or not detected.
Please specify a device to boot, or "shell" for a shell...
boot() ::

So I type /dev/hda6 which should be my boot partition, and it mounts OK until it gets to
* Checking root filesystm...
ext2fs_check_if_mouint: No such file or directory when determining whether /dev/hda5 is mounted.
fsck.ext3: Bad magic number in super-block while trying to open /dev/hda5
/dev/hda5:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

* Filesystem couldn't be fixed :( [ !! ]
give root password for maintenance
(or type control-D to continue):

So I type in the password.

(none) ~ #

So I try "e2fsck -b 8193 /dev/hda6" assuming that it is the same 5 for a 6 error I made.

But I get

e2fscj 1,38 (30-Jun-2005)
e2fsck: Bad magic number in super-block while trying to open /dev/hda6

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

It would be useful if I could look at my partitions and maybe change the conf file to boot from the correct one (?) but I can't do anything in the
(none) ~ #
prompt

-Colin
Back to top
View user's profile Send private message
buddha007
n00b
n00b


Joined: 22 Jan 2007
Posts: 21
Location: London

PostPosted: Sun Feb 04, 2007 8:08 pm    Post subject: Reply with quote

ooo that's a bit too technical for me at the mo..better wait for the moderator ;) it sounds to me though, that you might have specified the wrong filesystem in /etc/fstab. did you choose ext2 or ext3?
_________________
Windows?? I'd rather rub my nostrils down a cactus :)
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Sun Feb 04, 2007 8:10 pm    Post subject: Reply with quote

buddha007 wrote:
ooo that's a bit too technical for me at the mo..better wait for the moderator ;) it sounds to me though, that you might have specified the wrong filesystem in /etc/fstab. did you choose ext2 or ext3?


ext3.

-Colin
Back to top
View user's profile Send private message
buddha007
n00b
n00b


Joined: 22 Jan 2007
Posts: 21
Location: London

PostPosted: Sun Feb 04, 2007 8:12 pm    Post subject: Reply with quote

that's where the problem lies then.. it's trying to load an ext2 filesystem.

Code:
nano -w /etc/fstab

and change the filesystem type to ext3
_________________
Windows?? I'd rather rub my nostrils down a cactus :)
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Sun Feb 04, 2007 8:21 pm    Post subject: Reply with quote

buddha007 wrote:
that's where the problem lies then.. it's trying to load an ext2 filesystem.

Code:
nano -w /etc/fstab

and change the filesystem type to ext3


It is ext3 in fstab... is there a way for me to look at what my partitions are, to verify that I have the rest of the options OK?

-Colin
Back to top
View user's profile Send private message
buddha007
n00b
n00b


Joined: 22 Jan 2007
Posts: 21
Location: London

PostPosted: Sun Feb 04, 2007 8:38 pm    Post subject: Reply with quote

I had to do it the long way round, and I'm sure there's a quicker way, but this is what i did:

Code:
emerge parted


before that though, you'd have to boot up from the cd and chroot into your gentoo environment (see handbook for that)... hope there's someone out there with an easier answer... anyone?
_________________
Windows?? I'd rather rub my nostrils down a cactus :)
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Sun Feb 04, 2007 8:50 pm    Post subject: Reply with quote

buddha007 wrote:
I had to do it the long way round, and I'm sure there's a quicker way, but this is what i did:

Code:
emerge parted


before that though, you'd have to boot up from the cd and chroot into your gentoo environment (see handbook for that)... hope there's someone out there with an easier answer... anyone?


How do you boot up from teh CD? I can't find it in the handbook. Thanks for all your help, man. I really appreciate it.

-Colin
Back to top
View user's profile Send private message
buddha007
n00b
n00b


Joined: 22 Jan 2007
Posts: 21
Location: London

PostPosted: Sun Feb 04, 2007 8:57 pm    Post subject: Reply with quote

put the cd in the drive, restart the computer and as soon as you hear the start up jingle, press and hold c until you're booted
_________________
Windows?? I'd rather rub my nostrils down a cactus :)
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Sun Feb 04, 2007 11:20 pm    Post subject: Reply with quote

Thanks, that was rather stupid of me not to think of, for some reason I thought it would have changed.

So according to mac-fdisk my partitions are
/dev/hda1 Apple_partition_map Apple
/dev/hda2 Apple_Driver_ATA Macintosh
/dev/hda3 Apple_driver_ATA Macintosh
/dev/hda4 Apple_Bootstrat bootstrap
/dev/hda5 Apple_UNIX_SVR2 swap
/dev/hda6 Apple_UNIX_SVR2 root

The 2 Driver_ATA ones were on the iMac when I first got it, and could not be deleted, so the partitions after that are the ones I added.

Here is what my /etc/fstab says:

/dev/hda4 /boot ext2 defaults 1 2
/dev/hda6 / ext3 natime 0 1
/dev/hda5 none swap sw 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
/dev/cdrom/cdrom0 /mnt/cdrom auto noauto,user 0 0

My yaboot.conf says

boot=/dev/hda4
device=pci@800000000/mac-io@10/de@20000/disck@0:
partition=6
root=dev/hda6
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-genkernel-ppc-2.6.18-gentoo-r3
label=Linux
read-only
initrd=/boot/initramfs-genkernel-ppc-2.6.18-gentoo-r3
initrd-size=8192

When I start up, everything goes OK until I get that error like before... Mounting /dev/hda5 on /newroot failed: Invalid Argument which prompts me to type /dev/hda6, which works for a little bit, then says fsck.ext2: Bad magic number in super-block while trying to open /dev/hda4 etc etc, then prompts me for my password, which gives me a prompt. Now, however, if I type exit, it keeps mounting stuff, starting with the error
* Some local filesystem failed to mount [ !! ]

But continues to boot up fine, as far as I can tell. So at least I fixed taht, kind of. Can anyone tell where my error is?

-Colin
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Mon Feb 05, 2007 6:19 pm    Post subject: Reply with quote

Hi,

you should get rid of the line
/dev/hda4 /boot ext2 defaults 1 2

in your /etc/fstab. The bootstrap partition is not your /boot partition. That should get rid of the errors about hda4. You might also try adding
append="root=/dev/hda6"
to your yaboot.conf. Add it to the section under image=

Be sure to run ybin again. Hope it works.
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Mon Feb 05, 2007 10:20 pm    Post subject: Reply with quote

quatsch wrote:
Hi,

you should get rid of the line
/dev/hda4 /boot ext2 defaults 1 2

in your /etc/fstab. The bootstrap partition is not your /boot partition. That should get rid of the errors about hda4. You might also try adding
append="root=/dev/hda6"
to your yaboot.conf. Add it to the section under image=

Be sure to run ybin again. Hope it works.


OK, I did those things-then ran ybin -v. That gives me
ybin: Finding OpenmFirmware device path to 'dev/hda4'...
ofpath: unable to determine sysfs mountpoint
ybin: Unable to find OpenFirmware path for boot=/dev/hda4
ybin: Please add ofboot=<path> where <path is the OpenFirmware path to /dev/hda4 to /etc/yaboot.conf

Any idea what I should do?

-Colin
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Mon Feb 05, 2007 10:51 pm    Post subject: Reply with quote

are you doing this from your gentoo installation or from the install CD?

If you are doing it from the gentoo installation (it does boot up, right?), can you see if you have anything under /sys?

If you don't what is the output of
mount

Does /sys show up in the list? If it doesn't, maybe you can try
mount -t sysfs none /sys

and then try ybin -v again.
Back to top
View user's profile Send private message
buddha007
n00b
n00b


Joined: 22 Jan 2007
Posts: 21
Location: London

PostPosted: Mon Feb 05, 2007 11:23 pm    Post subject: Reply with quote

changing /dev/hda4 to
Code:
hd:4
might help too :P
_________________
Windows?? I'd rather rub my nostrils down a cactus :)
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Tue Feb 06, 2007 3:10 am    Post subject: Reply with quote

quatsch wrote:
are you doing this from your gentoo installation or from the install CD?

If you are doing it from the gentoo installation (it does boot up, right?), can you see if you have anything under /sys?

If you don't what is the output of
mount

Does /sys show up in the list? If it doesn't, maybe you can try
mount -t sysfs none /sys

and then try ybin -v again.


I was doing it from the install CD. It boots up without the CD but in a very buggy, somewhat primitive way (IE, hardly anything works). Booted from the CD there is nothing in sys, but it exists. Mount yields:

/dev/hda6 on / type ext3 (rw, noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw,devmode=0664,devgid=85)

Thanks for your help man.

-Colin
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Tue Feb 06, 2007 3:14 am    Post subject: Reply with quote

buddha007 wrote:
changing /dev/hda4 to
Code:
hd:4
might help too :P


Why do you say that? In yaboot.conf or fstab?

-Colin
Back to top
View user's profile Send private message
expanoncolin
n00b
n00b


Joined: 03 Feb 2007
Posts: 11

PostPosted: Tue Feb 06, 2007 3:43 am    Post subject: Reply with quote

At this point, the boot goes fine until I get

>>Mounting root...
Mount: Mounting /dev/hda5 on /newroot failed: Invalid Argument
!! Could not mount specified ROOT, try again
!! The root block device is unspecified or not detected.
Please specify a device to boot, or "shell" for a shell...
boot() ::

As I have gotten-typing in /dev/hda6 lets it boot up normally, until I get the error

* Warning: the current /etc/modules.devfs had not been automatically generated
* Use "modules-update force" to force (re)generation

If I type modules-update force, there are no errors or anything, but it has not removed this error. Since I assume that everything is (sort of) working, I tried

/mnt/cdrom

So I could install the GRP packages, but I get the error:

mount: special device /dev/cdrom/cdrom0 does not exist

With drastic and impossible luck, all of these problems are related :)

-Colin
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Tue Feb 06, 2007 6:30 pm    Post subject: Reply with quote

I wouldn't be surprised if those problems are all related.

I think you should run genkernel again. The handbook says that you need to delete the reference to /boot from fstab before you run genkernel.

As for the cdrom, does

mount /dev/hdc /mnt/cdrom

work (as root)? If it does, you just have to change fstab accordingly. If not, the system probably isn't detecting the drive.
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