Installing windows on computer with linux

How to Remove Linux and Install Windows on Your Computer

For a Microsoft Windows XP version of this article, see 314458.

Summary

This article describes how you can remove the Linux operating system from your computer, and install a Windows operating system. This article also assumes that Linux is already installed on the hard disk using Linux native and Linux swap partitions, which are incompatible with the Windows operating system, and that there is no free space left on the drive.

Windows and Linux can coexist on the same computer. For additional information, refer to your Linux documentation.

More Information

To install Windows on a system that has Linux installed when you want to remove Linux, you must manually delete the partitions used by the Linux operating system. The Windows-compatible partition can be created automatically during the installation of the Windows operating system.

IMPORTANT: Before you follow the steps in this article, verify that you have a bootable disk or bootable CD-ROM for the Linux operating system, because this process completely removes the Linux operating system installed on your computer. If you intend to restore the Linux operating system at a later date, verify that you also have a good backup of all the information stored on your computer. Also, you must have a full release version of the Windows operating system you want to install.

Linux file systems use a «superblock» at the beginning of a disk partition to identify the basic size, shape, and condition of the file system.

The Linux operating system is generally installed on partition type 83 (Linux native) or 82 (Linux swap). The Linux boot manager (LILO) can be configured to start from:

The hard disk Master Boot Record (MBR).

The root folder of the Linux partition.

The Fdisk tool included with Linux can be used to delete the partitions. (There are other utilities that work just as well, such as Fdisk from MS-DOS 5.0 and later, or you can delete the partitions during the installation process.) To remove Linux from your computer and install Windows:

Remove native, swap, and boot partitions used by Linux:

Start your computer with the Linux setup floppy disk, type fdisk at the command prompt, and then press ENTER.

NOTE: For help using the Fdisk tool, type m at the command prompt, and then press ENTER.

Type p at the command prompt, and then press ENTER to display partition information. The first item listed is hard disk 1, partition 1 information, and the second item listed is hard disk 1, partition 2 information.

Type d at the command prompt, and then press ENTER. You are then prompted for the partition number you want to delete. Type 1, and then press ENTER to delete partition number 1. Repeat this step until all the partitions have been deleted.

Читайте также:  Hp laser jet p1566 картридж

Type w, and then press ENTER to write this information to the partition table. Some error messages may be generated as information is written to the partition table, but they should not be significant at this point because the next step is to restart the computer and then install the new operating system.

Type q at the command prompt, and then press ENTER to quit the Fdisk tool.

Insert either a bootable floppy disk or a bootable CD-ROM for the Windows operating system on your computer, and then press CTRL+ALT+DELETE to restart your computer.

Install Windows. Follow the installation instructions for the Windows operating system you want to install on your computer. The installation process assists you with creating the appropriate partitions on your computer.

Examples of Linux Partition Tables

Single SCSI drive

Multiple SCSI drives

Single IDE drive

Multiple IDE drives

Also, Linux recognizes more than forty different partition types, such as:

FAT 16 > 32 M Primary (Type 06)

FAT 16 Extended (Type 05)

FAT 32 w/o LBA Primary (Type 0b)

FAT 32 w/LBA Primary (Type 0c)

FAT 16 w/LBA (Type 0e)

FAT 16 w/LBA Extended (Type 0f)

Note that there are other ways to remove the Linux operating system and install Windows than the one mentioned above. The preceding method is used in this article because the Linux operating system is already functioning and there is no more room on the hard disk. There are methods of changing partition sizes with software. Microsoft does not support Windows installed on partitions manipulated in this manner.

