从 live CD 安装 grub

从 live CD 安装 grub

我错误地删除了 MBR。现在我无法启动Ubuntu,所以我想重新安装grub。

我收到此错误:

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

所以,问题是我现有的 Ubuntu 分区安装为只读。当我尝试时:

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

所以我无法安装 grub,因为我处于只读模式。

有任何想法吗?

编辑:apt-get install grub 后,我重复了该过程并得到:

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.

答案1

$ sudo mount /dev/sdb7  /media/ubuntu_mpt

这应该是:

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

这不会再次挂载它,而是将已经存在的挂载更改为 rw。

相关内容