1

I want to create a rescue-cd for ppc64 (i need a custom kernel because the standard kernel give panic), my rescue-cd can boot my modified kernel, but on initramfs exit at this error

No root device specified. Boot arguments must include a root= parameter. 

My question is: how to create a initramfs which include a correct root parameter? On standard initramfs of Debian iso I have this

rootfs on / type rootfs (rw,size=2050368k,nr_inodes=15791,inode64) ~ # cat /proc/cmdline BOOT_IMAGE=/install/vmlinux rescue/enable=true --- quiet 

Any Idea? Thanks

1 Answer 1

1

I've 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 and works, only some fix, for example the cd must be mounted from shell (probaly because the 9111-285 has 2 cdrom drive).

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.