Another method of removing an operating system from the hard disk and installing a different operating system is to use an MS-DOS version 5.0 or later boot disk, a Windows 95 Startup disk, or a Windows 98 Startup disk that contains the Fdisk utility. Run the Fdisk utility. If you have multiple drives, there are 5 choices; use option 5 to select the hard disk that has the partition to be deleted. After that, or if you have only one hard disk, choose option 3 («Delete partition or logical DOS drive»), and then choose option 4 («Delete non-DOS partition»). You should then see the non-DOS partitions you want to delete. Typically, the Linux operating system has two non-DOS partitions, but there may be more. After you delete one partition, use the same steps to delete any other appropriate non-DOS partitions.

After the partitions are deleted, you can create partitions and install the operating system you want. You can only create one primary partition and an extended partition with multiple logical drives by using Fdisk from MS-DOS version 5.0 and later, Windows 95, and Windows 98. The maximum FAT16 primary partition size is 2 gigabytes (GB). The largest FAT16 logical drive size is 2 GB. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

Читайте также:  Linux параметры системы команда

105074 MS-DOS 6.2 Partitioning Questions and Answers
If you are installing Windows NT 4.0 or Windows 2000, the Linux partitions can be removed and new partitions created and formatted with the appropriate file system type during the installation process. Windows allows you to create more than one primary partition. The largest partition that Windows NT 4.0 allows you to create during installation is 4 GB because of the limitations of the FAT16 file system during installation. Also, the 4-GB partitions use 64-KB cluster sizes. MS-DOS 6.x and Windows 95 or Windows 98 do not recognize 64-KB cluster file systems, so this file system is usually converted to NTFS during installation. Windows 2000, unlike Windows NT 4.0, recognizes the FAT32 file system. During the installation of Windows 2000, you can create a very large FAT32 drive. The FAT32 drive can be converted to NTFS after the installation has completed if appropriate.

Источник

Переход с Linux на Windows 10

Вариант 1: Форматирование диска с дальнейшей установкой Windows 10

Этот способ подойдет пользователям в тех случаях, когда надобность в Linux просто отпала. Тогда ничего не мешает просто отформатировать содержимое диска или только конкретный раздел, чтобы без проблем инсталлировать туда Windows 10. В таких ситуациях никаких дополнительных настроек производить не придется, поскольку по сути это будет обычная «чистая» установка новой операционной системы на пустой жесткий диск или SSD. На нашем сайте уже имеется статья по данной теме, поэтому вам остается только изучить инструкции, перейдя по указанной ниже ссылке.

Вариант 2: Установка Windows 10 рядом с Linux

Многие пользователи знают о том, что установить любой дистрибутив рядом с любой версией Виндовс очень просто, поскольку не возникает никаких конфликтов с загрузчиками, а также инсталляторы предлагают выбрать соответствующий пункт, чтобы сохранить все файлы обнаруженной ОС. Однако при возникновении обратной ситуации процедура значительно усложняется. Она делится на несколько этапов, во время которых следует создать неразмеченное пространство, установить саму операционную систему и наладить корректную работу загрузчика. Именно это мы и предлагаем сделать далее.

Шаг 1: Работа с дисковым пространством в Linux

Для начала переместимся к Linux, чтобы здесь создать свободное дисковое пространство, которое в дальнейшем будет использовано для разметки файловой системы при установке Windows 10. За пример предлагаем взять самый популярный дистрибутив — Ubuntu, а вы, отталкиваясь от особенностей используемой сборки, выполните точно такие же действия.

    К сожалению, сжать раздел в Линукс просто так не получится, поскольку системный том изначально смонтирован, а размонтировать его нельзя. Придется запускать компьютер с LiveCD. Детальнее о создании такого загрузчика читайте в материале по ссылке ниже.

После успешного создания загрузочной флешки запустите ее и переходите к режиму ознакомления с ОС.

Мы рекомендуем отделять свободное пространство от основного раздела Linux только с конца, поскольку в начале всегда хранятся важные файлы для загрузки системы, о чем вы и должны быть уведомлены при работе с утилитой GParted. Дополнительно отметим, что стоит создать пространство с запасом и учетом того, что при работе с Windows может понадобиться добавление второго логического тома для хранения пользовательских файлов.

