• Grub loader reinstall help


    omg where to begin.
    Somehow while messing with virtualbox, I’ve lost my boot info.
    Through various readings I’ve mangaged to actually install grub, but that’s it. I think it’s grub2 but it’s just a shell and no clue how to use it.

    The grub boot menu that comes with antergos is gone. although I was using grub customizer so while trying to fix, I saw the starfield background go through the list so I knew I had stuff mounted right but end result not correct.

    These are my drives

    $ sudo fdisk -l
    
    Device         Start       End   Sectors   Size Type
    /dev/sda1       2048    526335    524288   256M EFI System
    /dev/sda2       526336  61966335  61440000  29.3G Linux filesystem
    /dev/sda3       61966336 964538367 902572032 430.4G Linux home
    /dev/sda4       964538368 976773134  12234767   5.9G Linux swap
    

    I used a combo of these two posts
    https://forum.antergos.com/topic/1641/how-to-restore-grub2/5
    https://forum.antergos.com/topic/1380/solved-missing-grub-command-reinstall-grub/4#

    The steps I took

    $ su pacman -S arch-install-scripts --noconfirm
    $ mount /dev/sda2 /mnt    #this was for root listed above
    $ mount /dev/sda1 /mnt/boot     #this was for boot listed above
    $ arch-chroot /mnt
    $ pacman -S grub efibootmgr
    $ grub-install --target=x86\_64-efi --efi-directory=/boot --bootloader-id=grub\_uefi --recheck
    $ grub-mkconfig -o /boot/grub/grub.cfg
    

    The is what gave me the grub shell at boot, but since I don’t know what I actually need to get the boot to Linux-lts or rather the stock grub boot menu that comes with antergos.

    Clearly I’m sick in the head and I was just trying to fix it myself taking some initiative before asking haha

    But before I somehow produce smoke and flames in my box, I guess I need some instructions on correct procedure.

  • Out of curiosity, if my linux-lts kernal is messed up as well, is it possible to install it as well all in the same procedure?

    I ask bc of the issues in the other post with moduals not loading and started to wonder if all this is related.
    other post here - https://forum.antergos.com/topic/10291/virtualbox-installation/2

  • I’m pretty sure that the grub-install command should follow grub-mkconfig command.

  • @firespray
    The steps you took seem to be almost correct, but there are some issues.

    $ su pacman -S arch-install-scripts --noconfirm
    $ mount /dev/sda2 /mnt    #this was for root listed above
    $ mount /dev/sda1 /mnt/boot     #this was for boot listed above
    $ arch-chroot /mnt
    $ pacman -S grub efibootmgr
    $ grub-install --target=x86\_64-efi --efi-directory=/boot --bootloader-id=grub\_uefi --recheck
    $ grub-mkconfig -o /boot/grub/grub.cfg
    

    It is up to you to have correct devices for mount points, but here’s some tips:

    • line “grub-install”: you shouldn’t need backslashes (\)
    • EFI partition should be mounted under /boot/efi, so sda1 should be mounted to /mnt/boot/efi
    • similarly, this option should be: --efi-directory=/boot/efi
    • maybe you’ll want to change option --bootloader-id=antergos_grub, but that’s not strictly required

    See also: https://wiki.archlinux.org/index.php/GRUB#Installation

    This may also help (as a last resort!) if you cant get grub to work properly: https://forum.antergos.com/topic/9188/create-boot-grub-custom-cfg-grub-assistant

  • @firespray
    (Re)installing linux-lts kernel is simple:

    sudo pacman -Syu  # updates your system first, if needed (optional)
    sudo pacman -S linux-lts
    

    You may also want to install headers for it:

    sudo pacman -S linux-lts-headers
    
  • @Firespray
    But if you are using the ISO installer, you should not update it, the space is too small for it.

  • @firespray said in Grub loader reinstall help:

    The grub boot menu that comes with antergos is gone.

    There was an issue with Antergos boot screen not appearing in new installed system, i couldn’t find the post though, maybe was deleted. I’m not sure if that’s what you mean.

    If you don’t need VM using EFI you can install in legacy BIOS which may solve the issues or give less problems in the future.

  • @manuel

    THANKYOU!
    I fixed it I one swift live usb session without having to reinstall kernal

    steps, with the edits

    $ sudo pacman -S arch-install-scripts --noconfirm
    $ mount /dev/sda1 /mnt/boot/efi        #this was for boot listed above
    $ mount /dev/sda2 /mnt                        #this was for root listed above
    $ arch-chroot /mnt
    $ sudo pacman -S grub efibootmgr
    $ grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=antergos_grub_uefi --recheck
    

    That reinstalled and set me back up using linux-lts default and the grub boot menu.

    Is antergos_grub_uefi correct?

    I’m pretty sure I just changed grub to antergos_grub and left the rest but I did it so fast I can’t remember and I like to be accurate.

    As soon as I rebooted that, and it it worked, I uninstalled virtualbox and rebooted again.
    kernal modual not loading error is gone and everything running back up to speed.

    Thankyou all
    Now back to the VB post

  • @firespray said in Grub loader reinstall help:

    Is antergos_grub_uefi correct?

    Let’s say it in not incorrect. :)
    It is an id sting that you select, and the system will just use it.

grub112 reinstall7 loader1 Posts 9Views 471
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.