5

I have attempted to create a UEFI pen drive that installs Ubuntu 20.04 LTS Desktop 64-bit.
The exFAT partition gpt2 contains the entire Ubuntu 20.04 LTS system image.
The FAT32 partition gpt1 contains the following files:

.
├── boot
│   └── grub
│       └── x86_64-efi
│           └── exfat.mod
└── EFI
    └── BOOT
        ├── BOOTX64.EFI
        ├── grub.cfg
        ├── grubx64.efi
        └── mmx64.efi

5 directories, 5 files

where the grub.cfg file contains the following lines:

insmod exfat
search --no-floppy --set=root --fs-uuid 7026-67D5
configfile /boot/grub/grub.cfg

After changing the Secure Boot method from Deployed Mode to Audit Mode, the default grub.cfg file of the exfat partition is called correctly from the grub.cfg file of the FAT32 partition.
In fact, the correct installation options appear.
After selecting the Ubuntu option, loops endlessly and pressing the ESC key I realize that the cause is an unspecified error: stdin: invalid argument, which is repeated many times.
What could be the cause of this error?

UPDATE 1: Even disabling secure boot completely, the same error appears.

UPDATE 2: Waiting for some time, the following message appeared:

Unable to find a medium container a live file system
Attempt interactive netboot from a URL?
yes no (default yes): _

UPDATE 3:
I found that if instead of having the partition in exFAT, I have it in NTFS, the problem doesn't appear. From this I deduce that despite the insmod exfat command, passed to the partition with that filesystem, the initrd.lz file does not support the exfat file system. In fact, I also performed this other test to have an almost total confirmation of this thing:

insmod exfat
search --no-floppy --set=root --fs-uuid 7026-67D5
chainloader /efi/boot/bootx64.efi
boot

and I got the error message:

Failed to find fs: Unsupported
Failed to load image \efi\boot\grubx64.efi: Unsupported
start_image() returned Unsupported

If there is a Windows image in the exfat partition instead of Ubuntu, the bootloader starts correctly.

Is there a way to implement exfat support inside of bootx64.efi and initrd.lz files?

Mario Palumbo
  • 277
  • 2
  • 8
  • 36

5 Answers5

4

I solved this problem using just taking out and pluging back in the flash drive when it shows the message "stdin: invalid argument". Worked like a charm. The flash drive I used was 32 GB USB3.0 SanDisk drive.

  • 1
    This is something that I have no way of trying at the moment but certainly unplugging and reconnecting the drive is not something that the end user expects to have to do to make everything work, being that I didn't get there, despite being a developer, after all this time. – Mario Palumbo Oct 21 '22 at 14:13
  • Worked for me w PopOS 22.04 on asrock x300 deskmeet install. Thanks – dongryphon Dec 17 '23 at 20:31
1

From this forum:


This issue was raised:

[20.655271] usb usb1-port4: couldn't allocate usb_device

After a few seconds it restarts with appropriate OS logo and shows next errors:

stdin: invalid argument

...like 50 same errors...

Unable to find a medium container a live system

Attempt interactive netboot from a URL ?


This solution:

  • Inserting "iommu=soft" into /boot/grub/grub.cfg in bootable USB helped me.

fixed the problem.


Summary

Sounds like the same problem you have and the same solution should work.

  • Unfortunately it doesn't work for me. – Mario Palumbo Feb 25 '22 at 13:23
  • Sorry to hear that. I'll upvote your question to draw more attention to it and leave my answer here for awhile so other people don't post the same thing. Kindly ping me @WinEunuuchs2Unix if you get a working solution so I can delete my answer. Thanks. – WinEunuuchs2Unix Feb 26 '22 at 00:45
  • I have updated my question with a new thing that I have discovered. I thank you for the answer. :-) – Mario Palumbo Feb 26 '22 at 18:12
1

Possible solutions (please post feedback):

  1. Ensure your boot partition shows up first in all possible places (BIOS, grub), just to be sure (source). If that works, and you modified more than one configuration point, you could test independent changes to see which one was the culprit.
  2. Try: changing port USB 3.0 -> 2.0; or using a USB hub; or using a different USB stick (source). This seemed to work for many others.

Please add your BIOS configuration possibly related to this issue (Secure Boot, Legacy Boot, UEFI boot, boot order, etc.)

Related:

  1. https://ubuntuforums.org/archive/index.php/t-2448929.html
  2. https://forums.linuxmint.com/viewtopic.php?t=172337
  3. https://ubuntuforums.org/archive/index.php/t-2468820.html
1

I have recently just found that as you use your USB stick to install and reinstall Ubuntu, it is logging all that information. So the more installations you have the more your USB stick is edited (and thus change state). I am assuming because mine was just 8GB that maybe there was not enough space anymore.

Anyways, long story short, another solution is to format the disk and create a Bootable USB again. Worked for me.

0

None of the other proposed solutions worked for me, but after removing the add-on network card I was able to run the installer. I had previously unplugged all the other devices (HDDs etc.) and other devices, but missed the network card.

So try booting with only the bare minimum hardware.

amc
  • 7,142