[SOLVED] How to get rid of this shit (GRUB) ?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

[SOLVED] How to get rid of this shit (GRUB) ?

Post by Menard »

Hi

I have a dual boot with Windows on another disk, and then I try to boot on the windows disk and then I have the Grub rescue mode
It is very ennoying because how then can I repair the windows boot ? I have no access to the repair tool (fixboot, fixmbr) I don't know if it is normal but for me, what I need is that Grub doesn't deal with windows, then if I want to boot Windows, I chose to boot on its disk and then I don't want to have its boot modify by Grub
So I imagine that to unconnect the disk and then reinstall grub and then reconnect the disk could be a good solution no ?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Dual boot issue

Post by Jo-con-Ël »

Please confirm this is your system. If it is so you have installed Mint root partition on one disk (sda1) and /home partiton on the other disk (sdb2) so is hard to know what is your Windows disk.

Code: Select all

Drives:    Local Storage: total: 763.85 GiB used: 611.47 GiB (80.1%) 
           ID-1: /dev/sda vendor: Hitachi model: HDT725032VLA380 size: 298.09 GiB 
           ID-2: /dev/sdb vendor: Seagate model: ST3500630A size: 465.76 GiB 
Partition: ID-1: / size: 29.40 GiB used: 11.15 GiB (37.9%) fs: ext4 dev: /dev/sda1 
           ID-2: /home size: 29.40 GiB used: 26.51 GiB (90.2%) fs: ext4 dev: /dev/sdb2 
Most probably Windows is installed on sdb (500GB Seagate disk), and Linux Mint, so said Mint disk will be sda (300GB Hitachi disk). To be sure, post back following code result

Code: Select all

sudo fdisk -l
sudo blkid
If your Mint disk is sda (Hitachi HDT725032VLA380) and Windows is intalled in sdb (Seagate ST3500630A):

1)Boot Linux Mint and ensure you have installed grub in correct MBR disk (i.e sda). Open a terminal (Allt+Ctrl+T) and run

Code: Select all

sudo grub-install /dev/sda
Then run and post back following codes result

Code: Select all

sudo update-grub
2)Once you are sure there is an option to boot Windows in that GRUB menu and you can boot that entry, then from a working Windows session repair its boot (fixboot/fixmbr).

3)When all is done you can choose your Windows disk in boot menu to boot Windows alone.
If Windows is also installed in sda you will need to do as indicated changing disk when installing GRUB as per point 1 (i.e.sudo grub-install /dev/sdb) .
Arrieritos semos y en el camino nos encontraremos.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Dual boot issue

Post by Menard »

Yes that's my system, unchanged, there is no windows on sda and no linux on sdb except my /home but it is not an OS, but I don't really know where grub is, what I know is that boot partition is on sda2 ... tags as it if I do this :

Code: Select all

u3@PC1:~$ sudo fdisk -l
[sudo] Mot de passe de u3 :                   
Disque /dev/sda : 298,9 GiB, 320072933376 octets, 625142448 secteurs
Disk model: Hitachi HDT72503
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0xf9305137

Périphérique Amorçage     Début       Fin  Secteurs Taille Id Type
/dev/sda1                  2048  62916110  62914063    30G 83 Linux
/dev/sda2    *         62916608 125830670  62914063    30G 83 Linux
/dev/sda3             125831168 188745727  62914560    30G 83 Linux
/dev/sda4             188747774 625141759 436393986 208,1G  5 Étendue
/dev/sda5             188747776 251662335  62914560    30G 82 partition d'échang
/dev/sda6             251664384 625141759 373477376 178,1G  7 HPFS/NTFS/exFAT


Disque /dev/sdb : 465,78 GiB, 500107862016 octets, 976773168 secteurs
Disk model: ST3500630A      
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x3d4168dc

Périphérique Amorçage     Début       Fin  Secteurs Taille Id Type
/dev/sdb1    *               63  20996954  20996892    10G  7 HPFS/NTFS/exFAT
/dev/sdb2              20998144  83912703  62914560    30G 83 Linux
/dev/sdb3              83912704 104886271  20973568    10G 83 Linux
/dev/sdb4             104886272 976773167 871886896 415,8G  f Étendue W95 (LBA)
/dev/sdb5             104886335 136343654  31457320    15G  7 HPFS/NTFS/exFAT
/dev/sdb6             136343718 450928484 314584767   150G  7 HPFS/NTFS/exFAT
/dev/sdb7             450928548 976773167 525844620 250,8G  7 HPFS/NTFS/exFAT
u3@PC1:~$ 
When all is done you can choose your Windows disk in boot menu to boot Windows alone.
That's not what I want, I have allready this ... I want grub stop to see my Windows disk because 1 - it is useless 2 - it brings troubles and issues
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Dual boot issue