Читайте также:  Как поменять картридж scx 4300

Шаг 2: Установка Виндовс 10

Мы бы не стали останавливаться на этом этапе, поскольку он знаком многим пользователям, но решили сделать это, чтобы учесть абсолютно все нюансы, связанные с неразмеченным пространством и созданием загрузочной флешки в Linux.

    Для начала приобретите Windows 10 на официальном сайте или загрузите ISO-образ. После этого его придется записать на флешку или диск, чтобы задействовать это устройство в качестве загрузочного. Детальнее о выполнении этой операции в Linux читайте в другом материале на нашем сайте, воспользовавшись указанной ниже ссылкой.

  • Загрузитесь с записанного съемного носителя и выберите язык для инсталляции Виндовс.
  • Затем нажмите на кнопку «Установить».
  • Введите ключ продукта или пропустите этот шаг.
  • Примите условия лицензионного соглашения, чтобы перейти далее.
  • Выберите тип установки «Выборочная».
  • Вы увидите незанятое пространство, которое мы добавили в предыдущем шаге. Можно сразу же на него установить ОС или создать еще один логический том, например, под буквой D.
  • После этого выберите раздел для инсталляции и нажмите на «Далее».
  • Подождите, пока все файлы будут установлены.
  • После перезагрузки следуйте отобразившимся инструкциям, чтобы настроить Windows 10.
  • Сразу же после запуска можно выключать ОС, поскольку далее придется настроить загрузчик GRUB.
  • Позже вы сможете вернуться к использованию Windows 10, но сейчас загрузчик сломан, поэтому не получится корректно загрузить ни одну из инсталлированных ОС. Давайте приступим к исправлению этой ситуации.

    Шаг 3: Восстановление загрузчика GRUB

    Загрузиться в Linux на данном этапе не получится, поскольку загрузчик GRUB был нарушен. Придется вернуться к LiveCD, о которой мы уже говорили в первом шаге. Вставьте флешку с образом диска в свободный разъем и запустите компьютер.

    1. В появившемся окне инсталляции переходите к ознакомлению с дистрибутивом.
    2. Откройте меню приложений и запустите оттуда «Терминал». Сделать это можно и через горячую клавишу Ctrl + Alt + T.
    3. Смонтируем корневой раздел с файлами Linux. По умолчанию за это отвечает команда sudo mount /dev/sda1 /mnt . Если расположение диска отличается от /dev/sda1, замените данный фрагмент на необходимый.
    4. Следующая серия команд необходима для монтирования раздела с загрузчиком, если такой выделен в отдельный логический том. Для этого используйте строку sudo mount —bind /dev/ /mnt/dev/ .
    5. Вторая команда имеет вид sudo mount —bind /proc/ /mnt/proc/ .
    6. В конце остается только указать sudo mount —bind /sys/ /mnt/sys/ , чтобы завершить монтирование файловых систем.
    7. Перейдите к работе с необходимым окружением, указав sudo chroot /mnt/ .
    8. Здесь начните инсталляцию файлов загрузчика, вписав grub-install /dev/sda .
    9. После этого выполните обновление через update-grub2 .
    10. Вы будете уведомлены об обнаружении операционных систем и успешном окончании генерирования файла настройки GRUB.
    11. Перезагрузите компьютер, воспользовавшись удобным для вас методом.
    12. Теперь при старте ПК можно выбрать одну из установленных ОС для дальнейшей ее загрузки.

    Теперь вы знакомы с принципом инсталляции Windows 10 рядом или вместо Linux. Как видно, при выполнении этой процедуры следует учитывать определенные особенности, которые связаны с загрузчиком операционных систем. Если все делать с точностью по приведенным инструкциям, никаких проблем с установкой возникнуть не должно и обе ОС будут доступны для взаимодействия в любой момент.

    Источник

    Поделиться с друзьями
    КомпСовет
    Adblock
    detector