Install syslinux from windows

Содержание
  1. Установка Syslinux
  2. Установка в среде NT/2K/XP
  3. Установка в среде DOS
  4. Установка в Linux
  5. Пример
  6. Подготовка к Установке
  7. Установка
  8. Загрузка DOS Систем
  9. Добавляем Linux
  10. Windows Системы.
  11. Syslinux
  12. Материал из Пингвиньи радостей
  13. Содержание
  14. Получение загрузчика
  15. получение загрузчика через хранилища linux
  16. получение загрузчика сайта www.pkgs.org
  17. получение загрузчика с сайта www.kernel.org
  18. Размещение SysLinux в качестве загрузчика
  19. установка SysLinux из WINDOWS
  20. установка SysLinux из DOS
  21. установка SysLinux из LINUX
  22. параметры установщика SysLinux
  23. Syslinux
  24. Contents
  25. BIOS Systems
  26. Boot process overview
  27. Installation on BIOS
  28. Automatic install
  29. Manual install
  30. UEFI Systems
  31. Limitations of UEFI Syslinux
  32. Installation on UEFI
  33. Configuration
  34. Examples
  35. Boot prompt
  36. Text boot menu
  37. Graphical boot menu
  38. Kernel parameters
  39. Auto boot
  40. Security
  41. Chainloading
  42. Chainloading a partition’s VBR
  43. Chainloading a disk’s MBR
  44. Chainloading other boot loaders
  45. Chainloading other Linux systems
  46. Using memtest
  47. Reboot and power off
  48. Clear menu
  49. Keyboard layout
  50. Hiding the menu
  51. PXELINUX
  52. Booting ISO9660 image files with memdisk
  53. Serial console
  54. Boot another OS once
  55. Troubleshooting
  56. Failed to load ldlinux
  57. Using the Syslinux prompt
  58. Fsck fails on root partition
  59. No Default or UI found on some computers
  60. Missing operating system
  61. Windows boots up, ignoring Syslinux
  62. Menu entries do nothing
  63. Cannot remove ldlinux.sys
  64. White block in upper left corner when using vesamenu
  65. Chainloading Windows does not work, when it is installed on another drive
  66. Read bootloader log
  67. Btrfs compression

Установка Syslinux

Опишем установку в разных ОС

Установка в среде NT/2K/XP

Используйте «syslinux.exe» (в папке win32) для WinNT/2000/XP. В инсталляторах для DOS и Windows можно использовать опции -m и -a для жёстких дисков, чтобы записать Master Boot Record (MBR) или сделать раздел «активным».

  • syslinux.exe [-sfmar] [-d папка] : [файл с загрузочным сектором]

Установка на Floppy

Установка на: Жёсткий диск или Флешку. Z — это буква диска.

  • syslinux.exe -m -a -d /boot/syslinux z:

*В приведенном выше примере syslinux.cfg должен быть в z:\boot\syslinux

Примечание: В среде NT/2K вы можете получить сообщение о не выпоненной установке и будет предложен выбор Abort/Retry/Ignore. Выбор Ignore корректно завершает программу.

Установка в среде DOS

Используйте «syslinux.com» (в папке dos) для «чистого» DOS (MS-DOS, DR-DOS, PC-DOS, FreeDOS. ) или Win9x/ME.

  • syslinux.com [-sfmar] [-d папка] : [файл с загрузочным сектором]

Установка в Linux

Чтобы создать загружаемую дискету Linux с использованием Syslinux, подготовьте обычную форматированную MS-DOS дискету. Скопируйте один или несколько файлов ядра Linux и выполните команду:

  • syslinux [-sfrma] [-d папка] a: [файл с загрузочным сектором]

(вместо a: поставьте букву своей дискеты; [] одначает необязательный параметр.)

  • syslinux [-sfr] [-d папка] [-o offset] /dev/fd0

(опять же, замените /dev/fd0 на файл Вашей дискеты)

Пример

