Sunday, September 24, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  3] [ 0]  / answers: 1 / hits: 6653  / 11 Months ago, sat, december 3, 2022, 4:35:37

Ok so as many of you may know the Windows 8 developer preview was released today and as such I'm very eager to use it but I have both Ubuntu and Windows 7 installed on my machine. I don't want to disturb these drives and have recently set up a dedicated grub partition on /media/sdb8

My question is if I install windows 8 will it overwrite the grub partition and if so what are the steps I should take to recover it.

More From » grub2


Windows 8 will not overwrite your boot partition (/media/sdb8) if you you specifically tell Windows not to do so during the installation process (hard disk setup where you select which partition to install C: drive on...). But Windows 8 will overwrite your MBR, as far as I know. So, once Windows 8 is installed, you will not be able to boot into Ubuntu; even though you will still be able to boot into Windows 7.

To fix this problem, you will need the same version of the Ubuntu LiveCD from which you had installed Ubuntu. Using the LiveCD, you can fix the MBR to show a boot screen to select Windows 8, 7 and Ubuntu. The detailed instructions can be found here:

I am listing them here for convenience.

  1. Boot the LiveCD Desktop.

  2. Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.

  3. Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L". sudo fdisk -l or sudo blkid. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For most users the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently. Example: the MBR may be installed on /dev/sdb and the Ubuntu partition may be on /dev/sdb3.

  4. Mount the partition containing the Ubuntu installation: sudo mount /dev/sdXY /mnt. Example: sudo mount /dev/sdb3 /mnt. Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot. Since you have a separate boot partition (which contains grub - /media/sdb8 - you will need to run the following command as well: sudo mount /dev/sdb8 /mnt/boot. Note: If the user has a separate /home partition, this must be mounted to /mnt/home. Encrypted home partitions should work.

  5. Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device. If you are using 10.04 or 10.10, then run sudo grub-install --root-directory=/mnt /dev/sdX. Example: sudo grub-install --root-directory=/mnt /dev/sdb. If you are using 11.04 or 11.10, then run sudo grub-install --boot-directory=/mnt/boot /dev/sdX. Example: sudo grub-install --boot-directory=/mnt/boot/ /dev/sdb.

  6. Reboot into the Ubuntu installation on your hard disk.

  7. Refresh the GRUB 2 menu by typing the following command in your terminal: sudo update-grub.

NOTE: As answered by Steve, "Windows 8 uses the new Protogon file system". Grub does not have support for this file system (yet!). Once this support comes, you can use Grub to boot into the Windows 8 bootloader. Until that time, as suggested by jart, use a separate hard disk to hold the Windows 8 partition and it's bootloader. This way, even the Ubuntu hard disk MBR will not get over-written. Unplug the Ubuntu hard disk when you are installing to the Windows 8 hard disk. Once the installation is complete, plug the Ubuntu hard disk back in, boot into the Ubuntu hard disk (by setting it in the BIOS boot sequence) and follow the steps which I have outlined above.

[#43505] Monday, December 5, 2022, 10 Months  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 193
Total Questions: 123
Total Answers: 108

Location: Bermuda
Member since Wed, Mar 22, 2023
7 Months ago
mugustered questions
Sat, Nov 19, 22, 07:03, 11 Months ago
Sun, May 29, 22, 11:53, 1 Year ago
Fri, Dec 23, 22, 15:02, 10 Months ago