LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-30-2020, 10:49 AM   #1
Jonny_Mango
LQ Newbie
 
Registered: Oct 2017
Posts: 24

Rep: Reputation: Disabled
Help! I messed up with a bios update...


Hi All,

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?

Many thanks in advance.
 
Old 11-30-2020, 11:16 AM   #2
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
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.
 
Old 11-30-2020, 12:32 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,353

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
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.
 
Old 12-03-2020, 02:34 AM   #4
Jonny_Mango
LQ Newbie
 
Registered: Oct 2017
Posts: 24

Original Poster
Rep: Reputation: Disabled
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?

Once again, many thanks in advance.
 
Old 12-03-2020, 06:48 AM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,353

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
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
Quote:
sudo grub-install
sudo efibootmgr -c -L "Windows Boot Manager" -l "EFI\ubuntu\grubx64.efi"
reboot
The default entry should now be the old installation.
use the set command at the grub prompt to verify.

What are you going to do with the partition the new installation is on after removing?
 
Old 12-03-2020, 03:11 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Thoughts.

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.
 
Old 12-04-2020, 02:13 AM   #7
Jonny_Mango
LQ Newbie
 
Registered: Oct 2017
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
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

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 View Post
What are you going to do with the partition the new installation is on after removing?
I don't know... What would you suggest?
 
Old 12-04-2020, 02:18 AM   #8
Jonny_Mango
LQ Newbie
 
Registered: Oct 2017
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Thoughts.

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?

Cheers.
 
Old 12-04-2020, 06:47 AM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,353

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Post the output of
Code:
sudo parted -l
efibootmgr

Last edited by colorpurple21859; 12-04-2020 at 10:21 AM.
 
Old 12-04-2020, 09:44 AM   #10
Jonny_Mango
LQ Newbie
 
Registered: Oct 2017
Posts: 24

Original Poster
Rep: Reputation: Disabled
james@james-Aspire-ES1-132 ~ $ sudo parted - l
[sudo] password for james:
Error: Could not stat device - - No such file or directory.
Retry/Cancel?
 
Old 12-04-2020, 10:24 AM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,353

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Had a typo that was suppose to be -l without a space between the - and the lowercase L, corrected the previous post
 
Old 12-05-2020, 10:13 AM   #12
Jonny_Mango
LQ Newbie
 
Registered: Oct 2017
Posts: 24

Original Poster
Rep: Reputation: Disabled
OK - here's the results:

james@james-Aspire-ES1-132 ~ $ sudo parted -l
[sudo] password for james:
Model: ATA WDC WD5000LPCX-2 (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 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 171GB 171GB ext4
3 171GB 280GB 108GB ntfs msftdata
4 280GB 280GB 839MB ntfs hidden, diag
5 280GB 496GB 216GB ext4
6 496GB 500GB 4114MB linux-swap(v1)

james@james-Aspire-ES1-132 ~ $ efibootmgr
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0005,0002,2001,2002,2003
Boot0000* Unknown Device:
Boot0001* ubuntu
Boot0002* Windows Boot Manager
Boot0003* Windows Boot manager
Boot0004* Windows Boot Manager
Boot0005* Windows Boot Manager
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
 
Old 12-08-2020, 02:34 AM   #13
Jonny_Mango
LQ Newbie
 
Registered: Oct 2017
Posts: 24

Original Poster
Rep: Reputation: Disabled
Anyone...?
 
Old 12-08-2020, 05:31 AM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,353

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
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.
 
1 members found this post helpful.
Old 12-08-2020, 05:46 AM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by colorpurple21859 View Post
leave as-is
Absolutely.

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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 26 messed me up with failed update (no surprise). Any help? bobkatz Fedora 9 06-15-2017 08:31 AM
messed up Ubunto, messed it up good... ButterflyMelissa Linux - Newbie 6 02-13-2015 08:28 AM
[SOLVED] GRUB is messed & boot problems with BIOS. p3ini Linux - Newbie 8 07-21-2011 08:31 AM
I cannot figure out why the ubuntu update has messed up. Help? horrormax276 Ubuntu 9 12-15-2010 06:10 AM
[SOLVED] messed up bios - Slackware doesn't load sycamorex Linux - Hardware 25 06-06-2010 09:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration