热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

双硬盘双Win8加Ubuntu修复Grub

nsitionalENhttp:www.w3.orgTRxhtml1DTDxhtml1-transitional.dtd

双硬盘双win8加Ubuntu是条件,grub已经不能够启动了,要修复一下,使其能够启动这个3个系统。具体的分布是:硬盘A+Win8A 硬盘B+Win8B+ubuntu。现在默认启动的是Win8。

使用LinuxLive USB Creator制作usb live,然后从u盘启动。

Linux安装助手LiLi USB Creator 2.8.25发布  2013-10/92052.htm

按照如下操作:

--------------------------------------------------------------------------

How to Repair, Restore, or Reinstall Grub 2 with a Ubuntu Live CD or USB

Grub 2 typically gets overridden when you install Windows or another Operating System. To make Ubuntu control the boot process, you need Reinstall (Repair/Restore) Grub using a Ubuntu Live CD.

Warning:

Using the sudo command, especially from a Live CD can do serious damage to your system. Read all instructions and confirm you understand before executing any commands. When pasting into the Terminal, use Ctrl+Shift+V, NOT Ctrl+V.

Terminal Commands:

Mount the partition your Ubuntu Installation is on. If you are not sure which it is, launch GParted (included in the Live CD) and find out. It is usually a EXT4 Partition. Replace the XY with the drive letter, and partition number, for example: sudo mount /dev/sda5 /mnt.

sudo mount /dev/sdXY /mnt

Now bind the directories that grub needs access to to detect other operating systems, like so:

sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys

Now we jump into that using chroot.

Now install, check, and update grub.

This time you only need to add the drive letter (usually a) to replace X, for example: grub-install /dev/sda, grub-install –recheck /dev/sda.

grub-install /dev/sdXgrub-install --recheck /dev/sdX

Now grub is back, all that is left is to exit the chrooted system and unmount everything.

exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt

Shut down and turn your computer back on, and you will be met with the default Grub2 screen.

You may want to update grub or re-install burg however you like it.

Congratulations, you have just Repaired/Restored/Reinstalled Grub 2 with a Ubuntu Live CD!

--------------------------------------------------------------------------

这里说下注意事项:

1.制作的usb live用的ubuntu版本要和硬盘上已经装的位数(同为32或者64)一致且最好是同一版本.否则有些命令不能使用。

2.对于第4步的grub-install /dev/sdX,后边的“X”要是现在默认启动的硬盘,如这边的情况,应该对应的是硬盘A。

3.如何查看硬盘上不能启动的ubuntu的版本号,可以去/etc/os-release中查看,也可以grep "VERSION" /etc -rn

4.如遇到“chroot:failed to run command '/bin/bash' :Exec Format error”,说明犯了1错误

5.关于让默认启动Win8的问题,修改/etc/grub.d/30_os-prober不再好使,因为它会prober出两个win8最终还是不知道要启动哪一个。如果要修改可以修改/boot/grub/grub.cfg。

Ubuntu 13.10 下载、安装、配置 整理汇总 页面 2013-10/91564.htm

Windows 7下硬盘安装Ubuntu 13.10图文教程 见 2013-10/91565.htm


推荐阅读
  • Ubuntu安装常用软件详细步骤
    目录1.GoogleChrome浏览器2.搜狗拼音输入法3.Pycharm4.Clion5.其他软件1.GoogleChrome浏览器通过直接下载安装GoogleChro ... [详细]
  • 本文介绍了在Ubuntu 11.10 x64环境下安装Android开发环境的步骤,并提供了解决常见问题的方法。其中包括安装Eclipse的ADT插件、解决缺少GEF插件的问题以及解决无法找到'userdata.img'文件的问题。此外,还提供了相关插件和系统镜像的下载链接。 ... [详细]
  • tcpdump 4.5.1 crash 深入分析
    tcpdump 4.5.1 crash 深入分析 ... [详细]
  • Ubuntu 用户安装 Linux Kernel 3.15 RC1
    nsitionalENhttp:www.w3.orgTRxhtml1DTDxhtml1-transitional.dtd ... [详细]
  • 树状笔记软件for linux,Ubuntu 14.04安装开源树状笔记管理软件 WikidPad 2.2
    WikidPad是一款开源免费的wiki风格的树状笔记管理软件,类似于Notepad。基于Python,支持Windows、Mac、Linux等平台。W ... [详细]
  • GetWindowLong函数
    今天在看一个代码里头写了GetWindowLong(hwnd,0),我当时就有点费解,靠,上网搜索函数原型说明,死活找不到第 ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的详细步骤
    本文详细介绍了搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的步骤,包括环境说明、相关软件下载的地址以及所需的插件下载地址。 ... [详细]
  • 本文介绍了在Ubuntu下制作deb安装包及离线安装包的方法,通过备份/var/cache/apt/archives文件夹中的安装包,并建立包列表及依赖信息文件,添加本地源,更新源列表,可以在没有网络的情况下更新系统。同时提供了命令示例和资源下载链接。 ... [详细]
  • python3 nmap函数简介及使用方法
    本文介绍了python3 nmap函数的简介及使用方法,python-nmap是一个使用nmap进行端口扫描的python库,它可以生成nmap扫描报告,并帮助系统管理员进行自动化扫描任务和生成报告。同时,它也支持nmap脚本输出。文章详细介绍了python-nmap的几个py文件的功能和用途,包括__init__.py、nmap.py和test.py。__init__.py主要导入基本信息,nmap.py用于调用nmap的功能进行扫描,test.py用于测试是否可以利用nmap的扫描功能。 ... [详细]
  • 本文介绍了在Ubuntu系统中清理残余配置文件和无用内容的方法,包括清理残余配置文件、清理下载缓存包、清理不再需要的包、清理无用的语言文件和清理无用的翻译内容。通过这些清理操作可以节省硬盘空间,提高系统的运行效率。 ... [详细]
  • 如何使用PLEX播放组播、抓取信号源以及设置路由器
    本文介绍了如何使用PLEX播放组播、抓取信号源以及设置路由器。通过使用xTeve软件和M3U源,用户可以在PLEX上实现直播功能,并且可以自动匹配EPG信息和定时录制节目。同时,本文还提供了从华为itv盒子提取组播地址的方法以及如何在ASUS固件路由器上设置IPTV。在使用PLEX之前,建议先使用VLC测试是否可以正常播放UDPXY转发的iptv流。最后,本文还介绍了docker版xTeve的设置方法。 ... [详细]
  • systemd-nspawn可以创建最轻量级的容器(ns的意思就是namespace),本文的实验平台是Ubuntu16.04,x86_64机器。本文的目的是:在Ubuntu中用syst ... [详细]
  • #这段代码的作用是实现在地图中随机导航。在ros下需要先加载机器人和相关配置,详请参阅古-月的博客http:blog.csdn.nethcx25909articledetails121 ... [详细]
  • Unity 3D 4.5.1和4.5.2 for Mac的安装与破解方法
    这里有两个版本的unity3dformac可以下载并破解。首先去官网下载unity3dformac4.5.1f3或者4.5.2f1。附上官 ... [详细]
author-avatar
手机用户2502925983
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有