Ubuntu boot recovery after Windows corruption

Source: Internet
Author: User
Tags wubi lenovo

I downloaded and installed Ubuntu in Windows XP. Under normal circumstances, I will provide the option to enter two systems after the startup.

Recently, due to the installation of shared software, Windows cannot be restarted, and even a blue screen can be reinstalled on Windows.

Although it was determined that the BIOS settings were changed, the settings can be restored to windows, but it was suspected that Windows system files were damaged and Microsoft restored the Windows system with one click, as a result, the boot items of the installed Ubuntu operating system disappear and cannot be booted and cannot enter the system again.

Obviously, reinstalling Ubuntu can solve this problem, but Lenovo g550's wireless NIC driver does not support Linux. In addition, many Java and Android source code download configurations have been made on the installed ubuntu, it will take a lot of effort and time to restore to the previous status.

Check the original Ubuntu installation directory, and the file is safe and sound, so you cannot enter the system because the boot is damaged. If you can recover the boot, the system does not need to be reinstalled, which greatly saves time and effort for reinstallation and configuration.

Is the boot recovery possible? One of the key advantages is that before Lenovo's one-click recovery to Windows, it used the data transfer in Lenovo's one-click recovery software to back up all the data on drive C to drive F, that is to say, configuration data for system damage money exists.

The most direct attempt is to directly copy the boot. ini in the data on drive C backed up by drive F together with other data to the current drive C. However, after the restart, it is found that it will be restarted again and again, and Windows cannot be restarted again! At the moment, I got into the nightmare of restoring the system, which means that after the restoration, the new software installed on Windows had to be reinstalled, and many things had come.

However, the installation disk of XP quickly restored the system boot and restored the boot. ini backed up before the above operation. Windows immediately restored the boot to normal.

Next we will go back to the Ubuntu boot issue.

Directly overwriting boot. ini won't work, but modifying boot. ini under the current Boot. ini will eventually solve the problem.

You only need to use NotePad to open boot. ini, and then add the following sentence in the last line:

C:/wubildr. MBR = "ubuntu"

Then, copy the wubidr and wubildr files backed up by drive F. MBR, windata. copy the three DAT files to the current drive C, and restart. the Ubuntu boot item appears under the Windows boot item. Click in and the familiar Ubuntu boot sound will sound, everything is done. The configuration and data inside are not lost. The website bookmarks, Internet functions, input methods, and so on are all in good condition.

To sum up, the key to successful operations is as follows:

1. Before the system restoration, use Lenovo's one-click restoration data transfer function to back up disk C data, including wubidr and wubildr. MBR, windata. dat three Ubuntu boot files still exist, retaining the right and possibility of recovery.

Ii. Baidu search engine help. Of course, the selection of search keywords is even more critical-XP Reinstallation, UBUNTU boot recovery

//////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// //////

References:

Http://chunjix.blog.163.com/blog/static/162010591201031044255748/

Resume the Ubuntu startup Item after Windows 7, Vista, and XP are reinstalled.

Computer Application 16:42:55 read 374 comments 1 font size: LargeMediumSmall subscription

Last night, Windows XP experienced a fault. Before the reinstallation, I used diskgen to rewrite the boot Partition Table. After installing the grub startup of ubuntu, the original Windows version of XP was gone. I searched a bunch of documents online and it was not solved.

 

1. Restore the Ubuntu startup Item after reinstalling XP (use Ubuntu installed with wubi)
I will install wubidr and wubidr In the Ubuntu-> winboot folder. copy two MBR files to the root directory of the C drive, and then use NotePad to open the boot. INI, add C:/wubildr in the last row. MBR = "ubuntu", and then save and restart. The Ubuntu startup Item I want is displayed !!!

Ii. Restore the Ubuntu startup item under Vista or Windows 7 (Ubuntu installed with wubi)
Recently, Windows 7 (Vista is the same) has been reinstalled, so I don't want to let the previously installed Ubuntu have no startup items, and Windows 7 (Vista is the same) has no boot. INI file editing method, Because ubuntu was installed in Windows with wubi!
Recovery Method:
1. Copy the wubidr and wubidr. MBR files in the Ubuntu-> winboot folder to the C root directory.
2. In "run", Enter cmd to the command prompt.
In the command interface bcdedit/create/D "Linux"/Application bootsector
We can get C:/Windows/system32> bcdedit/create/D "ubuntu"/Application bootsector.
// The name item {dbff544b-a7c4-11dd-a51d-00155803ebb4} displayed on the Multi-boot menu is successfully created.
3. Copy the ID in {}, such as: dbff544b-a7c4-11dd-a51d-00155803ebb4
4. Enter the following command (Note: Replace the ID in {} with the ID obtained in step 1)
Bcdedit/set {ID} device partition = C:
Bcdedit/set {ID} path/wubildr. MBR
Bcdedit/set {ID} description "ubuntu"
Bcdedit/displayorder {ID}/addlast

Restart Ubuntu after MBR is damaged.

The reason is that XP won't provide us with system boot programs during installation. Linux has system boot programs, such as grub. It is usually installed in the first hard disk (hd0), the first partition (HD, 0) the first sector, so if we install XP on the first partition, then reinstall XP, grub is damaged and the system cannot be guided any more.

If this happens, you have to reinstall grub. Don't worry, Linux won't be so easy to reinstall. The following describes how to install GRUB:

Method 1

1. Start with live CD
2. Open a terminal and run the $ sudo grub command (this may take a while). You will see a prompt like 'grub> '.
3. enter find/GRUB/stage1 after the prompt 'grub> '. You will get a running result. For example, the result on my machine is (hd0, 5) (This command is actually used to find the partition where/boot is located)
4. Run grub> root (hd0, 5) (enter the running result on your machine)
5. Run grub> setup (hd0). A few lines of text are displayed, and "... succeeded" is fixed successfully!
6. Run quit
7. restart the computer and retrieve the live CD.

Second, manually guide Linux.

Grub> root (hdx, Y)

# Generally, both the IDE and SATA hard disks are hd0, and Y is the partition where your Ubuntu system is located. The D disk is usually 5. You can try it several times by yourself,
# Grub will prompt if it is incorrect. The following is similar

Grub> kernel (hdx, Y)/boot/vmlinuz-2.6.16

# Not necessarily a vmlinuz-2.6.16, you asked the brother installed with you,/boot/the name of the file starting with vmlinuz,
# I am in the office and can't help you without Ubuntu
The following initrd.img-2.6.16should also be updated, which can be called initrd.gz.

Grub> initrd (hdx, Y)/boot/initrd. img-2.6.16

Grub> boot

# Note: The above command only allows you to access ubuntu. You need to completely solve the problem or reinstall grub. You can follow the first method to reinstall grub,
# You can install Ubuntu directly. I still don't understand how to install it,
# You can refer to the grub document or Google

[Switch] After windows is reinstalled, restart Ubuntu from. Below is a great solution to this problem:
1. Use livecd (highly recommended)
2. Use the Security CD
3. Use grub4dos
4. Use a grub floppy disk

1. Use livecd (highly recommended)
Use any Linux livecd you like (for example, UBUNTU 6.06 desktop CD)
Enter:
Sudo Su
Enter the password:
Grub

You should see something like this:
[Code] grub> [/Code]

Enter:
[Code] root (hdx, Y)
Setup (hdx) [/Code]

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, starting from 1), (hd0, 0) indicates the first partition of the first hard disk, (hd0, 1) it indicates the first 2nd partitions of the first hard disk, and (hd1, 4) indicates the 2nd partitions of the first hard disk.
(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)
Here (hdx, Y) is the partition where the/boot directory is located (normally, that is, the partition where you install the Ubuntu system, unless/boot is separated during installation .) If you do not know how many 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 [/Code]
Exit grub and repeat the system.
Now, 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 [/Code]

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 6. 06 alternative CD.

1. Use Ubuntu to install CD for boot
2. When the "Boot:" prompt appears, type "Rescue" as the boot parameter.
[Code] boot: Rescue [/Code]
3. Follow the instructions on the screen
4. Assume that the/BOOT disk is located at/dev/hda.
[Code] # grub-install/dev/hda [/Code]
The following is another method.
[Quote]
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. [Code] ~ # Mkdir/Ubuntu
~ # Fdisk-L/dev/discs/disc0/disc
~ # Mount <location of your Ubuntu root device>/Ubuntu/
~ # Chroot/Ubuntu/
Sh-2.05b # [/Code]
6. Assume that/dev/hda1 is the address of the/boot partition.
7. [Code] sh-2.05b # grub
Grub> root (hd0, 0)
Grub> setup (hd0)
Grub> quit [/Code]

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 [/Code]
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
[Quote] oneleaf wrote:
Copy grldr to C:/, edit C:/boot. ini, and add a line:
[Code] C:/grldr = "Grub" [/Code]
Then manually enter the startup command
For example: [Code] 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 [/Code]
After entering, reinstall grub.

Re-install GRUB:
For example, assume that the/BOOT disk is located in/dev/hda.
[Code] # grub-install/dev/hda [/Code]
3.2 replace grub with grub4dos to introduce the fuse system
[Quote] yonsan wrote:
(I wrote it by memory. If it is not perfect, please correct it)
If your system is currently using GRUB boot, check/boot/GRUB/menu before performing any operations. the content of LST. We recommend that you set/boot/GRUB/menu. LST copies one copy for 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 to overwrite C:/boot/GRUB/menu. lst with the menu. lst you copied from Linux.
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. Use grub zookeeper
It is very simple. You only need to use grub to renew the dynamic 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:
[Quote] youngong writes:
Start the computer with the installation CD, enter rescue and press enter, and then execute "grub-install/dev/hda3" to reinstall grub to the Ubuntu partition, create a boot floppy disk with "grub-install/dev/fd0" (if you want to install grub on MBR, grub-install/dev/hda is required ). Restart your computer with the created floppy disk to go to Ubuntu Linux. To restore my original nt loader Linux boot method, extract the hda3 Partition Boot Record, that is, "dd If =/dev/hda3 of =/Linux. lnx BS = 512 COUNT = 1 ", and the generated Linux. copy the lnx file to the root directory of Zone C and modify the boot. add "C:/Linux. lnx = Ubuntu Linux 5.04 ", you can choose to start Ubuntu during hard disk 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.

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.