0

I have ArchLinux installed with NON-UEFI (since last edit its UEFI now) on /dev/sda4 partitioned with LVM2 containing two logical volumes (/vgarch/arch_root & /vgarch/arch_home) , since i have GRUB2 installed by Ubuntu 22.04 i want to configure it to detect ArchLinux,mounting /dev/vgarch/arch_root and running update-grub (else os-prob won't detect idk why) gave me the following output

$ sudo update-grub
[sudo] password for ya22y: 
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.2.0-33-generic
Found initrd image: /boot/initrd.img-6.2.0-33-generic
Found linux image: /boot/vmlinuz-6.2.0-26-generic
Found initrd image: /boot/initrd.img-6.2.0-26-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
/usr/sbin/grub-probe: error: unknown filesystem.
Found Arch Linux on /dev/mapper/vgarch-arch_root
/usr/sbin/grub-probe: error: unknown filesystem.
Adding boot menu entry for UEFI Firmware Settings ...
done

GRUB shows ArchLinux entry but when i boot i got error saying

error: file "/vmlinuz-linux-lts" not found

However the kernel is installed. ( and tried to reinstall it from live environment)

$ sudo mount /dev/vgarch/arch_root /mnt
$ sudo chroot /mnt
[root@IYB /]# ls /boot
initramfs-linux-lts-fallback.img  initramfs-linux-lts.img  vmlinuz-linux-lts

Tried to add ArchLinux entry manually by adding the following script to /etc/grub.d/40_custom

menuentry 'Arch Linux' {
                                          #UUID of /dev/vgarch/arch_root partition
        search --no-floppy --fs-uuid --set=root 394db06d-01e3-43a3-bf84-22f7bca2cc0c
        linux /boot/vmlinuz-linux-lts root=UUID=394db06d-01e3-43a3-bf84-22f7bca2cc0c rw
        initrd /boot/initramfs.linux-lts.img }

booting to 'Arch Linux' gave the following:

error: uknown filesystem

Additional details

/dev/sda

Disk /dev/sda: 238,47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: LITEON LMH-256V2
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: 7B055726-9B69-4E1B-9DD6-4762B556617D

Device Start End Sectors Size Type /dev/sda1 2048 4095 2048 1M BIOS boot /dev/sda2 4096 1054719 1050624 513M EFI System /dev/sda3 1054720 233877503 232822784 111G Linux filesystem /dev/sda4 233877504 500117503 266240000 127G Linux LVM

Logical volumes

$ sudo lvdisplay
  --- Logical volume ---
  LV Path                /dev/vgarch/arch_root
  LV Name                arch_root
  VG Name                vgarch
  LV UUID                yhsMld-G8Zp-h6au-pfZw-k3V1-EkuT-Wgyf5A
  LV Write Access        read/write
  LV Creation host, time archiso, 2023-09-19 23:22:59 +0100
  LV Status              available
  # open                 0
  LV Size                16,00 GiB
  Current LE             4096
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

--- Logical volume --- LV Path /dev/vgarch/arch_home LV Name arch_home VG Name vgarch LV UUID cwlwYH-FXu4-zU3n-yHsL-DkSo-Gsl8-uRkuLE LV Write Access read/write LV Creation host, time archiso, 2023-09-19 23:24:11 +0100 LV Status available

open 0

LV Size <110,95 GiB Current LE 28403 Segments 1 Allocation inherit Read ahead sectors auto

  • currently set to 256

Block device 253:1

/boot directory in Arch

ya22y@IYB:~$ sudo mount /dev/vgarch/arch_root /mnt
ya22y@IYB:~$ sudo chroot /mnt
[root@IYB /]# ls /boot
initramfs-linux-lts-fallback.img  initramfs-linux-lts.img  vmlinuz-linux-lts

Arch directory /etc/mkinitcpio.conf

i've ran mkinitcpio -P after adding lvm2.

HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block lvm2 filesystems fsck)

EDIT I have installed grub from ArchLinux to ESP partition a.k.a /dev/sda2, and update it using grub-mkconfig. Now i hade two booting options,ubuntu_grub and arch_grub. However none of the grub associatiated with niether ubuntu or arch seems to detect the other OS.(os-prober enabled).

booting from ubuntu_grub.. Ubuntu OS appears and i can boot into it, however going to grub rescue mode and trying to ls (lvm/vgarch-arch_root) results

