Currently on Linux, looking to add Windows Dual boot

Hey,

I fished around and found how to add opensuse to an existing Windows installation, but couldn’t find the other way around. I’m currently on opensuse 12.2 on a 100gig partition, and I was wanting to add a dual boot option for Windows 7.

My current partitions:

lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
└─sda1   8:1    0   100G  0 part /
fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x000b1531

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   209713151   104855552   83  Linux

No swap partition as I have 16gig RAM.

What I’m looking to do is add a Windows 7 partition for the purpose of playing games.

I’d like some advice on suggested partition size/layout, and how to actually go about installing it. I think I’m using Grub2 but I’m not sure.

Thanks in advance.

Can you add another HD for windows?

As with your current setup, I would suggest backing up your personal files to an external source. Wipe the HD and start again, placing windows as sda1 (although most windows installs require sda1 and sda2, sda1 being a small boot sector)
Then place openSUSE after this

It might be possible to do all this without purchasing an additional HD, but you would need to be able to shrink some space off your current install and then create a partition at the end of the disk and shunt all your files to it. (If you make it NTFS windows will be able get the files from it.) You’ll see where I’m going…
Now create the partition/s for windows at the start of the HD
Install windows
Get it updated - fully, it took me all day recently on a windows 7 install
Copy all your files over to windows
Now partition for openSUSE, deleting the backup we made.
Install openSUSE and copy back your files

If I am understanding correctly, you have a 1000G disk, and are only using 100G at present.

I’m not certain, but I think Windows 7 wants two partitions. One is around 14-15 G (recovery partition), and the other is whatever you need. I am using around 100G, and I don’t come close to filling it. On the other hand, I don’t use Windows for much. So you might need more space. I guess it will depend on the requirements of the games you are considering.

If grub2 is installed on your root partition, then when you are done installing Windows, you will need to switch your “/dev/sda1” back to being the active partition. You can probably do that in Windows, but my advice would be to boot a linux live disk or rescue disk for that (disk could be a CD or DVD or USB).

If grub2 is installed in the MBR, then make a backup of that. A windows install will probably overwrite the MBR.

Correct.

I don’t want to waste space on a recovery partition, is that optional? (I’ve never installed Windows 7). If I was interested in running the same games from linux and windows, would it be a good idea to create a separate data partition for the installation of games? Or can I just access the games on the Windows partition with linux? I suppose the disk/partition formats come into play here. As I understand it, Windows prefers NTFS but can also read Fat32, while Linux doesn’t like NTFS much but can also read Fat32. As such, would creating a Fat32 windows partition be a good idea if I want to access it from linux sometimes too, or should I create a separate Fat32 data partition for this case? I guess it’s a personal preference in the end, but the only thing would be if using Fat32 on windows would be a downgrade in terms of speed or something?

If I do plan to have a partition for windows and a separate data partition for games, then how big would the windows one need to be?

This just confuses me.

Edit: Another thing I thought of is, can wine use an authentic windows installation (on this new partition, given a Fat32 or other readable format) rather than the virtual preffixs it usually uses?

Are you assuming I only have a 100gig HD?

Why should windows be at sda1?

Possibly. You will have to try to find out.

I have Windows 7, as it came on my laptop (except I shrunk its disk space). I have never installed it. I do have Vista on another computer, and I managed to install that without the recovery partition. I would guess that is also possible with Windows 7.

I’m not a gamer, so I don’t have answers here.

Linux is doing pretty well with NTFS, so I would suggest just sticking to that.

Sorry about that.

Can you post the output from:

# cat /etc/default/grub_installdevice

You will probably need to do that as root. That will tell us where grub2 is installed, and we can go from there.

Maybe someone else can answer that. I’ll be interested in the answer, too.

And a comment on your other recent reply: I don’t think Windows 7 needs to be on “/dev/sda1”. As far as I know, it can be on any primary partition.

No

It doesn’t have to be but the boot record for windows needs to be on a suitable primary

My one and only windows 7 install (that I don’t actually use) is all one partition.
I have a proper windows DVD form TechNet though

cat /etc/default/grub_installdevice
/dev/sda1
activate
generic_mbr

Does this help?

And openSuse works well on NTFS? Ages ago it didn’t iirc.

I think I’m going to add a 150 gig data partition after my linux partition, and then put a 50gig windows partition. It would look like this:

===Linux 100gig===/===Data 150gig===/===Win7 50gig===/===The rest ~700gig===]

The only question left is what file formats to use for the data and win7 partitions. Both windows and linux need to read/write from the data partition.

Yes. Grub2 is installed on your root partition.

The Windows install will change the active partition to be Windows, but it won’t cause any other problems. You can change back to linux by booting a live CD (or USB or install DVD), and running “fdisk”.

You can then do:


# cd /boot/grub2
# grub2-mkconfig -o grub.cfg

That will add an entry for Windows to the grub2 boot menu.

I would not advise it for installing linux. However with the current “ntfs-3g” driver, it works pretty well as a data partition. It’s a bit slower that ext4 or FAT, but unless you are copying huge files (such as a 4G iso file), you won’t notice the speed difference.

As far as I know, the only problem for NTFS with linux, is that it can’t fix file system problems. So you would need to boot to Windows and run “CHKDSK” for that. However, problems are rare. The only time I ever saw one, was after using “gparted” to shrink an NTFS partition.

I’m not quite sure what you are asking there.

For the NTFS partitions that I mount, my “fstab” entry contains

