• LFS - About initial ramdisks

    From Andrew Alt@1:261/38 to All on Wed Feb 22 00:25:34 2023
    Anyone else have a problem with the LFS section on creating an initrd? Me and a friend tried the mkinitramfs from
    https://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html

    When we ran it, we wound up with a 770Mb file. When we extracted it with cpio, it only extracted about 64K bytes. We tried a few times and the results were consistent.

    It only contained a few files, related to microcode (I don't have access to his computer right now so I can't be
    more specific).

    I added 'set -ev' to the script and watch it run to completion.

    I looked through the script but couldn't see where the problem is.

    I looked at the /tmp work directory and that only contained about 64K of data.


    --
    -Andy


    -+- MultiMail/Linux v0.52-c9c24da

    --- BBBS/Li6 v4.10 Toy-6
    * Origin: Prism bbs (1:261/38)
  • From Alexey Vissarionov@2:5020/545 to Andrew Alt on Wed Feb 22 12:46:00 2023
    Good ${greeting_time}, Andrew!

    22 Feb 2023 00:25:34, you wrote to All:

    Anyone else have a problem with the LFS section on creating an
    initrd?

    Do you still use floppies? If not, you don't need the initrd at all.

    Keeping the modules for disk controllers that don't need external firmware compiled into the kernel is generally a wise idea for several good reasons. Support for everything else may be built as modules and loaded from the /lib/modules during the userspace initialization.


    --
    Alexey V. Vissarionov aka Gremlin from Kremlin
    gremlin.ru!gremlin; +vii-cmiii-ccxxix-lxxix-xlii

    ... :wq!
    --- /bin/vi
    * Origin: ::1 (2:5020/545)
  • From Andrew Alt@1:261/38 to Alexey Vissarionov on Wed Feb 22 23:33:20 2023
    Alexey Vissarionov wrote to Andrew Alt <=-

    Anyone else have a problem with the LFS section on creating an
    initrd?

    Do you still use floppies? If not, you don't need the initrd at all.

    Hi Alexey,

    No we don't use floppies. We compiled nvme and ext4 support into the kernel and are able to boot. We thought an
    initial ramdisk might help with some troubleshooting. After successfully booting, we tried adding in just a few more things to the kernel, such as Bluetooth. After we re-compiled and rebooted, we got a black screen and had no idea
    why.


    Keeping the modules for disk controllers that don't need external
    firmware compiled into the kernel is generally a wise idea for several good reasons. Support for everything else may be built as modules and loaded from the /lib/modules during the userspace initialization.

    Ah, I think that explains more why we couldn't boot when compiling amdgpu into the kernel! We saw the solution was to build it as a module, otherwise the firmware wouldn't load, but there wasn't much explanation.

    --
    -Andy
    Website: https://andy5995.github.io


    -+- MultiMail/Linux v0.52-c9c24da

    --- BBBS/Li6 v4.10 Toy-6
    * Origin: Prism bbs (1:261/38)
  • From Alan Ianson@1:153/757 to Andrew Alt on Fri Feb 24 14:44:22 2023
    Anyone else have a problem with the LFS section on creating an initrd? Me
    and a friend tried the mkinitramfs from https://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html

    When we ran it, we wound up with a 770Mb file. When we extracted it with cpio, it only extracted about 64K bytes. We tried a few times and the
    results were consistent.

    It only contained a few files, related to microcode (I don't have access to his computer right now so I can't be more specific).

    That sounds like the microcode bits were prepended to the initrd file.

    If that is the case then it's hard to inspect the rest of the contents of that file, at least in the usual way.

    I don't normally use an initramfs but I had one with a gentoo install and I found the same thing. Gentoo's initramfs tool (i forget what it called now) created a huge initramfs but I was only able to see the intel-ucode bits of it when I tried to look inside of it.

    It must have contained a lot of modules but it did boot up just fine.

    --- BBBS/Li6 v4.10 Toy-6
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)
  • From Andy Alt@1:103/705 to Alan Ianson on Sun Feb 26 14:20:00 2023
    Alan Ianson wrote to Andrew Alt <=-

    I don't normally use an initramfs but I had one with a gentoo install
    and I found the same thing. Gentoo's initramfs tool (i forget what it called now) created a huge initramfs but I was only able to see the intel-ucode bits of it when I tried to look inside of it.

    It's kind of comforting to know it happened to someone else. :)

    --
    -Andy
    Website: https://andy5995.github.io


    ... MultiMail, the new multi-platform, multi-format offline reader!
    --- MultiMail/Linux v0.52-c9c24da
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)