Boot-Repair est en EFI ...

Asked by Roland Gautier

Bonjour,

Malheureusement, mon PC n'est pas en EFI.

Je suis à la recherche (infructueuse jusqu'à présent) d'une version de Boot-Repair-Disk 64 qui pourrait booter sur un pc NON EFI.
Pouvez-vous m'aider, svp ?

Merci par avance,
Roland

Question information

Language:
French Edit question
Status:
Solved
For:
glade2script Edit question
Assignee:
No assignee Edit question
Solved by:
Roland Gautier
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

https://sourceforge.net/p/boot-repair-cd/home/Home/

"repairs recent (UEFI) computers as well as old PCs"

Revision history for this message
Roland Gautier (rolandgautier) said :
#2

Hi Manfred,

Yes, I do agree : it repairs everything !
But, before reparing, the first point is to boot, and a usb key with the iso file restaured on it doesn't boot on a non EFI pc.

Another solution would be so :
Can I tell to boot-repair (the one installed on my usb extern disk) not to consider the disk where it stands (/dev/sda, wich will not stay connected once the pc repaired) and repair the rest of the pc ?

I didn't this this particular point in documentation.

looking for your reply,
Roland

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

1. How did you put the boot-repair iso on the USB stick?
A plain "copy" does not work, but you have to use specific programs for this (e.g. startup disc creator on Ubuntu)
https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu

2. If your system is booting successfully, then you should be able to run the boot-repair program, no matter on which disk it is located.
What happens if you try?

Revision history for this message
Roland Gautier (rolandgautier) said :
#4

Hi Manfred,

I do know creating a usb disk or a cd disk from an iso file. I have use Startup Disk Creator, indeed.
I used a 16go usb key, the I previously used to install Ubuntu on an external flash SSD disk, wich I name my "external disk".

I have 2 disks in my pc :
/dev/sda wich contains Ubuntu and GRUB in the MBR,
/dev/sdb wich contains Windows (old stuffs I must maintain alive)

When I use boot-repair from my external disk, it see 3 disks :
/dev/sda : my external disk
/dev/sdb : old Ubuntu disk
/dev/sdc : old Windows disk
and suggest to correct problems rewriting grub for the 3 disks on the MBR of /dev/sda.

This is not what I need.

I do want to correct the problems, but only about sdb & sdc, and to rewrite grub on (actual) sdb disk.

Do you want the Boot-Info_20180305_0903.txt file (96.5ko) ?
How can I upload it to you ?

looking forward to your reply,
Have a sweet day,
Roland

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

You can upload text files like the boot-info output to https://pastebin.ubuntu.com/ and then post the link address that you receive in this question document.

Revision history for this message
Roland Gautier (rolandgautier) said :
#6

le fichier Boot-Info_20180305_0903.txt (96.5ko) est ici :
the Boot-Info_20180305_0903.txt file (96.5ko) is here :

https://pastebin.ubuntu.com/p/ByBjr2fy8f/

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

I do not understand why you say that your PC is non-EFI.
There are EFI directories on sda1 (Ubuntu) and sdb2 (Windows).

Revision history for this message
Roland Gautier (rolandgautier) said :
#8

Manfred,

Please, see lines 1431 & 1432 :
"=================== UEFI/Legacy mode:
BIOS is EFI-compatible, but it is not setup in EFI-mode for this installed-session."

I don't know how to capture a print screen of mi bios, but i'm sure this pc has never run an EFI session.

This choice was made by ACER technicien, because of the chosen dual system configuration.

Roland

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

Let me ask some questions:
Why do you think that you need boot-repair?
What happens if you try booting now?
Have you ever tried enabling EFI (secure boot) in the BIOS?

Revision history for this message
Roland Gautier (rolandgautier) said :
#10

1 - this pc functions without external disk, for several years. I had a scratch last tuesday, wich sended a report.
as usual, I shuted of my pc at night. When I switch it on, friday morning, I didn't got the grub screen, but a 2 lines error message.
Looking for the problems, I have set en new system on my SSD flash disk. With it, I have mount one by one, each partition of the 2 disks inside the PC and it seems that files and datas were present, at their own place, and alive.
I prefer to repair GRUB and continue working on the same machine, instead of having to reinstall every tools on the SSD flash disk (I do not trust it such as the PC ...)
2 - because of the 2 lines grub error message
3 - I'll got this fu...en 2 lines message
4 - I don't know if doing so will not modify something on my 2 inside disks so I can't come backward to the previous mode, loosing many installed things in this way. (all the VERY importantes datas, scripts, programmes and so on were backuped on a daily base.)

I'll send the two lines message in a next post.

Revision history for this message
Roland Gautier (rolandgautier) said :
#11

The message on switch on of the pc is :

(centered) GNU GRUB Version 2.02~beta2-36ubuntu3.17

Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else, TAB lists possible device or file completion.

followed by a "grub>" prompt.

If I strike [a][TAB], I got :

Possible commands are:
acpi authenticate

followed by a "grub>" prompt.

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

I suggest to try some commands in this mode, hopefully it will be possible to get grub to boot.

On this "grub>" prompt type

ls

You will probably see an output like
(hd0) (hd0,5) (hd0,1) (hd1) (hd1,5) (hd1,4) (hd1,3) (hd1,1)

What exactly do you see there?

Revision history for this message
Roland Gautier (rolandgautier) said :
#13

(hd0) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1) (hd1,gpt5) (hd1,gpt4) (hd1,gpt3) (hd1,gpt2) (hd1,gpt1)

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