booting from arch_grub.. its get me directly to grub rescue mode, however try to ls (lvm/vgarch-arch_root) and ls (hd,gpt3) seems to recognize both OS filesystems.

"no known filesystem".

Boot-Repair Boot Info Summary:

============================== Boot Info Summary ===============================

=> Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 2048 of the same hard drive for core.img. core.img is at this location and looks for (,gpt3)/boot/grub. It also embeds following components:

modules
---------------------------------------------------------------------------
fshelp ext2 part_gpt biosdisk
---------------------------------------------------------------------------

sda1: __________________________________________________________________________

File system:       BIOS Boot partition
Boot sector type:  Grub2's core.img
Boot sector info: 

sda2: __________________________________________________________________________

File system:       vfat
Boot sector type:  FAT32
Boot sector info:  No errors found in the Boot Parameter Block.
Operating System:  
Boot files:        /efi/BOOT/fbx64.efi /efi/BOOT/mmx64.efi 
                   /efi/grub_arch/grubx64.efi /efi/ubuntu/grubx64.efi 
                   /efi/ubuntu/mmx64.efi /efi/ubuntu/shimx64.efi 
                   /efi/ubuntu/grub.cfg

sda3: __________________________________________________________________________

File system:       ext4
Boot sector type:  -
Boot sector info: 
Operating System:  Ubuntu 22.04.3 LTS
Boot files:        /boot/grub/grub.cfg /etc/fstab /etc/default/grub 
                   /boot/grub/i386-pc/core.img

sda4: __________________________________________________________________________

File system:       LVM2_member
Boot sector type:  -
Boot sector info: 

sdb: ___________________________________________________________________________

File system:       iso9660
Boot sector type:  Grub2 (v1.99-2.00)
Boot sector info:  Grub2 (v1.99-2.00) is installed in the boot sector of 
                   sdb and looks at sector 0 of the same hard drive for 
                   core.img, but core.img can not be found at this 
                   location.
Mounting failed:   mount: /mnt/BootInfo/FD/sdb: /dev/sdb already mounted or mount point busy.


================================ 2 OS detected =================================

OS#1: Ubuntu 22.04.3 LTS on sda3 OS#2: Arch Linux (rolling) on mapper/vgarch-arch_root

================================ Host/Hardware =================================

CPU architecture: 64-bit Video: Haswell-ULT Integrated Graphics Controller from Intel Corporation Live-session OS is Ubuntu 64-bit (Ubuntu 22.04.3 LTS, jammy, x86_64)

===================================== UEFI =====================================

BIOS/UEFI firmware: A17(65.17) from Dell Inc. The firmware is EFI-compatible, and is set in EFI-mode for this live-session. SecureBoot disabled (confirmed by mokutil). BootCurrent: 000F Timeout: 2 seconds BootOrder: 000C,000A,000B,000D,000E,0001,0000,0002,0009,000F Boot0000* ubuntu HD(2,GPT,b6110742-692a-45ec-9745-393729ff51e2,0x1000,0x100800)/File(\EFI\ubuntu\shimx64.efi) Boot0001* GRUB PciRoot(0x0)/Pci(0x1f,0x2)/Sata(1,65535,0)/HD(2,GPT,b6110742-692a-45ec-9745-393729ff51e2,0x1000,0x100800)/File(\EFI\ubuntu\grubx64.efi) Boot0002* grub_arch HD(2,GPT,b6110742-692a-45ec-9745-393729ff51e2,0x1000,0x100800)/File(\EFI\grub_arch\grubx64.efi) Boot0009* UEFI: LITEON LMH-256V2M-11 MSATA 256GB PciRoot(0x0)/Pci(0x1f,0x2)/Sata(1,65535,0)/HD(2,GPT,b6110742-692a-45ec-9745-393729ff51e2,0x1000,0x100800)AMBO Boot000A* Diskette Drive BBS(Floppy,Diskette Drive,0x0)AMBO Boot000B* Internal HDD BBS(HD,P1: LITEON LMH-256V2M-11 MSATA,0x0)AMBO Boot000C* USB Storage Device BBS(USB,ADATA USB Flash Drive 0.00,0x0)AMBO Boot000D* CD/DVD/CD-RW Drive BBS(CDROM,CD/DVD/CD-RW Drive,0x0)AMBO Boot000E* Onboard NIC BBS(Network,IBA GE Slot 00C8 v1550,0x0)AMBO Boot000F* UEFI: ADATA USB Flash Drive 0.00 PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(2,GPT,f45e2fa1-c5a6-4d79-876d-c8245af921e0,0x95f864,0x2754)AMBO

a9c517741ac31962d7feb152948ad1ee sda2/BOOT/fbx64.efi a660182adef313615746a665966d2ccc sda2/BOOT/mmx64.efi 3ef1fbaf89bb4141a06ee06b1db9ca8f sda2/grub_arch/grubx64.efi 5ddf997e8b025bfbc2009e85b32f60dc sda2/ubuntu/grubx64.efi a660182adef313615746a665966d2ccc sda2/ubuntu/mmx64.efi 64349b3622c65f495a99dbf6102496e3 sda2/ubuntu/shimx64.efi 64349b3622c65f495a99dbf6102496e3 sda2/BOOT/BOOTX64.efi

============================= Drive/Partition Info =============================

Disks info: ____________________________________________________________________

sda : is-GPT, hasBIOSboot, has---ESP, not-usb, not-mmc, has-os, no-wind, 2048 sectors * 512 bytes

Partitions info (1/3): _________________________________________________________

mapper/vgarch-arch_root : is-os, 64, pacman, no-docgrub, grub2, grub-install, grubenv-ok, grub-mkconfig -o /boot/grub, not-far mapper/vgarch-arch_home : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far sda2 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, not-far sda3 : is-os, 64, apt-get, signed grub-pc grub-efi , grub2, grub-install, grubenv-ok, update-grub, farbios

Partitions info (2/3): _________________________________________________________

mapper/vgarch-arch_root : isnotESP, fstab-without-efi, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot mapper/vgarch-arch_home : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot sda2 : is---ESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot sda3 : isnotESP, fstab-has-goodEFI, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot

Partitions info (3/3): _________________________________________________________

mapper/vgarch-arch_root : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, sda mapper/vgarch-arch_home : maybesepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sda sda2 : not--sepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sda sda3 : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, sda

fdisk -l (filtered): ___________________________________________________________

Disk sda: 238.47 GiB, 256060514304 bytes, 500118192 sectors Disk identifier: 7B055726-9B69-4E1B-9DD6-4762B556617D Start End Sectors Size Type sda1 2048 4095 2048 1M BIOS boot sda2 4096 1054719 1050624 513M EFI System sda3 1054720 233877503 232822784 111G Linux filesystem sda4 233877504 500117503 266240000 127G Linux LVM Disk mapper/vgarch-arch_root: 16 GiB, 17179869184 bytes, 33554432 sectors Disk mapper/vgarch-arch_home: 110.95 GiB, 119130816512 bytes, 232677376 sectors Disk sdb: 7.24 GiB, 7775191040 bytes, 15185920 sectors Disk identifier: F45E2FA1-C5A6-4D79-876F-C8245AF921E0 Start End Sectors Size Type sdb1 64 9828451 9828388 4.7G Microsoft basic data sdb2 9828452 9838519 10068 4.9M EFI System sdb3 9838520 9839119 600 300K Microsoft basic data sdb4 9842688 15185856 5343169 2.5G Linux filesystem

parted -lm (filtered): _________________________________________________________

sda:256GB:scsi:512:512:gpt:ATA LITEON LMH-256V2:; 1:1049kB:2097kB:1049kB:::bios_grub; 2:2097kB:540MB:538MB:fat32:EFI System Partition:boot, esp; 3:540MB:120GB:119GB:ext4::; 4:120GB:256GB:136GB:::lvm; sdb:7775MB:scsi:512:512:gpt:ADATA USB Flash Drive:; 1:32.8kB:5032MB:5032MB::ISO9660:hidden, msftdata; 2:5032MB:5037MB:5155kB::Appended2:boot, esp; 3:5037MB:5038MB:307kB::Gap1:hidden, msftdata; 4:5039MB:7775MB:2736MB:ext4::; mapper/vgarch-arch_home:119GB:dm:512:512:loop:Linux device-mapper (linear):; 1:0.00B:119GB:119GB:ext4::; mapper/vgarch-arch_root:17.2GB:dm:512:512:loop:Linux device-mapper (linear):; 1:0.00B:17.2GB:17.2GB:ext4::;

blkid (filtered): ______________________________________________________________

