Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have removed my MBR by mistake. Now I can't boot Ubuntu, so I want to reinstall grub.

I'm getting this error:

grub-install --boot-directory=/media/cab64688-2d97-4bbd-9f32-7bc0badb40a8/boot /dev/sdb
rm: cannot remove `/media/cab64688-2d97-4bbd-9f32-7bc0badb40a8/boot/grub/915resolution.mod': Read-only file system

So, the problem is that my existing Ubuntu partition is mounted read only. When I try:

sudo mount /dev/sdb7  /media/ubuntu_mpt
mount: block device /dev/sdb7 is write-protected, mounting read-only

So I failed to install grub since I'm in read only mode.

Any ideas?

EDIT: After apt-get install grub, I repeated the process and got:

Probing devices to guess BIOS drives. This may take a long time.
Unknown partition table signature
sed: can't read /media/cab64688-2d97-4bbd-9f32-7bc0badb40a8_/boot/grub/device.map: No such file or directory
grep: /media/cab64688-2d97-4bbd-9f32-7bc0badb40a8_/boot/grub/device.map: No such file or directory
/dev/sda does not have any corresponding BIOS drive.
share|improve this question
I doubt that anyone would respond faster if you attach the word urgent in your post. If anything, they might even avoid helping in the first place. I could be wrong. – Tshepang Jun 12 '11 at 19:24
You need to mount /dev/sdb7 with read-write permissions. – fpmurphy1 Jun 12 '11 at 20:18
Yes, but I can't do that from live CD. I fixed it with UNetbootin ubuntuforums.org/showthread.php?t=690912. – umpirsky Jun 12 '11 at 20:26
What kind of storage medium is /dev/sdb? What is your partition layout (on both sda and sdb)? – Gilles Jun 12 '11 at 21:33
It's regular HDD. – umpirsky Jun 13 '11 at 16:42
up vote 1 down vote accepted
$ sudo mount /dev/sdb7  /media/ubuntu_mpt

This should be:

$ sudo mount -o remount,rw /dev/sdb7

This will not mount it again, but change the already existing mount to rw.

share|improve this answer
Thanks, didn't tried it, but I hope it works. – umpirsky Jun 13 '11 at 16:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.