Давайте рассмотрим здесь пример создания Мультизагрузочной флешки на основе Syslinux.
Начнём сначала и сделаем всё по порядку.

Подготовка к Установке

1. Для начала скачаем весь комплект Syslinux

2. Пока скачивается, форматируем флешку программой HPUSBFW в файловую систему FAT 32
(или FAT 16 если флешка 2 Gb)

Установка

3. Допустим вы работаете в Среде Windows. Если так, то рассмотрим установку Syslinux в этой ОС.

Опишем всё пошагово:

3.1 Распакуйте скачанный архив и найдите папку win32 , скопируйте её в корень диска C:\

3.2 Запустите Консоль. Пуск => Выполнить => Пишите в поле cmd нажимаете Enter. Появится Консоль Windows. (чёрное окно)

3.3 Пишите в Консоли: cd c:\win32 затем Enter. Далее пишите команду установки: syslinux.exe -ma x:
Где х — буква вашей флешки (посмотрите в «Мой Компьютер») Этой командой вы установили Syslinux на флешку,
но этого для полноценной работы ещё не достаточно.

3.4 Создаём папки и файлы как это показано ниже:

boot\syslinux — Помещаем туда файл syslinux.cfg

boot\syslinux\fonts — помещаем туда файл шрифта 866_8x16.psf

boot\syslinux\modules — Найдите в комплекте Syslinux файл vesamenu.c32 и положите его сюда.

В папку boot\syslinux\images помещаем картинку которая станет фоном при загрузке с флешки.
Формат её должен быть *.png 640×480 например makabe.png

Можно считать, что установка загрузчика завершена, теперь нужно наполнить флешку содержимым
и отобразить его запуск в конфигурационном файле syslinux.cfg

Не будем здесь углубляться во все тонкости настроек файла syslinux.cfg , изучите тот, что здесь прикреплён
и многое вам станет понятно, например вы поймёте как устанавливается таймер, картинка, файл шрифта и.т.д
некоторые места в этом файле снабжены коментариями.

Уделим внимание загрузке 3х различных сред, — DOS, Linux, Windows.

4. В следующих действиях нам нужно будет редактировать файл syslinux.cfg , чтобы делать это в Windows
используйте редактор Notepad++. Для корректного отображения Русских букв используйте кодировку:
Кириллица OEM 866.

Загрузка DOS Систем

5. ДОС Системы обычно *.IMA или *.VFD файлы, это образы загрузочных дискет.
Стоит заметить, что в таком образе может быть не только ДОС (Дисковая Операционная Система),
но и другие менее популярные ОС (Например Колибри)

При загрузке таких вещей нам не обойтись без файла memdisk , найдите его в комплекте и поместите в папку /boot

Поместите на флешку нужный образ — /boot/dos/dos.ima

Пункт запуска в конфигурационном файле будет выглядеть вот так:

Добавляем Linux

6. Linux системы. Большинство таких систем запускаются через 2 основных файла — vmlinuz и initrd .

vmlinuz — ядро системы.

initrd — диск в оперативной памяти для начальной инициализации.

К примеру добавим на флешку PuppyRus.

Файл pup_ХХХХ.sfs вомещаем в корень флешки, а все остальные файлы складываем в /boot/puppy .

Добавляем в syslinux.cfg пункт загрузки:

Windows Системы.

7. Здесь дело обстоит немного сложнее и может возникнуть больше отказов, чем в предыдущих вариантах.

Поместите на флешку дистрибутив какого нибудь BartPE или XPE.
Эти дистрибутивы загружаются через файл setupldr.bin или peldr с использованием модуля chain.c32
и указанием диска hd0 1.

Файл chain.c32 берём из комплекта и помещаем в /boot/syslinux/modules

В syslinux.cfg пишем:

Мультизагрузочная флешка на основе Syslinux готова.

Спасибо за внимание и Успехов вам в дальнейших экспериментах 🙂

Syslinux

Материал из Пингвиньи радостей

Содержание

Статья о загрузчике операционных сред Syslinux