NAME FSTYPE UUID PARTUUID LABEL PARTLABEL sda
├─sda1 0b56d3c5-5f49-4918-b03e-a74ac1b4a646
├─sda2 vfat BD1A-71EF b6110742-692a-45ec-9745-393729ff51e2 EFI System Partition ├─sda3 ext4 e5d44bf3-db5f-40ff-bd31-ca7c932bc706 617bf50b-b498-48b2-857d-9537226c4a72
└─sda4 LVM2_member JWq8ac-3jR4-Ey1E-2mw0-EmPJ-YPVe-dPVeR8 763ae511-8ba2-400a-8cca-0e4126bfa1a0
├─vgarch-arch_root ext4 394db06d-01e3-43a3-bf84-22f7bca2cc0c
└─vgarch-arch_home ext4 12ca58df-3d30-436e-95ff-cc4c42c6e7a2
sdb iso9660 2023-08-08-01-19-05-00 Ubuntu 22.04.3 LTS amd64 ├─sdb1 iso9660 2023-08-08-01-19-05-00 f45e2fa1-c5a6-4d79-876e-c8245af921e0 Ubuntu 22.04.3 LTS amd64 ISO9660 ├─sdb2 vfat F7DB-4D56 f45e2fa1-c5a6-4d79-876d-c8245af921e0 ESP Appended2 ├─sdb3 f45e2fa1-c5a6-4d79-876c-c8245af921e0 Gap1 └─sdb4 ext4 913a515f-213d-4b90-954b-51e9103431ed 424ba32d-f6fd-a74e-87e0-cb7c55af8ef6 writable

Mount points (filtered): _______________________________________________________

                                                           Avail Use% Mounted on

/dev/disk/by-label/writable[/install-logs-2023-09-23.0/crash] 2.3G 0% /var/crash /dev/disk/by-label/writable[/install-logs-2023-09-23.0/log] 2.3G 0% /var/log /dev/mapper/vgarch-arch_home 103.1G 0% /mnt/boot-sav/mapper/vgarch-arch_home /dev/mapper/vgarch-arch_root 12.7G 14% /mnt/boot-sav/mapper/vgarch-arch_root /dev/sda2 505.7M 1% /mnt/boot-sav/sda2 /dev/sda3 84.5G 17% /mnt/boot-sav/sda3 /dev/sdb1 0 100% /cdrom

Mount options (filtered): ______________________________________________________

============================== ls -R /dev/mapper/ ==============================

/dev/mapper: control vgarch-arch_home vgarch-arch_root

===================== sda2/efi/ubuntu/grub.cfg (filtered) ======================

search.fs_uuid e5d44bf3-db5f-40ff-bd31-ca7c932bc706 root hd0,gpt3 set prefix=($root)'/boot/grub' configfile $prefix/grub.cfg

====================== sda3/boot/grub/grub.cfg (filtered) ======================

Ubuntu e5d44bf3-db5f-40ff-bd31-ca7c932bc706 Ubuntu, with Linux 6.2.0-33-generic e5d44bf3-db5f-40ff-bd31-ca7c932bc706 Ubuntu, with Linux 6.2.0-26-generic e5d44bf3-db5f-40ff-bd31-ca7c932bc706

END /etc/grub.d/30_os-prober

UEFI Firmware Settings uefi-firmware

END /etc/grub.d/30_uefi-firmware

Arch Linux

========================== sda3/etc/fstab (filtered) ===========================

<file system> <mount point> <type> <options> <dump> <pass>

/ was on /dev/sda3 during installation

UUID=e5d44bf3-db5f-40ff-bd31-ca7c932bc706 / ext4 errors=remount-ro 0 1

/boot/efi was on /dev/sda2 during installation

UUID=BD1A-71EF /boot/efi vfat umask=0077 0 1 /swapfile none swap sw 0 0

======================= sda3/etc/default/grub (filtered) =======================

GRUB_DEFAULT="0" GRUB_TIMEOUT_STYLE="hidden" GRUB_TIMEOUT="10" GRUB_DISTRIBUTOR="lsb_release -i -s 2&gt; /dev/null || echo Debian" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" GRUB_SAVEDEFAULT="false" GRUB_DISABLE_OS_PROBER="false"

==================== sda3: Location of files loaded by Grub ====================

       GiB - GB             File                                 Fragment(s)

78.407356262 = 84.189257728 boot/grub/grub.cfg 1 2.705089569 = 2.904567808 boot/grub/i386-pc/core.img 1 9.759067535 = 10.478718976 boot/vmlinuz 2 10.729740143 = 11.520970752 boot/vmlinuz-6.2.0-26-generic 1 9.759067535 = 10.478718976 boot/vmlinuz-6.2.0-33-generic 2 10.729740143 = 11.520970752 boot/vmlinuz.old 1 15.446777344 = 16.585850880 boot/initrd.img 1 4.538490295 = 4.873166848 boot/initrd.img-6.2.0-26-generic 2 15.446777344 = 16.585850880 boot/initrd.img-6.2.0-33-generic 1 4.538490295 = 4.873166848 boot/initrd.img.old 2

===================== sda3: ls -l /etc/grub.d/ (filtered) ======================

-rwxr-xr-x 1 root root 18683 Dec 18 2022 10_linux -rwxr-xr-x 1 root root 43031 Dec 18 2022 10_linux_zfs -rwxr-xr-x 1 root root 14387 Dec 18 2022 20_linux_xen -rwxr-xr-x 1 root root 13369 Dec 18 2022 30_os-prober -rwxr-xr-x 1 root root 1372 Dec 18 2022 30_uefi-firmware -rwxr-xr-x 1 root root 700 May 17 05:35 35_fwupd -rwxr-xr-x 1 root root 467 Sep 20 18:47 40_custom -rwxr-xr-x 1 root root 215 Dec 18 2022 41_custom drwxr-xr-x 4 root root 4096 Sep 19 23:23 backup

========================== sda3/etc/grub.d/40_custom ===========================

#!/bin/sh exec tail -n +3 $0

This file provides an easy way to add custom menu entries. Simply type the

menu entries you want to add after this comment. Be careful not to change

the 'exec tail' line above

menuentry 'Arch Linux' { insmod part_gpt insmod ext2 search --no-floppy --fs-uuid --set=root 394db06d-01e3-43a3-bf84-22f7bca2cc0c linux /boot/vmlinuz-linux-lts root=UUID=394db06d-01e3-43a3-bf84-22f7bca2cc0c rw initrd /boot/initramfs.linux-lts.img }

==================== blkid (filtered) before lvm activation ====================

/dev/mapper/vgarch-arch_root: UUID="394db06d-01e3-43a3-bf84-22f7bca2cc0c" BLOCK_SIZE="4096" TYPE="ext4" /dev/mapper/vgarch-arch_home: UUID="12ca58df-3d30-436e-95ff-cc4c42c6e7a2" BLOCK_SIZE="4096" TYPE="ext4" /dev/sda2: UUID="BD1A-71EF" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="b6110742-692a-45ec-9745-393729ff51e2" /dev/sda3: UUID="e5d44bf3-db5f-40ff-bd31-ca7c932bc706" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="617bf50b-b498-48b2-857d-9537226c4a72" /dev/sdb1: BLOCK_SIZE="2048" UUID="2023-08-08-01-19-05-00" LABEL="Ubuntu 22.04.3 LTS amd64" TYPE="iso9660" PARTLABEL="ISO9660" PARTUUID="f45e2fa1-c5a6-4d79-876e-c8245af921e0" /dev/sdb4: LABEL="writable" UUID="913a515f-213d-4b90-954b-51e9103431ed" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="424ba32d-f6fd-a74e-87e0-cb7c55af8ef6" /dev/sdb2: SEC_TYPE="msdos" LABEL_FATBOOT="ESP" LABEL="ESP" UUID="F7DB-4D56" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Appended2" PARTUUID="f45e2fa1-c5a6-4d79-876d-c8245af921e0" /dev/sda4: UUID="JWq8ac-3jR4-Ey1E-2mw0-EmPJ-YPVe-dPVeR8" TYPE="LVM2_member" PARTUUID="763ae511-8ba2-400a-8cca-0e4126bfa1a0" /dev/sdb3: PARTLABEL="Gap1" PARTUUID="f45e2fa1-c5a6-4d79-876c-c8245af921e0" /dev/sda1: PARTUUID="0b56d3c5-5f49-4918-b03e-a74ac1b4a646"

================================ LVM activation ================================

modprobe dm-mod
vgscan --mknodes Found volume group "vgarch" using metadata type lvm2 vgchange -ay 2 logical volume(s) in volume group "vgarch" now active lvscan ACTIVE '/dev/vgarch/arch_root' [16.00 GiB] inherit ACTIVE '/dev/vgarch/arch_home' [<110.95 GiB] inherit blkid -g

Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would purge (in order to fix packages) and reinstall the grub-efi of mapper/vgarch-arch_root, using the following options: sda2/boot/efi Additional repair would be performed: unhide-bootmenu-10s use-standard-efi-file

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the Arch Linux (rolling) entry (sda2/efi/**/grub.efi (** will be updated in the final message) file) !

