Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 878115 - iMac G3 (400mhz 750CE 128MB RAM slot-loading) panics at boot with minimal installer (PPC/PPC64 iso)
Summary: iMac G3 (400mhz 750CE 128MB RAM slot-loading) panics at boot with minimal ins...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-23 19:02 UTC by gavator234@gmail.com
Modified: 2023-06-19 11:49 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Catalyst stage2 specfile (installcd-stage2-minimal-openrc.spec,4.70 KB, text/x-rpm-spec)
2023-06-19 11:49 UTC, immolo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gavator234@gmail.com 2022-10-23 19:02:37 UTC
(Component unrelated, no other component fits the problem)

Despite having 128 MB of installed memory (In the handbook it states a 64MB minimum requirement), the system reports a memory deadlock and panics during what seems like memory initialization.

I am booting off of USB, without any sort of Open Firmware shenanigans (just used the option menu) and using the ppc32 uncached grub boot option. If this changes anything, I zeroed the thumbdrive before dd'ing the iso directly to /dev/sdb, not sdb1 or sdb2, sdb. I also noticed the handbook has no instructions or even mention of USB booting, only from CD, and I cannot boot from CD due to a dysfunctional drive.

I would attach a log, but I can't seem to find one anywhere on the drive and the screen only has space to display just a few lines before the panic, and then the panic. Due to circumstances I can't take a picture either. I know from watching the boot process earlier that it notes 118k of free memory, and since then it progressed too fast to read anything useful. Here's a hand-copying of the text on display after the panic (the kernel resets the CRT positioning at startup, and as such some line-wrapped info gets cut off. A "**CUTOFF**" is present where text can't be guessed with certainty based on surrounding info):

