Linux installer crashes on formatting eMMC drive

Unable to install Linux on Asus BR1100CKA laptop. This laptop has an eMMC drive shown as “Generic G1J38E”. The Windows 10 NTFS partition was resized and around 29 GB of unallocated space was available for installing Linux. The installer crashes during formatting this partition to EXT4. I have tried Debian 11, Debian-testing, Q4OS, Ubuntu Server, Xubuntu, GPARTED Live, etc. multiple times and the installation fails at formatting every single time. I also tried to format the partition as EXT4 from Windows using Disk-Genius and AOMEI-Partition-Assistant. The formatting was successful, but the installer keeps crashing. I really like the laptop, but Windows 10 OS is unacceptable for me. Any help or advice would be greatly appreciated.

Then you need to manually format via CLI in verbose mode. Capture all the output in form of logs and post it here.

Before seeing the logs, we cannot be sure what the cause is, but when nothing works, it’s usually a sign of either a critical user error (not the case here, because not even automated formatting worked) or a hardware failure.

Hi Deby
My guess is something must have gone wrong when you resized the Win10 NTFS partition. Did you do that with Gparted?

Look carefully with Gparted. There should be a new 29Gb partition that is not formatted.

  • What does it say when you try to put an ext4 filesystem on this partition?
  • Can you use the Info menu item on this partition? What does it report?
  • Would it be possible that the resizing has mucked up the partition table?
  • What partition table type is it?
  • What happens if you delete the 29Gb partition, then remake it from free space?
I also tried to format the partition as EXT4 from Windows using Disk-Genius and AOMEI-Partition-Assistant. The formatting was successful, but the installer keeps crashing.

So Windows can format it, but what you get is not usable by Linux.
I think it is likely that the partition table is mucked up. To fix that you have to save your Windows, clear the whole disk with Gparted, make a new partiton table (Gparted defaults to MBR, but you can do GPT) , setup your partitions with gparted, restore Windows if you want, try the Linux install again.
That is a big job.

Alternative. There are ways of inspecting the partiton table. I dont know how to do it or what software to use. Look it up, or someone else here may know.

Regards
Neville

This may be helpful

Hello Neville and thank you for a quick reply. I think the problem here is a buggy eMMC controller or firmware. The laptop is brand new, Windows outputs no errors, so faulty hardware is out of the question. GPARTED is able to create partition, but unable to finish formatting is as ext4. Debian installer freezes when formatting the root partition to ext4 and Ubuntu 22.04.1 Server installer crashes on the same step. I am not the only one having this error with exactly the same laptop model. Please take a look at this post: https://www.reddit.com/r/linuxquestions/comments/qy7oqo/unable_to_format_a_128gb_emmc_drive_to_any/ I encountered a similar problem with eMMC drive on Lenovo IdeaPad 1 82GW0047CF where GPARTED couldn’t even detect the drive. It was resolved by using the latest Linux kernel. Apparently any kernel older than 5.13 doesn’t have the driver for the eMMC. Debian 11 with 5.10.46 couldn’t detect the eMMC, but Ubuntu 22.04 with 5.15.0 installed with no errors. The case with Asus BR1100 is more complicated and nothing worked so far. The good news is that there is a NVME M.2 slot on the motherboard, so I might just buy an NVME SSD and install Debian on it. Thanks again for your help.

1 Like

Thank you. The problem seems to be the buggy eMMC controller. Please take a look at this post:

This is another case with the same laptop model:

I’ve ran into the same issue on the same laptop.
Appears that eMMC controller on this laptop has “broken CQE”.
Adding debug_quirks=0x20000 to sdhci module load options makes it work.
(0x20000 is the value for SDHCI_QUIRK_BROKEN_CQE flag, which makes the driver to avoid using CQE).

I am not familiar with how to modify the sdhci module load options. Where is the script at? Thanks again.

Hi Deby,
Looks like I was on the wrong track…never mind it was fun thinking about it.
Linux often has problems with new hardware. It is hard to know whether to wait for Linux to catch up ( which it may do if it is the firmware) or just use the NVME M.2 slot

I looked at the answer on superuser.com. Why dont you try the option of

make system avoid using CQE by specifying debug_quirks=0x20000 option to sdhci module. 

modprobe is easy to use.

That is a nice piece of diagnosis
Regards
Neville

Hi Neville,
Thank you, I appreciate your help. Yes, Linux has to catch up with new hardware, because, unfortunately, most of the hardware is not developed with Linux in mind. Windows dominates the market with around 80% share and Linux is below 2%. I’ve heard that Micro$oft is planning to implement a trick with TPM or similar module to make impossible to install any other OS, the same way as Google does in Chromebooks or Apple with their hardware. The incompatibility of eMMC drives with Linux is the beginning of the future problems. Everything was easy when all computers were modular with CPUs, RAM, Hard Drive, PSU, etc. all as separate, upgradeable and replaceable components. Now all affordable laptops have a motherboard with all other components soldered to the motherboard and non of them can be upgraded or replaced. Well, I only paid $169 for a brand new laptop with Jasper Lake Celeron N4500 and 4 GB RAM, so no complaints here. The 240 GB NVME M.2 SSD costs $28.99 on Amazon, so I decided to buy it. However, I would nevertheless like to try resolving this puzzle and install Linux on eMMC drive by implementing the “avoid using CQE by specifying debug_quirks=0x20000 option to sdhci module” solution. I am not sure how to do it. If you are familiar with the procedure, I would appreciate step by step instructions.
Best regards,
Deby.

Hi Deby,
Look here, one of the answers lists 3 ways to do it

I have not done it but I have done other stuff with modules.
The linux kernel lets you attach and remove modules ( which are like .so dynamically loaded libraries, except they are called .ko)
You can load and unload them, like plugins in a browser.
You can even load them dynamically, ie while the kernel is running, or you can set the system to autoload them at boot. The normal boot loads a default set of modiles. Most of them are drivers for various bits of hardware,

The besy way to work is to try module changes dynamically first. That way they disappear at reboot, so you cant destroy anything.

The commands involved are lsmod, modprobe, modinfo, …
The settings to do it automatically at every boot are in /etc/modprobe.d

I do hope you get your new laptop up and going. It is disapointing to encounter this problem. I would get the NVME djsk first. You need a running Linux to do anything with Modprobe.

I am looking for a new or secondhand laptop myself. I shall avoid anything with eMMC

1 Like

Therefore, what Linux needs to do is to increase its market share. Simple. Finally make GUIs work! Then market share will increase.
However, most of Linux fanatics do not see this as necessary. This is how the low market share is achieved.

Hi @Deby ,
On reading thru that article at \superuser.com, I can see that there are issues that they do not mention, so I thought I had better add some more hints.
You need to get a live Linux to start with. Lets imagine you have either

  • one of those install iso’s that start with a live linux and run the install script from within that live linux
  • a Linux on your proposed new NVME disk
    So you boot the live linux ( and dont start the install yet if it is an iso)
    Then you start with the following
Way 1: Unload the module and reload it with the option specified.

sudo modprobe -r sdhci_pci
sudo modprobe -r sdhci
sudo modprobe sdhci debug_quirks=0x20000
sudo modprobe sdhci_pci

This works when the system isn't going to access eMMC drive during boot. For example, you are in some kind of linux installer and about to begin installation on the eMMC drive.

what you have done then is add that debug_quirks=0x20000
setting to the sdhci module that is in the kernel you are currently running.
You should then be able to write on the eMMC drive.
So,

  • if you are working from an iso… go ahead and try the install
  • if you are in your NVME linux… do a mount and try and partition the eMMC disk and make filesystems.

If it doesnt work, its a failure… give up now
If it does work

  • if you are working from an iso, you will be at the end of the install. The only option is to reboot, I dont think you can get back to the live iso. You need to get back to the Linux that is now on the eMMC drive and make those modprobe changes permanent.
    So boot it, dont do anything that will cause a write, and try and do the following
Way 3: Use /etc/modprobe.d

Create a file like /etc/modprobe.d/sdhci-disable-cqe.conf which contains:

options sdhci debug_quirks=0x20000

This is usually "the right" way to permanently tweak module load behaviour. However, in order for it to work at early boot, one should make sure the config file gets to initrd image. Ways to do this may differ across distributions. For Ubuntu it's usually running sudo update-initramfs -u after creating/editing a file in /etc/modprobe.d.

It may not work, because it involves a write
So , if it fails, what you have to do is start again with the live .iso, redo the Way1 stuff, then mount the eMMC drive and then do the Way3 stuff on the mounted filesystem. Then escape from the .iso live Linux, boot from the eMMC drive, and it should work

  • if you are in the NVME Linux just make the modprobe changes permanent with
