Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Ubuntu Live CD to repair Grub Boot under Ubuntu

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to use Ubuntu Live CD to repair Grub boot under Ubuntu". The content of the article is simple and clear and easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use Ubuntu Live CD to repair Grub boot under Ubuntu".

This article takes Ubuntu Live CD repairing Grub boot as an example, and Fedora has been installed in / dev/sda3.

First make Ubuntu to start USB

The code is as follows:

Sudo dd if=ubuntu-13.10-desktop-amd64.iso of=/dev/sdb # / dev/sdb is the USB drive letter

1. Use startup USB to enter the Ubuntu trial environment

two。 Check the status of the hard disk partition and get the Linux system installation partition number

The code is as follows:

Sudo fdisk-l

View the output, and then determine which hard disk and partition the Linux system is installed on based on the file type and partition size. My computer has Fedora installed in / dev/sda3.

Alternatively, you can open the Gparted graphical tool to view partition information.

Mount the Fedora installation partition

3. We know that Fedora is installed on / dev/sda3, so we can mount the Fedora installation partition with the following command. You need to change / dev/sda3 to your own Linux installation partition.

The code is as follows:

Sudo mount / dev/sda3 / mnt

4. Mount other required directories (use-- bind)

The code is as follows:

Sudo mount-- bind / dev / mnt/dev

Sudo mount-- bind / proc / mnt/proc

Sudo mount-- bind / sys / mnt/sys

5.Chroot to the Linux system on the hard disk

The code is as follows:

Sudo chroot / mnt

6. Install & update Grub

The code is as follows:

Grub2-install / dev/sda

Grub2-mkconfig-o / boot/grub2/grub.cfg

7.Grub has been repaired successfully, and we also need to exit the chroot environment and uninstall the mounted devices and directories:

The code is as follows:

Exit # exit the chroot environment

Sudo umount / mnt/dev

Sudo umount / mnt/proc

Sudo umount / mnt/sys

Sudo umount / mnt

8. Restart!

Thank you for reading, the above is the content of "how to use Ubuntu Live CD to repair Grub boot under Ubuntu". After the study of this article, I believe you have a deeper understanding of how to use Ubuntu Live CD to repair Grub boot under Ubuntu, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report