Syslinux поддерживает загрузку

  • с файловых систем Linux ext2/3/4 или btrfs — в этом случае говорят об extlinux
  • с файловой системы MS-DOS FAT — это собственно загрузчик syslinux
  • с CD/DVD дисков — в этом случае загрузчик называется isolinux
  • по сети, используя PXE-загрузку с TFTP и/или HTTP серверов, — с помощью версии pxelinux.

Syslinux предоставляет множество модулей расширяющих его функциональность, например из известных memdisk. hdt.c32 и несколько подсистем организации меню: в текстовом варианте — menu.c32 и в графическом — vesamenu.c32 и gfxboot.c32.

Получение загрузчика

Syslinux распрораняется в открытых кодах и в виде скомпилированных бинарных пакетов. В Debian дистрибутивах бинарные пакеты имеют названия syslinux, syslinux-common и syslinux-utils. Эти пакеты могут быть получены как через хранилища пакетов, так и загружены напрямую с сайта pkgs.org.

получение загрузчика через хранилища linux

Описание получения загрузчика через хранилища linux приведено на примере Debian Squeeze.

Пакет присутствует в хранилище пакетов debian squeeze.
Для установки пакета

  • в командной строке: следует выполнить команду # apt-get install syslinux syslinux-common syslinux-utils
  • в графическом режиме: воспользоваться специализированной программой управления пакетами

После установки пакет доступен для использования.

получение загрузчика сайта www.pkgs.org

Получение загрузчика сайта www.pkgs.org может потребоваться, если нужна последняя версия Syslinux.

Для получения загрузчика Syslinux с сайта www.pkgs.org

  • загружаются пакеты с хранилища www.pkgs.org
  • распаковывается (устаналивается) загрузчик Syslinux

получение загрузчика с сайта www.kernel.org

Получение загрузчика сайта www.kernel.org может позволить избежать установки пакета в систему, например если загрузчик предполагается использовать лишь как PXELINUX.

Для получения загрузчика Syslinux с сайта www.kernel.org

  • загружаются пакеты с сайта www.kernel.org
  • распаковается архив
  • (например) извлекаются файлы необходимые для организации PXE-загрузки

Размещение SysLinux в качестве загрузчика

Процедура размещения Syslinux в качестве главного загрузчика зависит от операционной среды, из которой она осуществляется.

установка SysLinux из WINDOWS

Для установки загрузчика Syslinux из Windows используется файл «[bios/]win32/syslinux.exe» для 32-х битных систем и «[bios/]win64/syslinux64.exe» для 64-х битных систем. Установщик Syslinux для Windows поддерживает файловые системы FAT и NTFS.

установка SysLinux из DOS

Установка загрузчика Syslinux из DOS осуществляется с помощью файла «[bios/]dos/syslinux.com». Установщик Syslinux для DOS поддерживает файловую систему FAT.

Читайте также:  Можно ли поставить два windows

установка SysLinux из LINUX

Установка загрузчика Syslinux из Linux может быть осуществлена с помощью нескольких файлов

  • «[bios/]linux/syslinux» для установки с привилегиями суперпользователя на файловую систему FAT без монтирования раздела
  • «[bios/]mtools/syslinux» для установки с разрешением непривилегированной записи на файловую систему FAT без монтирования раздела
  • «[bios/]extlinux/extlinux» для установки на предварительно смонтированный раздел на все поддерживаемые ФС: FAT12/16/32, NTFS, ext2/3/4, Btrfs, XFS, UFS/FFS

Синтаксис команды syslinux

Синтаксис команды extlinux

параметры установщика SysLinux

Параметры ([options]) установщика загрузчика Syslinux различаются для различных вариантов установки.

Syslinux

Syslinux is a collection of boot loaders capable of booting from drives, CDs, and over the network via PXE. Some of the supported file systems are FAT, ext2, ext3, ext4, and uncompressed single-device Btrfs.

Contents

BIOS Systems

Boot process overview

  1. Stage 1 : Part 1Load MBR — At boot, the BIOS loads the 440 byte MBR boot code at the start of the disk ( /usr/lib/syslinux/bios/mbr.bin or /usr/lib/syslinux/bios/gptmbr.bin ).
  2. Stage 1 : Part 2Search active partition. The Stage 1 MBR boot code looks for the partition that is marked as active (boot flag in MBR disks). Let us assume this is the /boot partition, for example.
  3. Stage 2 : Part 1Execute volume boot record — The Stage 1 MBR boot code executes the Volume Boot Record (VBR) of the /boot partition. In the case of Syslinux, the VBR boot code is the starting sector of /boot/syslinux/ldlinux.sys which is created by the extlinux —install command. Note that ldlinux.sys is not the same as ldlinux.c32 .
  4. Stage 2 : Part 2Execute /boot/syslinux/ldlinux.sys — The VBR will load the rest of /boot/syslinux/ldlinux.sys . The sector location of /boot/syslinux/ldlinux.sys should not change, otherwise syslinux will not boot.

Installation on BIOS

Installing the package is not the same as installing the bootloader. After installing the relevant package(s), the bootloader code itself needs to be installed (to the adequate area, usually the VBR) so to be able to boot the system; the following sections provide alternative instructions depending on the characteristics of your particular system.

Automatic install

  • After executing the syslinux-install_update script, do not forget to edit /boot/syslinux/syslinux.cfg by following #Configuration and #Kernel parameters.

The syslinux-install_update script will install the bootloader code (usually to the VBR), copy *.c32 modules to /boot/syslinux/ , set the boot flag and install the boot code in the MBR. It can handle MBR and GPT disks along with software RAID:

If you use a separate boot partition, make sure that it is mounted. Check with lsblk ; if you do not see a /boot mountpoint, mount it before you go any further.

  • Run syslinux-install_update with flags: -i (install the files), -a (mark the partition active with the boot flag), -m (install the MBR boot code): If this command fails with Syslinux BIOS install failed, the problem is likely that the extlinux binary could not find the partition containing /boot :

This can happen, for example, when upgrading from LILO which, while booting a current custom kernel, turned a kernel command line parameter of say root=/dev/sda1 into its numeric equivalent root=801 , as evidenced by /proc/cmdline and the output of the mount command. Remedy the situation by either continuing with the manual install described below while specifying —device=/dev/sda1 to extlinux , or simply by first rebooting into a stock Arch Linux kernel; its use of an initramfs avoids the problem.

  • Now is the time to edit /boot/syslinux/syslinux.cfg by following #Configuration and #Kernel parameters.

Manual install

Your boot partition, on which you plan to install Syslinux, must contain a FAT, ext2, ext3, ext4, or Btrfs file system. You do not have to install it on the root directory of a file system, e.g., with device /dev/sda1 mounted on /boot . For example, you can install Syslinux in the syslinux subdirectory:

Copy all .c32 files from /usr/lib/syslinux/bios/ to /boot/syslinux/ if you desire to use any menus or configurations other than a basic boot prompt. Do not symlink them.

Now install the bootloader. For FAT, ext2/3/4, or btrfs boot partition use extlinux, where the device has been mounted:

Alternatively, for a FAT boot partition use syslinux, where the device is unmounted:

After this, proceed to install the Syslinux bootstrap code appropriate for the partition table:

  • mbr.bin will be installed for an #MBR partition table, or
  • gptmbr.bin will be installed for a #GUID partition table

as described in the next sections.

See Master Boot Record for further general information.

MBR partition table

For an MBR partition table, ensure your boot partition is marked as «active» in your partition table (the «boot» flag is set). Applications capable of doing this include fdisk and parted. It should look like this:

Install the MBR:

An alternative MBR which Syslinux provides is: altmbr.bin . This MBR does not scan for bootable partitions; instead, the last byte of the MBR is set to a value indicating which partition to boot from. Here is an example of how altmbr.bin can be copied into position:

