How to fix Grub in Debian-Debian information of Linux release-details are as follows. Mount the local hard disk with the Debian mounting disk, and repair the Debian Grub method:
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.
Only the device file is not/dev/hdaX,
Instead, it is/dev/ide/host0/bus0/target0/lun0/partX.
/Dev/ide/host0/bus0/target0/lun0/part1 is equivalent to/dev/hda1
After mounting the chroot file, you can perform a lot of work, such as repairing Grub,
Mount partition:
1. Start the installation program with the Debian installation disk (before the partitioning phase)
2. press alt + F2
3. Press enter to get a Shell.
4. Commands
# Mkdir/mnt/1
# Mount/dev/ide/host0/bus0/target0/lun0/part1/mnt/1
Now you have mounted/dev/hda1 to/mnt/1.
Solution 1:
1. Start the installation program with the Debian installation disk (before the partitioning phase)
2. press alt + F2
3. Press enter to get a Shell.
4. (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
The prompt successful is OK.
In addition to the above method of attaching a local hard disk and then repairing it, Grub has another method as follows:
Solution 2:
1. Run the grub command:
Method 1: After the preceding method enters shell, enter the command: sudo grub
Method 2: Use the boot CD to go To the linux system maintenance tool. When the boot page of the console is started based on the Linux GUI, do not select the system and press the "c" key on the keyboard, go to the grub editing page and run grub.
2. In grub mode, enter the following command:
Grub> find/boot/grub/stage1 ("/boot/grub/stage1" fill in the path of "stage1" in your system based on the actual location)
3. After the command is executed, the output result is displayed, for example:
(Hdx, y)
The values of x and y are obtained based on the actual machine parameters.
4. In grub mode, enter the following command:
Grub> root (hdx, y)
5. In grub mode, enter the following command:
Grub> setup (hdx)
The repair is completed.
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