As part of the company’s IT policy, I have to install Symantec PGP. I have dual-boot by Grub with Ubuntu and Windows7. I only encrypted the “C:”(sda1) partition by PGP. And both of my Windows and Ubuntu work fine.
But yesterday after I upgrade my Ubuntu Linux kernel and reboot, I find the Window7 boot menu entry in Grub is missing, which makes me can’t log in the Windows system.
Today After I do some investigation I find the solution to fix this problem, from “here“ and “here“.
First check the partition information. In my case, I can see that the Symantec PGP program split my original “sda1” into “sda1” and “sda2”. Or I should say: it create a new “sda1” for itself(maybe for add the booting information in the present “sda1”) and move the original “sda1” to the present “sda2”. This is important for the original Windows7 boot information is not on “sda1” now but “sda2”.(I find this is not right because the windows grub menu item works fine after the Synmantec PGP was installed, it disappears right after the Linux kernel is updated, which means the computer has “sda1” and bootable “sda2” originally.)
1 | user@user-ubuntu:~$ sudo fdisk -l |
Then what I do is to add the Windows boot entry to the “/boot/grub/grub.cfg”, and also this information should be add to the “/etc/grub.d/40_custom” as well. For after each time the Linux kernel is updated, the “/boot/grub/grub.cfg” will be refreshed. The information in “/etc/grub.d/40_custom” may be used to regenerate the “grub.cfg” file(This may also not be true, in that case I should manually add the boot entry to “/boot/grub/grub.cfg” each time after the Linux Kernel is updated).
1 | cd /boot/grub |
1 | menuentry "Microsoft Windows 7" { |
Reboot.