In this case, a single byte of value 5 (hexadecimal) is appended to the contents of altmbr.bin and the resulting 440 bytes are written to the MBR on device sda . Syslinux was installed on the first logical partition ( /dev/sda5 ) of the disk.

GUID partition table

For a GPT, ensure that attribute bit 2 «Legacy BIOS bootable» is set for the /boot partition. For Parted it can be set using the «legacy_boot» flag. Using sgdisk the command to set the attribute is:

This will set the attribute «legacy BIOS bootable» on partition 1 of /dev/sda . To check:

Install the MBR:

UEFI Systems

Limitations of UEFI Syslinux

  • UEFI Syslinux application syslinux.efi cannot be signed by sbsign (from sbsigntools ) for UEFI Secure Boot. Bug report: [3]
  • Using TAB to edit kernel parameters in UEFI Syslinux menu might lead to garbaged display (text on top of one another). Bug report: [4]
  • UEFI Syslinux does not support chainloading other EFI applications like UEFI Shell or Windows Boot Manager . Enhancement request: [5]
  • In some cases, UEFI Syslinux might not boot in some Virtual Machines like QEMU/OVMF or VirtualBox or some VMware products/versions and in some UEFI emulation environments like DUET. A Syslinux contributor has confirmed no such issues present on VMware Workstation 10.0.2 and Syslinux-6.02 or later. Bug reports: [6], [7] and [8]
  • Memdisk is not available for UEFI. Enhancement request: [9]

Installation on UEFI

  • Install the syslinux and efibootmgr packages from the official repositories. Then setup Syslinux in the ESP as follows:
  • Copy Syslinux files to ESP:
  • Setup boot entry for Syslinux using efibootmgr:

where /dev/sdXY is the partition containing the bootloader.

  • Create or edit esp/EFI/syslinux/syslinux.cfg by following #Configuration.

Configuration

The Syslinux configuration file, syslinux.cfg , should be created in the same directory where you installed Syslinux. In our case, /boot/syslinux/ for BIOS systems and esp/EFI/syslinux/ for UEFI systems.

The bootloader will look for either syslinux.cfg (preferred) or extlinux.conf

Examples

Boot prompt

This is a simple configuration file that will show a boot: prompt and will automatically boot after 5 seconds. If you want to boot directly without seeing a prompt, set PROMPT to 0 .

Text boot menu

Syslinux also allows you to use a boot menu. To use it, copy the menu and libutil modules to your Syslinux directory:

Since version 5.00, additional lib*.c32 library modules are frequently needed too. See the Syslinux wiki for the module dependency tree.

For more details about the menu system, see the Syslinux wiki.

Graphical boot menu

Syslinux also allows you to use a graphical boot menu. To use it, copy the vesamenu COM32 module to your Syslinux folder:

Читайте также:  Windows 10 open windows properties

Since version 5.00, additional lib*.c32 library modules are frequently needed too. See the Syslinux wiki for the module dependency tree.

This configuration uses the same menu design as the Arch Install CD, its config can be found at gitlab.archlinux.org. The Arch Linux background image can be downloaded from there, too. Copy the image to /boot/syslinux/splash.png .

Since Syslinux 3.84, vesamenu.c32 supports the MENU RESOLUTION $WIDTH $HEIGHT directive. To use it, insert MENU RESOLUTION 1440 900 into your config for a 1440×900 resolution. However, the background picture has to have exactly the right resolution, as Syslinux will otherwise refuse to load the menu.

To center the menu and adjust resolution, use MENU RESOLUTION , MENU HSHIFT $N and MENU VSHIFT $N where $N is a positive number. The default values are both 0 which is the upper-left hand corner of your monitor. Conversely, a negative number starts from the opposite end of the screen (e.g. VHSHIFT -4 would be 4 rows from the bottom of the screen).

To move the menu to the center, add or edit these values:

VESA standards are commonly a maximum of 25 rows and 80 columns, so going higher than those values might move the menu off the screen, potentially requiring editing from a rescue CD.

Kernel parameters

