View Single Post
  #19  
Old December 7th 18, 03:07 AM posted to alt.comp.os.windows-10,alt.os.linux
Carlos E.R.[_3_]
external usenet poster
 
Posts: 1,356
Default How to reset dual boot Linux:Win GRUB after "inaccessible bootdevice"

On 06/12/2018 23.53, arlen holder wrote:
On Thu, 6 Dec 2018 22:40:55 +0000, Andy D. Robinson wrote:

The question is what's the most graceful way to clear the OS giblets?
Do I simply wipe out C:\Windows on HDD2 (sdb) and HDD1 (sdc)?
(Is it _that_ easy? Or will that open a new can of worms?)


Drat. I apologize.
I never switch privacy nyms on purpose in the same thread.

My vpn scripts that Marek mostly wrote somehow didn't like,
I think, that I moved from Linux to Windows just now, posting from both
(where it keeps a variable based on the subject line), so something
didn't reset (a bug in those scripts somewhere as my long time Usenet
reader is "vi" and the randomizer scripts use telnet to the nntp server).


Sigh :-(


Anyway, the question that remains is simply how to gracefully
eliminate all the cross-platform OS giblets, which a
o The Windows 10 on HDD1 (WD10EFRX, sdc)
o The Windows 10 on HDD2 (Toshiba, sdb)
o The Ubuntu 17.10 on HDD2 (sdb)
o The Grub on HDD2
http://www.bild.me/bild.php?file=8520861grub12.jpg

Is it as simple as deleting C:\Windows in HDD1 (sdc) & HDD2 (sdb)?
http://www.bild.me/bild.php?file=4411450grub01.jpg

Can I just "rm -rf" to wipe out /etc/grub on HDD2 (sdb)?


That does not remove grub. The most important part of Grub is not inside
any partition or filesystem, but in some out of sight sectors.

You posted it yourself:

= Grub2 (v2.00) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos5)/boot/grub. It also embeds following components:


There is no clean way to delete that in Windows without special
software. You could erase the first track of the disk, that would do it,
but would erase any partition table, too.

What we do is to simply overwrite the code in first sector of the disk,
the MBR (but not the rest of the sector). I have forgotten the msdos
command that did that... ah, "fdisk /mbr" it was. Still, grub's core.img
is not deleted, but nothing points to it and thus it will not run and
display the menu.

No need to delete Linux or Windows with anything special. Just use a
*good* partitioning software and tell it to delete the relevant
partitions leaving empty unpartitioned space there. It works instantly,
seconds.

If you are paranoid - wait, you are, 'cos you are the nameshifter - then
use dd in Linux to overwrite with zeroes. It will take hours. Or use one
of those programs that overwrites with random data 32 times. It will
take days. Or use a special command in the "ATA Security Feature Set" to
do a "security erase". There is some Windows software to do it, but I
don't remember which.


--
Cheers, Carlos.
Ads