Trying to install Cubocore Linux on 32bit UEFI

The screenshot app for KDE is called Spectacle. :wink:

I didn't do anything special. My device (a 2-in-1 laptop) had the ESP partition (/boot/efi) already defined. My system has an SD card which Calamares often presumes is the main drive (BIOS issue actually.) I have to explicitly check the drive assignments before installing or it will try to put the bootstrap on the SD card. On my system, that is fatal because the SD card is not enabled at boot time.

what does efibootmgr -v show? Also

lsblk

Lol yes. This was when we were doing some live testing for cubocore.

Version 16.

I can see 3 Partition in my MMC of 32GB.
300mb
24GB - brtfs
4gb swap.

I wanted to see whole output of the terminal command eifbootmgr -v. Likewise the whole output of lsblk. If your device behaves like mine, then I want to make sure that there is only one mmc device...

From what you've shared, it suggests that the main drive was wiped. I'm guessing that the 300mb partition is supposed to be the ESP partition. It should be FAT32 or vfat with the boot flag set. It should be mounted at /efi/boot during installation.

This just responds with Version 16, nothing else.

While lsblk output is full list of drives Out of which the eMMC is the one that had windows which I partitioned using the calamares installer. I am just away from the device now. Will get back with detail output.

OK, that's a clue. Ordinarily efibootmgr -v would report the boot entries and boot order of the BIOS.

When you get to the device

blkid

will be more helpful if there is only one eMMC device showing in lsblk.

lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0          7:0    0   8.5M  1 loop /run/miso/sfs/livefs
loop1          7:1    0  93.7M  1 loop /run/miso/sfs/mhwdfs
loop2          7:2    0   1.1G  1 loop /run/miso/sfs/desktopfs
loop3          7:3    0 562.1M  1 loop /run/miso/sfs/rootfs
sda            8:0    1  14.6G  0 disk 
└─sda1         8:1    1  14.6G  0 part /run/miso/bootmnt
mmcblk1      179:0    0  29.1G  0 disk 
├─mmcblk1p1  179:1    0   300M  0 part 
├─mmcblk1p2  179:2    0  24.7G  0 part 
└─mmcblk1p3  179:3    0   4.1G  0 part [SWAP]
mmcblk1boot0 179:8    0     4M  1 disk 
mmcblk1boot1 179:16   0     4M  1 disk 
zram0        253:0    0   481M  0 disk [SWAP]
blkid
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/mmcblk1p1: UUID="6FC9-2FD3" TYPE="vfat" PARTUUID="e0e9372c-0199-44f1-8b4f-4f3dd600b507"
/dev/mmcblk1p2: UUID="303ceb5c-2ec1-4102-8250-75efae44474e" UUID_SUB="c6c0e40d-56ee-4b0f-a8d1-c9f67d644ff8" TYPE="btrfs" PARTUUID="b0aaa9a6-08e0-473f-9446-0bfa24d69554"
/dev/mmcblk1p3: UUID="083df610-49ec-414e-8b52-91e4db4d8853" TYPE="swap" PARTUUID="e28b41a9-e00e-4840-93ca-f03c4bb5058e"
/dev/sda1: LABEL="MJROROLL" UUID="6403-9E9E" TYPE="vfat" PARTUUID="0880dd0a-01"
/dev/zram0: UUID="e07c53d0-ba37-477b-9a00-d0e293d0d48c" TYPE="swap"
efibootmgr -v
BootCurrent: 0003
Timeout: 2 seconds
BootOrder: 0003,0002,0001,0004,0005
Boot0001* UEFI:CD/DVD Drive     BBS(129,,0x0)
Boot0002* UEFI: Built-in EFI Shell      VenMedia(5023b95c-db26-429b-a648-bd47664c8012)..BO
Boot0003* UEFI: SanDisk PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/USB(3,0)/HD(1,MBR,0x880dd0a,0x800,0x1d2d000)..BO
Boot0004* UEFI:Removable Device BBS(130,,0x0)
Boot0005* UEFI:Network Device   BBS(131,,0x0)
fdisk
isk /dev/mmcblk1: 29.12 GiB, 31268536320 bytes, 61071360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2D747D9D-35FC-4C38-BAD1-7013DAE66DBA

Device            Start      End  Sectors  Size Type
/dev/mmcblk1p1     4096   618495   614400  300M EFI System
/dev/mmcblk1p2   618496 52394219 51775724 24.7G Linux filesystem
/dev/mmcblk1p3 52394220 61063064  8668845  4.1G Linux swap

The partitions look good. The boot order looks a little busy (but OK.) Based on what I see, no boot entry is pointing to mmcblk1p1.

