Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fresh Install PPC Laptop1.5GHz...which step am I missing?
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
animalssj
n00b
n00b


Joined: 03 Jun 2004
Posts: 11

PostPosted: Tue Jul 06, 2004 5:10 am    Post subject: Fresh Install PPC Laptop1.5GHz...which step am I missing? Reply with quote

Ok. So I can stop asking all the wrong questions and not waste anyone's time, here is how I am doing this, exactly.

I boot off of the LiveCD just fine, type in 'G4' and boot to root # just fine.
I then set up the network...
Code:

net-setup eth0

that works beautifully and I then have network functionality.
My partition scheme is as follows.
Code:

/dev/hda1     Apple_Partition_map            31.5k
/dev/hda2     Apple Bootstrap                 800.0k
/dev/hda3     Apple_UNIX_SVR2 (swap)  512.0M
/dev/hda4     Apple_UNIX_SVR2 (root)       9.5G
/dev/hda5     Apple_Free                       128.0M
/dev/hda6     Apple_HFS (OSX)                64.4G
/dev/hda7     Apple_Free                           8.0k


I then proceed to creating the file system on my root only(ext3).
Code:

mke2fs -j /dev/hda4

that goes dandy, then I activate the swap.
Code:

mkswap /dev/hda3
 swapon /dev/hda3

Simple right? I then proceed to mount everything...
Code:

mkdir /mnt/gentoo
mount /dev/hda3 /mnt/gentoo

mkdir /mnt/gentoo/proc
mount -t proc none /mnt/gentoo/proc

mkdir /mnt/gentoo/dev
mount -o bind /dev /mnt/gentoo/dev

Ok then! Everything seems fine...
I even take time to set the date :D
Code:

date 070520522004

Cool. Then, I unpack the stage as the manual says.
Code:

cd /mnt/gentoo
tar -xvjpf /mnt/cdrom/stages/stage3-ppc-20040412.tar.bz2

That goes well, even with the 'tar: Error exit delayed form previous errors' Just like the manual says. Next comes the Portage install.
Code:

ls /mnt/cdrom/snapshots
portage-20040412.tar.bz2
tar -xvjf /mnt/cdrom/snapshots/portage-20040412.tar.bz2 -C /mnt/gentoo/usr

(then it extracts yada yada)

mkdir /mnt/gentoo/usr/portage/distfiles
cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles/



Ok. Then I leave the make.conf file the way it is. I don't change a thing in it. Here's what it looks like.
Code:

CFLAGS="-03 -mcpu=powerpc -pipe"
CHOST="powerpc-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"


I go straight to entering the new environment.
Code:

chroot /mnt/gentoo /bin/bash
env-update
* Caching service dependencies...
source /etc/profile

I skip the step of configuring the USE variable because I don't know how to. I am using this version of linux for many things, games included.

Code:

emerge ppc-development-sources

(it extracts... i think... a lot goes on, and it seems to come out ok. when I try to see the symlink, this is what comes out)

ls -l /usr/src/linux
lrwxr-xr-x      1 root         root   32 Jul   5 20:12 /usr/src/linux -> ppc-development-sources-2.6.1-r1

(i then type)
ln -s /usr/src/ppc-development-sources-2.6.1-r1/ /usr/src/linux
ls -l /usr/src/

(i get back)
lrwxr-xr-x     1 root   root   linux-> ppc-development-sources-2.6.1-r1
drwxrwxr-x  18 root  root     ppc-development-sources-2.6.1-r1


Seems, like what is supposed to happen, so I move on to compiling the Kernel.
Code:

cd /usr/src/linux
make menuconfig
(we get the kernel setup screen and here is what is selected...whew)
code maturity level options->
     [*] Prompt for development...
     [*] Select only drivers expected...
general setup->
     [*] Support for paging...
     [*] System V IPC
     [*] Sysctl support
     [*] Kernel .config
     [*] Enable access to .config
loadable module support
     [*] Enable loadable...
     [*] Module unloading
     [*] Module versioning
     [*] Automatic kernel module loading
processor
     [*] AltiVec Support
     [*] Thermal Management
     [*] CPU Frequency scaling
     [*] support for apple powerbooks
     [*] workarounds for ppc601 bugs
platform options
     [*] Kernel support for ELF binaries
     <M> Kernel support for MISC binaries
     [*] Support for open...
     [*] Support for RTAS
     [*] Support for PReP
     [*] Support for reading of PReP
     [*] Default bootloader kernel arguments
Bus options
     All Selected Except PCMCIA/Cardbus support
Advanced Setup
     [*] Prompt for advanced kernel configuration options
Device Drivers
     Block Devices   
          <*> Loopback device support
          <*> RAM disk support
          [*]   initial RAM disk
          [*]  Support for Large Block
     ATA/ATAPI
          (left default)
     SCSI
          (left default)
     MAC device drivers
          (left default)
     Networking support
          (left default)
...
...
The rest i left default in Device Drivers
...
...
File Systems
     [*] Second extended
     <*> Ext3 journaling
     [*] Ext3 extended attributes
     [*] proc file system

The rest of the options are left at default


So then I save it and begin the next step.
Code:

make dep && make vmlinux modules modules_install

***warning: make dep is unnecessary now.



Then it takes like 15 minutes to do it's thing.
After it is all done i do the copy thing...
Code:

cp vmlinux /boot/kernel-2.4.24
cp System.map /boot/System.map-2.4.24
cp .config /boot/config-2.4.24

I skip installing extra modules, as I would just like to get the install to work to begin with. I just want to get it to dual boot off of linux/osx.
Next step, I mess with fstab
Code:

nano -w /etc/fstab

/dev/hda2  /boot   ext2  noauto, noatime   1 1
/dev/hda4  /         ext3  noatime    0 0
/dev/hda3 none    swap sw   0 0
/dev/cdroms/cdrom0  /mnt/cdrom  iso9660  noauto,ro  0 0
#/dev/fd0   /mnt/floppy auto noauto  0 0
none  /proc   proc   defaults  0 0
none   /dev/shm   tmpfs  defaults  0 0

