WINXP and Ubuntu have been used for a long time. Later, WINXP experienced some problems and became slower and slower. Well, since the main operating system is unbutu, in terms of user experience, win7 is undoubtedly a better choice.
After installing Windows 7, the startup items of ubuntu are lost, and there is no Ubuntu installation disk of AJ brother in hand. You can only use tools to guide the installation.
A lot of related information on the Internet is from the old Ubuntu version. After struggling for a few hours, I finally got it done.
Required tools: 1. grub4dos 2. Ubuntu livecd or Linux System in the U disk. I use knoppix.
You can start it after you are ready.
1. go to Linux in Ubuntu or USB flash drive of livecd and find: File System/boot/GRUB/grub. CFG, open it in notepad, and write down the Ubuntu startup command (there are many, we only need the first one );
2. Install grub4dos. After decompression, paste grldr, grldr. MBR and menu. lst to the X disk (the partition where win7 is located ).
3. Create boot. ini on disk X, and type [boot loader]
[Operating systems]
C: \ grldr. MBR = "grub4dos"
;
4. type the Ubuntu startup information you noted down before in menu. lst (the system parameters are different for different computers)
Title unbuntu 10.10
Root (hd0, 1)
Kernel/boot/vmlinuz-2.6.35-24-generic root = UUID = 1fe21987-20c1-4eb1-9a8a-c943e53b2f7e Ro quiet splash
Initrd/boot/initrd. img-2.6.35-24-generic
Boot
5. Restart, select grub4dos, and select unbuntu 10.10. The cute logo appears.
You can also directly use the grub4dos commondline to enter the system, but it is troublesome.
If the primary PE is used, grub4dos will be broken. Repeat steps 2-> 5.
That's it.
This article was written a year ago and was published on campus. There were not many people reading it, but I didn't care much about it at the time.
But these two days I have been on a computer and found that this article is really written... Bad.
The description is unclear, and there are spelling mistakes. I think of a sentence: Wrong comments are more terrible than no comments.
Make the following corrections:
If Ubuntu is installed on the computer, the boot item is deleted after win7 is reinstalled to drive C. To reboot Ubuntu, we first installed grub4dos on win7.
The principle is to use bootmgr of win7.
Preparation software: grub4dos software.
Steps:
1. Create boot. ini in drive X and write
[Boot loader]
[Operating systems]
C: \ grldr. MBR = "grub4dos"
In this way, bootmgr can read the boot information from boot.int at startup, and can choose to start win7 or grub4dos at startup;
2. Decompress grub4dos and copy the grldr, grldr. MBR, and menu. lst files in the folder to drive C. After grub4dos is installed, select grub4dos boot;
3. menu. the boot information is recorded in lst. Here we use it to guide ubuntu. First, we need to obtain the startup information of ubuntu. All systems after 10.10 are stored in/boot/GRUB/grub. cfg. There are two methods: 1) After Ubuntu is installed, enable/boot/GRUB/grub. CFG, find the following field
Menuentry 'ubuntu, Linux 3.0.0-12-generic '-- class Ubuntu -- class GNU-Linux -- class GNU -- class OS {
Recordfail
Set gfxpayload = $ linux_gfx_mode
Insmod gzio
Insmod part_msdos
Insmod ext2
Set root = '(hd0, msdos1 )'
Search -- no-floppy -- FS-UUID -- set = root 60aeeaf3-1d61-47f4-a2c5-72d18e775e86
Linux/boot/vmlinuz-3.0.0-12-generic root = UUID = 60aeeaf3-1d61-47f4-a2c5-72d18e775e86 Ro quiet splash vt. handoff = 7
Initrd/boot/initrd. img-3.0.0-12-generic
}
The red field is useful information. Create a new document to store it. 2) if the startup information is not recorded before, use Ubuntu livecd after installing win7, or a USB flash disk in Linux;
4. Edit menu. lst,
Title unbuntu 10.10
Root (hd0, 0)
Kernel/boot/vmlinuz-3.0.0-12-generic root = UUID = 60aeeaf3-1d61-47f4-a2c5-72d18e775e86 Ro quiet splash
Initrd/boot/initrd. img-3.0.0-12-generic
Boot
Note the second line, grub. root = '(hd0, msdos1)', menu. if this is also the case in the lst, an error will be prompted. If it is changed to hd0, it will be okay after 0, meaning it will be mounted to the first partition of the first hard disk.
5. grub4dos has many other functions, such as guiding PE and installing the system, which is meaningless here.