The kernel parameters are set by using the APPEND directive in syslinux.cfg : for each LABEL entry, a maximum of one APPEND line is accepted (i.e. spanning multiple lines is not valid).

It is recommended to make the following changes for the «fallback» entry as well.

In the simplest case, the value of the root parameter needs to be replaced; see Persistent block device naming for supported methods.

Change root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX to point to the correct root volume.

If you use dm-crypt encryption change the APPEND line to use your encrypted volume:

If booting a btrfs subvolume, amend the APPEND line with rootflags=subvol= . For example, where /dev/disk/by-uuid/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX has been mounted as a btrfs subvolume called ‘ROOT’ (e.g. mount -o noatime,subvol=ROOT /dev/disk/by-uuid/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX /mnt ), then the APPEND line would need to be modified as follows:

A failure to do so will otherwise result in the following error message: ERROR: Root device mounted successfully, but /sbin/init does not exist.

Auto boot

If you do not want to see the Syslinux menu at all, use the #Boot prompt, and set PROMPT to 0 and comment out any UI menu entries. Setting the TIMEOUT variable to 0 might also be a good idea. Make sure there is a DEFAULT set in your syslinux.cfg . Holding either Shift or Alt , or setting either Caps Lock or Scroll Lock , during boot will allow for options other than default to be used. See the upstream wiki for additional alternatives.

Security

Syslinux has two levels of bootloader security: a menu master password, and a per-menu-item password. In syslinux.cfg , use

to set a master bootloader password, and

within a LABEL block to password-protect individual boot items.

The passwd can be either a cleartext password or hashed: see official documentation.

Chainloading

Syslinux BIOS cannot directly chainload files located on other partitions; however, chain.c32 can boot a partition boot sector (VBR) or another disk’s MBR.

Chainloading a partition’s VBR

If you want to chainload other operating systems (such as Windows) or boot loaders, copy the chain.c32 module to the Syslinux directory (additional lib*.c32 library modules might be needed too; for details, see the instructions in the previous section). Then create a section in the configuration file:

hd0 3 is the third partition on the first BIOS drive — drives are counted from zero, but partitions are counted from one.

Chainloading a disk’s MBR

If you are unsure about which drive your BIOS thinks is «first», you can instead use the MBR identifier, or if you are using GPT, the filesystem labels. To use the MBR identifier, run the command

replacing /dev/sdb with the drive you wish to chainload. Using the hexadecimal number under Disk identifier: 0xf00f1fd3 in this case, the syntax in syslinux.cfg is

For more details about chainloading, see the Syslinux wiki.

Chainloading other boot loaders

If you have GRUB installed on the same partition, you can chainload it by using:

Alternatively, it is also possible to load GRUB as a linux kernel by prepending lnxboot.img to core.img . The file lnxboot.img is part of core/grub and can be found in /usr/lib/grub/i386-pc .

This may be required for booting from ISO images.

Chainloading other Linux systems

The factual accuracy of this article or section is disputed.

Chainloading another bootloader such as Windows’ is pretty obvious, as there is a definite bootloader to chain to. But with Syslinux, it is only able to load files residing on the same partition as the configuration file. Thus, if you have another version of Linux on a separate partition, without a shared /boot , it becomes necessary to employ EXTLINUX rather than the other OS’s default bootloader (eg. GRUB2). Essentially, EXTLINUX can be installed on the partition superblock/VBR and be called as a separate bootloader right from the MBR installed by Syslinux. EXTLINUX is part of The Syslinux Project and is included with the syslinux package.

The following instructions assume you have Syslinux installed already. These instructions will also assume that the typical Arch Linux configuration path of /boot/syslinux is being used and the chainloaded system’s / is on /dev/sda3 .

From a booted Linux (likely the partition that Syslinux is set up to boot), mount the other system’s root partition to your desired mount point. In this example this will be /mnt . Also, if a separate /boot partition is used on the second operating system, that will also need to be mounted. The example assumes this is /dev/sda2 .

Install EXTLINUX to the partition VBR, and copy necessary *.c32 files