What output do you receive for

ls (hd0,gpt2)
ls (hd0,gpt2)/boot

If the second one shows several files with a name that contains a Linux kernel version number, then you should try the following:

set prefix=(hd0,gpt2)/boot/grub
set root=(hd0,2)
insmod linux
insmod normal
normal

What happens?
Does this show the normal grub menu, and if yes, con you boot Ubuntu?

Revision history for this message
Manfred Hampl (m-hampl) said :
#15

Oops, a copy/paste error, the commands should be

set prefix=(hd0,gpt2)/boot/grub
set root=(hd0,gpt2)
insmod linux
insmod normal
normal

Revision history for this message
Roland Gautier (rolandgautier) said :
#16

Ok, that's done ... (azerty keyboard caps, on a qwerty only grub system, no screen capture, no redirection to file ... My fingers cracks)

the result is here : https://pastebin.ubuntu.com/p/nyGTjqgfPQ/

and it launch Ubuntu (it seems so) ...
and I saw about half a dozen short lines message, during a half seconde,
and I got the UBUNTU logo in the center of the screen, with, below, the red/white dots changing, one after the other.
Nothing else.

I was looking for a log file :
on the ubuntu internal disk (the external was unplugged during the test), in the /var/log directory, NO file is younger then mars 3rd. ...

Where should I found a track ???

Revision history for this message
Roland Gautier (rolandgautier) said :
#17

Manfred,

Still looking for a log, search for "log" on all my internal Ubuntu disk (root).
Between 195 directory & 8736 other things, I got these wich were the only files at this time, today :

stop-bootlogd-single.service
stop-bootlogd.service
rmnologine.service
bootlogs.service
bootlogd.service

all : 0 octet | Lien vers inconnu (link to unknown) | lib/systemd/system | 22:22

Do you have an idea ?

Revision history for this message
Manfred Hampl (m-hampl) said :
#18

Ok, this is at least a step forward.
(Sorry, I forgot to warn you that the keyboard settings might be wrong in this mode.)

Suggested next steps:
After entering the commands as before when the grub menu appears select "advanced options for Ubuntu" (respectively "Options avancées pour Ubuntu" or whatever you see in your version) and in the next screen select "Ubuntu, with Linux 4.4.0-112-generic (recovery mode)" and on the next screen select "root command prompt".
Does this work? Does this give an Ubuntu command prompt? If not, how far did it go and what happened then?

Revision history for this message
Roland Gautier (rolandgautier) said :
#19

Hi Manfred,

With or without warning, all are same boring ... ;)

So, I have print a qwerty keybord map, This is now much easier.

I have done it :

1- on the second menu, I have two recovery mode :
Linux 4.4.0-112-generic
Linux 4.4.0-116-generic
(the two core files were in the reply of "ls (hd0,gpt2)/boot")

I choosed the 112 one like you wrote, but, for future session, would 116 one be better ?

On the next menu (pink background, simili graphic in text mode, centered, selected line in red ...)
I got the recovery mode choices : resume/clean/dpkg/failsafeX/fsck/grub/network/root/system summary.
I choosed root (wich seems similar to "root command prompt" you asked for)
I got 4|5 lines wich tell :
press enter to maintenance mode
press Ctrl D to continue.

This root mode is read only, I can't write|modify files.

looking forward to your reply
have a nice day.

Revision history for this message
Manfred Hampl (m-hampl) said :
#20

1. There should not be much difference between using the 4.4.0-112-generic and the 4.4.0-116-generic version of the kernel. The 4.4.0-116-generic version is the newer one and of course is the preferred one. Only if that one does not work, then you should use the 4.4.0-112-generic version as fallback.

