PDA

View Full Version : [ubuntu] how to Install Windows7 on system with already Ubuntu OS



raheem.syed.786
November 9th, 2013, 11:48 PM
Hi,

can any one please let me know the procedure to install either Windows7 or 8 on my laptop with already installed Ubuntu 13.04.

I have much data on Ubuntu, but facing many problems when trying to get new softwares/drivers for some devices in the market, as market is providing the softwares/drivers for either Mac or Windows version.. for ubuntu those are not fully supported with wine or any else softwares..

so requesting to share teh procedure to install Windows7/8 on my ubuntu 13.04 ...


thanks in advance.....

fantab
November 10th, 2013, 04:18 AM
First, you need to have a NTFS partition on your HDD. If you don't have one then make one. Install Windows, reformat the partition with NTFS again with Windows installer. Finish installation.
The Windows Install will corrupt Ubuntu booting so you will need to Reinstall GRUB (https://help.ubuntu.com/community/Grub2/Installing#via_the_LiveCD_terminal). Have a same version Ubuntu on DVD/USB ready to be used to reinstall Grub.

Also what problems are you having with Ubuntu... perhaps we can help you. Most of the Hardware out there is supported in Linux/Ubuntu.

raheem.syed.786
November 11th, 2013, 02:43 PM
Hi,


thanks for the reply,..I will try to install windows...as you said.


also for the second queury,

I was facing problems with the device detecting in virtual box, so i tried to install the virtual box 4.3 by removng the Virtual Box 4.2X , & found my UI was not proper, so i got some blogs to where the fix was available ...
so i followed below steps in order:
1. sudo su
2. apt-get update
3. apt-get install linux-headers-generic
4. apt-get dist-upgrade
5. reboot
6. sudo su
7. apt-get install nvidia-current-updates
8.-- i rebooted
here my WIFI went & net disconnected....
& no more net & also direct wired LAN connection i tried no connectiong(this was first time connecting the LAN cable for internet as i was using with WIFI)...
for the both WIFI & wired LAN showing connecting status & then ..it automotically shows disconneted status..
(I checked my internet connection in other it is fine)

please help me how to recovery this problem as not able to connect internet & also the desktop UI is not showing the Status Bar/Quick Launch menu bar ...(only the files on the desktop is displayed)

raheem.syed.786
November 12th, 2013, 09:14 PM
Hi , can u please reply

fantab
November 12th, 2013, 11:02 PM
Have you installed Windows?

I am not familiar with Virtual Box... and I can't help you with it. Once you have all the OS installed and working then start an NEW Thread with an appropriate title and someone here will guide you to a solution.

IMO the commands you ran are unrelated to the problem you are having with VB.
To remove/uninstall an application use Software Center or Synaptic Package Manager. Synaptic does a better job with "mark for complete removal" option.

Also start a separate thread to find out whats wrong with your wifi... Only people who can help you with "how to Install Windows7 on system with already Ubuntu OS" will get here. You will get better response if you open a new thread with Wifi in the title.

Good Luck.

raheem.syed.786
November 14th, 2013, 09:59 AM
Hey,

many thanks , but i resolvedall my problems...

1. WIFI was not connecting--> I have installed the reinstalled the drivers from the .deb back ups availabe in the path(
var/cache/apt/archives
)...with cmd(
sudo dpkg --install *deb
)

2. ubuntu app menu, Launchpad & Status bar was not displayed on desktop:

for compiz reset: Install dconf-tools
dconf reset -f /org/compiz/ log out and in.
To refresh your Unity launcher with the default set of icons: unity --reset-icons

3. To come to actual requested post, thanks for your suggestion & i have done below things:

a. I already have ubuntu 13.10 at /dev/sda2 (with UEFI & secure boot enabled).
b. Now I got the win-8.1 CD & started the instalation &
in one of this win-8.1 instalation wizard asked to either " upgrade OS to win 8.1 --or --custom install",
in that i selected custom selection (because the upgrade can happen only if my current OS was Win-7 or 8),
then next screen was the partion screen where it listed my all partitions,
in that i selected my desire partion(/dev/sda5) where i need my win-8.1, then pressed "Delete"--& then next to continue the installation &
succesfully installed win-8.1.

Here, as you said my grup corrupted & i can load only win-8.1, & my ubuntu at boot was not shown at all,
then as you said i gone through the site suggested to reinstall grub
where i tried
1. via Partition Files Copy:
this method does not worked as I think GRUB files have been deleted.

2. via bootRepair tool:
1. it was not able do repair if secure boot was enabled & the task was repeating even pressing ok or exit.


& other methods were so confusing...


except this, below method I have not tried...
may be this would have been worked
aaa: via Live CD terminal



sudo fdisk -l
sudo blkidIn the following commands:

Use the partition number of the Ubuntu installation with mount command.
Do not use the partition number with the grub-install command.
X is the drive letter (a, b, c, etc.); Y is the partition number (1, 5, etc).
--boot-directory is the folder in which the GRUB folder is located. This is normally /boot but should be changed if the grub folder is located elsewhere.
On systems with a separate /boot partition, that partition should be mounted to /mnt/boot. For instance: sudo mount /dev/sda6 /mnt/boot
grub-install will restore missing files in the grub folder but will not restore intentionally deleted or corrupted files. To accomplish these tasks GRUB 2 must be completely removed and reinstalled.
sudo mount /dev/sdXY /mnt # Example: sudo mount /dev/sda5 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sdX # Example: sudo grub-install --boot-directory=/mnt/boot /dev/sdaIf Ubuntu is installed on B-tree file system i.e. btrfs then /boot changes to /@/boot in above commands such that :
sudo grub-install --boot-directory=/mnt/@/boot /dev/sdX # Example: sudo grub-install --boot-directory=/mnt/@/boot /dev/sdaFor GRUB 2 version 1.98 and earlier (Ubuntu 10.04), the installation command is slightly different. Rather than designating the --boot-directory, the switch is --root-directory. In this case, the location changes to /mnt
sudo grub-install --root-directory=/mnt /dev/sdX




then I have done below in the Live CD terminal:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer

sudo apt-get update

sudo apt-get install grub-customizerWith Grub-Customizer, highlight the OS entry and click up / down arrow button to change its order. Or set the default OS in General Settings tab.
http://ubuntuhandbook.org/wp-content/uploads/2013/08/grub-customizer-300x214.jpg (http://ubuntuhandbook.org/wp-content/uploads/2013/08/grub-customizer.jpg)
If you’re comfortable with running some terminal commands, it’s not difficult to change default OS without installing any third-party program.
1.) Press Ctrl+Alt+T to open terminal. Edit the “/etc/default/grub” via below command and change GRUB_DEFAULT=0 to GRUB_DEFAULT=saved. This will make it easy to change default OS later.
sudo gedit /etc/default/grub2.) Update grub to apply changes to grub configuration:
sudo update-grub3.) After that, you can run sudo grub-set-default with the number of menu entry to boot (the first entry is 0) at any time, which will set the entry as default OS permanently. Or run sudo grub-reboot only for next boot.
For example, below command will set Windows 7 as default OS (Windows 7 is 4 in picture at top) permanently.
sudo grub-set-default 4


Even my problem was not solved then i found


then I saw another post & in win-8.1 i done below things:


1. disable the fast boot mentioned in the site:

http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html

To Turn "Fast Startup" On or Off in System Settings

1. Open the Control Panel (icons view) (http://www.eightforums.com/tutorials/2627-control-panel-open-windows-8-a.html), and click on the Power Options icon.

2. Click/tap on the Choose what the power buttons do link on the left side. (see screenshot below)

http://www.eightforums.com/attachments/tutorials/6230d1337576251t-fast-startup-turn-off-windows-8-step-1.jpg (http://www.eightforums.com/attachments/tutorials/6230d1337576251-fast-startup-turn-off-windows-8-step-1.jpg)

3. Click/tap on the Change settings that are currently unavailable link at the top. (see screenshot below)

http://www.eightforums.com/attachments/tutorials/6231d1337576251t-fast-startup-turn-off-windows-8-step-2.jpg (http://www.eightforums.com/attachments/tutorials/6231d1337576251-fast-startup-turn-off-windows-8-step-2.jpg)

4. If prompted by UAC (http://www.eightforums.com/tutorials/5509-user-account-control-uac-change-settings-windows-8-a.html), then click/tap on Yes.

5. Do step 6 or 7 below for what you would like to do.

6. To Turn On "Fast Startup" (Hybrid Boot) for a "Hybrid Shutdown"
NOTE: This is the default setting.

A) Under Shutdown settings, check the Turn on fast startup box, and click/tap on the Save changes button. (see screenshot below)
NOTE: If the Turn on fast startup setting is not listed, then you will need to close the System Settings window, enable hibernate (http://www.sevenforums.com/tutorials/819-hibernate-enable-disable.html), then start back at step 1 again.

http://www.eightforums.com/attachments/tutorials/6232d1337576251t-fast-startup-turn-off-windows-8-step-3.jpg (http://www.eightforums.com/attachments/tutorials/6232d1337576251-fast-startup-turn-off-windows-8-step-3.jpg)

B) The Shut down (http://www.eightforums.com/tutorials/2584-lock-log-off-restart-shut-down-switch-user-windows-8-a.html) Power option will now perform as a hybrid shut down when used.

C) Go to step 8 below.

7. To Turn Off "Fast Startup" for a "Full Shutdown"

A) Under Shutdown settings, check the Turn on fast startup box, and click/tap on the Save changes button. (see screenshot below step 6A)
NOTE: If the Turn on fast startup setting is not listed, then hibernate (http://www.sevenforums.com/tutorials/819-hibernate-enable-disable.html) has been disabled that removed this setting and also disabled fast startup.

B) The Shut down (http://www.eightforums.com/tutorials/2584-lock-log-off-restart-shut-down-switch-user-windows-8-a.html) Power option will now perform as a normal full shut down when used.

C) Go to step 8 below.

8. You can now close the Power Options window if you like.



2. after disable the fast boot, i done below things in win-8.1 OS

The way to do this that's most reliable is to use bcdedit in Windows. Open an Administrator Command Prompt window and type:
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
If you're booting with Secure Boot active, change grubx64.efi to shim.efi(i have taken as mine is secure boot enabled) (or maybe it'sshimx64.efi; in Linux, check the contents of /boot/efi/EFI/ubuntu to see what's there). Doing this in Windows is more reliable than other methods because some users have reported that some versions of Windows repeatedly re-register themselves as the default boot loader if the default is set outside of Windows. Although this is rare, it's consistent with what you're seeing, so using Windows for this task may be necessary.

After done above command able to boot only Linux then I done below command in my ubuntu linux terminal(not with LIVE CD):
$ sudo grub-install /dev/sdX
$ sudo update-grub

After doing above now my boot menu came with both ubuntu & windows ,

but but, Windows was not able to boot because i found the \EFI\Windows\grubx64.ef was missing which i copied from folder \EFI\ubuntu\grubx64.efi

then even not able to boot, so i just disabled the secureboot, that s it my issue fixed,

both OSs (ubuntu & windows 8.1) able to boot successfully.

fantab
November 14th, 2013, 11:11 AM
Well done. Congratulations!

If all is solved, mark the thread as 'Solved' using thread tools.

raheem.syed.786
November 15th, 2013, 01:04 PM
Hi,

here one more problem regarding when Secure boot is enabled,

1. when secure boot is enabled in BIOS,
not able to launch the windows 8.1 but ubuntu is working fine.

2. when secure boot is dis-abled in BIOS, able to launch both.


so, please let me know how i can boot the win-8.1 with seucre boot enabled with grub?


if this is solved i will move it solved state as you said....

thanks in advance again...

fantab
November 15th, 2013, 01:56 PM
If you can boot both OS with 'Secure Boot' disabled, then keep it disabled. No issues.
What is 'Secure Boot' (http://fossforce.com/2011/10/secure-boot-whats-microsofts-agenda/)?

oldfred
November 15th, 2013, 06:16 PM
There is a bug that may be part of the issue.
Unable to chainload Windows 8 with Secure Boot enabled Also post #11 on using refind
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1091464
Windows will not chain load from grub -
file path: /ACPI(a0341d0,0)/PCI(2,1f)/UnknownMessaging(12)/HD(2,96800,32000,7c043777b8608641,87,f6)/File(\EFI\Microsoft\Boot)/File(bootmgfw.efi

With UEFI you should not need EasyBCD. That is just another boot manager which UEFI and grub also are. Boot managers give you a choice of what to boot. Grub is both a boot manager and a boot loader for Ubuntu.
With BIOS some Windows users liked EasyBCD as you could only have one system boot from MBR. With UEFI all systems are equal in efi partition as boot able devices.