Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was running a dual boot system with Linux Mint Cinammon 18.3 and Windows 10 on an Acer ES1-132 laptop for a couple of years now. I use Linux 99% of the time and switch to Windows only when I need to use certain software such as CorelDraw which is not available on Linux. Acer is not Linux-friendly and it initially took me quite a while to get around a Windows Boot Manager issue that was preventing me from being able to boot into Linux. Eventually I found a workaround code which was: sudo efibootmgr -c -L "Windows Boot Manager" -l "EFI\ubuntu\grubx64.efi"
I recently was having some problems with the laptop (camera stopped working, touchpad stopped working + a few other minor issues) and after looking online it seemed that a bios update might fix some of these issues. I went to the Acer website to update the bios and found that updates were only available for Windows O/S, and nothing for Linux (of course...). At this point my brain apparently switched to zombie mode and I rebooted into Windows and performed the bios update while booted in Windows. Whilst it did fix the problems with the touchpad and camera, it also reverted back to automatically booting into Windows.
If I use a flash drive to boot into a live version of Linux I can find all of my files (huge relief!!) and I have installed LM again choosing the option of running LM alongside existing operating systems (as opposed to deleting all info on the drives). As yet I have not removed the flash drive and rebooted using the code: sudo efibootmgr -c -L "Windows Boot Manager" -l "EFI\ubuntu\grubx64.efi" because I am unsure if this will result in me losing any data. If left to my own devices my next step would be to buy an external HD, copy all my files and then run the code again, however, I'm fairly certain if I do this I will be starting from scratch with effectively a new install of LM.
Does anyone know if there is a way I can reinstall LM (or revert back to my previous setup) so that I do not have to start again from scratch (i.e. re-install all software etc), or did that bios update doom me?
Distribution: Ubuntu based stuff for the most part
Posts: 1,173
Rep:
I am a bit confused by your question in the last paragraph. You just wrote in the paragraph above that one you did reinstall Mint. So if you lost your files it was when you reinstalled the OS before backing up the files you said you found on it.
Running the command to get grub working again will not delete your files, reinstalling the OS can do that if /home get formatted.
If I use a flash drive to boot into a live version of Linux I can find all of my files
With this a reinstall shouldn't have been necessary, unless the efi partition was reformatted, all you would have needed to do is rerun the efibootmgr command again. Here is a list of the efibootmgr switches: https://linux.die.net/man/8/efibootmgr The command just registers the grubx64.efi bootloader as a "windows boot manager" If the efi partition was reformatted then grub-install command will need to be reran.
Quote:
I have installed LM again choosing the option of running LM alongside existing operating systems
With this either you have two LM installations on the system, and your most likely booting the newer installation, or you overwrote your data when you did LM re-install.
Last edited by colorpurple21859; 11-30-2020 at 12:35 PM.
Many thanks for the replies. I ended up buying a new external HDD to back up my files before running the efibootmgr command, but it seemed running a live version of LM from the USB stick created a few problems with permissions, so I bit the bullet and ran the command anyway without first making a backup. Thankfully all went well, and as colorpurple21859 predicted I now have 2 versions of Linux on my machine. Now when I boot up I get the following options:
Linux Mint 18.3 Cinnamon 64-bit (this is the new install)
Advanced options for Linux Mint 18.3 Cinnamon 64-bit
Windows Boot Manager (on /dev/sda1)
Linux Mint 18.3 Sylvia (18.3) (on /dev/sda2) (this is my old system setup)
Advanced options for Linux Mint 18.3 Sylvia (18.3) (on /dev/sda2)
System Setup
I get around 10-15 seconds to make a decision as to which option I want to choose and if I fail to specify an option by default I am booted into the 1st option, the new installation.
Can anyone advise how I can safely remove this new installation, or if that is tricky, then is there a way to change the order so that the 1st option in the list is my old system setup?
Can anyone advise how I can safely remove this new installation
At the grub menu press c for a grub prompt
Code:
grub>set
There will be a line that looks like this:
Code:
prefix=(hd0,?)/boot/grub
Where the hd0 will be the first drive counting from 0 and the ? will be the partition number counting from one. It probably points to the partition that the new installation is on and controlling the grub bootloader.
This should give control of the grub bootloader back to the installation you want to keep.
Boot into the installation you want to keep
Sudo efibootmgr will simply show the boot order. To remove any is sudo efibootmgr -Bb xy.
Every linux user ought to monitor that list. Some bios's creep adding entries. At some point the bios bricks.
Now what is also mentioned above is grub (or maybe other loaders) that take over from bios. That could be affected by boot order in some cases.
I think I'd also look at drive(s) in case any remnants exist to fool grub update.
Where the hd0 will be the first drive counting from 0 and the ? will be the partition number counting from one. It probably points to the partition that the new installation is on and controlling the grub bootloader.
This should give control of the grub bootloader back to the installation you want to keep.
Boot into the installation you want to keep
reboot
The default entry should now be the old installation.
use the set command at the grub prompt to verify.
Thanks for your help.
I'm pretty sure I followed the instructions correctly. After I typed "set" when "grub> " appeared it showed: hd0, gpt5 (as I recall - didn't screenshot it but pretty sure that's what it showed)
So now when I boot up it shows:
Linux Mint 18.3 Cinnamon 64-bit (this is my old system setup)
Advanced options for Linux Mint 18.3 Cinnamon 64-bit
Windows UEFI bootmgfw.efi
EFI/refind/refind_x64.efi
EFI/ubuntu/fbx64.efi
EFI/ubuntu/fwupx64.efi
EFI/ubuntu/mmx64.efi
EFI/Linux/ubuntu/fbx64.efi
EFI/Linux/ubuntu/fwupx64.efi
EFI/Linux/ubuntu/mmx64.efi
Windows Boot Manager (on /dev/sda1)
Linux Mint 18.3 Sylvia (18.3) (on /dev/sda5)
Advanced options for Linux Mint 18.3 Sylvia (18.3) (on /dev/sda5)
System setup
So my old system setup is now at the top of the list and is the default boot mode, which is great, so thank you for that. Would you recommend I do anything to tidy up/trim down that list, or just leave it as-is?
Quote:
Originally Posted by colorpurple21859
What are you going to do with the partition the new installation is on after removing?
Sudo efibootmgr will simply show the boot order. To remove any is sudo efibootmgr -Bb xy.
Every linux user ought to monitor that list. Some bios's creep adding entries. At some point the bios bricks.
Now what is also mentioned above is grub (or maybe other loaders) that take over from bios. That could be affected by boot order in some cases.
I think I'd also look at drive(s) in case any remnants exist to fool grub update.
Thanks very much for your input. Sorry but I'm not experienced enough with Linux to know what you're suggesting I should do. Can you educate me, or am I on the right path with colorpurple21859's suggestions?
Based on the grub menu info you posted, the old installation is on /dev/sda2 and the new installation is on /dev/sda5. With the diag partition between sda5 and the windows partition you won't be able to add it back to the windows partition. With its location, the most you could use it for is an extra data partition that you could share with windows if it is formatted ntfs or to multiboot an additional distro.
Quote:
Would you recommend I do anything to tidy up/trim down that list, or just leave it as-is?
leave as-is
Last edited by colorpurple21859; 12-08-2020 at 05:38 AM.
I reckon you've done enough damage already. You neglected to mention you had installed rEFInd - in addition to the two copies of grub. And the multiple Windows entries you created. EFI is pretty robust - much more so than BIOS, but you can still screw it if you try. So leave it alone for a while.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.