Create /mnt/boot/syslinux/syslinux.cfg . You can use the other Linux’s bootloader menu file for reference. Below is an example:

And then add an entry to your main syslinux.cfg

Note that the other Linux entry in /boot/syslinux/syslinux.cfg will need to be edited each time you update this OS’s kernel unless it has symlinks to its latest kernel and initrd in / . Since we are booting the kernel directly and not chainloading the other-OS’s default bootloader.

Using memtest

Use this LABEL section to launch memtest:

HDT (Hardware Detection Tool) displays hardware information. Like before, the .c32 file has to be copied from /boot/syslinux/ . Additional lib*.c32 library modules might be needed too. For PCI info, copy /usr/share/hwdata/pci.ids to /boot/syslinux/pci.ids and add the following to your configuration file:

Reboot and power off

Use the following sections to reboot or power off your machine:

Clear menu

To clear the screen when exiting the menu, add the following line:

Keyboard layout

If you often have to edit your boot command with diverse parameters in the Syslinux boot prompt, then you might want to remap your keyboard layout. This allows you to enter «=», «/» and other characters easily on a non-US keyboard.

To create a compatible keymap (e.g. a german one) run:

Now edit syslinux.cfg and add:

See the Syslinux wiki for more details.

Hiding the menu

to hide the menu while displaying only the timeout. Press any key to bring up the menu.

PXELINUX

PXELINUX is provided by the syslinux package.

For BIOS clients, copy the pxelinux.0 bootloader to the boot directory of the client. For version 5.00 and newer, also copy ldlinux.c32 from the same package:

We also created the pxelinux.cfg directory, which is where PXELINUX searches for configuration files by default. Because we do not want to discriminate between different host MACs, we then create the default configuration.

Читайте также:  Современные версии операционных систем семейства windows характеризуется укажите все верные ответы

Or if you are using NBD, use the following append line:

PXELINUX uses the same configuration syntax as SYSLINUX; refer to the upstream documentation for more information.

The kernel and initramfs will be transferred via TFTP, so the paths to those are going to be relative to the TFTP root. Otherwise, the root filesystem is going to be the NFS mount itself, so those are relative to the root of the NFS server.

To actually load PXELINUX, replace filename «/grub/i386-pc/core.0»; in /etc/dhcpd.conf with filename «/pxelinux.0» (or with filename «/lpxelinux.0» ).

Booting ISO9660 image files with memdisk

Syslinux supports booting from ISO images directly using the memdisk module, see Multiboot USB drive#Using Syslinux and memdisk for examples.

Serial console

Boot another OS once

It is possible to temporarily change the default Syslinux action and boot another label only during the next boot. The following command shows how to boot the archfallback label once:

During the next boot, the specified label will be booted without any Syslinux prompt showing up. The default Syslinux boot behaviour will be restored on the next reboot.

Troubleshooting

Failed to load ldlinux

An error message such as «Failed to load ldlinux.c32» during the initial boot can be triggered by many diverse reasons. One potential reason could be a change in file system tools or in a file system structure, depending on its own version.

See also [11] (the whole page might be relevant for troubleshooting too).

Using the Syslinux prompt

You can type in the LABEL name of the entry that you want to boot (as per your syslinux.cfg ). If you used the example configurations, just type:

If you get an error that the configuration file could not be loaded, you can pass your needed boot parameters, e.g.:

If you do not have access to boot: in ramfs, and therefore temporarily unable to boot the kernel again,

1. Create a temporary directory, in order to mount your root partition (if it does not exist already): 2. Mount / under /new_root (in case /boot/ is on the same partition, otherwise you will need to mount them both):

Fsck fails on root partition

In the case of a badly corrupted root partition (in which the journal is damaged), in the ramfs emergency shell, mount the root file system:

And grab the tune2fs binary from the root partition (it is not included in Syslinux):

Follow the instructions at ext2fs: no external journal to create a new journal for the root partition.

No Default or UI found on some computers

