Ramdisk images are too large.

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 647
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Ramdisk images are too large.

Post by Hypex »

A follow up post to this. So after some research I found it is plymouth that is bloating it out. Plymouth is used for the startup screen. But if it's inactive it's redundant and wasting space. I don't recall ever seeing a startup screen when a Linux kernel boots.

On my older Ubuntu it attempts to use plymouth when building ramdisk but fails. So the size is cut down. On my Fienix it includes plymouth which causes the bloat. By removing it the size can be brought from 11MB to a more manageable 4MB. Still more than 2MB but bootable.

It's hard to fix as mkinitramfs gives little control over the process. It allows you to change config but it uses hooks to include all the binaries that cannot be disabled or diverted. However it allows custom hooks to be added so a hook can be added to remove what isn't wanted. Not as clean as stopping what isn't wanted. But it can work.

I am also getting constant errors now when booting a systemd system from init ramdisk. One cause is building ramdisk from a 5.x kernel fails to boot a kernel 6.x system. I don't know to build a systemd friendly ramdisk from init system. Suppose installing systemd would help. But matching kernel releases does help.

My manager will include an update so ramdisks can be built again and also updated if desired.
User avatar
xeno74
Posts: 9387
Joined: Fri Mar 23, 2012 7:58 am

Re: Ramdisk images are too large.

Post by xeno74 »

Hypex wrote: Tue Jul 18, 2023 5:26 am One cause is building ramdisk from a 5.x kernel fails to boot a kernel 6.x system.
Booting with a 5.10 initial ramdisk works with the kernel 6.5. :-)
  1. Code: Select all

    CFE> setenv bootargs "root=LABEL=void"
  2. Code: Select all

    CFE> ramdisk -z -addr=0x24000000 -fatfs cf0:initrd-5.10.img
  3. Code: Select all

    CFE> boot -elf -noints -fatfs -z cf0:zImage-6.5
Another attempt:
  1. Code: Select all

    bash-5.1# tune2fs -L DEBIAN64 /dev/sdb6
  2. Code: Select all

    CFE> setenv bootargs "root=LABEL=DEBIAN64"
  3. Code: Select all

    CFE> ramdisk -z -addr=0x24000000 -fatfs cf0:initrd-5.10.img
  4. Code: Select all

    CFE> boot -elf -noints -fatfs -z cf0:zImage-6.5
Another attempt with the not compressed vmlinux kernel image:
  1. Code: Select all

    CFE> setenv bootargs "root=LABEL=DEBIAN64"
  2. Code: Select all

    CFE> ramdisk -z -addr=0x24000000 -fatfs cf0:initrd-5.10.img
  3. Code: Select all

    CFE> boot -elf -noints -fatfs cf0:vmlinux-6.5
You can use the initial ramdisk from the kernel 5.10 package.

Download: linux-image-5.10.177-X1000_X5000.tar.gz

Image
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9387
Joined: Fri Mar 23, 2012 7:58 am

Re: Ramdisk images are too large.

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 647
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Ramdisk images are too large.

Post by Hypex »

xeno74 wrote: Wed Jul 19, 2023 9:21 am Booting with a 5.10 initial ramdisk works with the kernel 6.5. :-)
Funny, I recall at some point you couldn't get them to work. :)

But do both the 5.10 ramdisk and 6.5 void/Debian systems use systemd?

I've found similar errors to what the initramfs break with online about failing to find init.

Download: linux-image-5.10.177-X1000_X5000.tar.gz

Thanks.

But this does reveal a limitation of my manager which is intentional. It doesn't allow to set arbitrary ramdisks that don't match the kernel version. It installs a ramdisk if one is included in archive. Otherwise it will generate one on the fly to match that exact kernel.
User avatar
xeno74
Posts: 9387
Joined: Fri Mar 23, 2012 7:58 am

Re: Ramdisk images are too large.

Post by xeno74 »

Hypex wrote: Sat Jul 22, 2023 9:30 am But do both the 5.10 ramdisk and 6.5 void/Debian systems use systemd?
Void PPC: runit

Debian PPC64: systemd
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 647
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Ramdisk images are too large.

Post by Hypex »

xeno74 wrote: Sat Jul 22, 2023 4:43 pm Void PPC: runit

Debian PPC64: systemd
Oh no. Another init system. I'll need to add this in. Also if any other supported systems use packages other than debs I need to convert to that as well.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 647
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Ramdisk images are too large.

Post by Hypex »

I made a collection of ramdisks a couple of years ago but it seems I may have forgotten to upload the links.

RamdisksXZ.tar:
https://drive.google.com/file/d/177GNsU ... sp=sharing

RamdisksGZ.tar:
https://drive.google.com/file/d/1nni7kd ... sp=sharing
User avatar
xeno74
Posts: 9387
Joined: Fri Mar 23, 2012 7:58 am

Re: Ramdisk images are too large.

Post by xeno74 »

Hypex wrote: Wed Jul 26, 2023 6:28 am I made a collection of ramdisks a couple of years ago but it seems I may have forgotten to upload the links.

RamdisksXZ.tar:
https://drive.google.com/file/d/177GNsU ... sp=sharing

RamdisksGZ.tar:
https://drive.google.com/file/d/1nni7kd ... sp=sharing
Thank you! :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply