Readers help support Windows Report. We may get a commission if you buy through our links.
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Due to the aggressive and territorial nature of Windows 10, problems like this will often emerge. That’s why installing Windows 10 before installing Linux in a dual-boot mode is advised. And you can also fix the Windows bootloader from Linux.
Linux is much less intrusive and won’t damage Windows 10 bootloader. Despite that, things can still go wrong after major updates. If that happens, you can fix it with Linux (Ubuntu).
How to repair Windows 10 bootloader errors from Linux?
1. Use the Boot Repair utility on Ubuntu
- Download Ubuntu live distro version.
- Mount it to your USB. You can do it with the Universal USB Installer (preferably) tool. Using this application is essential, or the drive won’t be bootable.
- Plug in the drive and boot from it.
- Go for the Try Ubuntu without installing option (If this fails, open BIOS/UEFI settings, disable Secure Boot, and try again).
- Once Ubuntu boots, press Ctrl+Alt+T to open the Terminal.
- In the command line, run the following string and press Enter after each:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair
- This should install Boot Repair application, which you can now find in the Application menu.
- Open it and choose Recommended repair and wait until it’s done.
Let’s start with the simplest method to fix the Windows bootloader from Linux. Probably knowingly, Ubuntu comes with a small utility called Boot Repair which fixes Windows 10 bootloader corruption upon running.
You’ll need to have the latest version of bootable Ubuntu mounted on your USB drive. After that, you’ll need to install the utility and, without meddling in the Terminal, repair the Windows 10 bootloader.
2. Use Terminal
- Boot again with the bootable USB drive.
- Open Terminal.
- In the command line, type the following strings and press Enter after each:
sudo apt-get install extlinux
sudo dd if=/usr/lib/extlinux/mbr.bin of=/dev/sda
sudo extlinux -i /boot/extlinux
- Don’t forget to replace sda with the Windows 10 system drive.
- Reboot after that, and Windows 10 should boot without any issues.
The second method relies on the Syslinux run through the Terminal. You’ll need to run a batch of commands to install and utilize Syslinux to fix the Windows 10 bootloader.
3. Use LILO
- Boot again with the bootable USB drive and open Terminal.
- In the command line, type the following string and press Enter after each:
sudo apt-get install lilo
sudo lilo - M/dev/sda mbr
- Reboot, and you’re good to go. The Windows 10 bootloader is fixed.
The final method utilizes LILO (Linux Loader), a small program responsible for managing dual boot. The procedure is similar to the previous one, at least for the unaccustomed eye.
If the previous two steps weren’t working for you (the first one should resolve bootloader issues), LILO is certainly a handy alternative.
If you’re still having trouble after going through all the solutions above, we recommend using a third-party tool to repair your PC and keep it healthy.
Hopefully, you managed to resolve the issue with the Windows 10 bootloader. We encourage you to tell us which fix worked in the comment below.
Aleksandar Ognjanovic
Aleksandar’s main passion is technology. With a solid writing background, he is determined to bring the bleeding edge to the common user. With a keen eye, he always spots the next big thing surrounding Microsoft and the Windows OS.
Focused on Windows errors and how to solve them, he also writes about the OS’s latest features as well as its interface.
In his free time, he likes to read, listen to music, and enjoy the nature. Hiking is one of his newly found passions.
Asked by: Ms. Jonas Hoffmann B.Eng. | Last update: March 23, 2022
star rating: 4.5/5 (23 ratings)
How do I repair Windows 10 with Linux?
Fix Windows 10 Not Booting up on Linux Rebuild GRUB. At times, GRUB has problems locating the Windows MBR file on your disks. Boot Repair. Use GRUB customizer tool. Startup repair. Change default bootloader. Fresh Install Windows 10.
Can you repair Windows from Linux?
You can quickly fix the Windows bootloader from Linux if it doesn’t work due to Windows updates. Use the boot repair utility which comes with Ubuntu to repair Windows boot from Linux. If you’re looking for a fast Ubuntu boot repair on Windows 10, you can do it within the terminal.
How do I restore Windows from Linux?
You’ll need a Linux Live CD or USB . ISO file, a free program called Rufus, an empty USB drive to put the Live CD on, and another USB drive to put your recovered files on. The USB drive for your recover files needs to be formatted to FAT32 file format.
Can I reinstall Windows 10 after Linux?
Anytime you need to reinstall Windows 10 on that machine, just proceed to reinstall Windows 10. It will automatically reactivate. So, there is no need to know or get a product key, if you need to reinstall Windows 10, you can use your Windows 7 or Windows 8 product key or use the reset function in Windows 10.
How do I restore the MBR after removing Linux?
Step-by-step Procedure Run Windows. Start computer and select Windows OS from bootloader. Delete Linux drive. Right-click on “Start” button and select “Data Management”. Assign unallocated space to Windows 10. Open Command Line in Boot mode. Fix MBR. Fix boot. Scan Windows disks. Rebuild BCD.
How do I repair corrupted Windows 10?
How can I fix corrupted files in Windows 10? Use the SFC tool. Use the DISM tool. Run a SFC scan from Safe Mode. Perform a SFC scan before Windows 10 starts. Replace the files manually. Use System Restore. Reset your Windows 10.
How do I restore Windows Boot Manager?
The instructions are: Boot from the original installation DVD (or the recovery USB) At the Welcome screen, click Repair your computer. Choose Troubleshoot. Choose Command Prompt. When the Command Prompt loads, type the following commands: bootrec /FixMbr bootrec /FixBoot bootrec /ScanOs bootrec /RebuildBcd.
What is grub rescue mode in Linux?
grub rescue>: This is the mode when GRUB 2 is unable to find the GRUB folder or its contents are missing/corrupted. The GRUB 2 folder contains the menu, modules and stored environmental data. GRUB: Just «GRUB» nothing else indicates GRUB 2 failed to find even the most basic information needed to boot the system.
How do I install Linux on Windows 10?
How to Install Linux from USB Insert a bootable Linux USB drive. Click the start menu. Then hold down the SHIFT key while clicking Restart. Then select Use a Device. Find your device in the list. Your computer will now boot Linux. Select Install Linux. Go through the installation process.
What is the cost of Windows 10 operating system?
You can choose from three versions of the Windows 10 operating system. Windows 10 Home costs $139 and is suited for a home computer or gaming. Windows 10 Pro costs $199.99 and is suited for businesses or large enterprises.
How do I reinstall Windows 10 from Linux USB?
Method 2: Create bootable Windows 10 USB using Ventoy Step 1: Prepare your USB drive. Step 2: Download and install Ventoy on Linux. Step 3: Use Ventoy to create bootable Windows 10 USB disk. Step 4: Using the bootable Windows 10 disk. Step 1: Install WoeUSB application. Step 2: Format USB drive.
How do I download Linux on Windows 10 without USB?
Installing Windows 10 without USB using Ubuntu, Step by Step Backup the Target drive. Create a 6GB NTFS partition on the hard drive and extract the Windows ISO to it. Create a 20GB, or larger, NTFS partition on the hard drive for the Windows Installation.
Will there be a Windows 11?
Microsoft has officially announced Windows 11, the next major software update, which will be coming to all compatible PCs later this year. Microsoft has officially announced Windows 11, the next major software update that will be coming to all compatible PCs later this year.
How do I uninstall Windows 10 and install Linux?
Here is what you have to do : Backup your data ! All of your data will be wiped with your Windows installation so do not miss this step. Create a bootable USB Ubuntu installation. Boot the Ubuntu installation USB drive and choose Install Ubuntu. Follow the installation process.
How do I restore Windows 10 from a dual boot system?
Repair Windows 10 on a dual-boot system Insert the Windows 10 media and restart your computer to boot from the media. Go to Command Prompt (click Troubleshoot > Command Prompt) Type: bcdboot C:\windows. Press Enter. Remove the DVD or USB. Type: exit. Press Enter. Restart your computer.
How do I fix grub after deleting Linux partition?
Solution: Turn on laptop and boot into Ubuntu OS. Launch the command Terminal(Ctrl+Alt+T) from Ubuntu. Type in the command in the terminal window: sudo update-grub. Hit Enter Key. Type in your sudo password when prompt to execute your command.
How do I fix bootloader?
If you do have the Installation Media : Insert the Media (DVD/USB) in your PC and restart. Boot from the media. Select Repair Your Computer. Select Troubleshoot. Choose Command Prompt from the menu : Type and run the command : diskpart. Type and run the command : sel disk 0. Type and run the command : list vol.
Does Windows 10 have a repair tool?
You can fix most Windows 10 boot problems using the Startup Repair tool, and here’s how to do it. Instead of spending time trying to find out the problem, Windows 10 includes the Startup Repair feature designed to quickly fix most common issues that may be preventing your computer from loading correctly.
Can Windows 10 repair itself?
Every Windows operating system has the ability to repair its own software, with apps for the task bundled in every version since Windows XP. Having Windows repair itself is a process that uses the install files of the operating system itself.
How do you check if Windows 10 is corrupted?
From the desktop, press the Win+X hotkey combination and from the menu select Command Prompt (Admin). ( Click Yes on the User Account Control (UAC) prompt that appears. Once the blinking cursor appears, type: SFC /scannow. Press the Enter key. SFC will start and check the integrity of Windows system files.
💻 Accidentally broke your Windows 10 MBR while playing around with Linux? Don’t panic—you can repair the Master Boot Record (MBR) right from your Linux system. Whether you dual-boot or just nuked the Windows bootloader, this guide walks you through the entire process of restoring your Windows MBR from a Linux environment.
🧠 What Is the MBR?
The Master Boot Record (MBR) is a crucial part of your storage drive—it tells your computer how to boot the operating system. If it’s damaged or overwritten (e.g., by GRUB or a Linux installer), your Windows 10 may refuse to start.
🛠️ What You’ll Need
- ✅ A working Linux system (Live USB or installed)
- ✅ Internet access (for downloading tools if needed)
- ✅ The
ms-sys
ortestdisk
tool - ✅ The correct Windows 10 partition and drive info
⚠️ Important: Backup any important data before proceeding—MBR work involves system-critical changes.
🗂️ Method 1: Use ms-sys
to Write Windows MBR from Linux
Step 1: Install ms-sys
This handy tool allows you to write Windows-compatible MBR boot code from Linux.
For Ubuntu/Debian:
sudo apt update
sudo apt install ms-sys
For Arch:
Step 2: Identify the Windows Drive
List all drives:
Look for the drive that holds your Windows installation. Usually something like /dev/sda
(not /dev/sda1
which is a partition).
Step 3: Write the Windows 10 MBR
Replace sdX
with the correct drive (e.g., /dev/sda
).
If you’re unsure, use this variant which writes the standard Windows 7/10 MBR:
sudo ms-sys --mbr7 /dev/sda
🧼 That’s it—reboot your system and Windows should start (assuming the partition is intact).
🧰 Method 2: Use TestDisk to Rebuild MBR (Alternative Method)
Step 1: Install TestDisk
sudo apt install testdisk
Step 2: Launch TestDisk
Follow the menu prompts:
– Select the disk (e.g., /dev/sda
)
– Choose Intel/PC partition type
– Select MBR Code > Confirm writing
This writes a standard boot sector, often enough to fix startup issues.
💡 Optional: Reinstall Windows Bootloader with GRUB Coexistence
If you’re dual-booting and want both Linux and Windows, consider:
This detects Windows and adds it to the GRUB boot menu.
Or manually edit /etc/grub.d/40_custom
:
menuentry "Windows 10" {
set root='(hd0,msdos1)'
chainloader +1
}
Then:
This lets you keep GRUB but boot Windows again.
🚨 Warning: GPT vs MBR
The above methods apply only to MBR-partitioned drives.
If you’re using GPT (common on UEFI systems), you’ll need to:
– Use a Windows 10 installation USB
– Boot into recovery > use bootrec /fixboot
and bootrec /rebuildbcd
Linux does not support writing EFI boot partitions via ms-sys
. You must repair them from Windows tools.
To check partition type:
Look for msdos (MBR) or gpt (GUID Partition Table).
✅ Summary: Fixing Windows 10 MBR from Linux
Task | Tool | Command Example |
---|---|---|
Install ms-sys |
Terminal | sudo apt install ms-sys |
Write MBR | ms-sys | sudo ms-sys --mbr7 /dev/sda |
Use testdisk | testdisk | sudo testdisk > MBR Code |
Dual boot with GRUB | GRUB | update-grub + custom entry |
Check partition type | parted | sudo parted -l |
🎯 Final Thoughts
Fixing the Windows 10 MBR from Linux is not only possible—it’s often faster than hunting for a Windows USB stick. With tools like ms-sys
, testdisk
, and a little command-line know-how, you can restore your boot process in just a few minutes.
🛡️ Recover, reboot, and get back to work—without leaving Linux!
This simple tutorial shows you how to repair your Windows 7 boot loader (MBR) from Ubuntu dual boot or Ubuntu Live CD / USB. This can be useful if you don’t have a Windows CD or DVD on hand.
To do so, first boot into your Ubuntu system. When you’re in Ubuntu, press Ctrl+Alt+T on your keyboard to open terminal and follow below steps:
1.) First run below command to check your disk:
sudo fdisk -l
The output tells you the disk information:
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x016c8108Device Boot Start End Blocks Id System
/dev/sda1 * 63 39054014 19526976 7 HPFS/NTFS/exFAT
2.) Now run commnad to install syslinux, which is a suite of lightweight IBM PC MBR bootloaders for starting up computers with the Linux kernel.
sudo apt-get update; sudo apt-get install syslinux
3.) Once installed, you can fix your Windows bootloader by running below command in terminal:
sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
Replace the startup disk name /dev/sda
in the above command according to the output in step 1.
Enjoy!
С помощью Linux можно спасти важные данные, очистить систему от вирусов или же взломать пароль, прочитать все файлы, расплавить процессор и стереть жёсткий диск.
С вашей Windows что-то не так. Возможно, вы забыли пароль, подцепили вирус, ваш жёсткий диск сыплет ошибками или система попросту отказывается загружаться. Проще всего переустановить Windows. Но что делать, если на диске осталась важная информация, которую вы не хотите терять?
Прежде чем заново устанавливать систему, дайте шанс Linux. Имея загрузочный диск с live-образом дистрибутива Linux, вы можете попробовать восстановить забытый пароль Windows, вернуть утерянные данные, просканировать компьютер на вирусы или хотя бы скопировать те файлы, которые ещё можно спасти.
Эти сведения можно использовать как во благо, так и во зло. Будьте осторожны и не навредите себе и другим.
Подготовка Linux
Прежде всего нужно загрузить ISO-образ нужного Linux-дистрибутива, поддерживающего live-загрузку. Live-режим — это режим, когда система загружается с внешнего носителя. Подойдёт практически любой дистрибутив. Для примера возьмём Ubuntu.
Загрузите ISO-образ, подходящий для вашего компьютера. После загрузки образа его нужно записать на флешку с помощью Rufus или на оптический диск с помощью стандартного средства Windows для записи. Если вы записываете диск в Linux, можно сделать это командой dd.
Когда диск записан, вставьте его в неисправный компьютер, выберите в BIOS загрузку с внешнего носителя. Когда Linux предложит варианты установки, выберите «Запустить без установки».
Подключение разделов Windows
Как правило, Linux монтирует сразу все разделы жёсткого диска. Для этого нужно открыть соотвествующий раздел в файловом менеджере.
Однако в некоторых случаях Linux не может смонтировать разделы. Чаще всего это происходит с разделами Windows с включённой функцией гибернации, а в Windows 10 гибридная гибернация используется при каждом включении. Есть несколько способов это исправить.
1. Можно отключить гибернацию в настройках Windows. Ваш компьютер будет загружаться медленнее, но исчезнут проблемы с монтированием разделов.
2. Можно примонтировать раздел Windows прямо из Linux. Для этого в терминале наберите команду sudo fdisk -l
. Так вы увидите список дисков в вашем компьютере.
Запомните имя нужного Windows-раздела, имеющего вид /dev/sd*, и введите sudo mount -t ntfs-3g -o remove_hiberfile /dev/sd* /mnt
3. Можно перезагрузить Windows, а затем сразу загрузиться в Linux. Дело в том, что гибридная гибернация Windows 10 не используется при перезагрузке.
Восстановление пароля
Чтобы сбросить пароль в Windows, сделайте следующее:
1. Войдите в терминал и добавьте репозиторий: sudo add-apt-repository universe
2. Обновите список пакетов: sudo apt-get update
3. Дайте команду установить chntpw: sudo apt-get install chntpw
4. Откройте файловый менеджер и отыщите раздел диска, на котором расположена Windows. Найдите папку Windows/System32/config и файл SAM в ней.
5. Скопируйте адрес к этому файлу. Он должен выглядеть примерно так: /media/689G10259A0FF9B1/Windows/System32/config
6. Введите команду cd /media/689G10259A0FF9B1/Windows/System32/config
7. Затем запустите утилиту chntpw для поиска пользователей Windows: sudo chntpw -l SAM
8. Консоль выдаст список пользователей Windows. Выберите имя пользователя, которому нужно сбросить пароль, и введите sudo chntpw –u имя_пользователя SAM
9. Консоль предложит варианты действий. Введите номер нужного действия:
1 — сбросить пароль;
2 — установить новый пароль;
3 — сделать пользователя администратором;
4 — разблокировать пользователя (если в таблице пользователя стояло значение dis/lock, пользователя сначала нужно разблокировать).
10. После выбора нужного действия консоль запросит подтверждение. Нажмите клавишу «y».
Проверка оборудования
Оперативная память
Если Windows не может запуститься из-за какого-то аппаратного сбоя, стоит проверить оборудование на исправность. Вы сможете узнать, что именно работает не так, и заменить этот компонент.
Чтобы проверить оперативную память, воспользуйтесь утилитой Memtest86+, которая есть практически в каждом дистрибутиве Linux. Когда Linux загружается, он предложит проверить оперативную память. Выберите этот вариант.
Тестирование оперативной памяти может продолжаться достаточно долго. Если с памятью какие-то неполадки, Memtest86+ сообщит от этом. Если проблемы связаны с оперативной памятью, её следует заменить.
Процессор
Если вы подозреваете, что причиной частых сбоев является нехватка питания процессора или его недостаточное охлаждение, можно запустить cpuburn. Эта консольная утилита создаёт предельную нагрузку на ваш процессор, заставляя его работать и выделять всё больше тепла. Установить cpuburn можно следующей командой: apt-get install cpuburn
Затем просто запустите её из консоли: cpuburn
Если с системой охлаждения или питанием что-то не так, компьютер выключится через 10–20 минут от перегрева. Это означает, что пора менять термопасту.
Будьте осторожны с cpuburn и не запускайте её на исправных компьютерах без нужды.
Жёсткий диск
Проверить жёсткий диск может стандартное приложение «Диски», которое есть в Ubuntu. Его интерфейс очень прост и понятен.
Если вы используете другой live-образ, введите следующую команду в терминале: sudo fdisk -l
Посмотрите имя нужного устройства. Затем введите команду sudo badblocks -v /dev/sd*
Проверка жёсткого диска длится довольно долго. Если на диске появились нечитаемые блоки, его нужно немедленно заменить. Существуют программы, которые помечают эти блоки, чтобы на них ничего не записывалось. Но это лишь полумера.
Сохранение данных
Запустив live-образ Linux, можно с лёгкостью скопировать важные данные с повреждённого компьютера.
Если вам нужно сохранить какие-то файлы на флешку, внешний жёсткий диск или в сетевое хранилище, это можно сделать с помощью любого файлового менеджера Linux.
Подключившись к интернету, вы можете загрузить важные файлы в любое облако, просто открыв браузер. Или выбрать пункт «Сеть» в файловом менеджере и скопировать данные в общие папки в вашей локальной сети.
Если вы хотите скопировать весь диск целиком, воспользуйтесь терминалом:
- Введите команду
sudo fdisk –l
- Запомните имена раздела, который хотите клонировать, и раздела, который будет содержать копию.
- Затем наберите
sudo dd if=/dev/sda of=/dev/sdc
- Ожидайте, пока консоль не уведомит о завершении копирования.
Копия содержимого /dev/sda будет перенесена на /dev/sdc. Так можно клонировать диски целиком. Можно переносить данные из одного раздела на другой или на внешний жёсткий диск. Копия будет настолько идентична, что можно восстановить на клонированном диске файлы, до этого удалённые на оригинале.
Восстановление удалённых файлов
При удалении файла стирается только его описание в системе. Сами данные остаются на месте, пока поверх них не будет записано что-то ещё. Значит, если вы удалили какие-то важные файлы или нечаянно отформатировали диск, можно попытаться восстановить потерянные данные.
В Linux есть несколько утилит для восстановления удалённых файлов. Это Safecopy, TestDisk и PhotoRec. Все они работают в консоли. Чтобы разобраться, как их использовать, ознакомьтесь с руководством.
Проверка Windows на вирусы
Windows может стать жертвой вирусов и перестать запускаться. Но отыскать их можно с помощью Linux. Не стоит опасаться, что вирус навредит компьютеру: в live-образе Linux он попросту не сможет запуститься.
Чтобы проверить Windows на вирусы, можно воспользоваться бесплатным антивирусом ClamAV. Установить его можно командой apt-get install clamav
Очистка жёсткого диска
Итак, вы скопировали все данные с жёсткого диска, сделали все необходимые бэкапы и теперь хотите отнести компьютер в ремонт. Как вы уже знаете, восстановить удалённые данные даже на компьютере с неработающей системой довольно просто. Если у вас на жёстком диске хранилась конфиденциальная информация, можно очистить его перед ремонтом.
Убедитесь, что на диске не осталось ничего ценного.
В Linux безвозвратно стирает файлы команда shred. Чтобы сделать невосстанавливаемым определённый файл, введите shred <имя_и путь_к файлу>
Это не удалит файл, но сделает его абсолютно нечитаемым и бесполезным.
Чтобы безвозвратно удалить и стереть файл, введите shred –remove –iterations=<число перезаписей> <имя_и путь_к файлу>
Число перезаписей влияет на то, сколько раз файл будет перезаписан случайным набором байтов. По умолчанию файл перезаписывается 25 раз. Как правило, этого достаточно, чтобы восстановить данные не смогли даже продвинутые утилиты.
Чтобы уничтожить подобным образом целый диск, используйте команду wipe. Сначала установите соответствующую утилиту: sudo apt-get install wipe
Затем узнайте имя нужного раздела или диска: sudo fdisk –l
Затем введите команду на уничтожение и имя диска: sudo wipe /dev/sda1
Используйте эти команды с осторожностью. Когда содержимое диска будет стёрто, восстановить его не получится.
С помощью live-дистрибутивов Linux довольно просто получить доступ к файлам Windows. Даже если вы не собираетесь переходить на Linux, никогда не помешает иметь под рукой загрузочный диск.
А ещё задумайтесь о конфиденциальности своих данных. Даже если ваша система защищена паролем, его можно сбросить или скопировать файлы на другой диск, даже не входя в учётную запись. Поэтому, если на вашем компьютере есть действительно ценные данные, пользуйтесь утилитами для шифрования.