Installing linux to usb windows

Installing linux to usb windows

With a bootable Ubuntu USB stick, you can:

  • Install or upgrade Ubuntu
  • Test out the Ubuntu desktop experience without touching your PC configuration
  • Boot into Ubuntu on a borrowed machine or from an internet cafe
  • Use tools installed by default on the USB stick to repair or fix a broken configuration

Creating a bootable Ubuntu USB stick from Microsoft Windows is very simple and we’re going to cover the process in the next few steps.

Alternatively, we also have tutorials to help you create a bootable USB stick from both Ubuntu and Apple macOS.

2. Requirements

  • A 4GB or larger USB stick/flash drive
  • Microsoft Windows XP or later
  • Rufus, a free and open source USB stick writing tool
  • An Ubuntu ISO file. See Get Ubuntu for download links

Take note of where your browser saves downloads: this is normally a directory called ‘Downloads’ on your Windows PC. Don’t download the ISO image directly to the USB stick! If using Windows XP or Vista, download version 2.18 of Rufus.

3. USB selection

Perform the following to configure your USB device in Rufus:

  1. Launch Rufus
  2. Insert your USB stick
  3. Rufus will update to set the device within the Device field
  4. If the Device selected is incorrect (perhaps you have multiple USB storage devices), select the correct one from the device field’s drop-down menu

You can avoid the hassle of selecting from a list of USB devices by ensuring no other devices are connected.

4. Boot selection and Partition scheme

Now choose the Boot selection. Choices will be Non bootable and FreeDOS. Since you are creating a bootable Ubuntu device select FreeDOS.

The default selections for Partition scheme (MBR) and Target system (BIOS (or UEFI-CSM)) are appropriate (and are the only options available).

5. Select the Ubuntu ISO file

To select the Ubuntu ISO file you downloaded previously, click the SELECT to the right of “Boot selection”. If this is the only ISO file present in the Downloads folder you will only see one file listed.

Select the appropriate ISO file and click on Open.

6. Write the ISO

The Volume label will be updated to reflect the ISO selected.

Leave all other parameters with their default values and click START to initiate the write process.

7. Additional downloads

You may be alerted that Rufus requires additional files to complete writing the ISO. If this dialog box appears, select Yes to continue.

8. Write warnings

You will then be alerted that Rufus has detected that the Ubuntu ISO is an ISOHybrid image. This means the same image file can be used as the source for both a DVD and a USB stick without requiring conversion.

Keep Write in ISO Image mode selected and click on OK to continue.

Rufus will also warn you that all data on your selected USB device is about to be destroyed. This is a good moment to double check you’ve selected the correct device before clicking OK when you’re confident you have.

If your USB stick contains multiple partitions Rufus will warn you in a separate pane that these will also be destroyed.

9. Writing the ISO

The ISO will now be written to your USB stick, and the progress bar in Rufus will give you some indication of where you are in the process. With a reasonably modern machine, this should take around 10 minutes. Total elapsed time is shown in the lower right corner of the Rufus window.

10. Installation complete

When Rufus has finished writing the USB device, the Status bar will be green filled and the word READY will appear in the center. Select CLOSE to complete the write process.

Congratulations! You now have Ubuntu on a USB stick, bootable and ready to go.

If you want to install Ubuntu, take a look at our install Ubuntu desktop tutorial.

Источник

Ubuntu Documentation

Outline

The general procedure to install Ubuntu (or Ubuntu flavour, Kubuntu, Lubuntu, Xubuntu, . ) from a USB flash drive is:

Get the correct Ubuntu installation file, ‘the iso file’, via this link or Ubuntu flavour via this link. Download the iso file into your running computer (for example into the directory Downloads in the internal drive, not into the USB flash drive that you want to make into a USB boot drive).

Check with md5sum (or another checksum tool) that the download was good.

  • Put Ubuntu onto your USB flash drive alias ‘stick’ alias ‘pendrive’ alias ‘thumb’. Tools for this purpose are described in this help page.
  • Configure your computer to boot from USB flash drive and boot from it.

    Читайте также:  Anydesk mac os missing screen capture permissions

    Try Ubuntu (Kubuntu, Lubuntu, Xubuntu, . ) before installing it.

  • Install Ubuntu to your internal drive (hard disk drive or solid state drive or external drive).
  • See also: Installation/FromUSBStickQuick for beginners starting from Windows.

    Introduction

    Ubuntu can be installed from a USB flash drive. This may be necessary for most new portable computers without DVD drives and is handy for others because a USB flash drive is so convenient. Also, you can configure Ubuntu on the USB flash drive to save changes you make, unlike a read-only CD/DVD disk.

    Booting from a USB flash drive created with usb-creator alias Startup Disk Creator and mkusb will behave just as if you had booted from the install CD. It will show the language selection and then the install menu, from which you can install Ubuntu onto the computer’s hard drive or launch the LiveCD environment. Other utilities, e.g. UNetbootin, may create slightly different boot drives or if on UEFI might not work at all with Debian iso files due to a bug

    Note: This article uses the term «USB flash drive» alongside USB stick, USB drive, USB device, USB pendrive and thumb drive.

    Prerequisites

    To create a USB installation device, you will need:

    a 4 GB USB flash device/drive/stick. If the iso file is smaller than 2 GB, it is possible to use a 2 GB USB device, at least with some of the methods. Files on this USB device will be erased, so backup the files you want to keep before making the device bootable. Some of the tools require that this USB device is properly formatted and mounted while other tools will overwrite whatever is on the target device. Please follow the instructions for each tool.

    an Ubuntu flavour ISO file downloaded from an official web page, ubuntu.com/download or http://releases.ubuntu.com, stored in your running computer (for example in the directory Downloads in the internal drive, not in the USB flash drive that you want to make into a USB boot drive).

    Check with md5sum (or another checksum tool) that the download was good. In Linux there is the tool ‘md5sum’. In Windows you can do it with Rufus: click on the circle with a tick mark (more about Rufus here.)

    Dummy headlines

    After a major remake of this help page the following headlines are kept here because they may be linked to from other web sites. Several other headlines further down in the page are also kept for this reason.

    Notes about speed

    Notes about size

    Notes about bootability

    The flash hardware

    There is a detailed description at the sub-page /pre

    Creating a bootable Ubuntu USB flash drive from Windows

    There are various methods available for Windows to create a bootable Ubuntu USB flash drive.

    NEVER try to use one of your hard disk drives or partitions in this process unless you really know what you are doing, as data will get erased.

    Rufus

    Rufus is the tool in Windows that is recommended officially by Ubuntu. A tutorial is available from here.

    balenaEtcher

    Pendrivelinux’s Universal USB Installer

    UNetbootin

    Win32 Disk Imager

    There is a detailed description at /fromWindows including Rufus, balena Etcher, Universal USB Installer, Unetbootin and Win32 Disk Imager.

    Creating a bootable Ubuntu USB flash drive from Ubuntu

    Install and run Startup Disk Creator alias usb-creator

    The Ubuntu Startup Disk Creator is dedicated to creating USB boot drives for Ubuntu and Ubuntu family flavours (Kubuntu, Lubuntu . Xubuntu).

  • Use another tool (e.g. ‘UNetbootin’ or ‘mkusb’), if you want to create a USB boot drive with another Linux distro (alias Linux operating system).
  • You can find usb-creator-gtk by typing «Startup Disk Creator» (Ubuntu Desktop) or usb-creator-kde in K-Menu—>Applications—>System—>Startup Disk Creator (Kubuntu). If it is not there, then you can install it using the Ubuntu Software Center.

    • Insert and mount the USB drive. Inserting the USB drive should auto-mount it.
    • Start the Startup Disk Creator
    • In the top pane of the Startup Disk Creator, pick the .iso file that you downloaded.
    • If the .iso file isn’t listed, click «Other» to locate and select the .iso file that you downloaded.
    • In the bottom pane of the Startup Disk Creator, pick the target device, the USB flash drive. If more than one choice, please check carefully, until you are sure that you will be writing to the correct device.
    • After checking that you are pointing to the correct target device, the USB flash drive, you can start the action.

    You must enter a password because this is a risky operation. Use the password of the current user ID (the same as for login and running tasks with 'sudo'. Password is not required when installing from a ‘live’ system (booted from a DVD disk or another USB flash drive).

    The Startup Disk Creator clones the iso file, which means that you need neither erase nor format the target drive. It will be completely overwritten anyway by the cloning process. The Startup Disk Creator looks like this in Ubuntu 18.04 LTS:

    Notes

    NEVER try to use one of your hard disk drives or SSDs or partitions in this process unless you really know what you are doing, as data will get erased.

    There are bugs that affect the Ubuntu Startup Disk Creator, when you run it in old Ubuntu versions in BIOS mode and try to create USB boot drives with other versions. In the Ubuntu Startup Disk Creator version 0.3.2 in Ubuntu 16.04 LTS, these bugs are no longer a problem, so you can install any version of the Ubuntu flavours from 16.04 LTS and newer versions.

    UNetbootin

    Download UNetbootin

  • UNetbootin works in and with most Linux distros.
  • It is an extracting tool (not a cloning tool).
  • It can make a persistence file up to 4GB in size to save data and defaults.
  • mkusb — dd image of iso file to USB device safely

    If you want to clone from a general image file to a drive, you can use mkusb. It lets you clone to any drive that is not busy, also an internal drive, and there are very obvious warnings to prevent mistakes.

  • mkusb can also
    • run in Debian and many linux distros that are similar to Ubuntu and Debian,
    • clone from iso files of most Linux distros to create USB boot drives,
    • create persistent live drives of the Ubuntu family and Debian, using all available drive space for persistence and/or data storage,
    • restore a USB boot drive to a standard storage device.
  • There is a detailed description at /fromUbuntu including the Startup Disk Creator, UNetbootin and mkusb.

    Creating a bootable Ubuntu USB flash drive from Mac OSX

    There is a good wiki page about booting with UEFI, and a good tutorial thread, UEFI Installing — Tips.

    Test if running in UEFI mode

    You may want to test if your Ubuntu flavour is running in [U]EFI mode. An installed system and a live system too is using the directory /sys/firmware/efi, so you can run the following command line,

    The following command line is more robust and also easier to understand, so you may prefer it (if you copy & paste and are not bothered by typing a long command line),

    Источник

    USB flash installation medium (Русский)

    На этой странице описаны различные способы создания загрузочной флешки с Arch Linux как для загрузки в системах с BIOS, так и с UEFI. Результатом будет система LiveUSB (подобная LiveCD), которую можно будет использовать для установки Arch Linux, обслуживания системы или в целях восстановления. Обратите внимание, что после выключения все изменения на носителе будут отмены из-за особенностей SquashFS.

    Если вам нужно запускать Arch Linux с USB-накопителя с сохранением изменений, посмотрите статью Installing Arch Linux on a USB key. Если вы хотите использовать загрузочный USB-носитель Arch Linux в целях восстановления, посмотрите статью Cмена суперпользователя.

    Contents

    Создание загрузочного USB для BIOS и UEFI

    Используя автоматические инструменты

    В GNU/Linux

    Через dd

    Выполните следующую команду, заменив /dev/sdx на ваше устройство, например, на /dev/sdb . (Не добавляйте номер раздела, т.е. не используйте что-то вроде /dev/sdb1 )

    Для получения дополнительной информации о dd, а также о oflag=sync смотрите соответственно dd(1) и dd(1) § DESCRIPTION .

    В Windows

    Через Rufus

    Rufus — универсальная утилита для записи ISO на USB-накопители. Просто выберите образ Arch Linux, USB-накопитель, который вы хотите сделать загрузочным, и нажмите СТАРТ.

    Поскольку Rufus не проверяет правильно ли отформатировано устройство и предоставляет GUI, его можно посчитать самым простым и надежным инструментом для использования.

    Этот способ не требует каких-либо обходных решений и прост как dd в Linux. Вам нужно только скачать образ Arch Linux и использовать утилиту USBwriter с локальными правами администратора для записи USB флешки.

    Через win32diskimager

    win32diskimager — инструмент для записи iso на USB с GUI для Windows. Просто выберите ваш iso образ и букву USB-носителя (вам может потребоваться сначала отформатировать его для назначения буквы), потом нажмите Write.

    Через Cygwin

    Убедитесь, что установка Cygwin содержит пакет dd .

    Положите образ в ваш домашний каталог:

    Запустите cygwin от администратора (это необходимо cygwin’y для доступа к железу). Для записи на USB-носитель выполните следующую команду:

    где образ.iso — путь до образа iso без директории cygwin , а \\.\x: — ваша флешка, где x это буква, присвоенная устройству windows, например, \\.\d: .

    В Cygwin 6.0 узнайте имя устройства с помощью:

    и запишите образ ISO, согласно выходной информации предыдущей команды. Например:

    через dd для Windows

    GPL версия утилиты dd для Windows доступна на сайте http://www.chrysocome.net/dd. Преимуществом над Cygwin является меньший размер. Используйте ее, как показано в инструкциях для Cygwin выше.

    Для начала скачайте последнюю версию dd для Windows. После загрузки распакуйте содержимое архива в каталог Загрузки или в другое место.

    Теперь запустите командную строку от администратора. Далее смените директорию с помощью ( cd ) на Загрузки.

    Если ISO Arch Linux в другом месте, укажите полный путь до него. Для удобства вы можете поместить образ Arch Linux в ту же папку, что и исполняемый файл dd. Основной формат команды будет выглядеть следующим образом.

    Замените все пустые места (обозначенные «x») правильной датой и правильной буквой диска. Вот полный пример.

    The factual accuracy of this article or section is disputed.

    Вы можете узнать физический номер вводом wmic diskdrive list brief в комадную строку или с dd —list .

    Любые окна Проводника должны быть закрыты или dd сообщит об ошибке.

    В macOS

    Сначала, вам нужно идентифицировать USB-устройство. Откройте /Applications/Utilities/Terminal и перечислите все устройства хранения с помощью команды:

    Ваше USB-устройство появится, как /dev/disk2 (external, physical) . Убедитесь, что это устройство, которое вы хотите использовать, проверив его имя и размер, а затем используйте его идентификатор для приведенных ниже команд вместо /dev/diskX.

    USB-устройства обычно автомонтируются в macOS, и вам необходимо отключить его (не извлечь) перед записью через dd . В Терминале выполните:

    Теперь скопируйте ISO образ на устройство. Команда dd похожа на версию dd в Linux, но заметьте, что ‘r’ перед ‘disk’ обозначает режим raw, который делает процесс намного быстрее:

    Обратите внимание, что в diskX здесь не включается суффикс s1 , иначе USB-носитель будет загружаться только в режиме UEFI, а не в legacy. После завершения macOS может жаловаться, что «The disk you inserted was not readable by this computer» («Вставленный диск не читается этим компьютером»). Выберите ‘Игнорировать’. Устройство USB будет загрузочным.

    Используя ручное форматирование

    В GNU/Linux

    Это способ сложнее, чем запись напрямую через dd . Но преимуществом этого способа — сохранение возможности хранение прочей информации на флешки (ISO образ устанавливается в определенный раздел уже размеченного устройства без изменения оставшихся).

    • Убедитесь, что пакет syslinux установлен.
    • Если вы еще не разметили накопитель, то создайте таблицу разделов и/или разделы прежде чем продолжить. Раздел /dev/sdXn должен быть отформатирован в FAT32.
    • Смонтируйте ISO-образ, файловую систему FAT32, расположенную на USB-носителе, а потом скопируйте содержимое ISO образа на накопитель. Затем отмонтируйте образ ISO. Раздел FAT32 должен остаться примонтированным (он будет использоваться в последующих шагах). Например:

    Для загрузки требуется либо метка, либо UUID для выбора раздела для загрузки. По умолчанию используется метка ARCH_YYYYMM (с соответствующим годом и месяцем). Поэтому необходимо правильно установить метку раздела, например, используя gparted. Кроме того, вы можете изменить это поведение, отредактировав строки, заканчивающиеся на archisolabel=ARCH_YYYYMM в файле /mnt/usb/arch/boot/syslinux/archiso_sys.cfg (для загрузки с BIOS) и в /mnt/usb/loader/entries/archiso-x86_64.conf (для загрузки с UEFI). Для использования UUID замените эти части строк на archisodevice=/dev/disk/by-uuid/ВАШ-UUID . UUID можно узнать с помощью blkid -o value -s UUID /dev/sdXn .

    Syslinux уже предустановлен в /mnt/usb/arch/boot/syslinux . Установите его полностью в эту папку, следуя инструкциям в Syslinux#Ручная установка.

    В Windows

    • Разметку и форматирование USB-устройства выполните, используя Rufus. Выберите схему разделов MBR для BIOS и UEFI и файловую систему FAT32. Уберите галку с пунктов «Создать загрузочный диск используя ISO-образ» и «Создать расширенную метку и значок устройства».
    • Измените Метку устройства USB-носителя X: на МЕТКУ archisolabel= , находящейся в \loader\entries\archiso-x86_64.conf . Этот шаг необходим для официального ISO (Archiso). Этот шаг также можно было выполнить через Rufus, на предыдущем шаге «разбиение и форматирование».
    • Распакуйте ISO (похоже на распаковку архива ZIP) на флешку, используя 7-Zip.
    • Скачайте официальный бинарник Syslinux 6.xx (архив zip) с https://www.kernel.org/pub/linux/utils/boot/syslinux/ и извлеките его. Версия Syslinux желательно должна совпадать с версией в образе ISO.
    • Запустите следующие команды (в cmd Windows от администратора):
    • Установите Syslinux на USB (используйте win64\syslinux64.exe для x64 Windows):

    Другие способы для систем с BIOS

    В GNU/Linux

    Через мультизагрузочную флешку

    Этот способ позволяет запускать несколько ISO с одного USB-носителя, включая archiso. Обновление ISO образа на USB-накопителе здесь делается проще, чем в большинстве других методах. Для получения дополнительной информации смотрите Multiboot USB drive.

    Через GNOME Disk Utility

    В дистрибутивах Linux с GNOME легко можно сделать liveCD через nautilus и gnome-disk-utility . Просто нажмите правой кнопкой мыши на файл .iso и выберите Open With Disk Image Writer. Когда откроется GNOME Disk Utility, укажите флешку в Destination и нажмите Start Restoring.

    Создание USB-ZIP накопителя

    Некоторые старые системы с BIOS поддерживают загрузку только с USB-ZIP носителя. Этот способ позволяет вам все еще загружаться с накопителя USB-HDD.

    • Скачайте syslinux и mtools с официальных репозиториев.
    • Найдите вашу флешку с помощью lsblk .
    • Введите mkdiskimage -4 /dev/sdx 0 64 32 (заменив x на букву вашего устройства). Это займет некоторое время.

    Теперь выполняйте инструкции из раздела ручного форматирования выше. Раздел будет /dev/sdx4 из-за особенностей работы ZIP-дисков.

    Через UNetbootin

    UNetbootin можно использовать на любом дистрибутиве Linux или Windows для копирования iso на USB. Но он перезаписывает syslinux.cfg , поэтому созданная загрузочная флешка не правильно загружается. Из-за этого Unetbootin не рекомендуется — пожалуйста используйте dd или один из других описанных здесь способов.

    В строке /dev/sdx1 вы должны заменить x на первую свободную букву т.е. на букву, которая следует за последней использованой в системе, на которую устанавливаете Arch Linux (например, если у вас два жестких диска, используйте c .). Вы можете сделать это изменение во время первой фазы загрузки, нажав Tab , когда отображается меню.

    В Windows

    Через Flashnul

    flashnul — утилита для проверки работоспособности и обслуживания Flash-памяти (USB-Flash, IDE-Flash, SecureDigital, MMC, MemoryStick, SmartMedia, XD, CompactFlash и т.д.).

    В командной строке вызовите flashnul с параметром -p и определите, какой индекс устройства является вашим USB-накопителем, например:

    Когда вы определили, какое вам нужно устройство, вы можете записать образ на него, вызвав flashnul с индексом устройства, -L и с путем к образу, например:

    Если вы действительно уверены, что хотите записать данные, введите yes, а затем немного подождите, пока они будут записываться. Если вы получили ошибку «Отказано в доступе», закройте все открытые окна Проводника.

    Если вы используете Vista или Win7, вы должны открыть консоль от имени администратора, иначе flashnul не сможет открыть флешку как блочное устройство и сможет писать только через дескриптор диска.

    Загрузка установочного носителя из ОЗУ

    This article or section is a candidate for merging with Multiboot USB drive#Using Syslinux and memdisk.

    Этот способ использует Syslinux и Ramdisk (MEMDISK) для загрузки всего образа Arch Linux в ОЗУ. Поскольку он будет работать полностью из оперативной памяти, вам необходимо убедиться, что система, на которую вы будете его устанавливать, имеет достаточный объем. Минимальное количество ОЗУ — между 500 MB и 1 GB. Этого должно хватить для MEMDISK на основе Arch Linux.

    Для получения дополнительной информации о системных требованиях Arch Linux, а также о требованиях для MEMDISK соответственно смотрите Руководство по установке и это. Для справки, вот тема форума об этом.

    Подготовка флэш-накопителя USB

    Отформатируйте USB-носитель в FAT32. Затем создайте следующие папки на нем.

    Копирование нужных файлов на флешку

    Далее скопируйте ISO, с которого вы хотите загружаться, в каталог Boot/ISOs . После этого извлеките следующие файлы из последней версии syslinux отсюда и скопируйте их в следующие каталоги.

    • ./win32/syslinux.exe на Рабочий стол или в Загрузки вашей системы.
    • ./memdisk/memdisk в каталог Settings на вашей флешки.
    Создание файла настроек

    После копирования необходимых файлов перейдите на USB-накопителе в /boot/Settings и создайте файл syslinux.cfg .

    Для получения дополнительной информации о Syslinux смотрите статью Arch Wiki.

    Источник

    Читайте также:  Компьютер заблокирован windows заблокирован разблокируйте диск
    Оцените статью