0

I can't install grub2 on my system. i followed the guide, but when i chroot on my ubuntu partition and type:

grub-install /dev/sdb

I get this error:

root@ubuntu:/# grub-install /dev/sdb /usr/sbin/grub-setup: error: hd0 appears to contain a iso9660 filesystem which isn't known to reserve space for DOS-style boot. Installing GRUB there could result in FILESYSTEM DESTRUCTION if valuable data is overwritten by grub-setup (--skip-fs-probe disables this check, use at your own risk).

Here is sudo fdisk -l output:

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x6af447e6
Device  Boot       Start         End      Blocks   Id  System
/dev/sdb1   *        2048   781459455   390728704    7  HPFS/NTFS/exFAT
/dev/sdb2       781459456   789272575     3906560   82  Linux swap / Solaris
/dev/sdb3       789272576   976773119    93750272   83  Linux

And sudo blkid:

/dev/loop0: TYPE="squashfs"
/dev/sr0: LABEL="Ubuntu 12.04 LTS i386" TYPE="iso9660"
/dev/sdb1: UUID="08E1AFD109C12FE4" TYPE="ntfs"
/dev/sdb2: UUID="1170bc3a-8b75-4c6b-8749-12cecb6db54d" TYPE="swap"
/dev/sdb3: UUID="881202f2-1f9b-4f10-9af5-90424a8dd362" TYPE="ext3"

3 Answers 3

1

Are you sure /dev/sdb is your hard drive? Because usually in the systems that I have seen with Ubuntu till now, sdb refers to the externally connected devices and /dev/sda is your hard drive where you should be installing grub to.

0

Just to be clear, what is the output of this?

mount /dev/sdb3 /mnt
grub-install --root-directory=/mnt/ /dev/sdb
2
  • The same: /usr/sbin/grub-setup: error: hd0 appears to contain a iso9660 filesystem which isn't known to reserve space for DOS-style boot. Installing GRUB there could result in FILESYSTEM DESTRUCTION if valuable data is overwritten by grub-setup (--skip-fs-probe disables this check, use at your own risk).
    – Ettore
    Apr 27, 2012 at 14:11
  • This is from a Live CD?
    – SirCharlo
    Apr 27, 2012 at 14:18
-1

According to this answer, you need to run

dd if=/dev/zero of=/dev/sdb bs=512 seek=1 count=2047

to overwrite the master boot record.

2
  • This sounds very destructive given the warning in grub-install's output.
    – pcworld
    Nov 9, 2020 at 2:08
  • @pcworld Fwiw, the answer in the linked thread has got six upvotes and accepted status.
    – K3---rnc
    Nov 9, 2020 at 15:47

You must log in to answer this question.

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