karel
  • 114,770
ya22y
  • 33
  • Sorry mabe stupid comment. I see a raw BIOS boot and an uefi filesystem. Are both OS installed in same mode? – nobody Sep 21 '23 at 20:17
  • If both are in same boot mode, then have you installed in Ubuntu lvm2 driver? sudo apt-get install lvm2 Rather than try to directly boot with full boot stanza, in 40_custom try a configfile entry to the grub in Arch's boot partition. https://ubuntuforums.org/showthread.php?t=2076205&page=54&p=13788092#post13788092 See 6.5 on configfile details https://www.gnu.org/software/grub/manual/grub/grub.html#Multi_002dboot-manual-config – oldfred Sep 22 '23 at 02:54
  • @nobody no they are not, as it shows Ubuntu is installed on efi mode, honestly i thought the laptop BIOS is installed on /dev/sda1 thats why i didn't try to delete it. – ya22y Sep 22 '23 at 09:33
  • @oldfred lvm2 installed on both os, and no they aren't on the same boot mode, ubuntu is on efi mode and arch on non-eufi mode (i thought that would be more simpler to use one efi partition for both os). – ya22y Sep 22 '23 at 09:37
  • UEFI systems can only boot in one mode from start. So once you start in UEFI mode, you cannot switch. Some boot managers are able to force reboot & switch modes, but grub cannot. With Ubuntu you just need to reinstall grub in UEFI mode to convert BIOS install to UEFI install. I would expect you can do the same with Arch, but do not know details. – oldfred Sep 22 '23 at 13:49
  • @oldfred Actually i've just turned arch to uefi mode by installing its own grub on /dev/sda2, now i have two booting options, booting from ubuntu's grub or arch's. Please see the last edit. – ya22y Sep 22 '23 at 14:38
  • 1
  • 1
    Make sure LVM is enabled. Please copy & paste the pastebin link to the BootInfo summary report ( do not post report), do not run the auto fix till reviewed. Use often updated ppa version over somewhat older ISO with your USB installer or any working install. https://help.ubuntu.com/community/Boot-Repair & https://sourceforge.net/p/boot-repair/home/Home/ – oldfred Sep 22 '23 at 19:28
  • @oldfred here's the link: https://pastebin.ubuntu.com/p/3wzK2CMQXZ/, if i understood the report, grub is running on BIOS and looks for core.img which is launching grub from ubuntu partition while LVM is disabled, and thats why i got the unkown filesystem error? – ya22y Sep 23 '23 at 16:40
  • @karel thanks for your suggestion, actually that's the approach I am considering to detect what I've missed. – ya22y Sep 23 '23 at 16:43
  • @oldfred LVM is now enabled and i've checked from grub rescue lsmod --builtin – ya22y Sep 23 '23 at 17:16
  • Do not know LVM, but you have grub installed in BIOS & UEFI boot mode for Ubuntu. It looks like most recent is BIOS as the mount of the ESP is commented out in fstab. Line 216 But Arch is installed in UEFI boot mode. Both installs need to be UEFI. And system set to default to UEFI boot and all repair, USB flash drives always booted in UEFI mode. No BIOS boots which just confuse things. – oldfred Sep 23 '23 at 21:47
  • so can i safely delete /dev/sda1 ? Also, reinstalling grub from arch on /dev/sda2 seems two work, each grub its booting or different OS – ya22y Sep 23 '23 at 22:05

1 Answers1

1

Apparently running os-prober from arch side detected ubuntu, here's how to do it:

-Boot to Arch Linux from a live cd and connect to the network. using iwctl

-Mount partition of logical volume containing root system /dev/vgarch/arch_root in my case.

$mount /dev/vgarch/arch_root /mnt

-chroot to the mounted partition $arch-chroot /mnt

-install grub package on the system using pacman -S grub dosfstools os-prober mtools

-now mount ESP partition to /boot/EFI directory (create one if doesn't exist using mkdir /boot/EFI)

$mount /dev/sda2 /boot/EFI

-install grub on EFI partition

rub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=ARCH --recheck -make sure os-prober is enabled and update grub

grub-mkconfig -o /boot/grub/grub.cfg

-exit chroot and reboot, then boot from ARCH entry, the new installed grub will detect ubuntu os and you can make it your default bootloader from boot sequence priority.

ya22y
  • 33