Post by Jo-con-Ël »

Menard wrote: Tue Nov 23, 2021 11:41 am
When all is done you can choose your Windows disk in boot menu to boot Windows alone.
That's not what I want, I have allready this ... I want grub stop to see my Windows disk because 1 - it is useless 2 - it brings troubles and issues
Notice I said boot menu the one you get pressing certain key (F11 in most MSI desktops as per this link) as soon as you power on computer. As per your user manual
Allumez l’ordinateur et le système lancera le processus POST (Test automatique
d’allumage). Lorsque le message ci-dessous apparaît à l’écran, appuyez sur la
touche DEL pour entrer dans le BIOS, F11 dans Démarrage
It is not GRUB menu.

You will need to choose Windows option in GRUB menu as per point 2 only to boot Windows first time after reinstalling GRUB in sda (Mint disk). This time in boot menu select Mint disk to boot and then in GRUB menu select Window entry.

You didn't confirm you have done as indicated in point 1 neither post back code result as per point 2 so can't be sure that Windows entry is created, if you can or not boot Windows from GRUB menu ...nor you can try to repair MBR in sdb from inside Linux.

After doing as indicate you can avoid GRUB menu includes an option for Windows editing /etc/defualt/grub file (xed admin:///etc/default/grub), you will need to entre your password twice and add following line
GRUB_DISABLE_OS_PROBER=true
Then run sudo update-grub.
Arrieritos semos y en el camino nos encontraremos.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Dual boot issue

Post by Menard »

I am sorry Ive made this confusion between boot menu and grub, it is only because i was tired

Notice that if I said that my problem is when I want to boot on the windows disk, this is because I know perfecly how to enter the boot menu

Thanks for this, I ll try it
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Dual boot issue

Post by Menard »

Code: Select all

u3@PC1:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Création du fichier de configuration GRUB…
Image Linux trouvée : /boot/vmlinuz-5.13.0-21-generic
Image mémoire initiale trouvée : /boot/initrd.img-5.13.0-21-generic
Image Linux trouvée : /boot/vmlinuz-5.11.0-38-generic
Image mémoire initiale trouvée : /boot/initrd.img-5.11.0-38-generic
  /dev/sdc: open failed: Aucun support trouvé
  /dev/sdd: open failed: Aucun support trouvé
  /dev/sde: open failed: Aucun support trouvé
  /dev/sdf: open failed: Aucun support trouvé
  /dev/sdc: open failed: Aucun support trouvé
  /dev/sdd: open failed: Aucun support trouvé
  /dev/sde: open failed: Aucun support trouvé
  /dev/sdf: open failed: Aucun support trouvé
Linux Mint 18.1 Serena (18.1) trouvé sur /dev/sda2
fait
u3@PC1:~$ 
Windows is lost ...

But I know perfecly how to repair my windows boot !!! I mean when grub is not blocking it
What has grub to do on a windows disk in place of the windows bootloader ?

Why does grub feel obliged to destroy our windows disks ?

What I get when I boot on the Windows disk (Seagate) now is a Grub Rescue message with a command prompt and saying "no such device as ... the Id of my sda1" (Linux Disk) :cry:

I ll use Linux to copy basic ntldr and ntdetect, I don't know at that moment if this is a problem with windows or with Grub because though I restored a new image of a windows (XP) today before this issue ... I had allready tried to but my previous windows with only his disk, and it failed, that is not normal and accuses Grub
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Dual boot issue

Post by Menard »

Jo-con-Ël wrote: Tue Nov 23, 2021 12:14 pm
nor you can try to repair MBR in sdb from inside Linux.

:shock: really ? or I can repair it with Bart PE SD Card I have
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Dual boot issue

Post by Menard »

I proceeded as I've said with success ... after basic ntldr and ntdetect copied on the root on sdb1

Code: Select all

u3@PC1:~$ sudo grub-install /dev/sda
[sudo] Mot de passe de u3 :                   
Installation pour la plate-forme i386-pc.
Installation terminée, sans erreur.
u3@PC1:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Création du fichier de configuration GRUB…
Image Linux trouvée : /boot/vmlinuz-5.13.0-21-generic
Image mémoire initiale trouvée : /boot/initrd.img-5.13.0-21-generic
Image Linux trouvée : /boot/vmlinuz-5.11.0-38-generic
Image mémoire initiale trouvée : /boot/initrd.img-5.11.0-38-generic
  /dev/sdc: open failed: Aucun support trouvé
  /dev/sdd: open failed: Aucun support trouvé
  /dev/sde: open failed: Aucun support trouvé
  /dev/sdf: open failed: Aucun support trouvé
  /dev/sdc: open failed: Aucun support trouvé
  /dev/sdd: open failed: Aucun support trouvé
  /dev/sde: open failed: Aucun support trouvé
  /dev/sdf: open failed: Aucun support trouvé
Linux Mint 18.1 Serena (18.1) trouvé sur /dev/sda2
Windows NT/2000/XP trouvé sur /dev/sdb1
fait
u3@PC1:~$ 
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Dual boot issue

Post by Jo-con-Ël »

Sorry for delay but happy you solved by your self. :D
Menard wrote: Tue Nov 23, 2021 5:05 pm :shock: really ? or I can repair it with Bart PE SD Card I have
What I meant was you can not try to solve Windows boot w/o being sure you boot Mint from its own disk and Windows entry exists and works.
Menard wrote: Tue Nov 23, 2021 4:26 pm But I know perfecly how to repair my windows boot !!! I mean when grub is not blocking it
What has grub to do on a windows disk in place of the windows bootloader ?

Why does grub feel obliged to destroy our windows disks ?
Repairing sdb MBR after installing GRUB is quite simple from inside LM ( apt install syslinux and then sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb) .

If Windows does not boot, in your case even it was not detected and so did not appear on grub menu, that is because you have done something alse weird as GRUB do not delete any file inside Windows partition. :roll:

Reparing Windows boot in such case (once MBR is repaired) also can be done from inside Linux. You need to install Boot Repair via PPA There is an option to do it in Advanced options>Other options>Repair Windows boot files.
Arrieritos semos y en el camino nos encontraremos.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Dual boot issue

Post by Menard »

No, I am sure of one thing with the previous windows XP I had in dual boot with Linux : when I wanted to boot it after unplugging the sda disk, it failed, but I don't remember if this was with a message from grub or not, but now with this other windows now, I am sure that it was with a message from grub and that is weird and totally unexpected because I consider that my windows disk must stay itself, I was controlling regularly the mbr boot sector's sha 256 ... so if I control it now I expect to have it unchanged but it seems unpossible because where can grub be then ?

Though I ve said something uncorrect, it is grub block me to repare windows, no because the tool is normally accessible with a windows CD ...
Now ntldr is loaded because I get a message about nvgts.sys missing and this is probably because this windows clone was not installed with exactly this hardware, I had a nvidia graphic card
But I ll try with Boot repair though, but if my MBR is broken, it is probably allready because I used this tool one time, it was not able to repair my linux boot but probably that broke my MBR, there is no other possibility because before I was still able to boot windows from sdb without a grub message

What I try is not so to be able to use this Windows, than to have windows able to boot from sdb alone when I ll re-install the clone that works well

Do you know how to read the mbr from linux ? or to calculate its hash ? because that's quite complicated each time with a BartPE to use ?

OH I'm sorry it is easy to find by Google

Code: Select all

sudo dd if=/dev/sdb of=/tmp/mbr bs=512
and

Code: Select all

xxd /tmp/mbr
Last edited by Menard on Wed Nov 24, 2021 7:02 am, edited 2 times in total.
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Dual boot issue

Post by Jo-con-Ël »

Menard wrote: Wed Nov 24, 2021 6:00 am but if my MBR is broken, it is probably allready because I used this tool one time,
Boot Repair Recommended repair option usualy install GRUB on MBR of all internal disks, so, yes ,that would break your Windows disk boot, But once again it does not delete any file inside Windows partition. I do not recommend to use that Recommended Repair option.

In other hand using clone partiton to restore Windows does not nclude first boot sectors in disk as using a disk clone. So if GRUB is still installed on MBR of that disk (i.e you did not repair MBR as indicated or using a deticated option to do it with Boot Repair Advanced option>MBR) you will get into the same problem.
Last edited by Jo-con-Ël on Wed Nov 24, 2021 7:16 am, edited 2 times in total.
Arrieritos semos y en el camino nos encontraremos.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Dual boot issue

Post by Menard »

Jo-con-Ël wrote: Wed Nov 24, 2021 7:00 am
Menard wrote: Wed Nov 24, 2021 6:00 am but if my MBR is broken, it is probably allready because I used this tool one time,
Boot Repair Recommended repair option usualy install GRUB on MBR of all disks internal disks, so, yes ,that would break you Windows disk boot, But once again it does not delete any file inside Windows partition. I do not recommend to use that Recommended Repair option.
OK , we have the explaination of all , I have now the 512 in sight and it is clear

Code: Select all

u3@PC1:~$ sudo dd if=/dev/sdb of=/tmp/mbr bs=512 count=1
[sudo] Mot de passe de u3 :                   
1+0 enregistrements lus
1+0 enregistrements écrits
512 octets copiés, 0,000250754 s, 2,0 MB/s
u3@PC1:~$ xxd /tmp/mbr
00000000: eb63 9005 2039 ffff 0000 0000 0000 0000  .c.. 9..........
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000050: 0000 0000 0000 0000 0000 0080 0100 0000  ................
00000060: 0000 0000 fffa 9090 f6c2 8074 05f6 c270  ...........
:shock: :shock: :shock:

And what is more a problem is that I made no back-up of my mbr since I added a new partition for /home :roll:
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Dual boot issue

Post by Menard »

In fact I find more trustable to restore the mbr from a backup file which correspond with my disk (real partitionning) than to repair it ... any error could have data loss consequences because I miss disk place by now, intenal AND external
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: Dual boot issue

Post by Menard »

I ve tried to repare my MBR with The CD :twisted: :twisted: :twisted:
> GRUB :twisted: :twisted: :twisted:
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: How to get rid of this shit (GRUB) ?

Post by Jo-con-Ël »

What's supposed that means? What's that CD? What did you do?

If you have done what is indicated in point 1, then you can go on with BartPE/WinPE or any Windows Instalation media (never mind if is not original but you can use any original one no matter the edition).
Arrieritos semos y en el camino nos encontraremos.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: How to get rid of this shit (GRUB) ?

Post by Menard »

The Windows XP CD is supposed to be able to restore the MBR by 2 methods but none worked here with this ... Grub so I had to reinstall a Windows XP including asking it to slow re-format the partition sdb1 and finally it works ... I get rid of this grub :D I was expecting to have to low level format the whole disk :oops:

No I didn't proceeded as you told me because in my logic I don't want to repare the bad by the bad ... and it has a philosophical great meaning if Windows couldn't repair itself what Linux made ... if so, today would have been the day when I first bought a Windows 10 or 11 license :mrgreen:

So now this time I made the uptodate backup of the mbr and I backedup it with the windows tool (diskprobe.exe) which allows to restore this mbr backup with it
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3593
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: How to get rid of this shit (GRUB) ?

Post by Jo-con-Ël »

Menard wrote: Thu Nov 25, 2021 1:01 pm No I didn't proceeded as you told me because in my logic I don't want to repare the bad by the bad ... and it has a philosophical great meaning if Windows couldn't repair itself what Linux made ... if so, today would have been the day when I first bought a Windows 10 or 11 license :mrgreen:
First point was only to be sure grub is installed in linux disk (sda) MBR in order you can boot Linux Mint when selecting that disk on boot menu. Nothing to be with Windows boot repair by itself. If you are sure, just forget it.

PD: You already did it, as I see in this post. Sorry.
Last edited by Jo-con-Ël on Mon Nov 29, 2021 1:11 pm, edited 2 times in total.
Arrieritos semos y en el camino nos encontraremos.
Menard
Level 7
Level 7
Posts: 1729
Joined: Wed May 08, 2019 5:14 am
Location: Angers (France)

Re: [SOLVED] How to get rid of this shit (GRUB) ?

Post by Menard »

In fact here the bad came with Boot Repair and by forgotting to back up my MBR, I really had even the feeling that Grub was hidden in my Bios ... :lol:
Linux Mint 20.3 Cinnamon - K 5.15 - Desktop - english
AMD APU A8 7600 - DDR3 1833 MHz 8 GB x2 Dual Channel
--

If you think tough men are dangerous, wait until you see what weak men are capable of.
Locked

Return to “Installation & Boot”