DMA free:1516kB min:5384kB low:5704kB high:6024kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:26400kB writepending:0kB present:131072kB managed:103800kB mlocked:0kB bounce:0kB free_**CUTOFF**:68kB local_pcp:68kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
DMA: 1*4kB (U) 1*8kB (U) 0*16kB 1*32kB (U) 1*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 0*2048kB 0*409**CUTOFF**8 = 1516kB
6600 total pagecache pages
- pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
32768 pages RAM
0 pages HighMem/MovableOnly
6843 pages reserved
Tasks state (memory values in pages):
[  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
Out of memory and no killable processes...
Kernel panic - not syncing: System is deadlocked on memory
CPU: 0 PID: 9 Comm: kworker/u2:0 Not tainted 5.15.74-gentoo-ppc32-ppc #1
Workqueue: events_unbound async_run_entry_fn
Call Trace (Couldn't possibly have the time to write this out, excluded)
...
---[ end Kernel panic - not syncing: System is deadlocked on memory ]---

All of my troubleshooting attempts have failed, including messing around with kernel params and flashing the iso again. My only option is to ask around here and see if I'm missing anything blatantly obvious.
Comment 1 Ben Kohler gentoo-dev 2022-10-25 15:46:13 UTC
Last time I tested the i486 minimal installcd for memory requirements, it needed about 160MB (testing via qemu).  We probably need to update the docs for ppc.
Comment 2 immolo 2022-10-25 15:58:33 UTC
As a workaround you need to find a ISO which has livecd root directly on the CD or use netboot to install Gentoo.

I'll test a few older ISOs I have to see which will work best to get you started.

As a note if you are feeling brave though you can build your livecd which does the above using Catalyst.

https://wiki.gentoo.org/wiki/Catalyst

https://wiki.gentoo.org/wiki/LiveUSB
Comment 3 immolo 2022-10-25 17:07:54 UTC
Only working solution with minimal effort I've found is to use an old 2008.0 livecd and then it will allow you to use a stage3-ppc32-musl-hardened-openrc to complete the install as normal (ignore the /run mount in the handbook.)

https://mirrors.zju.edu.cn/gentoo/releases/ppc/2008.0/installcd/install-powerpc-minimal-2008.0.iso

It works but it's not great so if you can setup a netbook using NFS you will have lot more options in how you want to setup your system.
Comment 4 gavator234@gmail.com 2022-10-26 02:06:10 UTC
(In reply to immolo from comment #3)
> Only working solution with minimal effort I've found is to use an old 2008.0
> livecd and then it will allow you to use a stage3-ppc32-musl-hardened-openrc
> to complete the install as normal (ignore the /run mount in the handbook.)
> 
> https://mirrors.zju.edu.cn/gentoo/releases/ppc/2008.0/installcd/install-
> powerpc-minimal-2008.0.iso
> 
> It works but it's not great so if you can setup a netbook using NFS you will
> have lot more options in how you want to setup your system.

Ok, so I've tried the iso provided and in the boot option menu it *does* show up, however it crashes immediately after selecting it and returns to the boot option menu with corrupted graphics. It'd probably be smarter to stick grub on the USB since grub worked properly on the newer image... but learning how to netboot w/ nfs for the first time sounds 100x more fun, especially in an environment as finicky and limited as this. This is gonna be a long day...
Comment 5 immolo 2022-10-26 03:53:43 UTC
Hmm, it worked on my device but it is quite a but newer.

Can you please create a forum post in the PPC subforum or join in #gentoo-powerc on irc.libra.chat so we can troubleshoot.
Comment 6 Matt Turner gentoo-dev 2022-10-29 18:23:19 UTC
Looks like I need to restore the 'normal' or 'noloop' livecd/fstypes that I removed from catalyst in

commit 9ad9eed7833829cc1150d715d48ea32539a5848a
Author: Matt Turner <mattst88@gentoo.org>
Date:   Thu Apr 30 23:28:58 2020 -0700

    targets: Drop most fstypes
    
    This removes support for various file systems from the embedded target
    (a target for producing images for embedded systems, as far as I
    understand) and for ISOs. For ISOs, squashfs is great and everyone uses
    it -- it provides better performance from a CD than the alternatives
    like zisofs, normal, or noloop. See [1] for performance data of squashfs
    vs other methods.
    
    For embedded, it's unclear whether the target is used at all. There are
    some very old specs in releng.git that use 'rel_type: embedded', but I'm
    not sure if the target is used at all these days. To that end, I've
    asked in #gentoo-embedded if anyone uses it. I've removed what I believe
    to be the file system options that don't provide any value, leaving
    jffs2 for now.
    
    [1] https://elinux.org/Squash_Fs_Comparisons
    
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

I suspect that using 'normal' or 'noloop' would have lower memory requirements than squashfs, since they don't require files to be decompressed to be accessed.

From there, it sounds like we should use one of those two options for minimal CDs since the ISO sizes are small enough.
Comment 7 immolo 2023-06-19 11:48:00 UTC
As this issue exists on x86 as well I've been using that to do testing as it's easier but fixing one will fix both.

A quick run down of where I've got to on this:

The current minimal ISO requires 134mb of RAM to boot.

With the patch matts88 wrote which re-enables normal fstype, Catalyst will create a 1.3GB ISO however when booting it will failing with the following:

>> Root device detected as /dev/sr0!
>> Determining looptype ...
>> Copying read-write image contents to tmpfs
cp: can't stat 'etc': No such file or directory
cp: can't stat 'root': No such file or directory
cp: can't stat 'home': No such file or directory
cp: can't stat 'var': No such file or directory
!! Copying failed, dropping into a shell.

rescureshell /newroot #

/run/initramfs/gksosreport.txt doesn't add anything more to point to the cause and I can confirm the ISO root has the above listed directories.

The normal fstype ISO still requires 134mb of RAM to boot though so I feel this is the wrong place to be looking in currently so will try running with a reduced kernel config to see where that gets me.
Comment 8 immolo 2023-06-19 11:49:49 UTC
Created attachment 864205 [details]
Catalyst stage2 specfile

Included specfile incase anyone has further ideas to improve upon.