10

Machine: Dell XPS 13 9380

After booting to a USB created using Rufus: The standard text appears:

Try or install Ubuntu
Ubuntu (safe graphics)
OEM install (for manufacturers)
Boot from next volume
UEFI Firmware Settings

I select Try or install Ubuntu. It then goes to a black screen with the following text:

error: out of memory.

Press any key to continue...

There is no other error information or details. After a few seconds, or upon pressing a key, it goes to the manufacturer logo splash screen and freezes until I manually power down and restart.

I couldn't find any others with this error that didn't also have a lot of other, more detailed, error output, but the "out of memory" error is fairly generic, so I may have missed something.

1
  • It's a modern Dell XPS 13 9380 with 16 GB RAM, currently stuck running Fedora 35 due to this issue. Commented Apr 25, 2022 at 7:19

6 Answers 6

7

I had this issue when starting an HP Elitebook 840 G8, and Ubuntu was not starting from the USB stick. Then I checked the BIOS settings on another same model laptop and I noticed that the "video memory" size on the laptop giving the error was set to 512 MB, while on the other laptop the "video memory" size was 64 MB.

I changed the "video memory" size to 64 MB and the error didn't come up anymore, and Ubuntu started properly. I tested different values of the "video memory" size and I noticed that the maximum value allowed on new HP laptops is 256 MB. On Lenovo laptops the "video memory" size can be set at 512 MB and there is no issue.

3
  • Confirming switching "video memory size" from 512 MB -> 256 MB fixes the boot problem with Linux on HP G8's.
    – Max
    Commented Jan 12, 2023 at 19:20
  • Switching from 256MB to 64MB solved a problem with HP Elitebook 850 G8 Commented Mar 23, 2023 at 14:54
  • I had to reduce the video memory to 128 MB or less on the exact same device (HP EliteBook 840 G8).
    – fuggi
    Commented Jul 28, 2023 at 21:06
5

I had the same issue with an ASUS laptop.

error: out of memory.

Press any key to continue...

Followed by (visible when splash is disabled)

. . .
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option: here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.15.0-25-generic #25-Ubuntu
Hardware name: ASUSTeK COMPUTER INC. UX550VD/UX5S0VD, BIOS UX550VD.307 04/19/2019
Call Trace:
. . .
Kernel Offset: Ox7a00000 from Oxffffffff81000000 (relocation range: Oxffffffff80000000-Oxffffffffbfffffff)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

It's a GRUB problem (Ubuntu bug 1842320).

Rufus in ISO mode should work. It'll install a working GRUB.

If it doesn't and you have GRUB already installed on the machine - boot into your existing GRUB (on HDD, not USB), press c to enter command prompt and boot from the USB "manually":

  1. Find the UBUNTU partition

    grub> ls
    (proc) (hd0) (hd0,gpt1) (hd1) . . .
    grub> ls (hd0,gpt1)
            Partition hd0,gpt1: Filesystem type ... - Label 'UBUNTU 22_0' ...
    grub> ls (hd0,gpt1)/
    boot/ boot.catalog casper/ dists/ efi/ install/ md5sum.txt pool/ ubuntu ...
    
  2. Set rootfs, kernel, initrd and boot the kernel

    grub> set root=(hd0,gpt1)
    grub> linux /casper/vmlinuz
    grub> initrd /casper/initrd
    grub> boot
    
3
  • what to do, if there is no /casper directory on fresh installed OS?
    – zayn1991
    Commented Aug 11, 2022 at 23:12
  • Sadly I get an error at the initrd /casper/initrd step. "Error: out of memory" Commented Sep 12, 2022 at 16:01
  • Same error with Ubuntu 23.04 or Ubuntu 23.10 daily build on Lenovo Evo laptop. I don't have grub as I try to install Ubuntu from USB.
    – Antoine M.
    Commented Jun 1, 2023 at 20:38
1

I have an Alienware Area 51 (DELL) from late 2019. I had the same problem. For me, it was a BIOS setting issue. In the Advanced tab there is a setting for "Intel Software Guard Extensions", AKA "SGX" it was set to "Enabled". When I changed it to "Software Controlled" everything worked as expected.

BIOS Screenshot

0

Had the same problem with Lenovo Ideapad series and using a live USB created with "Startup disk creator".

Setting up a live USB using Rufus solved the issue

1
  • What to do if there is no Windows systems, but only Linux? Rufus works on Windows only
    – zayn1991
    Commented Aug 11, 2022 at 23:17
0

I ran into the same problem with a Dell Precision 5510. In my case at least the initrd was too big for grub to handle. The cut-off was around 100M.

To reduce the size one of the things you can do is the following:

  1. Copy /casper/initrd from the USB medium to a working Ubuntu machine and call it initrd.1
  2. Unpack the first layer: mkdir unpack.1 && cpio -D unpack.1 -idv < initrd.1
  3. Write down the number of blocks. In my case it was 62.
  4. Remove the first layer: dd if=initrd.1 of=initrd.2 skip=62
  5. Unpack the second layer of the initrd: mkdir unpack.2 && cpio -D unpack.2 -idv < initrd.2
  6. Write down the number of blocks. In my case it was 9004.
  7. Remove the second layer: dd if=initrd.2 of=initrd.3 skip=9004.
  8. Unpack the final layer: mkdir unpack.3 && zstdcat initrd.3 | cpio -D unpack.3 -idv
  9. Remove unneded modules and firmware from unpack.3 to reduce size. I removed unpack.3/usr/lib/firmware/amdgpu.
  10. Repack layer 3: cd unpack.3 && find -print0 | cpio --create --null --format=newc --verbose | zstd > ../initrd.3.new && cd ..
  11. Copy the original initramfs and write initrd.3.new to the original offset (in my case 62 + 9004 = 9066): cp initrd.1{,.new} && dd if=initrd.3.new of=initrd.1.new seek=9066
  12. Create a 4th partition on your USB drive using fdisk and format it as ext4.
  13. Put initrd.1.new on that partition.
  14. Boot from the USB drive
  15. In Grub select the first option and press 'e' to edit the menu entry
  16. Change the line initrd /casper/initrd to initrd (hd0,gpt4)/initrd.1.new (partition identifier may differ on your system. Check first using ls (hd0,gpt4)/ in the Grub console)
  17. Press F10 to boot.

After installation you should mount the installed system, enter a chroot, and set MODULES=dep in /etc/initramfs-tools/initramfs.conf. Then run update-initramfs -u to ensure that the installed initrd stays small and Grub will be able to boot.

0

I solved my issue by installing reFInd Boot Manager (A graphical boot manager for EFI- and UEFI-based computers). You must have a PC that can boot in UEFI mode. To install:

sudo apt install refind

It configures itself and will start first instead of GRUB, just say yes when it asks you to install itself to esp partition.

PS: I used Ventoy to boot from USB and install system.

Ventoy is an open source tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files.
With ventoy, you don't need to format the disk over and over, you just need to copy the image files to the USB drive and boot it. You can copy many image files at a time and ventoy will give you a boot menu to select them.
You can also browse ISO/WIM/IMG/VHD(x)/EFI files in local disk and boot them.
x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.
Both MBR and GPT partition style are supported in the same way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .