Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] yaboot.conf will not save
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
sdidier
n00b
n00b


Joined: 23 May 2004
Posts: 46
Location: Idaho, USA

PostPosted: Sun May 23, 2004 11:53 pm    Post subject: [SOLVED] yaboot.conf will not save Reply with quote

:? Help! I'm more than just a little bit perplexed. I have installed and reinstalled 10 times on my Ti book 876mghz and although I have a yaboot screen after holding down the option key at boot, when I get to the text mode
my boot partition is identified as hda3
hda2 is the Bootstrap, hda11 is swap and hda12 is root. I cannot seem to get those values saved in the Yaboot.conf file. Throughout the handbook the editor of choice is nano and instructions and admonitions to saver are prevelant (ctrl-o asks for a number of options, I assume typing m-a will append the file and save the changes) but ---Code Listing 3: ?etc/yaboot.conf doesn't refer to using an editor it only talks to running mkofboot -v to install the settings. I must be missing something!!! I'm not a total idiot but thisd is sure making me feel as though I am!
Also, can anyone tell me how to force the installation cd to shutdown and eject at the completion on the install. I know it is not good to have to use the power button to shut the system down but the darn thinbg hangs and will not reboot!!!
Thanks in advance for any help.
_________________
Steve Didier
Back to top
View user's profile Send private message
sdidier
n00b
n00b


Joined: 23 May 2004
Posts: 46
Location: Idaho, USA

PostPosted: Mon May 24, 2004 3:12 am    Post subject: yaboot.conf Reply with quote

I think I know what my problem may be. I can view my partition and even open the directories and folders to review the info therein. So I know that I have Gentoo system loaded on my hard drive. Unfortunately I cannot, do not know how, change root from the live cd into the existing installation. If I can find out how to chroot to /mnt/gentoo then I believe I will be able to copy the yaboot.conf file to the hard drive and edit it from there.

Any help will be greatly appreciated!! :?
_________________
Steve Didier
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Mon May 24, 2004 5:37 am    Post subject: Reply with quote

Hi,

well I assume that you installed gentoo in several sessions, so
you may have lost track of stuff you are meant to do.
First mount your disks as per section 4.f,
that is activate your swap ( just before 4.f), mount your
root, mount /proc (code listing 7) and your dev-filesystem
(code listing 8 ).
Then let's go to section 6.a chrooting which is your last question,
follow "code listing 3" :
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile

Now you should be abble to use mkofboot in the right environment,
supposing you have a good yaboot.conf!
Now I am not sure I understood everything from your first post,
do you have a separate boot and / partitions? This is not recommended
on Mac. Did you made a mistake the first time in yaboot.conf? (Then
you should really use ybin -v . If it doesn't work tell us about your
partitionning and post your yaboot.conf file.

Also regarding the cd. As root typing "eject" would work provided
nothing is mounted. But while your working terminal is chrooted
on your hard drive the other virtual terminal aren't, so i assume it wouldn't work (I never tried). The shutdown command will not work from your
chrooted environment (I guess Init doesn't belong to that environment),
but you can issue the comand "reboot" or execute "shutdown" from an other virtual terminal (ctrl+alt+F1 to F6 to change virtual terminal).
Hope that help.
Back to top
View user's profile Send private message
sdidier
n00b
n00b


Joined: 23 May 2004
Posts: 46
Location: Idaho, USA

PostPosted: Mon May 24, 2004 6:02 am    Post subject: reply Reply with quote

Thanks for the reply fb Actually I did everything as per the instructions, I did not have a /boot partition I did create a bootstrap swap and root partitions. I did not however create those in the first partition, so I had to use mac-fdisk to reorder the boostrap to hda2 fron hda10.
I also chrooted chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile

What I am no too sure about is creating the yaboot.conf file so that I can use mkofboot and have it write the file on the hard drive? How do I move it off of the Live cd to /mnt/gentoo?

are you saying that I can open another terminal in the installation environment?

Thanks for the quick reply!!
_________________
Steve Didier
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Mon May 24, 2004 7:29 am    Post subject: Re: reply Reply with quote

sdidier wrote:
Thanks for the reply fb Actually I did everything as per the instructions, I did not have a /boot partition I did create a bootstrap swap and root partitions. I did not however create those in the first partition, so I had to use mac-fdisk to reorder the boostrap to hda2 fron hda10.
I also chrooted chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile

What I am no too sure about is creating the yaboot.conf file so that I can use mkofboot and have it write the file on the hard drive? How do I move it off of the Live cd to /mnt/gentoo?

are you saying that I can open another terminal in the installation environment?

Thanks for the quick reply!!


You have to write the yaboot.conf in the /etc directory of your hard drive,
have tried using yabootconfig? Well it didn't work for me. Here is a copy
of my yaboot.conf and I will comment the important point that have to be
changed:

Code:
## Example yaboot.conf for ybin and yaboot >= 0.6
## see man yaboot.conf for more details.

## Change `unconfigured' to your bootstrap partition eg: /dev/hda2
boot=/dev/hda2

## 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.

device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0

## partition is the partition number where the kernel images are
## located.  The kernel images should be on your root filesystem, so
## this is usually the same partition number as your root filesystem.
## so if root = /dev/hda3 (the 3rd partition) then you should have
## partition=3  This *MUST* be set correct or yaboot won't boot!  This
## option can be either set globally as shown here, or per image in
## the image= sections

partition=8

## delay is the amount of time in seconds the dual boot menu (if one
## is configured, by the presense of macos, macosx, etc options here)
## will wait before choosing the default OS (GNU/Linux or the value of
## defaultos=).  If you omit this then the value of timeout=
## (converted to seconds) will be used.

delay=10

defaultos=linux

## timeout is the amount of time in tenths of a second that yaboot
## will wait before booting the default kernel image (the first image=
## section in this config file or the value of default=). 

timeout=40
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

## Change the default colors, fgcolor is the text color, bgcolor is
## the screen background color. (default: fgcolor=white, bgcolor=black)
#fgcolor=black
#bgcolor=green

## Password supplied in plaintext, required for yaboot to boot, unless
## restricted is also present (see below). Be sure to
## chmod 600 /etc/yaboot.conf if you set this!

#password=secret

## Password supplied as an md5 hash, see above

#password=$1$saltstrg$HnJ/gcM3oKhNbnzUPgXTD/

## A password is only required to boot an image specified here if
## parameters are specified on the command line or if the user enters
## an image is not specified in the configuration file at all (ie.
## arbitrary file load).  restricted can also be placed in an image
## section in that case any image not including the restricted keyword
## will be fully password protected.

#restricted

## image is the kernel itself, commonly kept in / but also commonly
## found in /boot.  Note that /boot should generally not be its own
## partition on powerpcs, its not necessary and complicates things.
## Make sure /boot is on the partition specified by partition= see
## above.  /boot should never be an HFS filesystem.  You may point
## image= to a symbolic link so long as the symlink does not cross
## partition boundries.

image=/boot/kernel-2.4.24-r4
   label=linux
   root=/dev/hda8
   read-only

#image=/vmlinux.old
#   label=Linux.old
#   root=/dev/hda3
#   read-only
macos=/dev/hda6
macosx=/dev/hda4
enablecdboot
enableofboot


boot=/hda2 should be correct for you too.
device=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0
may be different for you. You should check it with:
"ofpath /dev/hda" and replace /pci.... by the result if it is different
(I know there is an easier way but I never remember it.)
partition=8, 8 should be replaced by the number of your root partition,
from your post put 12.
Then check the section:
image=/boot/kernel-2.4.24-r4
label=linux
root=/dev/hda8
read-only
You need to replace things here with stuff from your installation,
namely put /boot/yourkernelname instead of /boot/kernel-2.4.24-r4
(assuming you have a different name for your kernel).
For you, it should be root=/dev/hda12.
Finally check that the partitions for the other OSes are correct and
relevant to your install:
macos=/dev/hda6 <=======for booting Mac OS9 comment if don't have it
macosx=/dev/hda4 <====== OSX partition
enablecdboot <====== enable booting from cd
enableofboot <====== enable booting of the openfirmware (you should leave it).

Every line starting with # is a comment, read it for your information.
In nano when you have finished editing a file type ctrl-x to quit and
it will ask if you want to save your changes, which you do, it should
be straightforward to follow nano's instructions from there. If you start
with "nano /etc/yaboot.conf" and the file doesn't exist it will be created
when you save. You have to do this while you are chrooted.

About the last question, while you have only one screen linux has
virtual terminal. There are usually 6 virtual terminals when you boot
from most linux distro or livecds. Those 6 are comand line terminal
a 7th is usually dedicated to GUI mode when it is running. You switch
from terminal to terminal by ctrl+alt+F# where # is terminal number
you want.
So you have logged in one terminal (vt1) and have chrooted that terminal
to your hard drive but you still have the 5 others there in which you can
log in. Doing so will log you in the original cd environment, you don't
need to mount the partitions if you have already done so in an other
terminal but you can chroot again on your hard drive environment
if you wish too.
I hope I am not too confusing, or that I tried to explained something
you already knew.
Now I will be off to my home and have tea and be unavailable for the next
18hours.
Hope you make it without any more help!
Back to top
View user's profile Send private message
pindar
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 220

PostPosted: Mon May 24, 2004 7:59 am    Post subject: Reply with quote

First off: I never managed to cleanly unmount all partitions and reboot either, but you can force rebooting with reboot -f, and it will work nevertheless. As to your yaboot problem: assuming that you have chrooted into the new environment, the command should be
Code:
mkofboot -v -b /dev/hda3 -o hd:3

You will also have to edit /etc/yaboot.conf accordingly. There should be an example file in /etc which you can use as a starting point. The relveant sections are these:
Code:

## 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 ofpath /dev/hda DO NOT   
## specify a partition number for this!  On IBM hardware you can
## generally comment this out.

device=hd:

## partition is the partition number where the kernel images are 
## located.  The kernel images should be on your root filesystem, so 
## this is usually the same partition number as your root filesystem.
## so if root = /dev/hda3 (the 3rd partition) then you should have
## partition=3  This *MUST* be set correct or yaboot won't boot!  This
## option can be either set globally as shown here, or per image in
## the image= sections

partition=12

## image is the kernel itself, commonly kept in / but also commonly   
## found in /boot.  Note that /boot should generally not be its own
## partition on powerpcs, its not necessary and complicates things.
## Make sure /boot is on the partition specified by partition= see
## above.  /boot should never be an HFS filesystem.  You may point
## image= to a symbolic link so long as the symlink does not cross
## partition boundries.

image=/vmlinux
        label=Linux
        root=/dev/hda12
        read-only



I don't know if it's absolutely necessary, but I sometimes had trouble booting because the bootloader couldn't find the vmlinux image. In my case, what helped was adding a symlink on the root partition itself:
Code:

ln -s /boot/vmlinux /vmlinux

HTH!
Back to top
View user's profile Send private message
pindar
Apprentice
Apprentice


Joined: 30 Apr 2004
Posts: 220

PostPosted: Mon May 24, 2004 8:02 am    Post subject: Reply with quote

oops sorry, while I was writing, there was a better reply by fb. Disregard what I wrote.
Back to top
View user's profile Send private message
sdidier
n00b
n00b


Joined: 23 May 2004
Posts: 46
Location: Idaho, USA

PostPosted: Mon May 24, 2004 11:19 pm    Post subject: further misadventures! Reply with quote

I reinstalled after wiping my drive and starting over, thought that I had done everything correctly but I am still not seeing a correct boot partition even in OFirmware. Maybe it is sleep deprivation?
Could the placement of OSX vs Gentoo on the drive have something to do with the problem? In other word should the first partition be linux and the second primary partition be OSX? And which should be installed first-OSX or Gentoo?
I am seriously thinking about wiping my drive again and starting over.

Sorry for the basic questions--I thought I was past being a total newbie, guess not!

Thanks for the help so far. I do not intend to give up on this until I have a successful install and a working Gentoo partition. BTW I came over from YDL because I wanted something that was more me and I was getting tired of YUM problems on a dialup. :roll:
_________________
Steve Didier
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Tue May 25, 2004 12:32 am    Post subject: Reply with quote

Well, so long as your appleboot is on hda2 the rest shouldn't be any
trouble. My partionning is as follow:
hda1 partition map
hda2 appleboot
hda3 applefree space (unimportant)
hda4 OS X
hda5 applefree space (unimportant)
hda6 OS 9
hda7 swap
hda8 / (linux)
hda9 /home (linux)

If you want to reinstall everything, start with OS X and don't forget to
leave some space for linux. You probably should get some sleep that is
great help.
Back to top
View user's profile Send private message
sdidier
n00b
n00b


Joined: 23 May 2004
Posts: 46
Location: Idaho, USA

PostPosted: Sat May 29, 2004 10:32 pm    Post subject: Success! Reply with quote

:D Thanks fb for your help your advice helped me walk through a successful install--took me four mor etimes before I finally got it right, but I did!
_________________
Steve Didier
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