Way 3: Use /etc/modprobe.d

Create a file like /etc/modprobe.d/sdhci-disable-cqe.conf which contains:

options sdhci debug_quirks=0x20000

This is usually "the right" way to permanently tweak module load behaviour. However, in order for it to work at early boot, one should make sure the config file gets to initrd image. Ways to do this may differ across distributions. For Ubuntu it's usually running sudo update-initramfs -u after creating/editing a file in /etc/modprobe.d.

so in this case you are in /etc/modprobe.d on the NVME disk.

Thats about as far ahead as I can forsee.

The other option

Way 2: Specify sdhci.debug_quirks=0x20000 option to the kernel command line.

This often can be done with bootloader menu. It might save the day when the eMMC drive is used during boot and you didn't have a chance to burn the option via /etc/modprobe.d to initramfs.

Yes you can add kernel options to grub. It would be an alternative to Way 3 ie it would be permanent.

You might ask why bother with the temporary changes of Way1. Well that is all you can do on an iso… , it is not writeable.
On your NVME Linux you could just go straight in with the permanent changes.
For some reason, the traditional workflow with modprobe is to do try the temporary changes first.

I hope this makes a bit more sense of it

Regards
Neville

4 Likes

Hello Neville,
Thank you so much for the detailed instructions. I will try to use them and will let you know the result. The trick here is to format the eMMC partition as ext4. It should not be a problem with m.2 NVMe drive, since it has it’s own controller and should be Linux friendly. I ordered the 128 GB m.2 NVMe SSD from Aliexpress.com for about $15. Z-suit Solid State Drive 2280 Nvme Pcie3.0 128gb 256gb M.2 Ssd 512gb 1tb Internal Hard Drive Hdd - Solid State Drives - AliExpress The brand is unknown, but for the price this low I decided to try it.
Cheers

1 Like

Hello Neville,
Thank you, great explanation. Yes, very disappointing problem, which I encountered second time on a brand new laptop with eMMC drive. The first was the Lenovo IdeaPad 1 82GW0047CF, where the problem was easily resolved by using the newer Linux kernel. This one on the Asus BR1100CKA is more difficult, but should be resolved by installing the m.2 NVMe SSD. Unfortunately, all budget laptops now use an eMMC drives. The cheapest laptop with a separate replaceable SSD costs at least twice as much as the one with eMMC, even if they use the same CPU, GPU and RAM. In the end the Lenovo works very well with Ubuntu 22.04.1 LTS. I completely wiped the Windows 10 partition, formatted it to ext4, then installed Ubuntu Server minimal CLI (1.4 GB ISO). After reboot: sudo apt install slim xorg lxde-core --no-install-recommends. I don’t like snap, so I completely removed it and blocked re-installation in the future. Firefox and Chromium are only available as snap package, so I downloaded .tar.bz2 file, decompressed it in /home folder, created the shortcut in the menu and everything works fine.
Cheers.

1 Like

The problem here is that Bill Gates created the Windows monopoly by killing the competition, so any new PC sold comes with Window$. Consumer has no choice here. Some laptops come with Linux as main OS, but they are not marketed properly, so most people don’t even know about this. Other problems are: hardware compatibility and some tweaking needed on most Linux distros before they can be used by non tech savvy person. This is less of a problem now with distros like PCLinuxOS, Mint, Ubuntu, ZorinOS, Q4OS, etc. ready to use immediately after installation.

1 Like

Hi Deby,
Try Waterfox. It is downloaded as a tarfile? Looks like firefox, but has a different engine and blocks data gathering.

I am on the lookout for a laptop. Considered a refurbished Dell 7480.
What do you think? Should I buy a new one? It wont get a lot of use and I dont need a suoer high power one.

Regards
Neville

Hi Neville,

Waterfox and Firefox are both available as .tar.bz2 archives (waterfox-G5.0.1.tar.bz2, firefox-105.0.3.tar.bz2). I stopped using Waterfox because it was sold to an advertising company System1 and it is less secure than Firefox because of some delay with security updates compared to Firefox. When it comes to privacy, Tor browser is probably the only one that respects it. Every other browser either Mozilla or Chrome based is guilty in selling out the browsing history. Firefox based LibreWolf browser is better and more secure than Waterfox LibreWolf: An Open-Source Firefox Fork Without the Telemetry - It's FOSS I installed Chromium on Ubuntu using the “chromium_106.0.5249.119~linuxmint1+una_amd64.deb” package developed for Linux Mint. Chromium works better for streaming videos with hardware acceleration support. I use it for YouTube sometimes, but even better option is SMPlayer with mpv engine.

