Home Database Mysql Tutorial ubuntu下更新grub2

ubuntu下更新grub2

Jun 07, 2016 pm 03:43 PM
ubuntu Multiple renew computer system

电脑上装多个系统的难免会出现进不了系统的问题,多数是grub的问题。 使用LiveCD光盘启动电脑后进入光盘中的Ubuntu系统,或者用USB启动,打开终端。 sudo -i 先来找一找你的ubuntu安装在那个分区,用: fdisk -l 之后会出来一张表,表中有你的分区信息,找到

电脑上装多个系统的难免会出现进不了系统的问题,多数是grub的问题。

使用LiveCD光盘启动电脑后进入光盘中的Ubuntu系统,或者用USB启动,打开终端。

sudo -i

先来找一找你的ubuntu安装在那个分区,用:

fdisk -l

之后会出来一张表,表中有你的分区信息,找到你安装Ubuntu的分区,如果你不确定的话就找id为83的。下面假如说你的Ubuntu安装在/dev/sda1 分区,则下面挂载原系统的根目录:

mount /dev/sda1 /mnt

将/dev/sda1挂载到了/mnt下,当然你也可以选其他地方。这里注意,如果你有单独为/boot分区的话,要单独挂载一次 /boot,比如说 如果你原来的/boot挂载到/dev/sda12上了,那个你这里要再输入

mount /dev/sda12 /mnt/boot

下面是最后一步了:

grub-install --root-directory=/mnt /dev/sda

(注意:/mnt后面有空格键)
如果看到
Installation finished.No Error Reported.
就表示已经成功啦!
这时重新启动你的电脑,就能看到grub2的引导界面了,但是这时只能用来引导Ubuntu,还暂时无法引导Windows 7,这时选择进入Ubuntu,再找到并启动终端,在终端输入如下命令:

sudo update-grub2

更新一下grub2就可以了。
按照提示输入密码,如果顺利的话,会出现如下类似语句,那就表示成功了。

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-26-generic
Found initrd image: /boot/initrd.img-3.2.0-26-generic
Found linux image: /boot/vmlinuz-3.2.0-25-generic
Found initrd image: /boot/initrd.img-3.2.0-25-generic
Found linux image: /boot/vmlinuz-3.2.0-23-generic
Found initrd image: /boot/initrd.img-3.2.0-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
Found Ubuntu 10.04.3 LTS (10.04) on /dev/sda10
Found Ubuntu 10.04.3 LTS (10.04) on /dev/sda9
done
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to fine-tune deepseek locally How to fine-tune deepseek locally Feb 19, 2025 pm 05:21 PM

Local fine-tuning of DeepSeek class models faces the challenge of insufficient computing resources and expertise. To address these challenges, the following strategies can be adopted: Model quantization: convert model parameters into low-precision integers, reducing memory footprint. Use smaller models: Select a pretrained model with smaller parameters for easier local fine-tuning. Data selection and preprocessing: Select high-quality data and perform appropriate preprocessing to avoid poor data quality affecting model effectiveness. Batch training: For large data sets, load data in batches for training to avoid memory overflow. Acceleration with GPU: Use independent graphics cards to accelerate the training process and shorten the training time.

deepseek image generation tutorial deepseek image generation tutorial Feb 19, 2025 pm 04:15 PM

DeepSeek: A powerful AI image generation tool! DeepSeek itself is not an image generation tool, but its powerful core technology provides underlying support for many AI painting tools. Want to know how to use DeepSeek to generate images indirectly? Please continue reading! Generate images with DeepSeek-based AI tools: The following steps will guide you to use these tools: Launch the AI ​​Painting Tool: Search and open a DeepSeek-based AI Painting Tool (for example, search "Simple AI"). Select the drawing mode: select "AI Drawing" or similar function, and select the image type according to your needs, such as "Anime Avatar", "Landscape"

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Mar 05, 2025 pm 05:57 PM

Detailed explanation and installation guide for PiNetwork nodes This article will introduce the PiNetwork ecosystem in detail - Pi nodes, a key role in the PiNetwork ecosystem, and provide complete steps for installation and configuration. After the launch of the PiNetwork blockchain test network, Pi nodes have become an important part of many pioneers actively participating in the testing, preparing for the upcoming main network release. If you don’t know PiNetwork yet, please refer to what is Picoin? What is the price for listing? Pi usage, mining and security analysis. What is PiNetwork? The PiNetwork project started in 2019 and owns its exclusive cryptocurrency Pi Coin. The project aims to create a one that everyone can participate

How to ask deepseek How to ask deepseek Feb 19, 2025 pm 04:39 PM

The search accuracy of DeepSeek depends on the way of asking questions. To achieve ideal results, the question should contain the following key elements: Clear topic: Specific specified information objectives. Specific angles: Cut into the topic from a specific perspective. Expected output form: define the desired result type (summary, analysis, list, etc.).

How to download deepseek How to download deepseek Feb 19, 2025 pm 05:45 PM

Make sure to access official website downloads and carefully check the domain name and website design. After downloading, scan the file. Read the protocol during installation and avoid the system disk when installing. Test the function and contact customer service to solve the problem. Update the version regularly to ensure the security and stability of the software.

How to use deepseek How to use deepseek Feb 19, 2025 pm 04:45 PM

DeepSeek is an efficient data search and analysis tool with an indexing mechanism at its core. Factors that affect their efficiency include: data type, data size, search strategy, and DeepSeek performance. High-quality data, refined search queries and sufficient computing resources are essential to optimize search results.

How to adjust Sesame Open Exchange into Chinese How to adjust Sesame Open Exchange into Chinese Mar 04, 2025 pm 11:51 PM

How to adjust Sesame Open Exchange to Chinese? This tutorial covers detailed steps on computers and Android mobile phones, from preliminary preparation to operational processes, and then to solving common problems, helping you easily switch the Sesame Open Exchange interface to Chinese and quickly get started with the trading platform.

Ouyi official website link Ouyi okx official website entrance link Ouyi official website link Ouyi okx official website entrance link Mar 04, 2025 pm 11:42 PM

Ouyi’s official website provides a safe and reliable digital asset trading platform, and users can obtain real and valid official website addresses and entrance links through official channels. To ensure the security of funds and transaction compliance, please be cautious in distinguishing between official websites and false links, and go to the official website to confirm the latest information. The Ouyi platform is subject to a number of international certifications and license supervision, and is committed to creating a safe and transparent trading environment for users.

See all articles