0

When I run update-grub on Ubuntu 12.04 on my system, I get the following output:

Found linux image: /boot/vmlinuz-3.2.0-29-generic
Found initrd image: /boot/initrd.img-3.2.0-29-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1

What bugs me is the Windows 7 loader. /dev/sda indeed had Windows 7 on it previously. However, my goal was to complete erase that. During install, I deleted the partition table and created two partitions on each drive for RAID 1. So now I got:

md1 : active raid1 sdb2[1] sda2[0]
      1855727424 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sdb1[1] sda1[0]
      97589120 blocks super 1.2 [2/2] [UU]

md0 = / and md1 = /home, both formatted with ext4.

Why GRUB keeps insisting that there is a Windows 7 loader is beyond me. Where is this loader located and how can I get rid of it?

2 Answers 2

0

As far as I know, Windows 7 boot process uses not only MBR, but also VBR (volume boot record), which is contained on the first 512 bytes of the partition.

So I would try to zero all sda1, e.g.

dd if=/dev/zero of=/dev/sda1 bs=1M

And run update-grub again.

3
  • I have my Ubuntu installed on that partition, so I can't just erase it. However, superblock 1.2 starts 4096 bytes from the beginning of sda1, right? Are the bytes before that completely unused? Is it save to zero out only the first 512 bytes?
    – user2323470
    Jul 11, 2014 at 14:58
  • Well, you could always check for VBR by looking and first 512 bytes of the partition hexdump -C -n 512 /dev/sda1 - there should be 55 aa signature. And yes, superblock starts at 4K, so it should be safe to zero. But make a backup first!
    – maniaque
    Jul 11, 2014 at 15:23
  • dd is —for good reasons— also known as disk destroy. Caution with this!
    – Frank N
    Feb 14, 2016 at 8:41
0

1 just stop (windows) OS probing

sudo chmod a-x /etc/grub.d/30_os-prober

...and you should see, that no more windows probing is happening on your next sudo update-grub. (a+x to revert). More 'tricky' but less 'invasive'.

...or 2 (wipe MBR)

  1. create backup
  2. verify, there truly is an MBR (ends on 55 aa, as said by maniaque)
  3. wipe the mbr. Be extra careful, also about sdax number, have read this before.

code:

sudo dd if=/dev/sda1 of=~/mbr_sda1_backup bs=512 count=1
hexdump -C -n 512 /dev/sda1
sudo dd if=/dev/zero of=/dev/sda1 bs=512 count=1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .