Clean install windows 10 without affecting Ubuntu

Abinav_Shankar

New member
Jul 20, 2018
4
0
0
Visit site
Hi,

I have Windows 10 and Ubuntu 20.10 installed on two separate hard disks. There are problems with my Windows 10 and refreshing or resetting solves the problem only temporarily (the issues come back after two or three logins). I am planning to clean install Windows 10 from USB. I have all my personal files in ubuntu. Will clean installing W10 affect my Ubuntu files? Is it safe to proceed without any additional setups?

Thanks.
 

Ecm

New member
Nov 13, 2012
96
0
0
Visit site
If Ubuntu and all your files are on a completely separate drive (not a portion), then you can be 100% certain by pulling that drive before wiping and reinstalling Windows.

I’d suggest cleaning the Windows drive using diskpart before installing. It’s always nice to be certain there no junk left over.
 

me just saying

Active member
May 17, 2020
1,195
12
38
Visit site
no matter what you do, ubuntu will be affected. even if you pull the drive, you could lose grub. It may have to be recreated. IMO, it is always good to create a backup of all important files when you do anything major like you are planning - accidents happen.
 

YamiYukiSenpai

New member
Apr 17, 2015
7
0
0
Visit site
I believe I did this before, but it has been a while since I reinstalled Windows.

I have an old laptop that's quad-booting (Ubuntu & Windows are in one drive). If you have Windows 10 on the same disk, you can select the largest Windows partition (the NTFS one) at install time (I think even if you delete every partition Windows uses, recreating it from the freed space shouldn't touch the other partitions).

Assuming GRUB disappears, you can 1) select the Ubuntu partition at boot time, or 2) create an Ubuntu live USB, and reinstall GRUB.

When you reinstall GRUB, you have to make sure that you mount the Ubuntu partition & the EFI partition. I'm going by memory so I suggest you or someone here look it up to make sure that I was correct or didn't make a typo:
  1. List the disks that are in your system.

    sudo fdisk -l

    It'll have an output similar to this

    Disk /dev/sda: 238.49 GiB, 256060514304 bytes, 500118192 sectors
    Disk model: Samsung SSD 850
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: BD7EBAEA-CA89-424C-99FC-914DB87E6AC9

    Device Start End Sectors Size Type
    /dev/sda1 2048 976895 974848 476M EFI System
    /dev/sda2 976896 499337215 498360320 237.7G Linux filesystem

    If you have an NVME drive, instead of something like "sda1", it'll look like something like "nvme0n1p1"

    We'll use my output as an example. I bolded the ones you should pay attention to.
  2. Mount the Ubuntu partition & install GRUB

    su
    mount /dev/sda2 /mnt
    mount /dev/sda1 /mnt/boot/efi
    mount --bind /dev /mnt/dev
    mount --bind /dev/pts /mnt/dev/pts
    mount --bind /proc /mnt/proc
    mount --bind /sys /mnt/sys
    chroot /mnt
    grub-install /dev/sda
    update-grub
    Unmount the partition and restart

    exit
    umount /mnt/sys
    umount /mnt/proc
    umount /mnt/dev/pts
    umount /mnt/dev
    umount /mnt/boot/efi
    umount /mnt
    restart

Found a post in Ask Ubuntu that might help under the title "How can I reinstall GRUB to the EFI partition?". This forum wouldn't let me paste that link.
 
Last edited:

Members online

Forum statistics

Threads
323,770
Messages
2,244,349
Members
428,122
Latest member
postman