As best as I can tell, the state of the machine is that the install succeeded except for installing grub. You should be able to chroot (manjaro-chroot -a) from the liveUSB into Cubocore and then grub-install might just work there. You might have to mount mmcblk1p1 as /boot/efi After chrooting you can check what's mounted with lsblk.

Something to check in the chroot would be the /etc/fstab. If all three partitions are listed (ESP, root, and swap) then the last thing to do would be update-grub. If grub-install and the update-grub worked, you should be able to boot after exiting the chroot. I don't know if you'd have to regenerate initramfs (sudo mkinitcpio -P) first before updating grub, I never had to, but... YMMV

Edit: If grub-install succeeds, it will "fix" the boot order and add an entry for manjaro to the boot table.

I have tried to chroot and try to install grub but that fails with something like 'efi partition does not exist'

Update grub works.

Will look into the fstab and see what's there.
After the installation when I boot into liveusb grub and try to detect bootloader I can see 3 selections and all of them Throws error.
'error : not a valid root device. '

Let me try fstab.

UPDATE:
I checked the fstab and it looks good to me. Everything is correct and the correct mount points.

I haven't seen that error before. In the chroot, I'd try grub-install /dev/mmcblk1 one last time. Is there an entry for mmcblk1p1 in fstab? There should have been 3 entries.

Since this is a new install, I'd suggest a re-install. Use manual partitioning and explicitly (edit button) set each eMMC partition to a mount point, especially mmcblk1p1 to /boot/efi. mmcblk1p2 would be / and mmcblk1p3 would be swap. Don't let the installer format the first two partitions (it always formats swap.)

grub-install
sh-5.0# sudo grub-install
Installing for i386-efi platform.
grub-install: error: cannot find EFI directory.
sh-5.0# sudo grub-install /boot/efi
Installing for i386-efi platform.
grub-install: error: cannot find EFI directory.
fstab
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=6FC9-2FD3                            /boot/efi      vfat    defaults,noatime 0 2
UUID=303ceb5c-2ec1-4102-8250-75efae44474e /              btrfs   subvol=@,defaults,noatime,space_cache,autodefrag,compress=zstd 0 1
UUID=303ceb5c-2ec1-4102-8250-75efae44474e /home          btrfs   subvol=@home,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=083df610-49ec-414e-8b52-91e4db4d8853 swap           swap    defaults,noatime 0 2

This is my 3rd installation try. I will try manual partitioning tomorrow and report back to you.
Also I see there is only efi shell as boot disk in bios. I cant see MMC as bootable.

The fstab looks OK, but btrfs is an extra complication at the moment, should not matter for the ESP partition, but... I don't understand the "efi shell". Running KDE partition Manager - properties might shed some light on what is going on with mmcblk1p1 or maybe see the efi shell. Does the linx 10 have a reserved bootstrap area away from the main storage? I don't know if @gohlip would have any ideas about installing grub in this case.

I'm out of ideas at this point. The efi partition mmcblk1p1 isn't being recognized by either the BIOS or grub-install. Look at the mmcblk1p1 partition flags,and then other BIOS settings. Can you access mmcblk1p1 with a file manager (as root)?

First time I read this topic because I don't use 32bit. I was pinged.

First a caveat. I've never used/had a 32bit uefi system.
In fact I had used 64bits right at the beginning when people & computer articles were advising using 32bit even when 64bit was available. It has been a long time I used 32bit. So the following must be at your own risk.

Boot to the installed media using this first post and using the [Complicated Setups] method. Not the [Simple First Start] method. And start system in uefi.

When booted to the installed OS (not liveOS), at terminal

sudo pacman-mirrors -f5
sudo pacman -Syyuu

Install packages efibootmgr grub-vanilla dosfstools efivar if not installed.

sudo grub-install --target=i386-efi --efi-directory=/dev/mmcblk1p1 --bootloader-id=manjaro32  --recheck --debug
sudo update-grub

Continue with warning. Check files before proceeding.

sudo cp /boot/grub/i386-efi/core.efi /boot/efi/EFI/boot/bootx32.efi
sudo efibootmgr -c -d /dev/mmcblk1 -p 1 -L "manjaro32" -l "\EFI\Manjaro32\grubx64.efi"

Warning1 : I am not sure if there is a /boot/grub/i386-efi/core.efi, if there is none use /boot/grub/x86_64-efi/core.efi instead.
Warning2: I am not sure if there is a "\EFI\Manjaro32\grubx64.efi" or another efi named like'grubx32.efi' Use grubx32.efi if it exists.

ps: let us know, ya.

Good luck. :crossed_fingers:

ps: if you cannot boot to the installed OS, some commands above must be changed if performed from the liveOS. Much more complicated and we cannot 'update-grub' at liveOS. It will also reboot to a grub prompt. But we can find a way from there to boot to the installed OS then. And more commands to ensue. So whenever possible boot to the installed OS. FYI.

This is a 64bit linux install on a system with uefi32. The issue is the ESP partition seems to be invisible to grub-install. Is there anything beyond vfat format to get the system to recognize the partition or will sudo grub-install /dev/mmcblk1 fix up what is needed? For example, my system has the ESP partition label "SYSTEM" (different brand but similar device.)

I like the strategy of booting to the installation instead of chroot to try fixing grub. Thanks for the guidance. :slightly_smiling_face: Hopefully, @spikerguy can get this sorted out now.

The partition is recognized by lsblk and blkid. For grub-install, I think the problem was that "--target=x86_64-efi" was used instead of "--target=i386-efi".

"--target=x86_64-efi" is the standard 64bit efi grub-install command.
"--target=i386-pc" is the standard bios-legacy grub-install command.
If not specified, they will be the default settings based on the mode the system is booted up in.
"--target=i386-efi" on the other hand is for 32bit uefi and must be specified. No defaults for it.
While this may be correct, but as said I am not certain this is the cause of the problem OP faces.

2 Likes

Hello and thanks alot in helping me with this.
Ok I read your post and the tutorial to make devices boot.
'search.file /etc/manjaro-release root'
I tried this command and it failed with the following error.
IMG_20191016_001435

Then I continued with the next commands and I was able to enter in kernel boot mode but not the os.
IMG_20191015_085644

Here is the kernel or is it the busybox?
IMG_20191016_001934

My device boots in efi which is uefi32 in the bios I can only see 'Built-in EFI Shell' as my boot option when I dont have any storage device connected to the tablet.
Here
IMG_20191016_003226

And all about the device mmc details is here.

Also tried this from liveiso after mounting linux partition to mnt and efi partition to /mnt/@/boot/efi
And did 'sudo manjaro-chroot /mnt/@'

Give me error : cannot find EFI directory.
Kindly advice how can I make it work?

After reading your thread multiple times and understanding what those commands are for, I was 100% sure all those commands are accurate and that should solve the issue I am facing but that still didnt help, So I started going through the liveiso grub and when I Did detect efi bootloaders I was able to see the 3 bootloaders and all returned with the same error 'not a valid root device'

Then I started to look into the bios and found something called write protection under my EMMC device which was enabled so I disabled it after this i booted into liveiso grub and selected 'detect efi bootloaders' and selectes the first option and then it booted into the grub and straight to Manjaro 5.3.

Now I will try the grub-install --target command and see if it boots directly without the need of liveiso grub.

When the search.file failed, the variable "$root" was not set to mmcblk1 probably (hd1,gpt2).

If you type ls after the search.file fails, what does it report? You should see (hd0) (hd0,msdos1) which is the liveUSB. You should also see (hd1) (hd1,gpt1) (hd1,gpt2) (hd1, gpt3) which would be the main storage mmcblk1.

If (hd1) is not listed, then the storage is offline at boot time.

Your final error screen is busybox.

Are there any other options for the "Boot Override" in the BIOS? The Launch EFI shell from filesystem device looks preferable to Built-in EFI Shell, which is probably hard coded to windows.

1 Like

Yes I see that. But all are unknown system when is 'ls' to it.
Here
IMG_20191016_020718

Currently I am inside the installed version and trying to do grub-install install but it keeps failing with this error but looks like it recognize the efi partition atleast i guess.
IMG_20191016_015447

Well I found something in the BIOS for OS boot settings.
IMG_20191016_021018

And just to confirm that my installed os on mmcblk1 grub works fine.
IMG_20191016_021302
Now I will try again for the efibootmgr

Well well well!!!
From the Bios os setting I could confirm this bios is fixed to windows efi. Which lead me to read your recommendation for such cases to one of the user. The trick where we make the device think that we're booting using Microsot EFI.
I created a Microsoft and Boot directory inside /boot/efi/EFI and copied the core.efi from /boot/grub/x86_64-efi to /boot/efi/EFI/Microsoft/Boot/ and renamed it to bootmgfw.efi

To make it short I just passed this command sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi

Now finally I can boot directly to efi > grub > Manjaro. Yeay.

@jbMacAZ And @gohlip
Thank you for all the support. Really appreciate your patient and motivation to help users with such rare case scenarios. Maybe I need some motivation to help others back on this community forum too. Hahaha.
Cheers.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by