Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
issues with getting yaboot to work on imac g4 system
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
shock-wave
n00b
n00b


Joined: 29 Dec 2023
Posts: 1

PostPosted: Mon Jan 01, 2024 8:26 pm    Post subject: issues with getting yaboot to work on imac g4 system Reply with quote

I am quite a ways into installing gentoo on an imac g4. Because this was my first time I went with all the default/firstoptions thinking that they would be well supported and sane defaults

There are a few exceptions to this rule like I enabled some extra features in the kernel that werent in the guide but thats it.

Another exception was picking xfs for my filesystem for the root partition. This would kick my behind later.

When it came to picking the bootloader I picked yaboot since it was given as the default.



First yaboot wouldnt compile so I thought I did something wrong but I couldnt find anything in the guide. I then found a helpful topic here stating that it was broken when compiling with newer versions of gcc and that yaboot had not been updated since 2014.

Luckily the post mentioned a package called yaboot-static that would compile and I continued. I then had the sinking feeling that since it hasnt been maintained since 2014 that xfs wouldnt work for my filesystem but proceeded anyways.

When it came to first boot I got the error "kernel is either unknown or corrupted" since I followed everything very carefully I was pretty sure that I did not miss a step and I quickly concluded that it was probably my filesystem format. Another look at the forum confirmed this.

I have tried a solution which involved splitting my home partition in 2 and making a separate ext4 partition to mount at my current boot folder a long side the actual HFS boot partition. This partition would then house the kernel and the ramfs image.

This however did not seem to work even with tinkering and that makes sense considering the bootloader lives in the root directory. I found through an example yaboot.conf.sample file that it was not recommended and overcomplicated and gave up on that solution.



What is the best course of action?

I dont want to restart since I was compiling everything natively on the system and that took days.

If I were to restart I could cross compile but I have never done that before so I was hesitant to try. It would also then be in a vm and that would a lot more complexity to my first time gentoo install that I would really rather avoid. The other option is compiling gentoo from arch if thats even feasible (Is it? I legit have no clue).

Or maybe is it better to just go with grub instead? Since at the very least thats a maintained bootloader.

Or is there something I could do with yaboot that could make it work in my situation.



Any help would be greatly appreciated.

PS: seriously please update the guide. Its been pretty painful.


*edited for mistakes and clarity


Here is my system info if it helps

Code:

Portage 3.0.57 (python 3.11.7-final-0, default/linux/ppc/17.0/desktop, gcc-11, glibc-2.37-r7, 6.1.53-gentoo-r1-ppc32-ppc ppc)
=================================================================
System uname: Linux-6.1.53-gentoo-r1-ppc32-ppc-ppc-7455,_altivec_supported-with-glibc2.37
KiB Mem:      760032 total,     17292 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 27 Dec 2023 00:45:01 +0000
Head commit of repository gentoo: 8a71d9e61dc053c189f3f72a0ad5b47827588224
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p2) 2.41.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.11.7::gentoo, 3.12.1::gentoo
dev-lang/rust-bin:         1.71.1::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.3::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             11.4.1_p20230622::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://gentoo.osuosl.org/releases/ppc/binpackages/17.0/ppc

ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE @EULA @OSI-APPROVED"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -mcpu=powerpc -mtune=powerpc -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl alsa big-endian bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg lcms libnotify mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppc ppds qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wxwidgets x264 xattr xcb xft xml xv xvid zlib" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_PPC="altivec" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
[/code]
Back to top
View user's profile Send private message
GreenNeonWhale
n00b
n00b


Joined: 30 Mar 2016
Posts: 56

PostPosted: Mon Apr 01, 2024 5:11 pm    Post subject: yaboot_1.3.16-4_powerpc.deb has worked for me Reply with quote

Hello shock-wave,

Around April of 2023, I had Gentoo up and going on a B&W G3, booting with yaboot. I had to set that aside since then, due to other stuff taking priority, but, at the time it was working and booting great. I too had problems getting it to boot when I started, so here's what worked for me. I hope that it will work for you too. I'm writing this up partially from memory, so a few mistakes might be present, even though I'll try my best to avoid them.

I ended up using the very last officially supported Debian ppc32 version (jessie 8.0) as my starting point. I found that the included binary version of yaboot, yaboot_1.3.16-4_powerpc.deb, worked great. As I recall, you can install Debian's dpkg utility from Gentoo's portage. You can then use this to extract all the files from the .deb package. You should be able to find said old version of Debian at: https://archive.debian.org/debian

If you extract/dump all the files from the .deb package, which if I recall correctly is included on the Debian boot CD image, and put said files and binaries in all the right places on your Gentoo install, it should work.

You can boot directly to an OpenFirmware prompt by holding down Apple-Option-O-F right at/after the boot chime. These commands worked for me on my G3 with a SCSI card to directly boot to yaboot regardless of the preferences set in nvram. THEY WILL NOT WORK ON YOUR G4, I'm including them for illustrative/example purposes only. From this example you can see the two different SCSI ID numbers of the drives 2 & 14 -- 2 & e.
boot /pci@80000000/pci-bridge@d/ATTO,ExpressPCIProUL366@4/@e:2,\\yaboot
boot /pci@80000000/pci-bridge@d/ATTO,ExpressPCIProUL366@4/@2:2,\\yaboot

When running linux, you can use the ofpath utility to help figure out what the correct path is for your boot device.

I have a copy of yaboot_1.3.16-4_powerpc.deb saved on my hard drive. Here's the SHA512 hash for your reference:
8df21087c6df7cb195453c3dc6f08eb8ed44e285157225d4a404640db9e690d9ee40f887ea522cc1a78841a8226cb3bd4e675e454b8bf27f646b3310c7989604 yaboot_1.3.16-4_powerpc.deb

Regarding partition setups, I have used an ext2 formatted /boot partition to hold the kernel, and it has always worked for me. If you use an initramfs file, I'd store that there as well. yaboot can natively read ext2. As to the filesystem for the rest of your OS, you can use whatever one/s you want -- once the kernel is booted, it can read any supported filesystem. Yaboot handles writing to the little 800k HFS partition. I'd recommend creating partition 2 to be said 800k HFS partition. Naturally, and I'm assuming you already did this, the partition table will need to be Apple's, thus mac-fdisk. So, basically two boot partitions: Partition 2 - HFS 800k; Partition (Whatever you want) ext2 formatted with kernel and initramfs images.

I hope all this helps. I'll be keeping an eye on this thread, so if you have more questions, please post them, and I'll try and help.

Good Luck! :)
Back to top
View user's profile Send private message
GreenNeonWhale
n00b
n00b


Joined: 30 Mar 2016
Posts: 56

PostPosted: Tue Apr 09, 2024 1:08 am    Post subject: Addendum -- Debian Boot CD Specifics Reply with quote

Since it seems my post has gotten some reads, here are more specifics that might help people doing fresh installs on PPC, if they are having trouble with the Gentoo boot discs.

This is the specific boot CD I used. As I recall, it was just enough to get me started:
debian-8.11.0-powerpc-netinst.iso

It seems I was mistaken about the download link. This iso, plus the full Debian Jesse install isos, etc., are available at:
https://cdimage.debian.org/mirror/cdimage/archive/8.11.0/powerpc/

After that: a chroot, installing Gentoo's latest stage3, pull the yaboot binaries from Debian, and hopefully it will work. As I recall, it worked for me last year.
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