To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8e88a94c
Device Boot Start End Blocks Id System
/dev/sda1 * 2 91201 732564000 7 HPFS/NTFS
Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7d6a0813
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 5108 41029978+ 7 HPFS/NTFS
/dev/sdb2 5109 26339 170538007+ 7 HPFS/NTFS
/dev/sdb3 26340 30401 32627984+ 5 Extended
/dev/sdb5 26340 29986 29294496 83 Linux
/dev/sdb6 29987 30401 3333456 82 Linux swap / Solaris
ubuntu@ubuntu:~$ sudo mount /dev/sdb5 /mnt
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev
ubuntu@ubuntu:~$ sudo mount --bind /proc /mnt/proc
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# grub-install /dev/sda
Installation finished. No error reported.
root@ubuntu:/# grub-install /dev/sdb
Installation finished. No error reported.
root@ubuntu:/#