(thats what I have.  I'm not sure if I need to add something here for my osx partition??  Anyway, i save and exit.)


I do nothing else. Configure no network, nothing at this point.

I go straight to typing yabootconfig.
And here is my hell, maybe I put myself here, but here it is!

Code:

yabootconfig
yaboot is the Linux loader for PowerPc.  yabootconfig sets up your system to boot directly from your hard disk, without the need for a boot CD, floppy or a network boot. 
Install yaboot bootstrap on /dev/hda2 to boot Linux from /dev/hda4? [yes]  y
Creating a simple /etc/yaboot.conf...
yabootconfig: Cannot find a kernel, please locate one
Enter path to a kernel image:
(here are all the things I've tried, and not worked)
/boot/kernel-2.4.24
/usr/src/linux/vmlinux
(tons of variations, you name it i've typed it... or so i think)
yabootconfig: Could not determine necessary information, aborting...
yabootconfig: Are you using chroot yabootconfig instead of yabootconfig --chroot?


And there ends my escapades with Linux. I won't give up, but here is all the information that I've gathered during my installation. If anyone knows the problem, please help me, I can feel my puny useless mind frittering away. My phone number is 818-438-6455, I'm up all the time.
Thanks for taking the time to read this at least
8O
Back to top
View user's profile Send private message
CaribbeanKnight
Apprentice
Apprentice


Joined: 27 Apr 2003
Posts: 240
Location: Earth -> Europe -> Belgium -> Diest

PostPosted: Tue Jul 06, 2004 5:28 am    Post subject: Reply with quote

maybe you can skip yabootconfig and make a /etc/yaboot.conf file..?
here's mine for reference...
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=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=4

## 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=30

## 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=300
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/vmlinux
        label=Gentoo
        root=/dev/hda4
        sysmap=/boot/System.map
#       initrd=/boot/initrd-1024x768
        append="video=radeonfb:1024x768-32@75"
        read-only

image=/boot/vmlinux.test
        label=Gentoo_test
        root=/dev/hda4
        sysmap=/boot/System.map.test
#       initrd=/boot/initrd-1024x768
        append="video=radeonfb:1024x768-32@75"
        read-only

image=/boot/vmlinux.stable
        label=Gentoo_stable
        root=/dev/hda4
        sysmap=/boot/System.map.stable
#       initrd=/boot/initrd-1024x768
        append="video=radeonfb:1024x768-32@75"
        read-only

macosx=/dev/hda5
enablecdboot

_________________
...we ain't shit...
Linux User #353893
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Tue Jul 06, 2004 5:55 am    Post subject: Reply with quote

People run into this a lot - to use yabootconfig, you need to exit the chroot environment, and use yabootconfig with the --chroot option (usually with /mnt/gantoo as the parameter). This is what works/worked for me. If we ever get a proper FAQ going, that'll be on it.
_________________
Osmos.org
Now with 20% fewer rabid primates.
Back to top
View user's profile Send private message
animalssj
n00b
n00b


Joined: 03 Jun 2004
Posts: 11

PostPosted: Tue Jul 06, 2004 5:55 am    Post subject: Reply with quote

ok, i used that yaboot.conf as a good example and followed it to the letter, substituting the proper partitions, otherwise the vga information is the same.

I proceeded to ignore yabootconfig in that case and moved on to the next step.
Code:

emerge syslog-ng
rc-update add syslog-ng default
emerge xfsprogs (but that failed)
 i set up user admin
I then proceed to unmount the three previously mounted directories
but /mnt/gentoo always says that it is busy

from here i try to reboot.
i get after typing reboot

*failed to unmount filesystems

INIT: no more processes left in this runlevel
ive rebooted and it goes right into osx.
argh.  Help!
Back to top
View user's profile Send private message
animalssj
n00b
n00b


Joined: 03 Jun 2004
Posts: 11

PostPosted: Tue Jul 06, 2004 6:01 am    Post subject: Reply with quote

I apologize, but I'm very new at Linux. Thanks for all your help. How do I exit the chroot environment? What are the steps? Did I do the installation right?
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Tue Jul 06, 2004 6:05 am    Post subject: Reply with quote

Unless you did the mkofboot step, then Open Firmware doesn't know that's a bootstrap partition. Even if you did, you may have to manually force the issue in Open Firmware. On next boot, hold down "option", and select the penguin-badged hard drive. If it doesn't show up, then it mans you need to run mkofboot and/or ybin.

The shutdown problem seems to be pretty common for this LiveCD. It might have to do with the /dev binding, but I'm not entirely sure.
_________________
Osmos.org
Now with 20% fewer rabid primates.
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Tue Jul 06, 2004 6:08 am    Post subject: Reply with quote

animalssj wrote:
I apologize, but I'm very new at Linux. Thanks for all your help. How do I exit the chroot environment? What are the steps? Did I do the installation right?


No problem - I'm still pretty new at this, too. To exit the chroot environment (started when you typed "chroot /mnt/gentoo blah blah"), just type "exit". The best way to check whether you're still chrooted or not is to check the existence of /mnt/gentoo - if it's there, you're back in the LiveCD root. If not, you're still on your hard drive. There are probably other directories that would work, but that's the only one that comes to mind.
_________________
Osmos.org
Now with 20% fewer rabid primates.
Back to top
View user's profile Send private message
harlan
n00b
n00b


Joined: 06 Jul 2004
Posts: 1

PostPosted: Tue Jul 06, 2004 5:44 pm    Post subject: Reply with quote

The main problem should be here:

Quote:

/dev/hda2 /boot ext2 noauto, noatime 1 1
/dev/hda4 / ext3 noatime 0 0
/dev/hda3 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0


In the first line you're mounting your bootstrap partition in /boot, with ext2 filesystem. Somewhere in the manual should be written that the bootstrap partition have not to be mounted at all! So you have to comment out that line or delete it.

Also change the last 0 in the second line to 1.

Another problem is in
Quote:
CFLAGS="-03 -mcpu=powerpc -pipe"


I suppose you have a G4 processor, so you should change this in:

CFLAGS="-O2 -mcpu=7450 -maltivec -mabi=altivec -pipe"

Note: -O2 is a "o two", not "zero two",
7450 is the cpu type (=G4).

Hope this could help,
bye
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Wed Jul 07, 2004 3:04 am    Post subject: Reply with quote

harlan wrote:
In the first line you're mounting your bootstrap partition in /boot, with ext2 filesystem. Somewhere in the manual should be written that the bootstrap partition have not to be mounted at all! So you have to comment out that line or delete it.


Yeah - I missed that. The PPC version of the handbook used to be more clear about that, but in the great "one handbook for all" merge, some of the PPC differences were lost. The chroot advice probably still applies, however.
_________________
Osmos.org
Now with 20% fewer rabid primates.
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