LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 02-07-2019, 03:06 PM   #1
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Rep: Reputation: 28
How do I install windows again on a dual boot with Linux Mint?


I want to reinstall Windows on a dual boot with Linux Mint 19.1

I will first move all the data and installed programs of Windows to Linux Mint across the desktop then
delete the larger partition and reformat it to NTFS with Gparted.

Since I am keeping the smaller NTFS partition which I assume has the grub in it, will I be able to a fresh Windows 10 to the NTFS larger partition and be able to still dual boot without losing the Linux boot option?

If it does not work this way I assume another Mint installation will put two Mints and Windows as the triple boot. Then I would have to go to the installed Mint with the saved files and programs returning them to the new Windows.

Then I would delete both Mint partitions with Gparted and reinstall Linux Mint 19.1.

What is the easiest solution please?

Last edited by bscho; 02-07-2019 at 03:08 PM.
 
Old 02-07-2019, 04:34 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
the big question, MBR or UEFI install?

if UEFI then you'll have a small partition /boot/efi on it, otherwise it is delete-able because MBR grub for one resides on the mbr, and will be over written by Windows when you install it again. if UEFI then it should not be a big deal to install Windows after Linux because the /boot/efi directory holds the files to boot your operating systems.

if you have your Linux split into root and home separately then you can install linux again over top of it, actually format the same area and install it again. you might be able to use supergrub2 to find it then boot into it then install grub again regaining your Linux without issue.
 
Old 02-07-2019, 05:21 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Whilst UEFI is certainly easier, there is no need to re-install Mint. Nor does it matter if there is a separate /boot partition.

Simply re-install Win10 - it will detect what it needs. You will lose access to the Mint system. Presuming UEFI, go into the firmware screens and make Ubuntu the default boot entry.
If BIOS, boot a liveUSB (the Mint install USB is fine) and chroot into the Mint system then run "grub-install" followed by "update-grub". The supergrubdisk used to be handy for doing all this for your - I presume it still does although I haven't checked it out for a while.
Lots of how-to's out there for both Mint and Ubuntu - they should all be applicable.

Last edited by syg00; 02-07-2019 at 05:33 PM. Reason: sp
 
Old 02-07-2019, 06:26 PM   #4
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by BW-userx View Post
the big question, MBR or UEFI install?
How can I tell this from my Linux Mint?
 
Old 02-07-2019, 06:50 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,573

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
Copy/Paste the command below in a terminal on Mint to determine if your Mint is EFI or Legacy. Or use sudo parted -l and see if there is an EFI partition. Also, no Grub files will or at least should not be on an ntfs partition. If EFI, some files will be on the vfat partition.

Quote:
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"

Last edited by yancek; 02-07-2019 at 06:51 PM.
 
