LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to remove Mint dual booted (not working) with Win10 (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-remove-mint-dual-booted-not-working-with-win10-4175714968/)

Gyroman 07-23-2022 01:23 AM

How to remove Mint dual booted (not working) with Win10
 
I have been through expert help to fix dual booted Mint on a Win10 Toshiba Satellite Pro laptop. The help was excellent I got back the boot menu but Mint would not boot I used boot-repair from a live Mint USB with no change. I have saved my Linux data and I need to remove Mint. The Win10 {anti sociable b*st*rd} would not update properly with the dual boot so I want to just get back to a clean{?} Win10. This is same as PLEASE HELP (with info) I have been on this for weeks and I need to finish a job.

mrmazda 07-23-2022 02:47 AM

Windows should update normally if you can boot any live linux and run:
Code:

sudo efibootmgr -o 5,6,4,3,2002,2006,2004,2005,2,0,1,3001
to reverse what you did in your earlier thread. Save the Mint removal project for after your urgent project is done. You may be game for trying Linux again when you're not so busy.

Code:

sudo efibootmgr -o 5,6
might be sufficient. I've never had so many options on one PC to try a subset to rearrange just the first two.

Gyroman 07-23-2022 06:13 AM

Thanks ... I prefer Linux any day to WIN.. but
I need the powerpoint/word/zoom project stuff on WIN however I have a problem running videos embedded in powerpoint on zoom like no sound.. and I use Linux to do video editing work. I feel uneasy about undoing what we did before as the boot menu looks better somehow so I am sure it improved things and I can live boot Mint off the USB ok.

I suppose one option would be to run Mint in a virtual box and leave WIN10 alone for now. I have 16G memory and 1Tb HDD so would that allow me to load up my video prepping software and convert videos to something that will run on windows and transfer via a shared folder? I just don't want to disturb my WIN10 for now even if it won't update.

I think ultimately I would like to have a Linux Mint machine with WIN#? safely locked up in a virtual box if that would allow WIN to have required apps loaded and access required hardware etc.

Does [sudo efibootmgr -o 5,6 ] (-o mean order) and (5,6 = new boot order) ie just change the boot order back to WIN10?

I tried reinstalling Mint but got partition errors before. After what has been done is that a possibility now?

amplitude 07-23-2022 12:11 PM

You just insert the linux mint installation media and update the GRUB.

also try EasyBCD link

mrmazda 07-23-2022 03:10 PM

Quote:

Originally Posted by Gyroman (Post 6369341)
I suppose one option would be to run Mint in a virtual box and leave WIN10 alone for now. I have 16G memory and 1Tb HDD so would that allow me to load up my video prepping software and convert videos to something that will run on windows and transfer via a shared folder?

It should.

Quote:

I think ultimately I would like to have a Linux Mint machine with WIN#? safely locked up in a virtual box if that would allow WIN to have required apps loaded and access required hardware etc.
Good plan.

Quote:

Does [sudo efibootmgr -o 5,6 ] (-o mean order) and (5,6 = new boot order) ie just change the boot order back to WIN10?
-o is the efibootmgr boot order option. man efibootmgr

Quote:

I tried reinstalling Mint but got partition errors before. After what has been done is that a possibility now?
Successful installation should be possible at any time. The Mint installer can remove the old and install completely afresh, but also it can just reformat the existing Linux / partition and keep the /home partition undisturbed, if there is one from the old installation.

Gyroman 07-25-2022 02:25 AM

Quote:

Originally Posted by mrmazda (Post 6369434)

Successful installation should be possible at any time. The Mint installer can remove the old and install completely afresh, but also it can just reformat the existing Linux / partition and keep the /home partition undisturbed, if there is one from the old installation.

Thanks.. I tried Mint installation from live boot USB and the only option to keeping dual boot with WIN10 was to repartition the drive like it did not seem to give an option to use the existing Linux partition much less preserve my home directory. So not sure about this..

Gyroman 07-25-2022 02:29 AM

Quote:

Originally Posted by amplitude (Post 6369399)
You just insert the linux mint installation media and update the GRUB.

also try EasyBCD link

How do I "just update the grub" from a live boot Mint USB or is that a command line thing?

mrmazda 07-25-2022 06:34 PM

It's been too long since I last installed Mint for me to provide specifics, but the installation guide clearly suggests you can designate that an existing home partition can be reused without reformatting, and the existing root partition can be selected for reuse with fresh formatting. The starting point is the "installation type" you choose, which must be "something else". Obviously "erase disk" is not intended to keep whatever is present there now.

Updating grub can be done several ways. The only way I ever do it is via chroot on a command line Linux boot. Once this has been accomplished with root authority:
Code:

# mount /dev/sda6 /mnt
# mount -o bind /sys /mnt/sys
# mount -o bind /dev /mnt/dev
# mount -o bind /proc /mnt/proc
# chroot /mnt
# mount -a
# update-grub
# exit

At this point, reboot. Note /dev/sda6 must be replaced with the device name of whatever partition contains Mint's root filesystem. Presumably, update-grub remains a shortcut to the following:
Code:

sudo grub-mkconfig -o /boot/grub/grub.cfg
which is typically what needs doing when "reinstall grub" is recommended. Reinstall Grub can also mean reinstalling all grub* packages using a package manager.

Gyroman 07-26-2022 12:13 AM

Thank you.. I ran the grub update and so pleased to see it found Mint but had a problem with "GRUB drive for /sdb1"
I had a look at mapfile but just don't know enough to do this.. Thank you so much for your patience..

Code:

mint@mint:~$ sudo mount -o bind /sys /mnt/sys
mint@mint:~$ sudo mount -o bind /dev /mnt/dev
mint@mint:~$ sudo mount -o bind /proc /mnt/proc
mint@mint:~$ sudo chroot /mnt
root@mint:/# mount -a
root@mint:/# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-107-generic
Found linux image: /boot/vmlinuz-5.4.0-105-generic
Found initrd image: /boot/initrd.img-5.4.0-105-generic
Found linux image: /boot/vmlinuz-5.4.0-104-generic
Found initrd image: /boot/initrd.img-5.4.0-104-generic
Found linux image: /boot/vmlinuz-5.4.0-91-generic
Found initrd image: /boot/initrd.img-5.4.0-91-generic
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings
done
root@mint:/# exit
exit
mint@mint:~$


Gyroman 07-26-2022 01:11 AM

I just discovered I now have lost WIN10 on the ubuntu/Mint boot menu..

From uefi I moved WIN10 boot to top and got back my WIN10 so now I have no dual boot menu

should I just use WIN10 to repartition the drive and remove Mint which then could be re-installed clean or can I fix the dual boot menu?

mrmazda 07-26-2022 01:34 AM

Repeat the process you reported in comment #9 through the mount -a step, then run parted -l and/or fdisk -l instead of update-grub. Then show us that output as well as what efibootmgr reports. It may be necessary to use it as you did before, except to designate 5 be first instead of 6, to provide access directly to Windows until it can be determined just what happened as a result of /dev/sdb1 not being found when you ran update-grub.

Edit:
You should be able to fix grub's menu once we can determine what caused the update-grub error.

Gyroman 07-26-2022 06:31 AM

Huston.. I think we have a problem?
I should say to get live Mint up I F2'd into the bios and moved 'USB Memory' above 'WIN boot mgr' that's all..

Code:

mint@mint:~$ sudo mount -o bind /sys /mnt/sys
mount: /mnt/sys: mount point does not exist.
mint@mint:~$ sudo mount -o bind /dev /mnt/dev
mount: /mnt/dev: mount point does not exist.
mint@mint:~$ sudo mount -o bind /proc /mnt/proc
mount: /mnt/proc: mount point does not exist.
mint@mint:~$

[/code]

Code:

mint@mint:~$ efibootmgr
BootCurrent: 2001
Timeout: 2 seconds
BootOrder: 2001,0005,0006,0004,0003,2002,2006,2004,2005,0002,0000,0001,3001
Boot0000  Boot Device List
Boot0001  Diagnostic Menu
Boot0002  UiApp
Boot0003* ODD
Boot0004* HDD/SSD
Boot0005* Windows Boot Manager
Boot0006* ubuntu
Boot2001* USB Memory
Boot2002* USB ODD
Boot2004* LAN1
Boot2005* LAN2
Boot2006* FDD
Boot3001  HDD Recovery
mint@mint:~$

I'm just a rocket man.. all the science I don't understand..

mrmazda 07-26-2022 11:02 AM

Quote:

Originally Posted by Gyroman (Post 6370019)
Code:

mint@mint:~$ sudo mount -o bind /sys /mnt/sys
mount: /mnt/sys: mount point does not exist.
mint@mint:~$ sudo mount -o bind /dev /mnt/dev
mount: /mnt/dev: mount point does not exist.
mint@mint:~$ sudo mount -o bind /proc /mnt/proc
mount: /mnt/proc: mount point does not exist.
mint@mint:~$


The problem is what you reported in #9 isn't what you had to have actually done. Look at #8. In your description, you left out the foundational command that mounts the installed system's root filesystem, which is why what you did here couldn't work.

With your current efibootmgr output, after removing USB stick, you should be able to boot directly into Windows.

Gyroman 07-26-2022 06:31 PM

Houston.. Yes that is correct as it is now removing the USB gets me straight into WIN10..

Check for re-entry.. I should have gone back and started from #8 followed by #9 as far as mount -a. Is that correct?

One thing I did not try after update-grub (#8) was to actually try to boot into my installed Mint.. I sort of panicked because WIN10 did not appear in the boot menu. Now I am ok with getting into bios and changing the boot order if I move UBUNTU back on top should it boot my installed Mint since I did update-grub?

It's cold out here in space..

mrmazda 07-26-2022 07:08 PM

Quote:

Originally Posted by Gyroman (Post 6370125)
I should have gone back and started from #8 followed by #9 as far as mount -a. Is that correct?

10-4.

Quote:

One thing I did not try after update-grub (#8) was to actually try to boot into my installed Mint.. I sort of panicked because WIN10 did not appear in the boot menu.
Absence of Windows in Grub menu could be a sign that you managed to boot the live media in legacy mode rather than UEFI. That could have resulted in update-grub doing the wrong thing for your existing installation.

Quote:

Now I am ok with getting into bios and changing the boot order if I move UBUNTU back on top should it boot my installed Mint since I did update-grub?
At this point I would try using the BBS menu or making UEFI-Ubuntu/Mint the first BIOS entry to see what happens when you try to boot Mint.


All times are GMT -5. The time now is 12:52 PM.