0

EDIT: I'm adding "(editX)" edits and "A: ..." answers to my question, to avoid posting it as an answer (for now)...

Similar to this question has been answered many times in forums and so on, but there are special requirements that I couldn't find in a single place.

Purpose - With the spy features of all paid OS, it become a need for many people to take more steps to keep their life as private as possible... A possible (and maybe only) long-time solution is to use Linux and (temporary) keep Windows for compatibility with special software (usually paid software, available for Win only)... In the future (after 3-5 years) a virtual machine may be used instead, but so far this multi-boot setup is required...

Requirements:

  • multiboot system - multiple Win/Linux
  • ability to install new Linux and Windows versions at any time (and restore the MBR after each Win installation?) - (!) installations are not in special order, but as the need arise!
  • (optional) to be possible to encrypt chosen partitions (these with OS and/or data on them)
  • to have at least one shared partition between Linux and Windows (read/write)
  • (edit1) The computer uses BIOS, not UEFI (as presumed by Rod). This makes the task easier, according to what I read for UEFI. Probably UEFI users may use it too, by switching to CSM (Compatibility Support Module)...
  • ...probably more ideas can come to my (your) mind, but these above seems the most important for the planning stage...

Here is what I have so far (you can directly copy and amend/change):

Planned partitions structure:

  • hda1 (primary, ext4 512MB) - boot partition with Grub

I find appropriate to have a separate boot partition, where Grub to be installed (seems a requirement for the excryption option).

Q1: What type to choose - ext4? (Reference: this thread)

A1 (edit1): ext4 works just fine!

Q2: What size to choose? I found suggestions between 1 and 512MB...

A2 (edit1): I used size above 512MB, even 1GB+ (just to make sure is has enough space for backing up the whole contents of this partition - useful during the investigation/tests phase).

  • hda2 (primary, NTFS 20-80GB) - Win 7, 8, 10 or newer

Q3: Win may need separate HDD for encryption? Some link(s) could be enough.

A3 (edit1): I left the encryption option as there are many pros and cons... It's not correctly to suggest to someone else without trying it first by youself for a few months or years...

  • (optional) hda3 (primary) - Win 7, 8, 10 or newer

I'm planning to create this partition, just to have it ready if it's needed, but I'm not planning to use it... It could be used as data-sharing partition in the meanwhile...

Q4: Anything special for 2nd Windows to keep in mind?

A4 (edit1): I realised that when pre-partition the disk and prepare the partitions for Win, the Win setup doesn't create "hidden system boot partition" (it get's created if you re-partition the drive during the Win setup). Also I managed to manually create such "system boot partition" - for example by making /sda2 (or /sda1) "active/boot flag" and installing the Win on different partition /sda3 or even /sda7* (*logical drive also works for Win7). This way the Win boot manager also reside in it's own partition - which was prepared for encryption part... And something important, that could be very useful for some people: You can install Win boot loader on the same partition where the win is installed: for example - first, you set /sda2 to be "active/boot flag", then when you install Win it's boot record will be on /sda2 too! Second, make /sda3 "active/boot flag" and install another Win - it's boot loader will be installed in /sda3 too and there will be only one entry! If you don't set the /sda3 to be "active/boot flag", then the /sda2 boot loader will manage both installations and there will be 2 entries for Win, but it you want to format /sda2 and install another OS on it - you'll lose the boot record for /sda3 installation (I didn't tested this and I can't say if it's easy to recover it - probably that depends of the last Win OS boot loader that you install)!

  • hda4 (primary) - Extended partition (contains all logical partitions)
  • hda5 (NTFS, ?GB) - NTFS ('shared partition' between Win/Linux - read/write)

Q5: Is NTFS appropriate (and only) choice? (more choices discussed already)

A5 (edit1): Seems like NTFS is a good choice, probably FAT32 (not sure about exFAT) will work, but there are pros and cons... the most important is: FAT is limited to max 4GB file size!

  • (optional) More shared partitions (ntfs) could be created if needed
  • (optional) 'Non-shared partitions' (ext4) could be created too - for storing your data... and they could be encrypted as well?

Q6: If we need to encrypt these partitions, when and how to do this? Short answer with some link(s) should be enough.

A6 (edit1): Encryption part should be tested for at least few months before suggesting it to someone else, so I just dropped it off for now.

  • hda6 (ext4, 10-60GB) - Linux1 root partition

Q7: What about encryption of the partition - when to be done and how? Short answer with some link(s) should be enough.

A7 (edit 1): Encription dropped off for now.

  • hda7 (swap, 4-10GB *) - Linux1 swap partition

Consider the swap partition size based on your current RAM-size and real memory usage, and also consider hibernation (must have enough space to hibernate)!

  • (optional) More linux distro's could be added (for testing and/or production to replace "Linux1"), so it's good to leave enough space on hda7 or later... (or as unallocated space) at end of the drive...

Now... I don't have enough practice and I'm not sure what are the steps to continue. I'm planning to make some tests in the next 5-10 days.

I'm sure there are going to be more questions, although I think whey would be answered already (as separated questions).

Installation steps I am planning so far (again - you can copy and amend the list):

  • Re-partition the disk using Live CD

(edit1) Used Hyren's Boot CD and "parted magic" - deleted all old partitions and recreated according to the partitioning scheme above.

  • Install Grub immediately?

(edit1) I tried a few Win installations first and tested setting the "boot flag" (make "active" under Win) to different primary partitions - /sda1, sda2 and sda3 - This way I managed to install independent copies of Win, so I can replace any of them when needed, without losing the boot loader for all Win-installations! (Note: WIn could also be installed on logical partitions, so probably you can have more than 3-4 installations, but the boot loader is always put on "primary and active /active=boot flag/ NTFS partition"...)

If I do this, then I'll have a case where I already have Grub installed and a new OS needs to be installed. That case is going to happen now or later - when Win 10.5 or Win 12 arrives... or when another Linux distro needs to be installed.

I find appropriate to start with it and when the time arrive - every person following the plan will have the needed skills to do what's necessary as he/she already did it at the initial setup.

(edit1) I followed Rod's advice and didn't start with Linux, but after installing Linux, I installed 4-5 times different Win versions for testing purposes and restored the MBR from a Live CD multiple times. A note: because of the "separate Grub partition", when reinstalling grub must be mounted the root partition and then the grub partition to ~~/boot, and then can be called grub-install.

  • Install Linux1 to hda6 and hda7 (swap)
  • Install Win7 to hda2

(these questions start from 31 intentionally)

Q31: Are there anything to keep in mind here? Something to set up before booting Windows installation from DVD? Specific Win 7,8,10 cases to consider?

A31 (edit1): Yes, there are things to be considered here!!! If you want to keep every Win independent of the other, it's best to manage the "active partition (boot flag)" to match the same partition where you are going to install Win, BEFORE you start the installation and boot from DVD/USB. This way you can just format the OLD Win partition and replace it with something else, without worrying about "how to restore Win boot loader" (I also don't know how to restore it!).

  • Restore MBR and add windows to Grub menu

  • ...After some weeks/months of work using this multi-boot setup, we may need to add another OS for test and/or production...

Q32: Is there something special here, if we want to just replace a Win/Linux installation?

A32 (edit1): For Win - if setting the active partition before each installation, then there's no problem - every partition can be formatted and replaced with another Win as the WIn boot record will be placed on it's partition. Usually after installing Win, it's best to "reinstall grub2 to MBR using Live CD/USB"

If we add a new one, we may need to make another partition(s) - for another Linux distro... A note on "multiple Linux could use same swap partition" - if hibernate to disk is used, don't use single swap partition, otherwise you may lose the hybernated state and some data!!

Quite big plan and many things to consider... Please note I don't need very detailed plan (i.e. what command to execute), but "what to consider/achieve" at every step...!

I'll update my question to include specific links to each stage after I complete the test successfully. The aim is to create a plan, that many Win-users could follow and convert to Linux!

1