Old 02-07-2019, 10:46 PM   #6
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by yancek View Post
Copy/Paste the command below in a terminal on Mint to determine if your Mint is EFI or Legacy. Or use sudo parted -l and see if there is an EFI partition. Also, no Grub files will or at least should not be on an ntfs partition. If EFI, some files will be on the vfat partition.
First says no command -d
second says
Model: ATA WDC WDS500G1B0A- (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 247GB 247GB primary ext4
2 247GB 248GB 524MB primary ntfs boot
3 248GB 378GB 130GB primary ntfs
4 497GB 500GB 3430MB extended
5 497GB 500GB 3430MB logical linux-swap(v1)

Can't see if that has helped me much?
 
Old 02-07-2019, 11:32 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Take more care when copy-paste. You have BIOS.
 
Old 02-07-2019, 11:36 PM   #8
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by syg00 View Post
Take more care when copy-paste. You have BIOS.
Do not understand you I have done it again
barry@barry-To-be-filled-by-O-E-M ~ $ [ -d /sys/firmware/efi ] && echo "EFI boot on HDD"
barry@barry-To-be-filled-by-O-E-M ~ $


Yes I have a Bios is it in there then?
 
Old 02-08-2019, 07:01 AM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
MBR boot not UEFI, so that means you'll lose your gurb momentary until you do one of the suggestions, chroot, or try and see if supergrub2 will get you back in to Linux to re-establish your gurb after a windows installation.

Partition Table: msdos <--- is the tell tell sign you got MBR, Legacy, BIOS, Old School, boot setup.
 
Old 02-08-2019, 07:22 AM   #10
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by BW-userx View Post
MBR boot not UEFI, so that means you'll lose your gurb momentary until you do one of the suggestions, chroot, or try and see if supergrub2 will get you back in to Linux to re-establish your gurb after a windows installation.
so how do I do that from the windows then please?
 
Old 02-08-2019, 07:43 AM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,573

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
Quote:
First says no command -d
That is a result of leaving the " [ " character off when running the command.

Since you have a Legacy/msdos partitioned drive, your windows installer should detect that and install to whichever partition you select formatted ntfs. Windows on a Legacy/MBR install will overwrite the Grub boot code in the MBR. You will not be asked if you want to do this nor will you be informed that it is happening. Once the install is finished, reboot to windows to test. If it boots, use Your Linux install media or SuperGrubDisk to re-install Grub to the MBR.
 
Old 02-08-2019, 07:49 AM   #12
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by yancek View Post
That is a result of leaving the " [ " character off when running the command.

Since you have a Legacy/msdos partitioned drive, your windows installer should detect that and install to whichever partition you select formatted ntfs. Windows on a Legacy/MBR install will overwrite the Grub boot code in the MBR. You will not be asked if you want to do this nor will you be informed that it is happening. Once the install is finished, reboot to windows to test. If it boots, use Your Linux install media or SuperGrubDisk to re-install Grub to the MBR.
I did that and got no command -d and then keep ing the [ info] It did nothing at all

Try it and see if it works on your terminal certainly does not on mine.

Just downloaded the supergrub2.iso and want to now how I can use it to restore a grub that has both windoze and linux on?

Or should I use it first before partitioning to delte and reinstall windows and save the grub?
 
Old 02-08-2019, 09:01 AM   #13
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Have made a yumi of the super disk 2 and have it running so I can boot into either Windows or Mint now.

If I go into linux and do this

Restore grub

Now we are going to install grub back to the MBR, which it is what most people to do.

In the next command you will need to replace sda with your hard disk.

Either you run:

sudo grub-install /dev/sda

(where you might have to write your user password blindly or not) as a admin user or:

grub-install /dev/sda

Will this make a grub with Windows and Linux then?

or is it best to take and save a copy of the existing grub and saving that?
I am having problems to find where that is any help will be appreciated.
 
Old 02-08-2019, 09:18 AM   #14
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
oops you forgot
Code:
sudo update-grub
after you've installed grub. With supergrub2 you boot it select it in BIOS what do you want to boot list that comes up, you should know how to boot your system and use BIOS boot list selection, pick the usb stick , then when it boots into it, have it search for all oses, then travel down the list until you find your linux distro then select it, it too will show you the old style of booting using the I do not know what it is called, but the partitions nomenclature style as well if you run into problems with it try using that one msdos(0,3) something like that.

you'll understand what I am talking about when you see it. you just need to know where your kernel is located on what partition and hdd to select it. if you use that one on the list. Oh yes, it is zero based.

Last edited by BW-userx; 02-08-2019 at 09:20 AM.
 
Old 02-08-2019, 12:13 PM   #15
bscho
Member
 
Registered: Nov 2012
Location: London
Distribution: Mint 20, Kali, Peppermint, Ubuntu, MakuluFlash, Fedora 32, Windows 12 Lite, MakuluLinux
Posts: 821

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by BW-userx View Post
oops you forgot
Code:
sudo update-grub
after you've installed grub. With supergrub2 you boot it select it in BIOS what do you want to boot list that comes up, you should know how to boot your system and use BIOS boot
I cannot see the grub there all it seems to do is allow me to select Windows or Linux.

Do you know where I can find my existing grub for me to save it?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installing mint 18.2 amd64 onto a dual boot windows 7 / mint 17 amd32 has lost windows 7 rhubarbdog Linux Mint 13 12-02-2017 07:34 AM
how to install Mint 18 over Mint 17 on dual boot with Windows 7 Gwynny Linux - Laptop and Netbook 3 05-14-2017 12:23 AM
[SOLVED] virtualbox installs pcbsd again and again and again straffetoebak Linux - Virtualization and Cloud 4 11-21-2014 07:14 PM
Dualbooting again, again, again... Procrastinator Linux - General 4 10-28-2004 11:04 AM
Need help installing Mandrake (again, again, again...) DicedMalt Mandriva 6 08-26-2003 04:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 01:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration