How to (safely) Dualboot Windows 10 and Linux?

cybertechcybertech OGBenchmark King
edited September 12 in Help

hoping for some advice to a novice.

tried a couple of times including reinstalling windows and crashed linux grub.

I plan to install in Disk 0's 31.30GB unallocated space (tried before and it works)

Disk 1 is storage HDD for.... "linux"

1st try: Debian 11 - created ext4 / partition and swap in 31.30GB. Installed Grub in Disk 0 (/dev/sda). Dual boot works well, boots and tried to install nvidia drivers. Subsequent boot gets stuck in Grub unless i choose Windows UEFI
(is it because i didnt disable secure boot or something? not sure whats wrong here but it worked)

2nd try: Tried to reinstall into the 31.30GB, format and reset partition. Does not work anymore. Reintalled windows.

3rd Try: Install kbuntu, Grub cannot be installed in /root partition (/dev/sda5) nor Disk 0 (/dev/sda). Critical Failure. After which Windows does not boot at all.

What I want to achieve: A safe dual boot environment where I can constantly reinstall linux OS as and when it crashes.

Thanks in Advance

I bench YABS 24/7/365 unless it's a leap year.

Comments

  • ehabehab Content Writer

    why don't you use the hypervisor and install a linux vm?

    Thanked by (1)cybertech
  • I had the same problem with Nvidia drivers and latest version of Ubuntu non-LTS, too - the open source non-Nvidia ones worked no problem

    Thanked by (1)cybertech
  • cybertechcybertech OGBenchmark King

    @ehab said:
    why don't you use the hypervisor and install a linux vm?

    didn't want to run linux inside windows, but i guess at my level its better to do so first haha.

    @bdl said:
    I had the same problem with Nvidia drivers and latest version of Ubuntu non-LTS, too - the open source non-Nvidia ones worked no problem

    yes. it worked well initially, and saw that its on some generic display drivers and thought why not give it some nvidia boost. BAM went into grub rescue command line or something. dont know how to recover.

    I bench YABS 24/7/365 unless it's a leap year.

  • Hello. Just want to ask if you also created a separate /boot/efi partition in addition to the existing Windows efi partition?
    Just also recently dual-boot my laptop (Windows/Pop!_OS). We also have the same drives SSD+HDD.

    These are my current partition layout if it helps.

    Thanked by (1)cybertech
  • cybertechcybertech OGBenchmark King

    @mainwindow said:
    Hello. Just want to ask if you also created a separate /boot/efi partition in addition to the existing Windows efi partition?
    Just also recently dual-boot my laptop (Windows/Pop!_OS). We also have the same drives SSD+HDD.

    These are my current partition layout if it helps.

    i did try it during the Kubuntu botched installs; adding 512mb ESP. Where in this case did you install the Grub into? specifically into the ESP partition?

    how would you "repair" Pop!_OS if it crashes unrecoverably somehow?

    I bench YABS 24/7/365 unless it's a leap year.

  • @cybertech said:
    i did try it during the Kubuntu botched installs; adding 512mb ESP. Where in this case did you install the Grub into? specifically into the ESP partition?

    I just copied the Microsoft folder from the windows efi partition to the /boot/efi/EFI. Pop migrates from grub to systemd so i did not tinker into grub, but I think you can use the default when installing kubuntu (/dev/sda). Just copy the folder so that the two os will appear to grub.

    how would you "repair" Pop!_OS if it crashes unrecoverably somehow?

    Since I'm also a novice, I will just reinstall Pop, but I'm also exploring options, e.g. Timeshift for Linux files. Both Windows and Pop uses/share the 1TB HDD for my files (with external backup) so I'm not really worried.

    Thanked by (1)cybertech
  • Not_OlesNot_Oles Hosting ProviderContent Writer

    Tom, not Oles. Happy New York City guy visiting in Mexico!
    The MetalVPS.com website runs very speedily on MicroLXC.net! Thanks to @Neoon!

  • ehabehab Content Writer

    @CamoYoshi u still backing up

  • Thank you for the tags, @Not_Oles and @ehab !

    Pop! OS tries to implement Grubless UEFI booting which may not play nicely with Windows 10.

    This tutorial may be helpful, though it assumes you are starting from a blank system disk to partition and install both Pop! OS and Windows to, with Pop! OS being installed first and having some certain settings adjusted during the installation:

    https://support.system76.com/articles/dual-booting#installing-on-a-shared-drive-starting-with-pop_os

    This article as well may also be helpful:

    https://support.system76.com/articles/bootloader

    Windows 10 is known to be very intrusive upon the boot loader for system disks, and dual booting Windows 10 with Linux has become more difficult as a result, so after a Windows update or at random when it thinks there is a disk problem (because it sees the bootloader has been tampered with outside Windows, or has seen your Linux partitions and thinks they are corrupt parts of the disk), you may find Linux won't boot anymore. I honestly recommend instead using two separate disks to run Linux & Windows, and perhaps putting the shared data on a partition on one of the disks instead, as it will require less effort on your part, or consider running Windows or Pop! OS (or another distro of choice) on a virtual machine.

    I hope you find this information helpful - Let me know if you have any other questions.

    Cheap dedis are my drug, and I'm too far gone to turn back.

  • edited September 13

    If you create/keep a separate partition for /home, then you'd likely find it quicker to just reinstall the linux distro, choosing not to format /home. The alternative is to boot a rescue disc (or the linux install disc, breaking out of the installation), then reinstalling grub. There's plenty of instruction on the web for that.
    D'ya think my 256GB laptop SSD has enough partitions? :-D

        /dev/sda1      500M  7 HPFS/NTFS/exFAT
        /dev/sda2  *   45.3G  7 HPFS/NTFS/exFAT
        /dev/sda3   13.4G 83 Linux
        /dev/sda4    69G  f W95 Ext'd (LBA)
        /dev/sda5    128M 82 Linux swap / Solaris
        /dev/sda6    4G 83 Linux
        /dev/sda7     11.7G 83 Linux
        /dev/sda8     57.6G 83 Linux
        /dev/sda9     26.4G 83 Linux
        /dev/sda10    17.7G 83 Linux
        /dev/sda11   20.9G 83 Linux
        /dev/sda12    18.6G  7 HPFS/NTFS/exFAT
        /dev/sda13    11.5G 83 Linux
    
    Thanked by (1)cybertech

    lowendinfo.com had no interest.

  • cybertechcybertech OGBenchmark King

    @AlwaysSkint said:
    If you create/keep a separate partition for /home, then you'd likely find it quicker to just reinstall the linux distro, choosing not to format /home. The alternative is to boot a rescue disc (or the linux install disc, breaking out of the installation), then reinstalling grub. There's plenty of instruction on the web for that.
    D'ya think my 256GB laptop SSD has enough partitions? :-D

        /dev/sda1      500M  7 HPFS/NTFS/exFAT
        /dev/sda2  *   45.3G  7 HPFS/NTFS/exFAT
        /dev/sda3   13.4G 83 Linux
        /dev/sda4    69G  f W95 Ext'd (LBA)
        /dev/sda5    128M 82 Linux swap / Solaris
        /dev/sda6    4G 83 Linux
        /dev/sda7     11.7G 83 Linux
        /dev/sda8     57.6G 83 Linux
        /dev/sda9     26.4G 83 Linux
        /dev/sda10    17.7G 83 Linux
        /dev/sda11   20.9G 83 Linux
        /dev/sda12    18.6G  7 HPFS/NTFS/exFAT
        /dev/sda13    11.5G 83 Linux
    

    so it works for you when reinstalling linux ? my case it worked at first, until i crashed it with nvidia drivers and tried to reinstall again. stuck in what it looks like a "grub rescue mode"

    where in this case was the grub installed in, /dev/sda or /dev/sda(?)

    I bench YABS 24/7/365 unless it's a leap year.

  • cybertechcybertech OGBenchmark King

    @CamoYoshi said:
    Thank you for the tags, @Not_Oles and @ehab !

    Pop! OS tries to implement Grubless UEFI booting which may not play nicely with Windows 10.

    This tutorial may be helpful, though it assumes you are starting from a blank system disk to partition and install both Pop! OS and Windows to, with Pop! OS being installed first and having some certain settings adjusted during the installation:

    https://support.system76.com/articles/dual-booting#installing-on-a-shared-drive-starting-with-pop_os

    This article as well may also be helpful:

    https://support.system76.com/articles/bootloader

    Windows 10 is known to be very intrusive upon the boot loader for system disks, and dual booting Windows 10 with Linux has become more difficult as a result, so after a Windows update or at random when it thinks there is a disk problem (because it sees the bootloader has been tampered with outside Windows, or has seen your Linux partitions and thinks they are corrupt parts of the disk), you may find Linux won't boot anymore. I honestly recommend instead using two separate disks to run Linux & Windows, and perhaps putting the shared data on a partition on one of the disks instead, as it will require less effort on your part, or consider running Windows or Pop! OS (or another distro of choice) on a virtual machine.

    I hope you find this information helpful - Let me know if you have any other questions.

    agree that it makes sense to install in separate disk. this is an issue for me right now as its not possible to add a disk. would have to consider rebuilding a new PC just for fun :p

    I bench YABS 24/7/365 unless it's a leap year.

  • edited September 14

    @cybertech IIRC, I just install to the MBR i.e. /dev/sda . Modern distros can cope well with UEFI and all the enforced Windows crap. To be safe, I turn off Secure Boot/Fast Boot in 'doze.
    Take written notes (I have a small notebook for this) on how you partition the disc, to make it easier for when you reinstall (Linux Mint, the only desktop OS :p ). [Mint has a backup tool for /home and settings, though I don't use it.]

    Excuse the formatting below; I hate markdown!

    sudo update-grub
    [sudo] password for user:
    Sourcing file /etc/default/grub' Sourcing file/etc/default/grub.d/50_linuxmint.cfg'
    Sourcing file /etc/default/grub.d/60_mint-theme.cfg' Sourcing file/etc/default/grub.d/init-select.cfg'
    Generating grub configuration file ...
    Found theme: /boot/grub/themes/linuxmint/theme.txt
    Found linux image: /boot/vmlinuz-5.4.0-84-generic
    Found initrd image: /boot/initrd.img-5.4.0-84-generic
    Found linux image: /boot/vmlinuz-5.4.0-81-generic
    Found initrd image: /boot/initrd.img-5.4.0-81-generic
    Found Windows 10 on /dev/sda1
    done

    Abbreviated /etc/fstab
    # / was on /dev/sda3 during installation
    # /Data was on /dev/sda8 during installation
    # /ISOImages was on /dev/sda11 during installation
    # /Photos was on /dev/sda9 during installation
    # /Projects was on /dev/sda10 during installation
    # /Recovery was on /dev/sda12 during installation
    # /home was on /dev/sda7 during installation
    # /tmp was on /dev/sda6 during installation
    # swap was on /dev/sda5 during installation

    Notice that I take the little time/effort to label my partitions during installation. It makes things much easier to identify during, for example systemrescuecd operations, such a partition resizing.

    Yes, they ARE actually ISO images that I store there! Recovery is the original Windoze recovery partition, resized to nearly its' minimum.

    Thanked by (1)cybertech

    lowendinfo.com had no interest.

  • I think I took the safest route. Step 1 was to buy a separate machine for linux. Sowwy.

    My Rambles: MichaelCee.xyz

  • edited September 14

    @cybertech
    You got me curious:
    sudo grep grub /var/log/installer/syslog
    Jun 16 19:47:26 mint grub-installer: info: Identified partition label for /dev/sda3: msdos
    Jun 16 19:47:27 mint grub-installer: dpkg: warning: ignoring request to remove grub-efi which isn't installed
    Jun 16 19:47:27 mint grub-installer: dpkg: warning: ignoring request to remove grub-efi-amd64-bin which isn't installed
    Jun 16 19:47:27 mint grub-installer: dpkg: warning: ignoring request to remove grub-efi-amd64 which isn't installed
    Jun 16 19:47:27 mint grub-installer: dpkg: warning: ignoring request to remove grub-efi-amd64-signed which isn't installed
    Jun 16 19:47:27 mint grub-installer: dpkg: warning: ignoring request to remove grub-efi-ia32-bin which isn't installed
    Jun 16 19:47:27 mint grub-installer: dpkg: warning: ignoring request to remove grub-efi-ia32 which isn't installed
    Jun 16 19:47:27 mint grub-installer: info: Installing grub on '/dev/sda'
    Jun 16 19:47:27 mint grub-installer: info: grub-install does not support --no-floppy
    Jun 16 19:47:27 mint grub-installer: info: Running chroot /target grub-install --force "/dev/sda"
    Jun 16 19:47:27 mint grub-installer: Installing for i386-pc platform.

    Thanked by (1)cybertech

    lowendinfo.com had no interest.

  • edited September 14

    Note that I've been doing this dual boot crap for well (bad?) over 20 years - yikes!

    Too many fdisk /mbr, fdisk fix bootrec, partimage...
    Windoze Report Card reads:

    Doesn't play well with others.

    I dread every time I need to boot 'doze, as it runs yet another protracted update on startup/shutdown. At least a <30 second normal startup does make it bearable, on the odd occasion.

    lowendinfo.com had no interest.

  • edited September 15

    Saw your post and thought I would share my configuration for dual booting Windows and Linux.

    Similar to what you would like to do, I have Windows and Linux installed on two different hard drives. As my PC has 3 drives, I actually have Linux installed on single partition of the third disk. In the image below, that partition is Disk 2 Partition 1.

    Because the Linux partition doesn't need a lot of disk space, I only allocated 250GB of disk space to it. So I actually have two partitions on that hard drive and the second one is an extra NFTS partition. However, you could easily format the entire hard drive as a single partition for Linux.

    While I had been using OpenSUSE for many years, I recently switched to a different Linux distribution called MX-Linux. One interesting thing about this distro is that it only used one partition – there aren’t separate partitions for home, swap and such. I really like this distro and having a single partition may make things easier for you.

    Here is a copy of the notes I made during the installation:

    1. Because OpenSUSE used multiple partitions and MX Linux uses only one, I used GParted to remove all of the existing partitions and then created two ones. One partition was a 250GB EXT4 partition for MX Linux and the other is ~710GB NTFS partition for the Windows F drive.

    2. Prior to doing the installation, I disconnected the two other drives so only a single 1TB HDD was operational.

    3. I booted to the live version of MX Linux 19.4 from “live” USB stick and then clicked on the installer icon on the desktop.

    4. Since I had already created two partitions on the 1TB hard drive, I selected a custom disk setup on the second screen.

    • Selected “Custom install on existing partitions” and specified to do the install on the new EXT4 partition
    • Installed GRUB for Windows and Linux on that drive
    1. After the installation was complete, the PC rebooted and started MX Linux. After about 15 seconds, the main login window appeared and I was able to successfully log in.

    2. I shutdown the PC and reconnected the other two drives to verify that I could boot into Windows from the Windows Boot Manager screen.

    3. Because the Windows 10 SDD had been disconnected, I had to update the boot drive in the BIOS so that the PC would boot to the Windows 10 SDD. I did this and the PC did successfully boot into Windows 10.

    4. Under Window 10, I updated EasyBCD to the latest version and then added MX-Linux as an addition boot option. Here is what my setup looks like in EasyBCD

    Note - EasyBCD is a neat little utility that is free for non-commercial use. It allows you to easily modify the Windows boot menu to boot to most any OS. If you look on YouTube, you will find several videos showing how to setup the dual boot for Windows 10 and Linux. These videos will help you with step 8 above..

    Hope this helps …

    Paul

    Thanked by (1)cybertech
  • edited September 16

    @cybertech I can't emphasise enough my recommendation to at least have a separate home partition! You can reinstall Linux to your heart's content and as long as you don't format the /home partition, you will retain your settings & data. (Even better is to have an additional separate /Data partition.)

    Don't be blinkered by the poor default Windoze mentality. In my past, when I HAD to deal with corporate Windows lusers, I used to still partition a separate (user) local data partition. Corporate users are/were well used to having multiple drive letters, for distinct network resources. (I've had to put up with 'doze since version 3.1, if not earlier when PageMaker started to become popular - circa 1985.)

    Thanked by (1)cybertech

    lowendinfo.com had no interest.

  • cybertechcybertech OGBenchmark King
    edited September 16

    really appreciate all for the detailed guides and sharing of experience, this gave me the courage to try dualboot on same physical disk again.

    also exploring replacing the 2nd storage disk to an SSD.

    maybe read into possibility of repairing grub as well if it crashes.

    I bench YABS 24/7/365 unless it's a leap year.

  • cybertechcybertech OGBenchmark King
    edited September 16

    alright, just installed kubuntu, grub into /dev/sda, GPU drivers working, bluetooth audio working, chrome working.

    previous failures might have been missing EFI partition (but im not sure)

    fingers crossed dont have to fix anything :p

    Thanked by (2)AlwaysSkint mainwindow

    I bench YABS 24/7/365 unless it's a leap year.

  • Thanked by (1)cybertech

    lowendinfo.com had no interest.

  • cybertechcybertech OGBenchmark King
    edited September 16

    yes im counting on this if and when it happens. i think its inevitable :sweat_smile:

    but really thankful for all information and experiences shared, it really helped on the understanding of dualbooting especially on the same disk!

    #Appreciate

    Thanked by (1)AlwaysSkint

    I bench YABS 24/7/365 unless it's a leap year.

  • Remembering now, I have used a LiveCD to reinstate grub. Thankfully, it's rare to need it these days and as previously indicated, I'm more likely to just reinstall Linux Mint, using the latest ISO.

    Thanked by (1)cybertech

    lowendinfo.com had no interest.

Sign In or Register to comment.