Saturday, November 17, 2012

upgrading to Windows 8 with less than 20GB free space.

Ok, so I got the upgrade to windows 8 for $15. My win 7 wasn't exactly working properly after flashing from the iso and I hadn't really used it anyway, just booted into it occasionally. So I downloaded the iso during the install and burnt it to a dvd. Would have thought that I could just proceed with the install on my 50GB partition for windows - wrong, you need at least 20GB free space on c:/. I had to set-up my partitions such that the windows partition was prior to the linux partition, and it wasn't possible to extend it without wiping the linux partition (which I didn't want to do).

So here's how I upgraded to Windows 8 with less than 20GB of free space (I started with 2GB). For this you will need to have chosen the option to install of a DVD and you will not be importing any of your old Windows 7 stuff during install. If you want to keep all of your applications and settings etc and import them, this is not the method for you. First of all, I got rid of hiberfil.sys which was taking up 6-8GB on my hard drive. If your pagefile is running off c:/ you can get rid of that too. All you need is 8.5GB free if you do the install straight off the DVD.

Boot onto the install DVD. During the install, choose the option that does not import any of your settings (the other option takes you back to windows and requires 20GB). I didn't need any of my applications or settings so this was fine for me. From here you can choose to install on any hard drive, however, as I'm upgrading, the installer fails on a hard drive that does not have Windows. Install onto your current Windows 7 partition. It backs up your old set-up as Windows.old, which you can delete to free up 20+GB when you're in Windows 8 later using disk cleanup. Though for some reason it still shows up on the windows splash screen as an option. Good one Windows.

Now for the Ubuntu part:
Now, to get grub back up and running (the Windows install deletes it). If you've got a reasonably new livecd around (new enough to have grub2 on it) then just boot onto that and follow these instructions:
First, open the Terminal.
Mount the partition you Ubuntu Installation is on. If you are not sure which it is, launch GParted (included in the Live CD) and find out. It is Usually a EXT4 Partition. Replace the XY with the drive letter, and partition number. Example: sudo mount/dev/sda5 /mnt. Then bind the directories, you need, like so:
sudo mount /dev/sdXY /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
Now we jump into that using chroot.
sudo chroot /mnt
Now install, check, and update grub. This time you only need to add the partition letter (usually a) to replace X. Example:grub-install /dev/sdagrub-install –recheck /dev/sda
grub-install /dev/sdX
grub-install --recheck /dev/sdX
Now you can exit you mounted hard disk, and unmount.
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt
and then sudo reboot

and then when you get back into ubuntu you're going to need to sudo update-grub to get your windows partition back, or alternately I guess you could mount it with your ubuntu drive earlier on the livecd, but that would require way more than a single command!

No comments:

Post a Comment