Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 400  / 3 Years ago, mon, october 18, 2021, 4:10:16

I have installed Ubuntu 12.10 on my laptop, but would like to install windows for the purpose of gaming (Hallelujah). But I haven't left any unpartitioned parts of the HDD so now I am stuck on (How to remove one partition from ubuntu and use it to install win7 in a safe way?) I do not want to reinstall everything all over again, but definitely want to play games on my laptop.



I do not want alternatives with Wine or PlayOnLinux, cuz I have runned a few games and they were all buggy, I want dual-boot.



fdisk -l output:



**Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xe2cf4679

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2000895 999424 83 Linux
/dev/sda2 2002942 1465147391 731572225 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 2002944 4001791 999424 82 Linux swap / Solaris
/dev/sda6 4003840 6002687 999424 82 Linux swap / Solaris
/dev/sda7 6004736 406003711 199999488 83 Linux
/dev/sda8 406005760 606003199 99998720 83 Linux
/dev/sda9 606005248 706002943 49998848 83 Linux
/dev/sda10 706004992 879212543 86603776 83 Linux
/dev/sda11 879214592 1035462655 78124032 83 Linux
/dev/sda12 1035464704 1075462143 19998720 83 Linux
/dev/sda13 1075464192 1115461631 19998720 83 Linux
/dev/sda14 1115463680 1269835775 77186048 83 Linux
/dev/sda15 1269837824 1465147391 97654784 83 Linux**

More From » 12.10

 Answers
7

Installing Windows after Ubuntu



This is not hard as everyone says, but you need to be prepared before you start or you will leave the computer in an unbootable state.



Basic procedure




  1. You can use gparted to resize a partition, but you must either boot from live media or be using a partition that is not mounted.


  2. Decide how much space you can spare. You will find various opinions out there, but Win 7 needs at least 40 GB IMHO. With games installed, you may need more.


  3. Back up your data. You have a lot of logical partitions. To delete logical partitions, you need to first be sure logical partitions with a higher number are unmounted. Moving partitions is not recommended.


  4. You need to create a primary partition formatted as NTFS. If you can let go of /dev/SDA15 The easiest thing for you may be to A) delete it, B) shrink your extended partition, and C) use the new unallocated space for your Win partition.


  5. Assuming you have a valid product key for Windows, when you insert the recovery discs or install dics, you need to choose the options that will not restore your computer to factory image or use the entire disk. The installer will be able to find the NTFS partition and install to that. The exact details of the Win installer menu are off-topic here, however, but you can find instructions for this part if you search. But be careful with this step; you don't want to accidentally blow away Ubuntu.


  6. Once you have rebooted the computer into Windows, follow the steps for first time use, validate your product key, etc. But Windows will have changed the MBR, so you will not be able to boot Ubuntu.


  7. You have a choice to stay with the Win bootloader and use EasyBSD or something to fix booting, but it's easiest to reinstall Grub2.


  8. See Reinstalling Grub2, but here's the key part of that page.



    A) Boot from the live media.



    In these examples, X is the drive letter (a, b, c, etc.); Y is the partition number (1, 5, etc):



    Example: sudo mount /dev/sdXY /mnt



    sudo mount /dev/sda1 /mnt



    Example: sudo grub-install --boot-directory=/mnt/boot /dev/sda



    sudo grub-install --boot-directory=/mnt/boot /dev/sda



    In short, you mount the partition, but install to the drive. The actual commands here are suggestions based on what you posted, but it's up to you to make sure you are installing Grub2 where you want it.


  9. Now Ubuntu will boot but not Windows. Login to Ubuntu and sudo update-grub



[#31750] Tuesday, October 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
velelf

Total Points: 395
Total Questions: 115
Total Answers: 107

Location: Sudan
Member since Mon, Jun 1, 2020
4 Years ago
;