Score:0

Ubuntu 22.04.2 LTS Installation ISO (casper/initrd) add exfat support

nl flag

Recently, I made a Ubuntu USB installer for Ubuntu 22.04.2 LTS.

The basic settings are as follows:

  1. My USB has 2 partitions one is EFI partition (Grub2 is installed) and the other one is Data partition labeled as "LINUX" (It has three files: ubuntu-22.04.2-desktop-amd64.iso, vmlinuz and initrd)

  2. Grub2 has the following menuentry:

menuentry "Ubuntu 22.04.2 LTS" --class ubuntu {
    search --no-floppy --label "LINUX" --set root
    set iso_file=/ubuntu-22.04.2-desktop-amd64.iso
    loopback loop ${iso_file}
    linux /vmlinuz iso-scan/filename=${iso_file} file=/cdrom/preseed/ubuntu.seed quiet splash=silent
    initrd /initrd
}

Now, if the Data partition is formatted with ExFAT format, it gives me a Busybox saying the iso file cannot be found. But, ext4 works well in this setting.

I have tried the following, but none of them works:

  1. Extract initrd files and add exfat driver to lib/modules/5.19.XXXX/kernel/fs and then repack it. Replace this initrd in Data partition and also in the installer ISO file. However, it gives me the Busybox and I checked that the exfat drivers folder that I added before is not showing.

  2. Copy existing ubuntu initrd and vmlinuz to replace both Data patition file and ISO file. No luck either

Now, I am bit confused, how does the Ubuntu ISO file load the ubuntu installer and boot up the installer. I saw a lot of materials online and the following seems to be reasonable, but I believe I have missed some important piece:

UEFI boots up to find Bootx64.efi and corresponding grub.cfg (UEFI handles boot to Grub2). Then, Grub2 finds vmlinuz and initrd so that vmlinuz will act as kernel and initrd is unpacked to ram disk to establish basic file system (Grub2 handles boot to vmlinuz). During the above process, kernel builtin drivers and modules are loaded.

But when I unpack filesystem-squashfs file, I can see the exfat driver!!! The missing part is what is actually loaded during installation:

Q1: It seems initrd is not used or partially used or overwritten by something else so that my modification is not working.

Q2: The squashfs is not used or overwritten during installation boot, otherwise the driver should be there.

Any help is appreciated!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.