Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4502  / 3 Years ago, thu, may 20, 2021, 12:15:39

Previous system state when it was working:
UEFI



  • Disk C: SSD, Windows 10 installed as main OS.

  • Disk D: HDD, just data, one partition takes the whole disk.

  • Disk X: SSD, one partition (GPT).

  • Disk O: HDD, contains windows 7.


(Note: I don't remember the order of disks, so I'll be naming them by drive label assigned in Windows.)



  1. I decided to install Ubuntu on a separate partition on disk X. I shrank the partition using Windows disk manager and verified that the system worked afterwards. Then I created bootable USB with Ubuntu 20.04.1 and booted into it.

  2. In Ubuntu installer, I used the "Something else" option because I was unsure that "Install alongside with Windows" won't try to install on disk C. In there I created a new ext4 partition and mounted to /. Then I specified this same partition as boot loader partition and finished installation.

  3. After reboot, I couldn't boot Ubuntu. Windows was booting normally as usually, without showing any options, even if I chose to boot from disk X in UEFI. Then I realized that I made a mistake on step 2 by specifying the same partition where I installed Ubuntu as boot loader partition.

  4. I booted into Ubuntu USB installer and tried to install once again. This time I chose the same partition to install Ubuntu as on step 2 and chose to format the partition (after the installer showed a warning). I chose sda as the boot loader partition (it corresponds to disk C). Installation finished normally, upon boot I was presented with GRUB boot menu. Ubuntu was working normally. NB: the installer's partition table correctly displayed partitions for Windows 10 and Windows 7 on their corresponding disks.

  5. I messed up the Ubuntu instance and wanted to do a reinstall. I booted into the installer USB again, and then again chose the same partition, chose to format it, and again chose sda as boot loader partition. I basically repeated what I did on step 4. Except when I reached the next installer screen, I saw some warning (don't remember which) which had a Back button. I decided to go back and check that I selected the right settings on the partition step, so I pressed "Go Back". --- At this point, the installer displayed an error message, so I decided to reboot and try again.

  6. In the installer on the step which displays the partition table I now cannot see the Windows 7 and Windows 10 partitions detected. The number of partitions and their sizes seem to be correct, but the OS detection cannot find them anymore. Besides, there is no "Install alongside Windows" option offered now. If I try to finish the installation with the same settings as on step 4, I get a warning that I need to specify a EFI partition. Since I didn't know which one that should be (sda? but I was specifying sda already...) I decided to not go forward with the installation and cancelled it.


Now the system is in a state where it cannot boot into GRUB.


Here're a few observations about this current state:



  1. Upon boot, I see this:


error: no such device: <GUID>
error: unknown filesystem.
Entering rescue mode...


  1. ls in grub rescue shows this:
    (hd0) (hd1) (hd1,gpt3) (hd1,gpt2) (hd1,gpt1) (hd2) (hd3) (fd0). ls-ing each of them yields "Filesystem is unknown" except for (hd1,gpt3) which yields ext2. ls-ing this partition yields lost+found. (It used to show also /etc and /media but after a few further steps described below it doesn't now.)

  2. When in Ubuntu live CD, I can see all the partitions using parted.

  3. I've created Windows 10 recovery USB and loaded into it. It couldn't fix startup (using Repair your computer > Troubleshoot > Repair startup). The corresponding logs show that all tests are successful, but it looks like it doesn't even detect the OS and checks the OS on the recovery USB. I then tried Advanced options > Command prompt, and in diskpart I see the following:


Disk ###  Status         Size     Free     Dyn  Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 55 GB 451 MB
Disk 1 Online 465 GB 28 GB *
Disk 2 Online 372 GB 0 B
Disk 3 Online 1397 GB 0 B
Disk 5 No Media 0 B 0 B

I find it worrying that it doesn't display * in the Gpt column for Disk 0, which is Disk C in my terminology. Disk 1 is disk X (judging by size).


Note that select disk 0 then list partition shows the partitions:


Partition ###  Type          Size     Offset
------------- ------------ ------- -------
Partition 1 Primary 100 MB 1024 KB
Partition 2 Primary 54 GB 101 MB
Partition 3 Recovery 522 MB 54 GB

How do I proceed further? It seems like the data should be intact, so I don't want to reinstall Windows if possible. I don't care about the Ubuntu installation, I wanted to reinstall it anyway. I want to be able to restore Windows 10 (top priority) and Windows 7 (very desirable).


More From » boot

 Answers
4

I had a similar Issue and fixed it with boot-repair.


sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair

just try the recomended repairs in the gui and reboot


[#2760] Friday, May 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
weamp

Total Points: 197
Total Questions: 115
Total Answers: 92

Location: Mauritania
Member since Sun, May 7, 2023
1 Year ago
;