没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
1 11
挂载 Debian 根分区
mount /dev/sdb2 /mnt
挂载其他需要的系统目录
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot 到移动硬盘上的 Debian
chroot /mnt
重装 GRUB
grub-install /dev/sdb
更新 GRUB 配置
grub-mkconfig -o /boot/grub/grub.cfg
退出 chroot 环境
exit
卸载分区和目录
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys
umount /mnt
重建完成
挂载 Debian 根分区
mount /dev/sdb2 /mnt
挂载其他需要的系统目录
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot 到移动硬盘上的 Debian
chroot /mnt
重装 GRUB
grub-install /dev/sdb
更新 GRUB 配置
grub-mkconfig -o /boot/grub/grub.cfg
退出 chroot 环境
exit
卸载分区和目录
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys
umount /mnt
重建完成
2 11
今天在试图将root文件系统迁移到一块空白磁盘时,遇到了一个安装grub的错误:
root@bcat:~# grub-install /dev/sdc
Installing for i386-pc platform.
grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels. This is not supported yet..
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists
are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
非常奇怪的一个问题,在网上乱找,发现这个帖子,猛然想起这个磁盘曾经被不小心写
入过ISO文件。于是按照帖子的内容执行了dd
dd if=/dev/zero of=/dev/sdc seek=1 count=2047 bs=1b
这个命令会在磁盘的开始写入1M的zero,由于Linux下使用fdisk进行分区时会空出前2048个块,
所以执行这个命令不会影响现有的数据,执行完毕后,grub可以顺利安装
root@bcat:~# grub-install /dev/sdc
Installing for i386-pc platform.
Installation finished. No error reported.
3 0
剩余5页未读,继续阅读
资源评论
Pil0tXia
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功