First, you need to decide on whether to boot using the firmware's native EFI/UEFI mode or the Compatibility Support Module (CSM), which enables BIOS/legacy-mode booting. (This assumes you're talking about a new computer. If your motherboard is from before 2011, it's probably BIOS-only.) EFI is the better choice for a couple of reasons. First, Windows will boot from a GPT disk in EFI mode. This is important because GPT does away with the awkward primary/extended/logical partition distinction, which will expand your partitioning options, particularly if you want to install multiple versions of Windows. Second, EFI boot options are generally much more flexible and give you more options. On the down side, if you're already familiar with BIOS-mode booting, EFI is a strange new world -- and one that's poorly-documented. To get started, here are a few references:

If you intend to install multiple versions of Windows, chances are you'll end up with one entry in GRUB (or whatever boot manager you use) for Windows, which will then let you select which Windows version to boot. There are ways to boot individual Windows' installations more directly from another boot manager, but they usually involve some extra hoop-jumping, especially in EFI mode.

For Linux itself, you can get by with a single partition for the root (/) filesystem. Adding more partitions adds flexibility but also makes it more likely you'll mess up the sizing. The /boot partition is necessary in various specialty cases, including using encryption, LVM, and some types of software RAID. Typically this is a ~500MiB partition. Note that there are several other partitions related to booting which are not /boot partitions; the name "/boot partition" refers to a partition mounted at /boot. It can be just about any filesystem in theory, although ext2fs and ext4fs are the most common choices.

If you boot in EFI mode, you'll need an EFI System Partition (ESP). This is one of those boot-related partitions that's not usually a /boot partition (although it could be, and mounting the ESP at /boot is common in the Arch Linux community). I recommend making the ESP 550MiB or bigger (but bigger is overkill unless you mount it at /boot, in which case up to 1GiB might make sense).

Swap is another common partition. If you want to be able to hibernate to disk, you must have at least as much swap space as physical RAM.

Most dual-booters use GRUB as the boot manager. There's no point in installing it before you install Windows, since Windows will wipe it out (or at least change the boot order) in favor of its own boot manager. The typical OS installation order is Windows and then Linux. If you later decide to install a new Windows, you may need to re-install GRUB using a recovery system. There are boot loaders other than GRUB available. If you install in EFI mode, my own rEFInd may be of interest because it tends to handle complex setups with more than two OSes better than GRUB does.

  • Thank you, Rod! I must say "Sorry!", because I wasn't (and I'm still not) aware of other than "BIOS-legacy" options... I'll read all links! However the idea for this plan is to be used by many people, so I find your answer better for them (which is a good thing!), but I'll unable to confirm that as I don't have such (new) computer yet!... I'll update my question to reflect the Uefi/Bios in a few hours... – Minister Mar 3 '16 at 7:47
  • If you can split your answer and add some comments on Bios-legacy mode (should be shorter as it would not be in help for as many people as the Uefi...), that could let me make the tests successfully and post the step-by-step guide... The idea for multiple WIn/Linux is in fact simple - in production single Win and single Linux is enough, the next installations are for testing something "new", before going to production usage with it (and could be Win or Linux...)! I hope that makes more sense. – Minister Mar 3 '16 at 7:48
  • Rod (+1), I've made many tests under BIOS-mode (old machine) and created multiboot system without any problems, without the optional "encryption". I also managed to add Linux entries to Win boot loader and Win entries to Grub2 boot loader. I also managed to restore Grub to MBR from a live CD (this one seemed to be needed at some point, although using EasyBCD could avoid that need). I also Installed Win to a logical drive, by marking a primary NTFS partition as "active/boot flag". The encryption part seems for more advanced users as there are some pros and cons, so I just leave it off... – Minister Mar 10 '16 at 11:58
  • You mention "There are ways to boot individual Windows' installations more directly from another boot manager, but they usually involve some extra hoop-jumping, especially in EFI mode." Can you provide some reference how to do this? I'm thinking of renaming the EFI folder created by the first windows, and making its partition invalid during the installation of the second (zero some megabytes and restore afterwards). Will that work? – Thomas G. Sep 2 '16 at 9:39
  • I don't have a pointer to an article that describes how to do this. In brief, the process is to install Windows A, then change the type code on the ESP it used, then install Windows B. You'd then need to install another boot manager to switch between the Windows boot loaders that use the two separate ESPs. – Rod Smith Sep 2 '16 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.