Certain motherboard manufacturers have less compatibility for booting from USB devices than others. While an ext4 formatted USB drive may boot on a more recent computer, some computers may hang if the boot partition containing the kernel and initrd are not on a FAT16 partition. To prevent an older machine from loading ldlinux and failing to read syslinux.cfg , create a partition (≤ 2 GB) and format to FAT16 using dosfstools :

then install and configure Syslinux.

Missing operating system

  • Check that you have installed gptmbr.bin for GPT and mbr.bin for MBR partition table. A «Missing operating system» message comes from mbr.bin while gptmbr.bin would show a «Missing OS» message.
  • Check whether the partition that contains /boot has the «boot» flag enabled.
  • Check whether the first partition at the boot device starts at sector 1 rather than sector 63 or 2048. Check this with fdisk -l . If it starts at sector 1, you can move the partition(s) with gparted from a rescue disk. Or, if you have a separate boot partition, you can back up /boot with

and then boot up with the Arch install disk. Next, use cfdisk to delete the /boot partition, and recreate it. This time it should begin at the proper sector, 63. Now mount your partitions and chroot into your mounted system, as described in the installation guide. Restore /boot with the command

Check if /etc/fstab is correct, run:

You will also get this error if you are trying to boot from a md RAID 1 array and created the array with a too new version of the metadata that Syslinux does not understand. As of August 2013 by default mdadm will create an array with version 1.2 metadata, but Syslinux does not understand metadata newer than 1.0. If this is the case you will need to recreate your RAID array using the —metadata=1.0 flag to mdadm.

Windows boots up, ignoring Syslinux

Solution: Make sure the partition that contains /boot has the boot flag enabled. Also, make sure the boot flag is not enabled on the Windows partition. See the installation section above.

The MBR that comes with Syslinux looks for the first active partition that has the boot flag set. The Windows partition was likely found first and had the boot flag set. If you wanted, you could use the MBR that Windows or MS-DOS fdisk provides.

You select a menu entry and it does nothing, it just «refreshes» the menu. This usually means that you have an error in your syslinux.cfg file. Hit Tab to edit your boot parameters. Alternatively, press Esc and type in the LABEL of your boot entry (e.g. arch). Another cause could be that you do not have a kernel installed. Find a way to access your file system (through live CD, etc) and make sure that /mount/vmlinuz-linux exists and does not have a size of 0. If this is the case, reinstall your kernel.

Cannot remove ldlinux.sys

The ldlinux.sys file has the immutable attribute set, which prevents it from being deleted or overwritten. This is because the sector location of the file must not change or else Syslinux has to be reinstalled. To remove it, run:

White block in upper left corner when using vesamenu

Problem: As of linux-3.0, the modesetting driver tries to keep the current contents of the screen after changing the resolution (at least it does so with my Intel, when having Syslinux in text mode). It seems that this goes wrong when combined with the vesamenu module in Syslinux (the white block is actually an attempt to keep the Syslinux menu, but the driver fails to capture the picture from vesa graphics mode).

If you have a custom resolution and a vesamenu with early modesetting, try to append the following in syslinux.cfg to remove the white block and continue in graphics mode:

Chainloading Windows does not work, when it is installed on another drive

If Windows is installed on a different drive than Arch and you have trouble chainloading it, try the following configuration:

Replace the mbr code with the one your Windows drive has (details above), and append swap to the options.

Read bootloader log

In some cases (e.g. bootloader unable to boot kernel) it is highly desirable to get more information from the boot process. Syslinux prints error messages to screen but the boot menu quickly overwrites the text. To avoid losing the log information, disable UI menu in syslinux.cfg and use the default «command-line» prompt. It means:

  • avoid the UI directive
  • avoid ONTIMEOUT
  • avoid ONERROR
  • avoid MENU CLEAR
  • use a higher TIMEOUT
  • use PROMPT 1
  • use DEFAULT problematic_label

To get more detailed debug log, recompile the syslinux package with additional CFLAGS:

Btrfs compression

Booting from btrfs with compression is not supported.[12] This error will show:

Оцените статью