How to fix Grub with Debian mounting disk and attach local hard disk

Source: Internet
Author: User
Use the Debian installation disk to repair Grub and mount the local hard disk-Debian information for the Linux release. For more information, see the following. As long as you enter the Debian Installer (the hardware identification process may be passed, but it is before the partitioning stage)

You can mount the local hard disk partition.

The device file is not/dev/hdaX.

Instead, they include/dev/ide/host0/bus0/target0/lun0/partX.

/Dev/ide/host0/bus0/target0/lun0/part1 is equivalent to/dev/hda1

Mount the file and run the chroot command to perform a lot of work, such as repairing Grub.

Instance 1, Mount partition:
Start the system with the Debian installation disk and enter the installation program (before the partitioning phase)

Press alt + F2
Press enter to get a Shell

Command
# Mkdir/mnt/1
# Mount/dev/ide/host0/bus0/target0/lun0/part1/mnt/1

Now you have mounted/dev/hda1 to/mnt/1.

Instance 2, repair Grub:
Start the system with the Debian installation disk and enter the installation program (before the partitioning phase)

Press alt + F2
Press enter to get a Shell
(Assume that your Linux disk is/dev/hda in/dev/ide/host0/bus0/target0/lun0/part6)

Command
# Mount/dev/ide/host0/bus0/target0/lun0/part6/mnt
# Chroot/mnt
# Grub-install/dev/hda
# Exit

Yes.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.