After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Feb 2018
    Location
    to be changed
    Posts
    11

    After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    I have Windows 10 and installed alongside this latest Ubuntu. As the third system I've tried Fedora 27 but didn't know its installation scheme is quite complicated with all these lvms additional boot partitions made and some grub changes, etc. All systems run fine during few months until some error occured in Fedoras loading like it couldn't load Breeze theme (KDE) and login were looped, no access to the system. Couldn't find any solution to repair this error.

    Fedora made some overwritings in /dev/sda1 which is my efi boot partition and I don't know what. After reinstall Fedora added additional boot partition and it was named /dev/sda1 fedora arranged partition and other /dev/sdax fedora boot so I thought I would like to have previous partition scheme and deleted all fedora partitions but also mistakingly checked sda1 to remove which didn't disappeared and the files were kept there but probably something went wrong or was changed, erased...have no idea. I've removed fedora named catalogue with efi files from there (/dev/sda1). The result is I cant boot into any system. Tried hard reinstall of Fedora and Ubuntu but none helped.

    My laptop (ASUS x750jb, 2014 year) boot only to bios which detect hard drive but not see it in boot options or boot override section. Hard drive is attached to serial ATA port 4 if this means anything. I've tried boot-repair and grub-customizer under Ubuntu but none changes were made to find any hdd boot option appers in bios or the grub menu appears to choose the system to load. Grub-customizer couldn't start normally asking to choose which /dev/sdax to use and as default was set to /cow (?). Grub-customizer saw only /dev/sda8 as partition with boot files (sda8 is the partition where Ubuntu is installed with main point "/") and could only run with this or with /cow partition. Really don't get all this grub2/efi thing. I've also installed Lilo and with this tool recovered or repaired mbr windows boot manager with sudo lilo -M /dev/sda mbr. None changes. http://paste.ubuntu.com/p/6YCrv9KrNz/ it's an output info log from boot-repair after the job.

    I can run only liveusb/livecd linuxes, haven't tried Windows 10 reinstall with boot repair option, maybe this would help? Or its internal trouble of the laptop firmware at this point and I should check it in professional service? I really usually can fix many errors but this seems new to me and probably is caused by fedora interfere with whole /dev/sda partitions. Now I don't have Fedora, only Windows and Ubuntu installed. I've probably used grub2 instead of efi booting system. Also tried in ASUS bios disable/enable fast boot/SCM/secure boot.

    Would really appreciate any solution or idea what can be done with this. Fedora KDE is cool but....oh well...

  2. #2
    Join Date
    Oct 2011
    Posts
    1,836

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    Hello.

    You should first figure out what method your motherboard firmware is configured to boot your machine. EFI or Legacy MBR.

    It seems your EFI partition is intact, e.g. Ubuntu and Windows entries are there, however Fedora entry seems to be missing which might mean you've installed Fedora while booted MBR. EFI boot method does not use MBR so your attempt to repair MBR had no effect if computer is configured to boot using EFI.

    With EFI, what you might need to do is to boot into Live media and add manually entries to EFI firmware if automatic addition failed for some reason. See how to use efibootmgr: https://wiki.gentoo.org/wiki/Efibootmgr#Usage

    You should figure out what method to use and use only one, mixing between the two might yield undesired effects. I think you should stick with EFI since Windows is probably using that method as well.

    You could also try troubleshot with rEFIt tool.

  3. #3
    Join Date
    Oct 2011
    Posts
    1,836

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    There was also an issue recently with an faulty driver which caused invalid state with EFI firmware on some laptops. This driver was enabled only on Ubuntu 17.10 if I understand correctly. https://www.reddit.com/r/linux/comme...d_lenovo_bios/

  4. #4
    Join Date
    Feb 2018
    Location
    to be changed
    Posts
    11

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    Thanks for response firstly ! :-)
    I've also discovered some forum threads in the net about Ubuntu 17.10 causing issues with efi and some fixing done in Ubuntu 17.10.1...maybe I'll look more into this but...my case is fedora after effects or side effects ;-)
    In the meantime I've tried efibootmgr and usually don't get the "man pages" way of explaining things, many times left me uncertain of what exactly to do, command but with what exactly options, etc...but this guide on gentoo seems rather straightforward.
    Also installed refit but same thing, can't get what to do with this after install...I've linked the efi file by efibootmgr but no reaction was after reboot or I just did something wrong.
    But all in all thanks for clarifying some ways what to check for solutions.
    Last edited by pawel; 28th February 2018 at 05:05 PM.

  5. #5
    Join Date
    Oct 2011
    Posts
    1,836

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    Don't install rEFIt, the idea was that you burn that to a CD or USB stick and try to boot that. After booting rEFIt, the menu should give you some options to find and boot entries from EFI partition located on disk. Basically what should motherboard firmware do in the first place.

  6. #6
    Join Date
    Feb 2018
    Location
    to be changed
    Posts
    11

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    Ok, I've booted rEFInd and got these options only (no any system to boot from any source path)
    sorry if photos are upside down, ubuntu's picture editor saving them like that, no idea why...
    Click image for larger version. 

Name:	20180301_162050.jpg 
Views:	12 
Size:	37.5 KB 
ID:	29434Click image for larger version. 

Name:	20180301_162017.jpg 
Views:	20 
Size:	53.6 KB 
ID:	29435Click image for larger version. 

Name:	20180301_161926.jpg 
Views:	18 
Size:	47.6 KB 
ID:	29436
    Second photo is the first icon in menu "start efi shell" and third photo is the second option from menu "partitioning tool" gedit soft. In EFI shell menu there're attached disks listed and in bios I can see only active USB disk to choose as filesystem if I would like to manually add an EFI boot menu item, no HDD to choose. I don't get how to use this EFI shell to pin again HDD to start to be again visible by bios, maybe then efibootmgr commands will be effective, maybe hdd is inactive now? Have no idea, it's completely fresh stuff to me.

    In the meantime I've received other suggestion from ask.fedoraproject.org forum:
    From your description, it sounds like you booted the Fedora installation into legacy BIOS mode when you wanted to reinstall the system. In this mode, the installer wouldn’t know to create a UEFI System Partition (ESP) as it can’t even detect UEFI when the system is in legacy BIOS mode.

    You can create an ESP yourself using gparted from a LiveCD. Create a new FAT32-formatted partition, and set the ESP and BOOT flags on the partition. You can then simply copy over your ESP data from your system backup. You do have a full system backup, right? If you don’t have that than I recommend the following:

    Boot the Fedora installer in UEFI mode, and reinstall Fedora. Take care to create an appropriately sized ESP.
    Boot from a Windows 10 installation disk also in UEFI mode (you can download ISO’s from Microsoft.com these days)
    Open the Command Prompt (shift+F10).
    Identify and mount (assign it any drive letter) the UEFI partition created by Fedora using. You can work it out following step 1–7 here and then assigning the existing partition a drive letter instead of creating a new partition)
    Run "bootrec C:\Windows" where C is the drive letter of your Windows installation (identify it using the same method as you used to find the UEFI partition)
    Reboot.

    That should get you a working UEFI system and restore Windows and Fedora’s UEFI blobs.

  7. #7
    Join Date
    Oct 2011
    Posts
    1,836

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    rEFInd should have found the entries from EFI partition and present them as menu icons. Does `efibootmgr -v` finds any entries in firmware in regards to installed OS?

    You can fix Fedora install even if it was installed in Legacy mode. It is a matter of mounting ESP partition and installing a couple of packages. And adding a firmware entry using `efibootmgr`. But first you should get EFI boot mode enabled so that motherboard firmware does read from ESP partition.

    https://fedoraproject.org/wiki/GRUB_...n_UEFI_systems

  8. #8
    Join Date
    Feb 2018
    Location
    to be changed
    Posts
    11

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    Nope, no installed OS found by rEFInd...below it's only DVD, USB pendrive as Hard Drive and USB pendrive in UEFI mode found
    ubuntu@ubuntu:~$ efibootmgr -v
    BootCurrent: 0006
    Timeout: 1 seconds
    BootOrder: 0006,0005,0003
    Boot0003* CD/DVD Drive BBS(CDROM,,0x0)..GO..NO........o.H.L.-.D.T.-.S.T. .D.V.D.R.A.M. .G.U.7.1.N....................A................... ........>..Gd-.;.A..MQ..L.Z.K.D.B.J.7.2.F.1.7. .3. . . . . . . . ........BO
    Boot0005* Hard Drive BBS(HD,,0x0)..GO..NO........i.M.D.O. .U.S.B. .2...0. .5...0.0....................A..................... ........6..Gd-.;.A..MQ..L.M.D.O. .U.S.B. .2...0. .5...0.0........BO
    Boot0006* UEFI: MDO USB 2.0 5.00 PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(1,0)/HD(1,GPT,1ba7e9d7-5953-4ef3-8b09-f83c1fec0ffe,0x800,0x3d37df)..BO
    ubuntu@ubuntu:~$
    Currently only Windows with sda2 recovery partition and partition with normal windows installation exists + ntfs additional partitions and Ubuntu sda8 partition, on sda1 there're EFI files with few catalogues, on sda2 windows recovery are EFI files from Windows and Ubuntu. But I can't access to any of them from booting or by efibootmgr...some added entries occur but after reboot none of them persist.
    My question is: can I just erase sda1 partition entirely (or it's a must to backup all stuff from there?) and then boot Windows 10 installation loader to load efi files there and then boot Ubuntu to do the same? When it was Windows and Ubuntu, Ubuntu installed GRUB2 in /sda and all was just updated via grub commands, grub-customizer.
    Last edited by pawel; 2nd March 2018 at 08:51 AM.

  9. #9
    Join Date
    Oct 2011
    Posts
    1,836

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    But I can't access to any of them from booting or by efibootmgr...some added entries occur but after reboot none of them persist.
    Can you access the boot menu from motherboard firmware and choose between entries listed with efibootmgr?

    What exactly you mean by "some added entries occur but after reboot none of them persist", how are you adding them?

  10. #10
    Join Date
    Oct 2011
    Posts
    1,836

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    Also if you are using the Ubuntu 17.10 Live media which happened to have these issues, please use something else. Ubuntu 17.10.1 should be fine.

  11. #11
    Join Date
    Feb 2018
    Location
    to be changed
    Posts
    11

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    I'm using now liveusb Ubuntu 17.10.1 and this version is already installed in sda8, below are photos from bios:
    Click image for larger version. 

Name:	20180302_100644.jpg 
Views:	15 
Size:	30.7 KB 
ID:	29437 - boot with esc button pushed
    Click image for larger version. 

Name:	20180302_100739.jpg 
Views:	8 
Size:	28.6 KB 
ID:	29438 - all drives attached to laptop properly detected
    Click image for larger version. 

Name:	20180302_100801.jpg 
Views:	9 
Size:	30.5 KB 
ID:	29439 - boot options I may choose from..."Hard Drive BBS Priorities" shows only USB drive
    Click image for larger version. 

Name:	20180302_100817.jpg 
Views:	14 
Size:	31.6 KB 
ID:	29440 - after choosing option "Add New Boot Option" from above menu and "Select filesystem" only USB occurs so it's not impossible to add here via bios an Efi from sda1 as it won't work, won't be linked, just menu new option but without booting effect.
    Click image for larger version. 

Name:	20180302_100833.jpg 
Views:	11 
Size:	33.1 KB 
ID:	29441 - boot override option, chosing "Launch EFI Shell...." results with "no found" popup as probably no Hdd filesystem other than USB or DVD is seen

    When I use liveusb ubuntu in terminal efibootmgr command with some options installing like following this https://www.linuxbabe.com/command-li...otmgr-examples, etc some new entries occur with 'efibootmgr -v' but none of them resist after reboot.
    I've found this link https://gnu-linux.org/how-to-permane...uefi-menu.html but there's already some OS listed as HDD filesystem is found...in my case I need to reenable internal laptop's HDD visible as filesystem (not USB as HDD)

  12. #12
    Join Date
    Oct 2011
    Posts
    1,836

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    When I use liveusb ubuntu in terminal efibootmgr command with some options installing like following this https://www.linuxbabe.com/command-li...otmgr-examples, etc some new entries occur with 'efibootmgr -v' but none of them resist after reboot.
    This might mean the firmware memory has gone into read only mode which is a symptom of the issue happened with Ubuntu 17.10. Not sure how the motherboard firmware state was fixed in this case, but If you were using Ubuntu 17.10 to write new entries, you can try now with Ubuntu 17.10.1 and see if the new entries persist a reboot.

  13. #13
    Join Date
    Feb 2018
    Location
    to be changed
    Posts
    11

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    Yeah, I just made it under ubuntu 17.10.1 with:
    efibootmgr -c -d /dev/sda -p 1 -L "ubuntu" -l \EFI\ubuntu\grubx64.efi
    efibootmgr -c -d /dev/sda -p 1 -L "ubuntu" -l \EFI\ubuntu\shimx64.efi
    where
    /dev/sda -p 1
    means
    /dev/sda /dev/sda1
    as I couldn't figure out which file is needed...after this efibootmgr -v gave me usb, usb uefi, dvd, ubuntu x2 but after reboot none of new entries were visible via bios or grub from hdd and in liveusb ubuntu efibootmgr -v gives this:
    ubuntu@ubuntu:~$ efibootmgr -v
    BootCurrent: 0006
    Timeout: 1 seconds
    BootOrder: 0006,0007,0008
    Boot0006* UEFI: MDO USB 2.0 5.00 PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(1,0)/HD(1,GPT,1ba7e9d7-5953-4ef3-8b09-f83c1fec0ffe,0x800,0x3d37df)..BO
    Boot0007* Hard Drive BBS(HD,,0x0)..GO..NO........i.M.D.O. .U.S.B. .2...0. .5...0.0....................A..................... ........6..Gd-.;.A..MQ..L.M.D.O. .U.S.B. .2...0. .5...0.0........BO
    Boot0008* CD/DVD Drive BBS(CDROM,,0x0)..GO..NO........o.H.L.-.D.T.-.S.T. .D.V.D.R.A.M. .G.U.7.1.N....................A................... ........>..Gd-.;.A..MQ..L.Z.K.D.B.J.7.2.F.1.7. .3. . . . . . . . ........BO
    ubuntu@ubuntu:~$
    no changes, just boot entries numbering has changed, It;s bayond me how to enable HDD again....now making Windows 10 bootable installation, will check out how this will result
    Last edited by pawel; 2nd March 2018 at 12:15 PM.

  14. #14
    Join Date
    Feb 2018
    Location
    to be changed
    Posts
    11

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    Can you access the boot menu from motherboard firmware and choose between entries listed with efibootmgr?
    I don't get exactly what do You mean by this....if it's bios I can't, I may set again via livemode ubuntu and efibootmgr command to add entries using sda1 efi files (windows 10 and ubuntu) but this doeasn't take any effects after reboot. I'm not sure how I would access motherboard firmware? Using which program or command?

  15. #15
    Join Date
    Oct 2011
    Posts
    1,836

    Re: After Fedora reinstall damaged /dev/sda1 /boot or mbr or efi

    First picture from post #11 seems like a boot menu from motherboard firmware aka BIOS.

    From https://bugs.launchpad.net/ubuntu/+s...x/+bug/1734147

    The patch note implies that the fix is not upstreamed which might mean you might need to boot a specific kernel compiled with such patch: http://people.canonical.com/~ypwong/...-debug-m.patch

Page 1 of 2 1 2 LastLast

Similar Threads

  1. crash sda1 on boot
    By nohup in forum Using Fedora
    Replies: 1
    Last Post: 23rd September 2016, 04:21 PM
  2. Dual DOS / XP boot damaged by Fedora 14 installation
    By Engineeringtech in forum Installation, Upgrades and Live Media
    Replies: 23
    Last Post: 9th March 2011, 06:17 AM
  3. reinstall fedora 12 in dual boot
    By kkshethin in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 21st May 2010, 10:17 AM
  4. How Reinstall XP Without Losing grub/fedora boot?
    By riffin-rich in forum Using Fedora
    Replies: 7
    Last Post: 19th July 2007, 02:00 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •