Page 1 of 1 [ 10 posts ] 

DeepHour
Veteran
Veteran

User avatar

Joined: 1 Jun 2014
Gender: Male
Posts: 82,324
Location: United Kingdom

04 Jun 2016, 2:40 pm

I have recently been experimenting in installing Linux-Windows dual booting setups. One such installation, featuring Windows 7 and Mageia 5 looks like this on the Mageia partition manager:

Image

Clearly no attempt here to show the partitions in proportion! The second blue (Windows) partition is actually the C drive, and takes up about 240 GB of the 320GB hard drive. :lol:


And here's the Grub dual boot selection page:

Image


This all works very well, so I probably know more than I give myself credit for, though it's a pretty straightforward installation (legacy BIOS, MBR partitioning, etc). All the same, I have tended to proceed by trial and error or by intuition, rather than by a clear grasp of the technical issues. It strikes me that a knowledge of how the Grub bootloader program works is central to what is going on. I've read loads of stuff like this: http://www.dedoimedo.com/computers/grub.html, and though I'm sure the authors of such things mean well, I invariably get lost after a couple of paragraphs, as they tend to assume a degree of familiarity with the basics which is often not present.

So if any kind person on this forum could assist by answering some or all of the following questions, in as non-technical a language as possible, I'd be most grateful:

1. Assuming that the installation process for the example above places Grub by default on the Windows partitions, where exactly is it to be found? I suspect it's either in the first partition or just before it, but not on the C drive?

2. Does Grub directly replace the Windows bootloader by deleting it?

3. Or does it overwrite it, but leave it capable of being restored?

4. Or does it leave it intact, but suspend or disable its operation?

5. Or does the Windows bootloader remain active, and come into operation if Windows is selected on the dual boot screen?

6. Or something else?



mr_bigmouth_502
Veteran
Veteran

User avatar

Joined: 12 Dec 2013
Age: 30
Gender: Non-binary
Posts: 7,028
Location: Alberta, Canada

04 Jun 2016, 2:54 pm

Usually in a Linux/Windows dual boot setup, GRUB will be installed to the MBR, replacing NTLDR, but the configuration will be stored on your Linux partition. This means that if you want to get rid of Linux and go back to normal, you have to restore NTLDR using a Windows installation disc. It's been a while since I've done it so I forget how, but there's guides online.

Another way GRUB can be installed is by putting it on your Linux partition, but then you'll need another bootloader to access it. Fortunately, there's EasyBCD, a Windows program that allows you to set up a menu for NTLDR that can point towards GRUB.


_________________
Every day is exactly the same...


Meistersinger
Veteran
Veteran

User avatar

Joined: 10 May 2012
Gender: Male
Posts: 3,700
Location: Beautiful(?) West Manchester Township PA

04 Jun 2016, 3:14 pm

Also, if you're using a computer that has UEFI, rather than legacy BIOS, UEFI, IIRC, handles the details on dual-booting. It's been a while since I worked on a PC with UEFI (since the asswipe that used to live in the den screwed me when he bought an Asus Laptop I owned.)



mr_bigmouth_502
Veteran
Veteran

User avatar

Joined: 12 Dec 2013
Age: 30
Gender: Non-binary
Posts: 7,028
Location: Alberta, Canada

04 Jun 2016, 5:19 pm

Meistersinger wrote:
Also, if you're using a computer that has UEFI, rather than legacy BIOS, UEFI, IIRC, handles the details on dual-booting. It's been a while since I worked on a PC with UEFI (since the asswipe that used to live in the den screwed me when he bought an Asus Laptop I owned.)

UEFI booting doesn't work well on the one machine I have with a UEFI, so I stick with legacy mode.


_________________
Every day is exactly the same...


DeepHour
Veteran
Veteran

User avatar

Joined: 1 Jun 2014
Gender: Male
Posts: 82,324
Location: United Kingdom

04 Jun 2016, 9:33 pm

mr_bigmouth_502 wrote:
Usually in a Linux/Windows dual boot setup, GRUB will be installed to the MBR, replacing NTLDR, but the configuration will be stored on your Linux partition. This means that if you want to get rid of Linux and go back to normal, you have to restore NTLDR using a Windows installation disc. It's been a while since I've done it so I forget how, but there's guides online.

Another way GRUB can be installed is by putting it on your Linux partition, but then you'll need another bootloader to access it. Fortunately, there's EasyBCD, a Windows program that allows you to set up a menu for NTLDR that can point towards GRUB.



Thanks for that, I'm definitely a few more steps on the way to figuring things out now. :D

Just to confirm though, the MBR is on a section preceding the small 'System Reserved' Windows partition marked on the diagram in my opening post?


Maybe one or two members could also offer some enlightenment regarding another Linux installation I recently did, when I installed Mageia to an external HDD? I did this by the way because it's a fairly new and expensive desktop machine, with a UEFI based system and GPT partitioning, and I didn't want to inadvertently create serious problems. Anyway:

Image

Internal HDD


Image

External HDD (sdb)


Image

GRUB 2 Dual Boot Screen


In this setup also the operating systems function well. I'm pretty sure the GRUB 2 bootloader is on the external drive (dev/sdb) and I assume (though am not certain) that the Windows bootloader is intact and functioning on the internal HDD (dev/sda). I originally thought that both OSs were entirely self-contained, and that the Linux system would only start up when the external HDD was manually selected from the boot menu in the setup section. What in fact occurs is that GRUB 2 appears automatically from the outset, indicating that Mageia and the external HDD seem to have 'taken over' the computer and now control access to the main HDD. This is also suggested by the fact that the word 'Mageia' has been inserted at the top of the boot menu in the setup section, and the internal HDD has been 'booted out' of the list, this apparently all done by the Mageia installer. I am now wondering whether the computer would function at all (ie whether Windows would be accessible) if the external drive became faulty or was simply disconnected.....

:?



mr_bigmouth_502
Veteran
Veteran

User avatar

Joined: 12 Dec 2013
Age: 30
Gender: Non-binary
Posts: 7,028
Location: Alberta, Canada

04 Jun 2016, 10:58 pm

GPT discs actually don't have an MBR, and to be quite honest I'm not sure how you're supposed to set up a dual boot configuration on them.

But anyway, I'd recommend restoring NTLDR on your internal drive with a Windows install disc, and installing GRUB on the external. To make sure you don't accidentally write GRUB to your internal drive, I'd recommend disconnecting it beforehand. Of course, if your system is under warranty, you might want to give it some thought first before you open it up.


_________________
Every day is exactly the same...


DeepHour
Veteran
Veteran

User avatar

Joined: 1 Jun 2014
Gender: Male
Posts: 82,324
Location: United Kingdom

05 Jun 2016, 1:56 am

The more I think about it, the more I suspect that the situation described may have arisen because I inadvertently installed GRUB 2 on the internal drive by mistake. I've just completed an external drive installation of Linux Antix, in which I made sure that the bootloader was installed on sdb, and as a result the laptop in question boots Windows by default, and only boots Antix if instructed to do so by selecting the external HDD in the BIOS. I noticed that the installation process offered the default location of the bootloader as sda, (goodness knows why), and I switched this to sdb. I can only imagine that in the case of the Mageia installation the same thing happened, and that either through inexperience or inattention I selected the default option.

If the worst comes to the worst, there's no way I want to be messing around with a Windows install disc by the way. One of the few impressive features about Windows 8.1, the OS on my desktop machine, and maybe the only impressive feature, is that it has a recovery partition which can be saved to a USB flash drive, which can be used to reinstall the entire OS from a system image, if you have made one on an external hard drive, without a need for any Windows CD. I've already used this twice to reinstall Windows 8.1 on a laptop on which Windows had been corrupted or completely wiped, and it only took about two minutes in either case.



DeepHour
Veteran
Veteran

User avatar

Joined: 1 Jun 2014
Gender: Male
Posts: 82,324
Location: United Kingdom

06 Jun 2016, 12:07 am

I'm wondering also, whether a full system reset will restore the original bootloader on a Windows machine. I think that on a Windows 8, 8.1 or 10 system this process restores all partitions to their original settings, not just the C Drive.

There's probably a flaw in this line of reasoning, but I'm not sure what it is.....



mr_bigmouth_502
Veteran
Veteran

User avatar

Joined: 12 Dec 2013
Age: 30
Gender: Non-binary
Posts: 7,028
Location: Alberta, Canada

07 Jun 2016, 3:29 am

DeepHour wrote:
I'm wondering also, whether a full system reset will restore the original bootloader on a Windows machine. I think that on a Windows 8, 8.1 or 10 system this process restores all partitions to their original settings, not just the C Drive.

There's probably a flaw in this line of reasoning, but I'm not sure what it is.....

I'm not sure how that built in system reset works to be honest. I think it would require you to be able to boot into Windows in the first place.


_________________
Every day is exactly the same...


DeepHour
Veteran
Veteran

User avatar

Joined: 1 Jun 2014
Gender: Male
Posts: 82,324
Location: United Kingdom

07 Jun 2016, 4:08 am

I'm pretty sure the supposition you make in your second sentence is correct. :)

But to clarify an impression I may have given in an earlier post, although the installation set up on the desktop machine may be a bit of a hybrid/Frankenstein arrangement , it still works acceptably and delivers full and prompt access to both operating systems via the GRUB 2 screen. The factory reset option was suggested as a potential method of launching a pre-emptive strike before anything goes wrong.