You are not logged in.

#1 2018-12-26 08:43:41

jeton
Member
Registered: 2016-05-04
Posts: 29

Reboot and Select proper Boot device !?

I just installed a fresh Arch, rebooted successfully into the new Arch several times and installed a desktop environment and a bunch of programs. Everithyng was good.

Than I removed the hard disk to get some data from the old one. When I mounted back the new one with the new Arch install, it wasn't recognised.

The hard disk doesn't appear on boot menu, nor BIOS. But when I boot on the live Arch usb, the disk is recognized. I can mount it and chroot on it. The disk is fine and all the files are there.

What should I do?

EDIT:

I reinstalled grub with the

--removable

option added and I ran mkconfig, than I could boot again. But as soon as I moved the disk again the same problem appeared.

How can I find a permanent solution to this problem?

Last edited by jeton (2018-12-26 11:15:01)

Offline

#2 2018-12-26 14:53:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,621
Website

Re: Reboot and Select proper Boot device !?

Use UUIDs in your boot loader config and fstab rather than kernel block device names.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-12-26 18:41:12

jeton
Member
Registered: 2016-05-04
Posts: 29

Re: Reboot and Select proper Boot device !?

Trilby wrote:

Use UUIDs in your boot loader config and fstab rather than kernel block device names.

I generated fstab with this command:

genfstab -U /mnt >> /mnt/etc/fstab

and I installed grub with these commands:

grub-install --target=x86_64-efi --efi-directory=/boot--bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

Can you provide an example of what I need to change to use UUID?

P.s. Thank you for your help and patience.

Offline

#4 2018-12-26 18:44:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,621
Website

Re: Reboot and Select proper Boot device !?

I don't use grub, so I don't know what that will automatically do.  What is actually in your grub config(s)?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2018-12-27 19:56:49

jeton
Member
Registered: 2016-05-04
Posts: 29

Re: Reboot and Select proper Boot device !?

Trilby wrote:

I don't use grub, so I don't know what that will automatically do.  What is actually in your grub config(s)?


What do you use?

I tried with systemd-boot and Arch was booting fine. As soon I removed the hard disk and place it back ... again the same problem.

/boot/loader/entries/arch.conf looks like this

title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID={my-part-uuid} quiet splash

Offline

#6 2018-12-27 20:05:12

loqs
Member
Registered: 2014-03-06
Posts: 17,605

Re: Reboot and Select proper Boot device !?

Appears the firmware is dropping the EFI boot entry from NVRAM when the device is removed unless it is marked as removable.

Offline

#7 2018-12-27 20:07:47

jeton
Member
Registered: 2016-05-04
Posts: 29

Re: Reboot and Select proper Boot device !?

loqs wrote:

Appears the firmware is dropping the EFI boot entry from NVRAM when the device is removed unless it is marked as removable.


How to mark it as removable?

Offline

#8 2018-12-27 20:15:23

loqs
Member
Registered: 2014-03-06
Posts: 17,605

Re: Reboot and Select proper Boot device !?

http://git.savannah.gnu.org/cgit/grub.g … 0b75#n1071 what grub-install is relying upon is
installation.html#alternative-naming specifically using EFI/BOOT/BOOTX64.EFI as the bootmgrs location.

Last edited by loqs (2018-12-27 20:26:53)

Offline

#9 2018-12-27 20:36:56

jeton
Member
Registered: 2016-05-04
Posts: 29

Re: Reboot and Select proper Boot device !?

loqs wrote:

http://git.savannah.gnu.org/cgit/grub.g … 0b75#n1071 what grub-install is relying upon is
installation.html#alternative-naming specifically using EFI/BOOT/BOOTX64.EFI as the bootmgrs location.

I'm not using grub anymore, I switched to systemd-boot.

Is it saying that I should rename

EFI/BOOT/bootx64.efi

to

EFI/BOOT/bootarch.efi

Last edited by jeton (2018-12-27 20:41:17)

Offline

#10 2018-12-27 20:42:43

loqs
Member
Registered: 2014-03-06
Posts: 17,605

Re: Reboot and Select proper Boot device !?

No EFI/BOOT/bootx64.efi should be loaded even if it does not have an entry in efivars.  Did you copy systemd-bootx64.efi to bootx64.efi?

Offline

#11 2018-12-27 21:11:19

jeton
Member
Registered: 2016-05-04
Posts: 29

Re: Reboot and Select proper Boot device !?

loqs wrote:

No EFI/BOOT/bootx64.efi should be loaded even if it does not have an entry in efivars.  Did you copy systemd-bootx64.efi to bootx64.efi?

I tried now, it didn't help.

Should I run:

mkinitcpio -p linux

every time I make changes to these boot files?

Could updating bios help?
I'm using ASUS X550CA.

Offline

#12 2018-12-27 21:23:04

jeton
Member
Registered: 2016-05-04
Posts: 29

Re: Reboot and Select proper Boot device !?

I just ran:

bootctl install

and restarted the pc and it booted again. But I guess removing the hard disk could break the boot loader again. I don't understand what is causing this.

Offline

#13 2018-12-27 21:28:47

loqs
Member
Registered: 2014-03-06
Posts: 17,605

Re: Reboot and Select proper Boot device !?

Check the output of `efibootmgr` now with the working system and again when it is not.
I am working on the basis the entry for whichever bootloader your system is using is removed after the firmware detects the device has been removed.
Installing the bootmanager to  EFI/BOOT/bootx64.efi should allow it to be detected even without an entry.

Last edited by loqs (2018-12-27 21:28:59)

Offline

#14 2018-12-28 07:15:10

jeton
Member
Registered: 2016-05-04
Posts: 29

Re: Reboot and Select proper Boot device !?

I installed and ran efibootmgr when arch was working:

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001
Boot0000* Linux Boot Manager
Boot0001* CD/DVD Drive

and than removed and mounted back the hard drive and ran efibootmgr again:
(note: just by removing and mounting back arch was booting, but when I mounted other hard disk with ubuntu in-between, the arch boot loader broke)

BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0005,0003
Boot0003* CD/DVD Drive
Boot0004* UEFI: Patriot Memory PMAP
Boot0005* Hard Drive

The good thing is that now I now how to easily fix it, by chrooting with live usb and running bootctl install.

Offline

Board footer

Powered by FluxBB