users,gid=users,uid=1001,fmask=133,dmask=022,locale=en_US.UTF-8

in the options field.

The masks and “gid=users” should allow anyone in the “users” group to write to the NTFS partition. And the “uid=1001” results in my unix id showing up as the file owner, and allows me to set time stamps on files (as with “cp -p”).

For many years, my practice was to use FAT for a shared data partition. I changed that to NTFS because FAT file systems don’t have a proper time stamp (they record file times as local time, rather than UTC). And NTFS has worked fine for that.

Thanks for the responses, very helpful.

So FAT should be faster for large files, but NTFS has timestamps which you found useful? Why is it better to have the windows installation on ntfs?

With FAT, there is no concept of file ownership, not protection.

For people who always log into Windows as Adminstrator, I suppose that does not matter. I always preferred to be a limited user, so that a dumb typo couldn’t destroy the system.

On 04/09/2013 11:36 PM, Maeldun pecked at the keyboard and wrote:
> Hey,
>
> I fished around and found how to add opensuse to an existing Windows
> installation, but couldn’t find the other way around. I’m currently on
> opensuse 12.2 on a 100gig partition, and I was wanting to add a dual
> boot option for Windows 7.
>
Why not save yourself grief and frustration and just use VirtualBox
instead to run Windows 7.

VBbox is not good for games limited 3D accelerations.

To the OP I don’t see a swap or a home. Though you may get by with out them it is highly recommend you have a swap and a separate home partition. A separate home will allow you to upgrade or install new Linux and keep your personal data and settings. A swap is used if you should happen to run out of main memory which would crash the system.

Installing Windows will mess up the MBR for booting into Linux so you will have to reinstall grub to get Linus to boot again.

Thanks for the responses.

I don’t have a swap because I have 16gig of ram, most of which I don’t use. I know how to add a swap if need be.

I agree I should have put a separate home partition, it would have come in very handy shortly. I can still do so right? I could modify my current 100gig partition and split it into about 50 gig, and mount /home there? After which I could again resize the partitions to more closely fit the use of / and ./home?

To reinstall grub, would I use just a normal opensuse 12.2/3 dvd and boot with that? (or in my case use a usb)

Yes, you can do that. Backup everything first. The best time to split would be when you are installing the next version. That way you only have to backup “/home” (and what’s below that).

Since your grub seems to be on “/dev/sda1” rather than the MBR, you probably won’t need that.

But yes, you can boot with the DVD or live media. It’s best to boot with media using about the same kernel level, and the same architecture (64bit or 32bit) as the installed system. There are some posts on reinstalling grub.

Ok cool.

I’m backing up my files now (shunting them over to that 150gig data partition).

I think I will install windows 7, and then do a fresh install of linux, using 12.3 this time and probably 64-bit too (and this should take care of grub as well I take it).

I have already formatted up the 2 new partitions, which are now as follows:

===Linux 100gig (ev4 or something)===/===Data 150gig (NTFS)===/===Win7 50gig (NTFS)===/===The rest ~700gig (unformatted)===]

So the plan is:

  1. Backup files to Data
  2. Install Win 7 (and get rid of hibernation and stuff to save on disk space)
  3. Install a fresh version of openSuse 12.3 64-bit. (probably in a couple weeks time as I’m running out of download usage).

Can some1 please suggest what is a reasonable space allocation for opensuse 12.3 64-bit, so I can split the 100gig partition into a / partition and /home partition? Would any other partitions be useful, such as /boot?

Ultimately, it is how you use the system.

I am currently using 7.9G for the root partition. I have a lot installed (KDE, Gnome, XFCE, LXDE, texlive). I think the recommendation is 20G for the root file system, which should be plenty.

I do have a separate “/boot”. That’s because my root file system is in an encrypted LVM, so a separate “/boot” keeps unencrypted kernel and other stuff as needed for booting.

And yes, installing 12.3 will fix any booting problems that result from the Windows install.

Thanks!!!

On 2013-04-10 06:26, nrickert wrote:
> I’m not certain, but I think Windows 7 wants two partitions. One is
> around 14-15 G (recovery partition), and the other is whatever you need.
> I am using around 100G, and I don’t come close to filling it. On the
> other hand, I don’t use Windows for much. So you might need more space.
> I guess it will depend on the requirements of the games you are
> considering.

No, the recovery partition is something that the computer manufacturers
do; it is another Windows or msdos system, bootable on its own,
dedicated to restore an image of the original installation. It is not a
requirement of Windows itself, but something to make users life easier
(instead of reinstalling Windows, you restore an image in minutes).

Actually, I think that some HP computers sold with Linux has also that
recovery partition, which in this case is an image of the original Linux
system they sold.

What Windows 7 prefers is two partitions: one small boot partition
(maybe 200MB), and a big system partition. It is possible, though, to
install it on only one partition.

It is also possible to install Windows on a logical partition, provided
that the small boot partition is a primary one. I have done that with
Server 2008, but that was before GPT came into the game.

On 2013-04-10 17:56, Maeldun wrote:

> So FAT should be faster for large files, but NTFS has timestamps which
> you found useful? Why is it better to have the windows installation on
> ntfs?

Forget FAT for Windows 7 installs, you will loose features. You need NTFS.

It stores ownership and extended permission info, which is important for
Windows 7 (like the older NT versions when compared with the
contemporary home Windows versions). But it has other features, like
larger file size, journal, more robust… I’m not sure that you can even
install W7 in FAT.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)