After XP is reinstalled, the MBR is written by XP, causing grub to fail to work. solution: Start from CD-ROM and start from live CD to desktop. Open the terminal or switch to a tty (CTRL + ALT + F1 ). Input: sudo grub Input: Find/boot/GRUB/stage1 # Some people say this step is not needed, but I personally think this step should be added. Input: Root (hd0, x) # enter the data fed back by the find command Input: setup (hd0) # Write (hd0, x) If you want to use XP for multi-system boot) Enter quit # To exit grub. Restart. If there is no accident, congratulations! You can see the dual-System Boot of XP and ubuntu. ^_^ --------------------------------------------------------------------------- How to retrieve Ubuntu after Windows XP is reinstalled First download grub for DoS Install and download the ext3 partition Access software (with ext2fsd or explore2fs) After running, copy all the boot folders in the Ubuntu root directory to drive C. After restarting, select grub in the boot menu to go to Ubuntu. Key Point: grub for DOS is required for Ubuntu Linux. Therefore, this line is displayed in c: \ Boot. ini: C: \ grldr = "Grub" ext3 The boot folder under the partition contains a bootable file, which needs to be placed in the C root directory. Bytes ------------------------------------------------------------------------------------------------------- 1. Use livecd (highly recommended) 2. Use Security CD 3. Use grub4dos 4. Use grub zookeeper 1. Use livecd (highly recommended) Use any Linux livecd you like (for example, UBUNTU 6.06 desktop CD) Enter: Code: Sudo Su Grub Code: grub> Enter: Code: Root (hdx, Y) Setup (hdx) Please do not enter them all the same! Understand the meaning of these commands. HD indicates the hard disk in the format (HD hard drive number, partition number) Starts from scratch. So (according to daily habits, count from 1 ), (Hd0, 0) indicates the first partition of the first hard disk, (Hd0, 1) indicates the first 2nd partitions of the hard disk, (Hd1, 4) represents 2nd partitions of 5th hard disks. (Note: In Linux, hda1 is used to represent the first partition of the first hard disk. Do not mix it with the representation in grub .) Root (hdx, Y) (hdx, Y) is the partition of the/boot directory. (Normally, it is the partition where you install the Ubuntu system, unless/boot is separated during installation .) If you do not know which partitions you have installed Ubuntu in, you can enter root (hd0, press the tab key to complete. (Suppose you have installed Ubuntu on the first hard disk) after you press the tab, you will see some information about each partition. Generally, you can see where your Ubuntu system is installed by the partition size and format. Usually setup (hdx) is setup (hd0 ). (Most of you have installed Ubuntu on the first hard disk .) Note that do not enter setup (hd0, 0 ). I have made this mistake. (If you do not copy the command and operate it by memory, you may make this mistake .) Last, use Code: Quit Exit grub and repeat the system. Now, let's summarize the commands used. (We recommend that you copy the following code on paper. If you are still confused about the meaning of (hdx, Y), You 'd better copy the above explanations .) Code: Sudo Su Grub Root (hdx, Y) Setup (hdx) Quit Is it easy? The key is to understand the hard disk partition representation in grub. 2. Use Ubuntu Security CD to restore Ubuntu Desktop-CD may not be used. You may need 7.10 alternative CD. 1. Use Ubuntu to install CD for boot 2. When the "Boot:" prompt appears, type "Rescue" as the boot parameter. Boot: Rescue 3. Follow the instructions on the screen 4. Assume that the/BOOT disk is located at/dev/hda. Code: # Grub-install/dev/hda The following is another method. Firehare wrote: 1. Start the system to install CD on Ubuntu 2. Run the command on the screen until (never exceed this step) [!] Fdisk Disks 3. Press 'ctrl + ALT + f2' 4. Press 'enter' to enter the terminal 5. ~ # Mkdir/Ubuntu ~ # Fdisk-L/dev/discs/disc0/disc ~ # Mount <location of your Ubuntu root device>/Ubuntu/ ~ # Chroot/Ubuntu/sh-2.05b # 6. Assume that/dev/hda1 is the address of the/boot partition. Sh-2.05b # grub Grub> root (hd0, 0) Grub> setup (hd0) Grub> quit 1. Use Ubuntu to install CD for boot 2. When the "Boot:" prompt appears, type "Rescue" as the boot parameter. Boot: Rescue 3. Follow the instructions on the screen 4. Assume that the/BOOT disk is located at/dev/hda. Code: # Grub-install/dev/hda 3. Use grub for DoS You can use grub4dos to re-install grub without Ubuntu or livecd. You can even use grub4dos instead of grub to introduce the kernel system. 3.1 Use grub4dos to re-install grub Lower limit http://www.ubuntu.org.cn/download/installformharddisk/grldr Oneleaf writes: Copy grldr to C :\, edit c: \ Boot. ini, and add a line: C: \ grldr = "Grub" Then manually enter the startup command Example: Root (hd0, 0) Kernel/vmlinuz-2.6.10-5-686 root =/dev/hdb5 Ro quiet splash Initrd/initrd. img-2.6.10-5-686 Savedefault Boot After entering, reinstall grub. Re-install GRUB: For example, assume that the/BOOT disk is located in/dev/hda. Code: # Grub-install/dev/hda 3.2 replace grub with grub4dos to introduce the fuse system Yonsan wrote: (I wrote it by memory. If it is not perfect, please correct it) If your system is currently using GRUB boot mode, check the content of/boot/GRUB/menu. lst before performing the operation, We recommend that you copy/boot/GRUB/menu. lst to the backup (copy it to the FAT32 partition for storage )! Enter the Window environment 1) download grub020p.zip and decompress it to the C root directory. Open drive C and check whether the following files exist. C: \ Boot (folder) C: \ changelog.txt C: \ compile C: \ copying C: \ grldr C: \ grub4lin C: \ grub-0.95-patch1-startups C: \ grub-0.95-patch2-findroot C: \ grub-0.95-patch3-ntfs C: \ grub-0.95-patch4-emulation C: \ grub-0.95-patch5-splash C: \ grub-0.95-patch6-scdrom C: \ grub-0.95-patch7-bioscdrom C: \ grub.exe C: \ grub. pif C: \ readme.txt C: \ 2.16.xpm.gz C: \ scratchpad.txt 2) Modify c: \ Boot \ grub \ menu. lst and overwrite c: \ Boot \ grub \ menu. lst with the menu. lst you copied from the Linux system. 3) access the grub command line (press the C key when the grub boot menu appears) > Root (hd0, 0) > Setup (hd0) 4) restart the computer 4. It is very simple to use grub zookeeper. You only need to use grub zookeeper to activate the machine. How to Create grub zookeeper? If you have not performed a grub crash and want to use the Resume function to restore the Server Load balancer instance, the following figure appears: Youngong wrote: Start the computer with the installation CD, enter rescue and press ENTER Run "grub-install/dev/hda3" to reinstall grub to the Ubuntu partition. Create a boot floppy disk with "grub-install/dev/fd0" (Grub-install/dev/hda is easier if you plan to install grub on MBR ). Restart your computer with the created floppy disk to go to Ubuntu Linux. In order to restore the way my original nt loader started Linux, then extract the hda3 Partition Boot records That is, "dd If =/dev/hda3 of =/Linux. lnx BS = 512 COUNT = 1 ", Copy the generated Linux. lnx file to the root directory of Zone C, Modify boot. ini and add "C: \ Linux. lnx = Ubuntu Linux 5.04 ", You can choose to start Ubuntu during Hard Drive boot. In fact, the boot floppy disk has only played a transitional role during the entire process, but it also facilitates future maintenance of the system. Zhan wrote: Today, the Windows system is reinstalled, and the old XP is installed as 2003. After installation, use the Ubuntu installation disk grub-install/dev/hda to restore Linux. However, there is only one WINXP option at startup. When you enter, the file system cannot be identified and cannot be started. Then a grub will stop, but the Linux system can still be used. Do you guys have any good solutions? I don't want to reload it anymore !! For details about how to start Windows, see: Booting 'Microsoft Windows XP professional' Root (hd0, 0) Filesystem type unkown, partition type 0x7 Savedefault Makeactive Chainloader + 1 Grub The buttons are useless, but CTRL + ALT + Delete can be restarted. Yonsan wrote: Use the following method to guide windows Code: # Windows Title windows Rootnoverify (hd0, 0) Chainloader + 1 Bytes ------------------------------------------------------------------------------------------------------- How to fix Ubuntu failure after Windows is reinstalled If your computer is windows or Ubuntu, you may encounter such problems. After windows is reinstalled, you cannot enter ubuntu. In general, there are two solutions to this problem! The simplest method: 1. Use another livecd disk to mount all disks. 2. Copy/boot/grub from the original Ubuntu to win's C drive. 3. Modify the boot. ini file in drive C of win. It may be hidden and read-only. You need to modify the attributes yourself! 4. Add c: \ grldr = Ubuntu at the end of the file. 5. Restart ubuntu. Method 2: Note that this method can only be performed under Ubuntu before Windows is reinstalled !!! First, make sure that your grub is normal and can start Linux Then boot to Ubuntu if your IDE Hard Disk Run: Sudo dd If =/dev/hda of =/Media/Linux. lnx BS = 512 COUNT = 1 If your hard disk is identified as SDA, run Sudo dd If =/dev/SDA of =/Media/Linux. lnx BS = 512 COUNT = 1 Then you can find the Linux. lnx file in/media. Copy it to your win root directory, usually c: \, restart win, and modify the boot. ini file under the root directory. Add the following at the end of the file: C: \ Linux. lnx = "Linux OK. Restart ubuntu. Note: You need to back up this file to a network hard disk or a USB flash disk. After you reinstall win, you only need to copy the file to the root directory of Win and modify boot. ini! Conclusion: In comparison, the first method is simpler, but I think the second method is more permanent. Of course, you can choose to reinstall grub to restore Ubuntu boot. But I don't think it will be easy for beginners! Thanks for providing the sun391 and enjoyforfun methods. ------------------ The preceding content is transferred from a webpage ------------------------------------ Supplement: this problem may not occur if you use a ghostxp installation disk to install Windows (at least I use the platinum premium version 5.7.1) Bytes ------------------------------------------------------------------------------------------------------- When our fragile Windows system suffers regular paralysis and cannot be fixed, we can only reinstall the system, we found that the installation of "overlord" windows did not take into account the operating system boot on the hard disk MBR.Program(Grub), directly Delete, only write Windows boot information. Whether Microsoft is interested or not, this shows the bad habits of windows and the acts of Microsoft robbers. What should we do, discard windows? But we still need our beloved game. Windows is already on my hard disk because the game still has a subsidiary system, and we have to endure it. Develop the DIY spirit of Linux people, and we will find the lost Linux boot program on our own. 1. Use Ubuntu live to boot to Ubuntu live Mode 2. Run the following command on the Ubuntu terminal: $ Sudo grub In fact, grub not only appears in front of us during our guidance, we can also directly run the grub command to enter the simulation GRUB boot program. 3. Then, run the following command in grub command line mode: Root (hdx, Y) Note: X indicates the hard disk number, and the number "0" indicates the first hard disk on our machine. The order of grub is from "0. Similarly, if your system is on the second hard disk, it is 1, and so on. In addition, "Y" indicates the Partition Number of the hard disk/boot. If you do not know the Partition Number, enter the following information. You can press the tab key after entering a comma, in this way, the partition information of the hard disk can be listed. 4. Install grub and run the following command: Setup (hdx) Setup (hdx) writes grub to the MBR of the "X" hard disk. If it succeeds, there will be a successful ...... 5. log out of grub after installing it. Quit 6. Restart the machine and reboot Linux. $ Sudo reboot Note: In fact, after installing grub, we also need to check whether the grub configuration file is correct by using the mount command in Ubuntu live mode to load the original Ubuntu partition, information in the grub/menu1.st file in the original/boot directory |