0

Warning: is ppc64 (be) and not ppc64le (le) be and le mean Big Endian Little Endian. I have an old ppc64 (be) ibm workstation, this is the sad situation about this architecture (which is still supported by Linux kernel, the 5.1 serie works really fine, the 6.* give kernel panics and udev process stuck at boot, for booting with this kernel you have to wait 20 minutes (sic!).) So I need a 5.1* kernel (actually I use the kernel 5.15.193, works fine). This is the situation about main distros (I avoid experimental or unknown distros) on my old Ibm 9111-285 workstation

Opensuse: boot, but give error about xml repository file (bad checksum or similar, to test it download the ppc64 tumbleweed iso and test it with qemu-ppc64)

Debian sid: is one of the few working, but to install it you have to run a livecd from old Debian stable ppc64 compile a custom kernel from anywhere (a vm with cross compile ppc64 or similar) and install the Debian sid from scratch (require a deep knowledge). After install and upgrade a lot of packages give illegal instruction error. So I prefer to avoid it.

Unbuntu: support only ppc64le

Gentoo: this is the perfect solution, works all, only is from source so you need to wait compilation of packages which can mean hours or maybe days.

Now the main question: for recovery I can use the old good Debian 7 (the latest ppc64 Debian which support this machine) but is too old and probably will give error making chroot a new distro. So I want to know how to do a livecd with custom kernel for ppc64, anyone has idea to start it? Some suggestions? A livecd ppc64 for Gentoo probably exist, but without the custom kernel give crash or don't reach the "login" phase because my old ide-cdrom on 9111-285 is not include in Gentoo kernel (for this reason I need a custom kernel).

I have tried the "live-build" project for Debian, but don't support ppc64 (the package exist, but give "architecture not supported")

1 Answer 1

2

Solution found, I start from a Debian ppc64 sid port cd, I extract it (there is a lot of tools to make it, I have simple mount the iso and run cp -av), insert my custom initrd and vmlinux image in "install" folder.

Then

xorriso -as mkisofs -r -V 'Debian 12 Rescue ppc64' -o debian-12.0.0-ppc64-Rescue-2.iso -J -joliet-long -cache-inodes -chrp-boot-part directorywhereyouextractfiles 

EDIT: there is only one serious problem, initramfs search for root of "original" workstation, so it can boot on that workstation but give error on other hardware (including qemu-ppc64 emulated)

EDIT-2: found the solution :)

First of all: what change in initramfs? Only the kernel modules, So I did this

I have copied the original image of debian netinstall in a Debian vm (ppc64 with custom kernel)

mkdir temporary cp original-initrdfromdebianportcd.gz . gzip -d original... 

extract it

unmkinitramfs -v original .

Now, we need the original modules? No, we need custom modules (extract the initramfs custom image with unmkinitramfs as we did for original in another directory)

pwd #just to avoid to delete something important rm -fr 6.1.0-9-powerpc64/ cp -av modulesfromcustominitramfs . 

in my case

mv -v ../directorywithcustomiinitramfswhichdont'workbefore/5.15.164/ lib/modules 

Now we have to rebuild initrd

find . | cpio -ov -H newc| gzip -c >/boot/initrd.new.img 

We transfer it to directory of iso extracted in folder install

in this folder we have two files

initrd.gz vmlinux 

so

cp /boot/initrd.new.img initrd.gz 

We rebuild the iso!

xorriso -as mkisofs -r -V 'Debian 12 Rescue ppc64' -o debian-12.0.0-ppc64-Rescue-2.iso -J -joliet-long -cache-inodes -chrp-boot-part directorywhereyouextractfiles 

testing with qemu-ppc-64 works really fine :) Don't care about image corruption

enter image description here

Let's see the custom kernel

BusyBox v1.35.0 (Debian 1:1.35.0-4+b3) built-in shell (ash) Enter 'help' for a list of built-in commands. ~ # uname -r 5.15.164 ~ # 

Very good! It will also possible to extend cd with new packages but is another story. On qemu-ppc64 works, will be work also in 9111-285? I will try asap (tried, works fine, but there is still something to fix, for example, the cdrom don't mount automatically and must be mounted from shell, anyway recovery works so is ok)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.