
Code: Select all
root@MSI /root % ls -l /dev/sd?
brw-rw---- 1 root disk 8, 0 Jan 22 09:41 /dev/sda
brw-rw---- 1 root disk 8, 16 Jan 22 09:41 /dev/sdb
brw-rw---- 1 root disk 8, 32 Jan 22 09:41 /dev/sdc
brw-rw---- 1 root disk 8, 48 Jan 22 09:41 /dev/sdd
Code: Select all
root@MSI /root % parted -l
Model: ATA CT500MX500SSD1 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI System boot
2 106MB 500GB 500GB ext4 Linux filesystem
Model: ATA WDC WD2003FZEX-0 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 2000GB 2000GB ext4
Model: ATA CT1000MX500SSD1 (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 250GB 250GB ext4
2 250GB 500GB 250GB ext4
3 500GB 1000GB 500GB ext4
Model: General USB Flash Disk (scsi)
Disk /dev/sdd: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 123kB 16.0GB 16.0GB primary fat32 lba
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label
Model: HL-DT-ST BDDVDRW CH10LS28 (scsi)
Disk /dev/sr0: 369MB
Sector size (logical/physical): 2048B/2048B
Partition Table: unknown
Code: Select all
oot@MSI /root % chroot /mnt/gentoo /bin/bash
chroot: failed to run command `/bin/bash': Exec format error

Code: Select all
file /mnt/gentoo/bin/bashCode: Select all
uname -aCode: Select all
root@MSI /root % file /mnt/gentoo/bin/bash
/mnt/gentoo/bin/bash: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, stripped
Code: Select all
root@MSI /root % uname -a
Linux MSI 2.6.38-std231-i586 #2 SMP Tue Aug 23 17:46:59 UTC 2011 i686 AMD Ryzen 7 2700X Eight-Core Processor AuthenticAMD GNU/Linux

Code: Select all
root@MSI /root % uname -a
Linux MSI 4.14.80-std532-amd64 #2 SMP Sun Nov 11 18:59:44 UTC 2018 x86_64 AMD Ryzen 7 2700X Eight-Core Processor AuthenticAMD GNU/Linux
You haven't set the esp flag here?Tony0945 wrote:Code: Select all
root@MSI /root % parted -l Model: ATA CT500MX500SSD1 (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Number Start End Size File system Name Flags 1 1049kB 106MB 105MB fat32 EFI System boot
Code: Select all
root@MSI /root % parted /dev/sda print
Model: ATA CT500MX500SSD1 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI System boot, esp
2 106MB 500GB 500GB ext4 Linux filesystem
Code: Select all
~ # efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0001,0004,0005,0002,0003
Boot0000* rEFInd Boot Manager HD(1,GPT,16438771-d6bb-482a-ad34-a1c04d0363c7,0x800,0x200000)/File(\EFI\refind\refind_x64.efi)
...Code: Select all
root@MSI /root % efibootmgr -c -L "REFIND" -l '\EFI\refind\refind_x64.efi'
GUID Partition Table Header signature is wrong: 40000064f2fd43a0 != 5452415020494645
GUID Partition Table Header signature is wrong: 40000064f2fd43a0 != 5452415020494645
GUID Partition Table Header signature is wrong: 40000064f2fd43a0 != 5452415020494645
GUID Partition Table Header signature is wrong: 40000064f2fd43a0 != 5452415020494645
GUID Partition Table Header signature is wrong: 40000064f2fd43a0 != 5452415020494645
GUID Partition Table Header signature is wrong: 40000064f2fd43a0 != 5452415020494645
Could not prepare Boot variable: Read-only file systemCode: Select all
root@MSI /root % mount |grep sda1
/dev/sda1 on /mnt/gentoo/boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
# mount|grep sda
/dev/sda2 on / type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
Code: Select all
mount -o remount,rw /sys/firmware/efi/efivars
efibootmgr -c -L "REFIND" -l '\EFI\refind\refind_x64.efi'
Think you are right. I feel like I took a journey into Hell.figueroa wrote:I find that UEFI is a gift from hell.
Code: Select all
tony@MSI ~ $ sudo efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0007,0002
Boot0000* Linux HD(1,GPT,6cc06059-07a5-450a-be59-c954bf6e846b,0x800,0x32000)/File(\EFI\refind\refind_x64.efi)REFIND
Boot0001 Hard Drive BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)..GO..NO..........C.T.5.0.0.M.X.5.0.0.S.S.D.1...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.8.1.4.4.1.E.5.D.9.0.0.0. . . . . . . . ........BO..NO..........W.D.C. .W.D.2.0.0.3.F.Z.E.X.-.0.0.S.R.L.A.0...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L. . . . .W. .-.D.M.W.6.C.0.N.2.P.X.7.C.D........BO..NO..........C.T.1.0.0.0.M.X.5.0.0.S.S.D.1...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.9.1.0.2.2.E.3.0.F.C.9.9. . . . . . . . ........BO
Boot0002 CD/DVD Drive BBS(CDROM,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0300)..GO..NO..........H.L.-.D.T.-.S.T. .B.D.D.V.D.R.W. .C.H.1.0.L.S.2.8...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.8.K.C.L.9.5.0.F.0.6. .1. . . . . . . . ........BO
Boot0003 UEFI: PXE IP4 Realtek PCIe GBE Family Controller PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x2)/Pci(0x1,0x0)/Pci(0x0,0x0)/MAC(309c231b4251,0)/IPv4(0.0.0.00.0.0.0,0,0)..BO
Boot0004 UEFI: PXE IP6 Realtek PCIe GBE Family Controller PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x2)/Pci(0x1,0x0)/Pci(0x0,0x0)/MAC(309c231b4251,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0007* UEFI: HL-DT-ST BDDVDRW CH10LS28, Partition 1 PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x1)/Sata(5,65535,0)/CDROM(1,0x4b,0xb40)/HD(1,MBR,0x0,0x0,0xb40)..BO

So i found out, Bill. I just didn't expect it and paniced when I couldnt boot into the machine that has all the virtualbox machines. BOS boots didn't work like that. If you disconnected all dtives the "boot from hard drive" and "boot from CDROM" entries are still there. I have to explicitly remove PXE boot and "boot from floppy".obiwanbill wrote:I noticed this exact same issue ... “when you disconnect the SATA drive and reconnect it, the EFI BOOT entry is gone”.
Solution? Recreate the EFI BOOT entry.