Dell 7480 is a decent laptop with core i5 or i7 and 8 to 16 GB of RAM, but there are many other choices. A few things to consider when choosing any PC (laptop, desktop, tablet, etc.) are your preferred OS, the software you need to use, screen resolution, size and quality, inputs - outputs - ports (USB, HDMI, Ethernet, etc.), storage size requirements, battery capacity, backlit keyboard, any specific requirements and your budget. There is no point to pay for the features that are never going to be used, but, for example, computer gaming requires a powerful discrete GPU, a powerful CPU (Intel Core i5 or i7,AMD Ryzen 5 or 7) and large RAM capacity, compiling software requires a powerful CPU and enough RAM. If the laptop is to be used only for Internet, email, chat, music, videos, word processing, etc. - even the cheapest budget laptop with Intel Celeron and 4 GB RAM will be sufficient.

Regards,
Deby

1 Like

I tried to compile LibreWolf from source, and failed.
I dont mind System1… they do some R development work too.
I will sit on Waterfox for a while and just see how it develops. They are active with releases.

Thanks for comments on choosing laptops. I dont want gaming or high speed video. Want some compute capacity for R and Latex, and for compiling. 16Gb of ram would be good.

Thznks
Neville

Hi Neville,
No need to compile LibreWolf. It is available as .deb or AppImage. Here are the links: Installation – LibreWolf
Index of /repositories/home:/bgstack15:/aftermozilla/Debian_Unstable/amd64
https://gitlab.com/api/v4/projects/24386000/packages/generic/librewolf/106.0.1-1/LibreWolf.x86_64.AppImage
LibreWolf is more secure than Waterfox because it is updated sooner than Waterfox. Firefox can be tweaked to improve privacy using this script: GitHub - simeononsecurity/FireFox-Privacy-Script: Implement the privacy oriented configurations for FireFox or by installing the AdGuard AdBlocker extension: AdGuard AdBlocker – Get this Extension for 🦊 Firefox (en-US) On the other hand, there is no truly private and secure browser available. Tor browser is close enough, but it is quite slow. I use Firefox with AdGuard or uBlock Origin: uBlock Origin – Get this Extension for 🦊 Firefox (en-US)
Cheers

1 Like

Hi Neville,
If you prefer a powerful CPU and 16 GB RAM, the budget laptop will not be sufficient. Refurbished laptop could be a good deal if you can find it for much less than the brand new. The problem with older computers is the obsolete hardware. Every new generation of hardware comes with great improvements in performance and power efficiency. The recommended CPUs are AMD Ryzen 5, 7, 9, Intel Core i5, i7, i9. AMD is usually a better value than Intel, providing better performance or lower prices. Look for DDR4 or DDR5 RAM. Any CPU and chipset that works with DDR3 or DDR2 RAM is too old and obsolete. The best storage type is NVMe M.2 PCIe Solid State Drive. The true comparison of the CPU performance can be found at https://www.cpubenchmark.net/ Also look for CPU Launch Date on AMD and Intel websites: https://www.amd.com/en/processors
Intel® Product Specifications
Anything released before 2017 or even 2019 is too old. IPS screen provides better colors and viewing angle than TN. Full HD resolution (1920x1080) or higher provides sharper images and more workspace area than 1366x768 or lower.
Cheers.

The simplest solution is now available with Linux Kernel 6.1 release. I hope this helps everyone having this kind of problem with installing Linux on eMMC drive. The root of the problem is lack of hardware drivers in older Linux kernels. The solution comes with the latest Linux kernel. I successfully installed debian-bookworm-DI-alpha2 (Linux Kernel 6.1), released on 2023-02-19, which can be downloaded here: Index of /cdimage/bookworm_di_alpha2/amd64/iso-cd The installation went smooth with no errors and everything works. Ubuntu 22.04, Linux Mint 21.1, Debian 11 and Devuan 4 with Kernel 5.xx all failed to install with fatal error on eMMC drive. Any Linux distro with Kernel 6.1 or newer should also work.

2 Likes

Hi Deby,
See my reply in the post ‘Best Linux laptops for programming’
I accidentally replied under the wrong topic
Regards
Neville