2. Yes, "root" is the mode that I meant.
When starting this mode, the disk is read-only. Executing the command
mount -o rw,remount /
will enable read-write mode on the hard disk partition.

I suggest that you try reinstalling the grub boot loader on the main disk.
The commands are

sudo grub-install /dev/sda
sudo update-grub

I keep my fingers crossed that this has the desired results.

Revision history for this message
Roland Gautier (rolandgautier) said :
#21

mount -o rw,remount / : ok

sudo grub-install /dev/sda :
installation pour la plateforme x86_64-efi.
grubinstall : erreur : impossible de trouver le répertoire EFI (can't find EFI directory)

Revision history for this message
Manfred Hampl (m-hampl) said :
#22

I assume that the reason for this is the same as the one causing boot-repair to complain about EFI.

There are additional options for grub-install, but I do not have any experience with them.

I hope that the command

sudo grub-install --no-uefi-secure-boot /dev/sda

installs the non-efi version in the boot sector.

Disclaimer: I have never tried this command with such additional option myself and I cannot guarantee that it is working in the way that I hope it does.

Revision history for this message
Roland Gautier (rolandgautier) said :
#23

sudo grub-install --no-uefi-secure-boot /dev/sda :
installation pour la plateforme x86_64-efi.
grubinstall : erreur : impossible de trouver le répertoire EFI (can't find EFI directory)

exactly the same answer then previous test.

Revision history for this message
Manfred Hampl (m-hampl) said :
#24

Ok, apparently this does not work.
Grub seems to be sure that your installation is with EFI enabled.

Have you already tried switching to "secure boot" (or "UEFI" or whatever the name is) in BIOS?

Revision history for this message
Roland Gautier (rolandgautier) said :
#25

Could this test write anything on the disks wich may empeach restauring the actual system ?

Revision history for this message
Manfred Hampl (m-hampl) said :
#26

As far as I know this will not change anything on the disk. It will just try booting in a different way, and if that boot process works, then the operating system will of course access the disk.

And in any case you should be able to disable secure boot in the BIOS again and everything should be back to the status as before.

Revision history for this message
Roland Gautier (rolandgautier) said :
#27

Hello Manfred,

Booting in UEFI mode :
Both of the two internal disks reply exactly the same grub message on wich wee worked these last days.
Windows boot menu reply that a certain file in windows/efi is corrupted.

I'll get a windows system disk to fix this point.

It seems that I can't find back my previous Ubuntu on the internal hdd.
I feel not secure working all day long on my transcend SDD usb disk.
I suppose I will reinstall (from scrtach, with re formatting of the hdd) UBUNTU on his previous position (with less mistakes than the first time ;=), restore the datas (on wich I work on my usb SDD disk) and keep working with this pc.
I should fix the windows issue later on.

My point is, now :
In UEFI mode, I can't boot on my external usb hbb, even when USB HDD set in first position in the bios efi boot order.

I suppose that this come from the installation of Ubuntu (and partitionning and formating of partitions) has been done on this PC in Legacy mode.
--- Is this exact ? ---

If I switch my pc to UEFI mode for reinstall UBUNTU on the internal hdd, will a future installation of Ubuntu (and partitionning and formating of partitions) realised on my usb hdd in EFI mode will be bootable ?

looking forward to your reply,
have a sweet day.

Revision history for this message
Manfred Hampl (m-hampl) said :
#28

If switching the BIOS to UEFI did not work, then you can undo that change.

Some last ideas that you could try:

Can you re-try the boot-info script with the BIOS switched to UEFI

There is a video https://www.omgubuntu.co.uk/2011/09/live-usb-sticking-grub-2-video how to reinstall the grub boot loader when booting from some other boot device. (But this will perhaps also fail with "can't find EFI directory".)

Revision history for this message
Roland Gautier (rolandgautier) said :
#29

Hello, Manfred,

I hope you're fine.

I have try many this these two last days.

In fact, a EFI directory is present in /dev/sda1, but it links to a partition wich doesn't contains an EFI directory ...

I got many information here, perhaps some may be of interest for you :
https://www.micro-astuce.com/Forum/boot-repair-pour-reparer-demarrage-windows-ubuntu-t7445.html#p55261
https://forum.ubuntu-fr.org/viewtopic.php?pid=11770851#p11770851

But, whatever I try, I got always the same result.

So, at Last, I reinstall Ubuntu on /dev/sda, from scratch.

I found that Windows is steel alive in the second disk, Ill fix the windows mbr issue later.
I yet loose too many time on this problem.
However, I have learn many things this last week and I wish thank you for your endless help and support.

We may discuss later on, on other subjects ...

Have a nice day,
best regards,
Roland