I have a desktop computer with two HDDs that boots with legacy BIOS. Both my HDDs have MBR partition table. On /dev/sda there is Windows 8. Some time ago I installed a fully encrypted Manjaro on /dev/sdb using the automatic installer and I put the boot loader on /dev/sda (it was there by default). Until now, I had to insert a password to get to grub, and here I decided whether I'd boot into Windows or Manjaro.
Now I would like to achieve this:
I switch on my computer, I don't give it any other imputs ---> it boots Windows from /dev/sda since this is the first hard disk in the BIOS boot order
I switch on my computer, I press an F or the Delete key during the BIOS screen ---> it shows me a list of devices that I can boot from, and here I can choose either to boot into Windows by choosing /dev/sda, or to boot into Manjaro by choosing /dev/sdb.
I don't mind reinstalling Manjaro, but I can't use a Windows restore CD. My idea was to:
Reinstall Manjaro, but this time unencrypted, with the boot loader on /dev/sda, so that when I boot the computer and I don't give it any imputs it will boot on Windows
Reinstall Manjaro again, this time encrypted and with the boot loader on /dev/sdb.
However, after doing this and booting from /dev/sda, I got an error from grub that says that it could not detect such device and that the filesystem was unknown. Am I right in understanding that, if I were to install Manjaro on /dev/sdb and the boot loader on /dev/sda and then I were to phisically remove the HDD labeled as /dev/sdb from my computer, then I would not be able to access Windows anymore because grub would fail to detect the second HDD were Manjaro was?
How can I achieve what I wrote above about choosing what system to boot only via the BIOS and without using a Windows recovery CD? Thank you in advance!
First, if you do not have a windows recovery disk or find a way to set windows to restore windows boot, you cannot achieve what you want to do.
ps: but the major complaint is that windows updates overrides our boot, you want to update your windows and hope it does that?
But suggest you also set your manjaro to sdb mbr so that when your sda mbr is occupied by windows, you have a working sdb mbr to boot manjaro.
I spent the last hour searching for a way to restore the MBR in Windows without using any Windows recovery media, and hopefully I found a solution: https://www.youtube.com/watch?v=9vSnEUrxAFU
Unfortunately in the comments there are some people saying that it didn't work for them
No, that is not the problem. What let me down is that it is so easy to overwrite the Windows boot manager: I didn't find any reference of this neither on Calamares nor in the Manjaro user guide. As an example, Calamares warns me that I'm creating a not-so-secure system if I put an unencrypted boot partition alongside an encrypted root partition.
Yes, that was my conclusion too: to let sda be the first HDD in the boot order so that my family can access Windows without any problem, and then when I want to use Manjaro I manually select sdb from the BIOS boot menu. To achieve that, I have to install grub on sdb and leave sda untouched. This also will allow me in the future to swap the boot order of the HDDs, so that Manjaro might become the first option and Windows the second (if my family will not mind that )
If you want to try that out, and if it don't work, you can easily still have your old system back.
But best set Manjaro grub to sdb mbr first before trying.
Except for the encrypted part (I don't use encryption), I find calamares quite versatile.
We can choose which disk mbr to set to, or to its own partition or not to install any bootloader and we can later (after installation) choose to install other bootloaders. I have no complaint.
Of course there are warnings if we choose non-default and I think that's correct too, in case novice users muck it up.
For some time I thought this was what I had to do before attempting that solution, however wouldn't I end up having the same problem eventually? I mean: if I were to install Manjaro and the boot loader both on sdb, and then I were to remove sda let's say because of a mechanical failure... am I correct in assuming that I wouldn't be able to boot into Manjaro because grub doesn't see sda anymore?
I also watched this video about how to do an isolated dual boot (it's 1h long): https://www.youtube.com/watch?v=6854EiOF7QE
He installs Manjaro in the same hard disk where Windows is, but is it possible to achieve something like that with Manjaro on sdb? And if it is possible, what would happen to me if I were to physically remove sda or sdb from the computer? Would the other OS boot without a problem or wouldn't it boot because it can't detect the OS on the hard disk I removed?
Thank you in advance, I'm still very noob
EDIT: I came across this topic: [HowTo] Dual-boot Manjaro - Windows 10 - Step by Step
Is creating a separate /boot/efi partition what determines the "no messing with the Windows EFI partition and therefore no problems with Windows removing the Manjaro bootloader"? Since my partition table is MBR, would I be fine just creating a separate /boot and installing the boot loader here on /boot, or would I still have to do what the guy in the video I linked above does?
You can use different hard drives for Windows and Manjaro but if your MBR only exist on either disk you will get a failure to boot if you remove it.
Most firmwares allow for setting the boot priority either on a permanent basis or using a keypress to temporarily override the firmware defined primary device.
If you are careful during Manjaro install and writing the Manjaro MBR to your Manjaro disk device then dual booting can be achieved using the temporary boot device override.
Another approach is to disconnect the disk device with Windows, boot a to a Manjaro live system and install to an available disk device. This will ensure your MBR for booting Manjaro is written to your Manjaro device.
After connecting both drives you will be able to either set the active boot device in the firmware or use a hotkey for selecting the temporary device.
This approach is used by many privacy oriented Manjaro users to airgap their Manjaro and Windows installation.
Selecting at boot time which device to load makes it possible to keep the systems apart as they share nothing.
Yes, and if I'm understanding your post correctly, then I don't need a separate /boot partition to achieve something similar on MBR, because all is needed is that I simply install Manjaro and its boot loader on sdb... but this only works with a proper Windows installation.
This is what isn't written in the official Manjaro user guide, so I didn't know about this and I installed Manjaro on sdb and the boot loader on sda. I then re-installed both Manjaro and the boot loader on sdb, while Windows is on sda. Booting directly on sda now doesn't work, and my understanding is that I overwrote the Windows boot loader with grub (the workaround being choosing sdb at boot, then choosing Windows from grub).
This is a good advice, but my first objective is to restore the Windows boot loader 1) without a Windows recovery cd/usb, and 2) without enslaving it to an existing Manjaro installation. In the end, I would like to have them separated, so that I can remove either of the hard disks and still have the other OS functioning.
I can remove and re-install Manjaro at my pleasure, but I can't lose Windows
EDIT: I should explain "without enslaving it to an existing Manjaro installation" better. So, what I know for sure is that if I have Windows on sda and I install Manjaro on sdb and grub on sda, I'm "enslaving" Windows to Manjaro, meaning that I can't boot into Windows if Manjaro is not there. So, to access Windows safe/advanced boot (or whatever it is called), I need to access Windows, and to access Windows I need Manjaro. Thus I can not remove sdb prior to repairing the Windows boot loader. [What follow are a lot of assumptions] Now, if I were succesful in restoring the Windows boot loader, I would still have Manjaro visible on sdb, thus it would detect it and it would insert it in the Windows boot loader, and now the parts would be inverted... if I were to remove Manjaro, I wouldn' be able to boot in Windows.
I really hope to be wrong in this last part and that I will be able to restore the Windows boot loader, and not that it doesn't work anymore if I remove Manjaro...
If your system is a MBR/BIOS system - with no separate EFI partition - it sounds like you have overwritten the MBR on the device you refer to as sda.
My Windows knowledge is quite rusty since several years I have not used Windows.
A fast and dirty search of the internet came up with references to a couple of Windows utilities. As you are still able to boot your Windows installation you should be able to execute this utility or you may have a bootable Windows USB you can use to boot into the Repair Computer option of the Windows install ISO.
The bootrec utility should be able to restore your MBR to a state where it boots directly to Windows.
I provide these commands as information only and cannot guarantee nor be responsible for any damage which may or may not occur if you choose to execute them without proper verification.
Though while these command could fix your problem please do you own research to verify.
No offence but I don't watch linked youtube videos unless an adequate description of the content is provided and then only maybe and probably not. The reason is - either I already have the knowledge (partially) or I can acquire it faster using a refined search and reading the docs. I am an old fox having piles of ready available knowledge. I actually remember using the mentioned tool on a Windows 2008 server - quite some years ago.
Windows 8 - 8.1 essentially the same. The ISO was only if you needed it to boot from. Booting a Windows ISO to the first Windows install screen - there is a link in the lower left for Repair Computer.
No upgrades are done - only a an environment for running the repair commands.
As I mentioned - you might be able to do so from within your current running Windows.
If you are very quick from selecting Windows in Grub and hitting ShiftF8 you might even be able to launch your current Windows to a prompt only. Then executing the mentioned commands and reboot.
I would like to arrive at that point too, but I can't spend one month finding and learning how to use the software I need to use: I'd rather keep doing things in Windows as I'm currently used to, and, when I have free time, boot Manjaro and learn how to do the same things. Once I can do all of them, then I will say goodbye to Windows
I didn't know this, thank you! Sometimes it is really great to be wrong To give you some context, I became paranoid towards messing with OSes in general when a couple years ago I tried Debian GNOME (and I say again, GNOME, coming from Windows) and grub failed to detect Windows... so I had to navigate this unkown interface to get to the browser, open it, search for a solution and imputing sudo update-grub in a terminal... and I never used a terminal before! Debian lived almost unused for quite some time in my second hard disk before I discovered Manjaro thanks to a really kind person.
I didn't know that key combination, thank you! But I'm still not sure that I should leave my second hard disk (where Manjaro is) attached to the computer when I try to repair the Windows boot loader: the last thing I want is that it detects Manjaro and that somehow it fails to restore the Windows boot loader because of that. But, as I said earlier, if I try to boot directly into Windows (sda) I get an instantaneous error message that says that it could not find the device. And this means that...
I might need to boot into the ISO and fix the problem from there.
So, to recap, my plan so far is:
Burn Manjaro iso on a pendrive and Windows 8.1 on another pendrive
Reinstall a fully unencrypted version of Manjaro on sdb, with separate /home folder as NTFS (just to be extra safe that I can later on attach this hard disk on another computer to back up all the important data there)
Attach sda and backup everything onto /home, and from this to another hard disk on another computer
Proceed to apply the bootrec fix
Attach sdb and enjoy separate boot
Does any of you guys think I'm missing something, or that I can improve something?
Absolutely no offence! Please allow me to recap them
The first one is about how to get to the safe/advanced boot, how to get to the terminal and then inputing the exact bootrec commands you found with your research.
The second video is dated 3 August 2015 (so some things most likely will be different today) and is about how to make a separate dual boot with Windows and Manjaro sitting on the same hard disk. The end result is that he can jump back and forth between the two boot loader as he pleases without rebooting the computer between jumps, and he achieves this in the way I'm recapping here:
2nd video recap
He starts with BIOS, one MBR hard drive and three partitions: C, Recovery and System Reserved ("he" will be omitted from now on)
Downloads Manjaro, Rufus and EasyBCD
Burns Manjaro on a pen drive
Defrags his system with the Windows built-in defragmenter
Shrinks C to make room for Manjaro and leaves the space unallocated
Uses EasyBCD to create a backup of his MBR
Boots into Manjaro live
Uses GParted and creates:
8.1. sd4: extended partition out of the unallocated space (he has already 3 partitions, so this needs to be an extended one)
8.2. sda5: logical, 350 MiB, ext4
8.3. sda6: logical, 10240 MiB, ext4
8.4. sda7: logical, 26889 MiB, ext4
8.5. sda8: logical, 2048 MiB, linux-swap
Starts the CLI Manjaro Installer
9.1. (the first settings are date and time, I'm skipping these; he is entering menus and submenus, I'm trying to represent their tree and what he does)
9.2. Disk(s) preparation
9.2.1. Set Filesystem Mountpoints
126.96.36.199. swap: sda8, denies the creation of a filesystem on this partition because he has already done it in GParted
188.8.131.52. root: sda6, ext4, denies the creation of a filesystem on this partition
184.108.40.206. sda5: /boot, ext4, denies the creation of a filesystem on this partition
220.127.116.11. sda7: /home, ext4, denies the creation of a filesystem on this partition
18.104.22.168. chooses FSUUID as device name scheme to use in config files
9.3. Install system
9.4. Configure system (he enters boot passwords, user accounts...)
9.5. quits the installation without installing the boot loader
10.1 lsblk -f
10.2 yaourt -S mhwd-chroot then y to proceed with the installation
10.3 sudo mhwd-chroot (this opens a second terminal window, all the other commands will be imputed into the second window; /dev/sda6/ (sda6: root) is selected by default)
10.4 lsblk -f
10.5 mount /dev/sda6 /mnt(sda6: root)
10.6 mount /dev/sda5 /mnt/boot(sda5: boot)
10.7 cd /mnt
10.9 mount -t proc proc /mnt/proc
10.10 mount -t sysfs sys /mnt/sys
10.11 mount -o bind /dev /mnt/dev
10.12 mount -t devpts pts /mnt/dev/pts/
10.13 chroot /mnt
10.14 pacman -S mtools os-prober then y to proceed with the installation
10.15 grub-install /dev/sda5 (he points out that in the wiki it is sda, the whole hard disk, so he insists that in order to do an isolated dual boot, grub needs to be installed on sda5 (boot))
Reboots (as expected, he boots into Windows)
Using EasyBCD, he edits the boot menu by adding a new entry: "type: GRUB 2", "drive: partition 4, linux, 350 MiB" (he explains that Windows doesn't assign a number to a logical partition, so all numbers are shifted by 1 and sda5 becomes partition 4)
Leaves Windows as the default boot, and not Manjaro
Reboots and this time he can choose whether to boot into Windows or Manjaro
Boots into Manjaro, and since Windows is listed on grub, he can choose either to boot Manjaro or to go back to the Windows boot loader (not load directly into Windows, but the Windows boot loader... basically he could jump back and forth between the two boot loaders if he wanted)
I've been busy last week, but I've found an easier solution for my problem! My recommanded way to uninstall a distro from a Windows dual boot system (if the distro boot loader was installed on the same hard disk where Windows is but not on a dedicated /boot partition for BIOS or /boot/efi (I'm not sure here) partition for UEFI) is to:
backup all the files you want to save from the distro /home folder;
check that the above worked by rebooting the computer (you should boot stright into Windows without seeing the GRUB screen;
go into the Windows Disk Manager and overwrite the partitions used by the distro.
The command that worked for me was bootsect /nt60 C: /mbr
In order to create a separate dual boot where the Windows boot loader references GRUB and GRUB references the Windows boot loader back, you have to:
if you are installing the distro on the same hard disk where Windows is, then create a separate /boot partition and install here the distro boot loader;
if you are installing the distro on a different hard disk than where Windows is, then you can safely install the distro boot loader on the same hard disk where you are installing the distro (and not where Windows is!) without creating a separate /boot partition.
In the first case, you'll have to tinker with the Windows boot loader to add GRUB, while GRUB should automatically detect Windows (if it does not, then just run sudo update-grub on the distro terminal).