4

It's an interesting problem I never saw before. The hard disk of this laptop has a harware problem (on a specific sector it got some problems).

That's why if I let Ubuntu installation to create the partitions, using the whole space, that fails.

However, if I create the partitions, without using the entire space, that passes (the partitions are created and it goes forward to installation).

I created the following partitions, on the 500GB hard drive:

  • 100GB ext4, mount: /
  • 2GB swap
  • 1GB EFI

If I don't create the EFI partition, Grub fails to be installed. So, I saw that Ubuntu was going to create the EFI partition, by default, and I created it manually when selecting the Something else option.

The installation went well. It even displayed the alert saying that everything was successful.


But, when restarting the laptop, it doesn't boot from the HDD. I don't see the HDD option in the BIOS.

I tried to add it, but it asks me about the path for boot––which I have no idea what it is.

How to solve this? How can I get Ubuntu running on this laptop?

It doesn't have Secure Boot or anything similar in BIOS.

I have a live usb drive which I can use to access the hard drive, which works nicely.

  • Are you sure it is not the HDD's problem? Because it seems like it to me :-) –  Jul 04 '17 at 08:09
  • @RonnieDroid I can mount the HDD and access it. Do you think it would work in that case? – Ionică Bizău Jul 04 '17 at 08:11
  • @RonnieDroid Before, this laptop ran Windows 10. And it got some problems, which seem to be like hardware problems to me. I saved the documents successfully, by mounting it in readonly mode. I wasn't able to mount it in write mode, using a live USB stick. – Ionică Bizău Jul 04 '17 at 08:12
  • It may, it may not, you better know where the damage is and leave that space empty. Or you better get a new HDD because I have fought with such HDD and it is a pain in the neck –  Jul 04 '17 at 08:16
  • well for my HDD, even after cutting the damaged sectors, the problem still exists, your system was slow when with Windows 10 right? –  Jul 04 '17 at 08:18
  • @RonnieDroid Extremely slow when copying the files. It copied all of them, except just a few. The owner of the laptop told me the laptop wasn't too fast or too slow, it was just working. But I assume that was before problems to appear. It may, it may not, you better know where the damage is and leave that space empty. –– I think that's what I did. I don't know exactly where the bad sector is, but there is about 50% chance that I it's in the free area. – Ionică Bizău Jul 04 '17 at 08:23
  • Just for reference, after fixing the installation using boot repair, it got relatively fast. Quite fast for an HDD. I was surprised. The entire night it copied the documents and files to my HDD (about 8 hours) and it copied them back in less than 8 minutes. – Ionică Bizău Jul 04 '17 at 16:09
  • why EFI, is EFI enforced in BIOS? if its not booted from EFI based installer, you should be able to install directly on MBR – v_sukt Jul 13 '17 at 07:45
  • You should consider the warning given by Rod Smith... Granted RonnieDroid's answer is a temporary fix, the long standing consequences of not heeding would be bad... – ben-Nabiy Derush Jul 14 '17 at 03:06

3 Answers3

6

Your problem is mostly related to the bootloader rather than the HDD itself

To fix that, boot into your Ubuntu Live-usb and from there do this

open the terminal by pressing ctrl+alt+T

then copy past this commands to it one after another,

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

and by this you will install a tool called boot-repair.

open boot repair from Dash and you'll get this window

enter image description here

choose the recommended repair and follow the steps.

Note you have to be connected to the Internet when using boot-repair.

Note it can take some time, be patient

4

Although RonnieDroid's answer is likely to solve your immediate problem, using a modern disk that reports bad sectors is asking for trouble. Modern hard disks reserve a few sectors so that bad sectors can be mapped out and replaced with the good ones. This should happen transparently, so if you're actually seeing bad sectors, that means that the number of bad sectors on the disk has exceeded the number the manufacturer set aside. When this happens, it usually means that the disk is in the process of failing catastrophically. It's likely that the number of bad sectors will begin to increase -- possibly quite suddenly and rapidly. The result is likely to be a nightmare to recover even some of your data at best, and at worst, a total loss of all data on the disk. There's no way of knowing how long it will be before this begins to happen.

In sum, I STRONGLY recommend that you replace that disk IMMEDIATELY. If a delay is unavoidable, be sure to back up any important data on the disk, since it could easily fail completely at any time.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • Yes, boot repair did fix the problem. Using 100GB of 500GB with the hope it won't break on these sectors, lol. :D I did recommend my friend (the owner of the laptop) to replace the disk/laptop and showed her how to use Google Drive/documents in the cloud for the more important ones. Also backups. Thanks! – Ionică Bizău Jul 04 '17 at 16:07
1

the hard drive boot option disappeared because you erased /efi/boot/bootx64.
this it the default media path and must be there for device boot.

grub installs at /efi/boot/ubuntu/grubx64.efi or /efi/boot/ubuntu/shimx64.efi for secure boot.
this gives a OS boot option.
external media will require the device boot option (default media path).

the boot repair program given in the first answer replaced this missing file.

ravery
  • 6,874