Tuesday, September 18, 2018

All you need to know about dual booting on UEFI/BIOS firmware and Intel hardware

I've been playing around with linux and dual-booting since 2014. It's fun. It's challenging. A lot of it is waiting around for the OS (operating system) to install. Recently, I've been experimenting with my Dell Inspiron 5999 with i7 and radeon m335 graphics, and has UEFI and BIOS (legacy) capabilities.
Recently, Windows 10 has been such a hassle to deal with as it just keeps getting space aids from the Nth dimension. It randomly corrupts its own drivers, forces you to update it, refuses to update because of your antivirus (no other reason), and is basically the inbred child of vista and ME. A lot of times it would just refuse to work because it randomly deleted an essential file. For no reason. In the middle of my editing music, the bluetooth cut out, and Windows went haywire for absolutely no reason, and caused my nice bluetooth headphones to have a heart attack and not turn off. This was the final straw:  I was installing Windows 7 on that machine if it kills me.
So. First problem:  burning the iso file right (as I do have a legitimate windows 7 key, but no cd, go figure) to an available usb. So I recommend using the windows 7 USB DVD download tool or the mkusb utility available in linux. I have found mkusb to be a godsend as the USB's were immediately bootable with no hassle. The hassle was either they wouldn't boot at all, or linux wouldn't recognize the partition table at all.



Windows 7 USB DVD download tool link:  direct download
mkusb link: launchpad ppa
 install mkusb (for linux only): 

  • sudo add-apt-repository ppa:mkusb/ppa 
  • sudo apt-get update
Now that we have our 2 separate USB's burned (both windows 7 and your preferred distro of linux), there's more complications. Windows 7 only installs in legacy/CSM/BIOS/compatibility mode with msdos/MBR partition table ONLY. Also, it will refuse to install via USB because of driver problems with USB 3.0. Now, I have done some research and dug up some information from intel, and I have compiled the files with DISM GUI and have followed this extremely helpful walkthrough from intel on how to inject drivers into your USB "disk". I HIGHLY recommend following this official walkthrough if you all don't trust me with the file links I provide for boot wim and install wim (this is for windows 7 HOME PREMIUM versions only, if you're using another version, follow intel's walkthrough by the letter).  Copy both the finished boot wim and install wim files into the sources file of the windows USB. This USB is now finished and ready to go. You will want to install Windows 7 before installing linux as the workaround (booting into linux live usb, installing grub, rebooting with the live usb still inserted, boot native installation of linux, reinstall grub) does not work for this pc in legacy mode.
After installing Windows 7, the next challenge is installing linux correctly so that it can boot into windows from the grub bootloader. DO NOT, I repeat, DO NOT let the program automatically partition these for you as it will not partition it correctly. Choose the "something else" option for when you arrange your partitions. The partitions you will need in order for this to work are as follows: 
/ (root)
/home
/boot
swap
I have proven this to successfully dual-boot with linux as I loaded windows 7 successfully from the grub boot menu upon reboot. This is with both operating systems installed in legacy mode. I have not experimented with having windows on legacy mode, and running ubuntu in uefi mode, completely separate from each other to prevent conflicts. The only conflicts I have got from dual booting so far is if I improperly shut windows down and try to boot into it again from the grub bootloader, it is graphically incapable of running properly. I have yet to find a workaround for this:  I might have to actually separate the two operating systems, tricking them both into thinking they're the only one on the system. The problem I think is windows 7's native recovery menus which completely zoink out after grub.

No comments:

Post a Comment