It was originally a Windows 7 + Ubuntu dual system. After Windows 7 is reinstalled, Grub of Ubuntu disappears.
This article is not a detailed document, simple record
Refer to menu. lst
Create a new text file named c: menu. lst and the content is
Color black/cyan yellow/cyan
Timeout 15
Default 0
Title Ubuntu
Root (hd0, 7)
Kernel/boot/vmlinuz-2.6.32-21-generic root = UUID = b8a285d9-f33e-4d9c-b72c-2c11175add9e ro quiet splash
Initrd/boot/initrd. img-2.6.32-21-generic
When you start windows 7, you can select grub for dos and then select Ubuntu
The command prompt (initramfs) appears)
Enter ls/dev/disk/by-uuid
Copy all the items that appear. In theory, the longest string is the uuid of the Ubuntu partition. replace this uuid with it. All the items must be in lower case.
Kernel/boot/vmlinuz-2.6.32-21-generic root = UUID = 3c6891b6-180f-4972-ab3f-d4f5911d2958