Ramdisk images are too large.
Ramdisk images are too large.
Has anyone noticed that building a ramdisk image is too big from a newer Linux like the Debian based Fienix?
For some reason, using the same exact kernel and modules, it's smaller from an older Linux. On my old Ubuntu 12.04 install the GZip images are around 3MB. Building the image on the new Fienix results in an 11MB file! This is too large for me to use.
I'm using mkinitramfs every time and my initramfs.conf looks similar enough. Both have MODULES=most. Suppose I'll need to unpack the cpio and compare the contents. What's the Linux version of FileCompare?
For people that like a ramdisk like me, especially to get around the device reassigning, this isn't good if the image is bloated.
For some reason, using the same exact kernel and modules, it's smaller from an older Linux. On my old Ubuntu 12.04 install the GZip images are around 3MB. Building the image on the new Fienix results in an 11MB file! This is too large for me to use.
I'm using mkinitramfs every time and my initramfs.conf looks similar enough. Both have MODULES=most. Suppose I'll need to unpack the cpio and compare the contents. What's the Linux version of FileCompare?
For people that like a ramdisk like me, especially to get around the device reassigning, this isn't good if the image is bloated.
Re: Ramdisk images are too large.
No, I haven't noticed it till now. I create the initial ramdisk on ubuntu MATE 16.04.7. They work with all Linux distributions on my X1000 and X5000.
All initial ramdisks for the X5000 have a size of 9.8MB and for the X1000 from 10.9MB till 10.5MB and I don't have any issues with these.
diff
http://www.amigalinux.org
http://www.supertuxkart-amiga.de
Running Linux on AmigaONEs can require some tinkering.
http://www.supertuxkart-amiga.de
Running Linux on AmigaONEs can require some tinkering.
Re: Ramdisk images are too large.
Hypex,
You're right. I created an initial ramdisk with the stable longterm kernel 5.10.39 on Ubuntu 10.04.4 LTS today. It has a size of 2.7MB. Unfortunately I can't boot Fienix with this initial ramdisk.
Error message:
But Ubuntu 10.04.4 LTS boots with this small initial ramdisk.
I tried to reduce the initial ramdisk on ubuntu MATE 16.04.7 but without any success. I stripped the kernel modules and I deleted some modules but the size is always around 11MB. Does CFE supports other compressions?
Thanks,
Christian
You're right. I created an initial ramdisk with the stable longterm kernel 5.10.39 on Ubuntu 10.04.4 LTS today. It has a size of 2.7MB. Unfortunately I can't boot Fienix with this initial ramdisk.
Error message:
Code: Select all
Target filesystem doesn't have /sbin/init
I tried to reduce the initial ramdisk on ubuntu MATE 16.04.7 but without any success. I stripped the kernel modules and I deleted some modules but the size is always around 11MB. Does CFE supports other compressions?
Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de
Running Linux on AmigaONEs can require some tinkering.
http://www.supertuxkart-amiga.de
Running Linux on AmigaONEs can require some tinkering.
Re: Ramdisk images are too large.
I've mostly used Ubuntu 12.04 standard and they've booted fine when I tested.
Is that raw or GZipped?All initial ramdisks for the X5000 have a size of 9.8MB and for the X1000 from 10.9MB till 10.5MB and I don't have any issues with these.
With a GUI?diff
Yeah it''s bit low level. I need something more upstream. That can compare folders and file sizes. Maybe I'm thinking of CompareFiles.
Thanks for confirming. I wonder if this is because Fienix uses systemd? I ran into this with my boot manager. Systemd support old init scripts but I couldn't get it to work. I needed it to set up the x1boot mount. It work one time then stopped a few times then came back. Too unreliable so I scrapped and found after an hour of reading that systemd is way easy to setup a boot mount with. Where as with init it's hours reading a broad subject for one specific thing you need.You're right. I created an initial ramdisk with the stable longterm kernel 5.10.39 on Ubuntu 10.04.4 LTS today. It has a size of 2.7MB. Unfortunately I can't boot Fienix with this initial ramdisk.
I tested 5.13 booting with a ramdisk created from Ubuntu 12.04 that uses init and here it worked.
From what I know it only supports GZip. Kinda like UBoot or the old one. For this reason I added internal XZ support to my boot loader. This way I can add in the latest best codec without relying on firmware. I don't even know if OF or CFE supports unpacking but in a binary I see no way of calling back to CFE as it's all OF interfaces. The large files are too big for my loader because it uses AmigaBoot to load them in. Like on the XE, CFE has a limit of around 14MB to load in files. Which is why the raw kernels cannot load from FFS with boot command. CFE can load a zImage from FFS OTOH. Below listing is XZ compressed kernels and ramdisks. Bigger ramdisks are off Fienix.I tried to reduce the initial ramdisk on ubuntu MATE 16.04.7 but without any success. I stripped the kernel modules and I deleted some modules but the size is always around 11MB. Does CFE supports other compressions?
Directly from CFE, apart from FFS, big files are fine loading from FAT. They are also loaded directly in ram. So don't need to allocate memory. Aside from any internal allocating. Which is limited from FFS.
Edit:
Hooray for InterWeb! A power outage caused a system reboot. Thought I had lost half an hour of typing but it saved it! Phew. Quick press send!
Re: Ramdisk images are too large.
Code: Select all
ienix@Fienix:~$ ls -l /boot/x1boot/boot/
total 0
-rwx---rwx 1 root root 2635084 Apr 16 11:42 initrd-4.19
-rwx---rwx 1 root root 2084502 Apr 1 13:17 ramdisk-4.19
-rwx---rwx 1 fienix fienix 1419052 May 30 13:30 ramdisk-5.11
-rwx---rwx 1 fienix fienix 1420348 Jun 2 13:30 ramdisk-5.13
-rwx---rwx 1 fienix fienix 1362672 Jun 7 13:51 ramdisk-5.2
-rwx---rwx 1 fienix fienix 7422032 Jun 8 01:33 ramdisk-5.5
-rwx---rwx 1 root root 7480068 Jun 6 03:05 ramdisk-5.6
-rwx---rwx 1 root root 7635748 Apr 16 11:41 vmlinux-4.19
-rwx---rwx 1 fienix fienix 7149268 May 31 12:54 vmlinux-5.11
-rwx---rwx 1 fienix fienix 7305372 Jun 9 13:30 vmlinux-5.13
-rwx---rwx 1 fienix fienix 6513068 Jun 7 13:53 vmlinux-5.2
-rwx---rwx 1 fienix fienix 6796296 Jun 8 01:32 vmlinux-5.5
-rwx---rwx 1 root root 8407692 Apr 16 11:29 vmlinux-5.6
Re: Ramdisk images are too large.
It's gzipped.
No, it hasn't got a GUI.
Yes, Fienix uses systemd.
Do you mean, that you have booted Fienix with the kernel 5.13 with a small ramdisk created from Ubuntu 12.04? If yes, then you are responsible for creating the next inital ramdisks now.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de
Running Linux on AmigaONEs can require some tinkering.
http://www.supertuxkart-amiga.de
Running Linux on AmigaONEs can require some tinkering.
Re: Ramdisk images are too large.
Yes! LOL.
I tested it tonight to make sure. Don't know how it's working fine for me. All I can say is that all my Linux volumes are on my single RDB Amiga 2TB HDD and they all boot fine.
I'll pack some up and drop them off.
But I found the issue, it's the /usr/lib/powerpc-linux-gnu/ files. The are 22.3MB and it links things into /usr. The other is 2.7MB.
Re: Ramdisk images are too large.
Fantastic, you have found the difference between fhe small and big initial ramdisk. Do we need the /usr directory in the ramdisk?
http://www.amigalinux.org
http://www.supertuxkart-amiga.de
Running Linux on AmigaONEs can require some tinkering.
http://www.supertuxkart-amiga.de
Running Linux on AmigaONEs can require some tinkering.
Re: Ramdisk images are too large.
I think we do in the bigger one. It's hard to tell but the small files in the root are symlinks to places in /usr. In particular /lib links to /usr/lib. For whatever reason.
It's more bloated but it contains .so libs that would be needed. The only thing is why it it is bigger? Unfortunately initramfs tools aren't complex enough and even though mkinitramfs is considered low level there isn't much to configure it with. I went through all the conf files and could not see where anything obvious would be. I read the man pages and it too said nothing about resulting size.
I did a brief Google but nothing showed up of relevance. I don't know if it's a systemd thing or what. Now 11MB is nothing in the modern world, except for optimised firmware. But for us it matters. Loading both an 11 MB kernel and 11MB ramdisk will take ages. And my boot loader can't use any files that are over 14MB about combined. Even when using "extreme" XZ in my boot loader, two 7MB files together are too big.
Just as well the later kernels are more stable, I mean, the sda assignments tend to stick in one place. So made a "Fast Fienix" menu entry with just kernel. But, I had to fix the fstab, after I solved an mkinitramfs fsck warning. When I found it had an sdb. So my root was on an sda but fstab said root was on an sdb. Thought it would break root but it didn't.
Re: Ramdisk images are too large.
Okay so here is a log of mkinitramfs from a small ramdisk and a big ramdisk plus a diff between. I'm sure this is due to the config. But I checked it and the hooks were empty so it must be getting it from somewhere else or some other default.
Hidden Text - Click to Show :
Hidden Text - Click to Show :
Hidden Text - Click to Show :