https://wiki.archlinux.org/api.php?action=feedcontributions&user=Gm5729&feedformat=atomArchWiki - User contributions [en]2024-03-29T06:06:32ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=User_talk:Lonaowna&diff=261712User talk:Lonaowna2013-06-07T19:59:29Z<p>Gm5729: Created page with "I notice that wireless tools are now in base which was the primary reason before that I would have installed base-devel. Thus making the change moot. :) ~~~~"</p>
<hr />
<div>I notice that wireless tools are now in base which was the primary reason before that I would have installed base-devel. Thus making the change moot. :) [[User:Gm5729|gkey]] ([[User talk:Gm5729|talk]]) 19:59, 7 June 2013 (UTC)</div>Gm5729https://wiki.archlinux.org/index.php?title=User_talk:Gm5729&diff=261696User talk:Gm57292013-06-07T17:33:52Z<p>Gm5729: /* Isn't Arch Way and Arch Linux same thing? */ new section</p>
<hr />
<div>Recommend that this Beginners Guide and Installation Guide be combined to cut down on rendundancy, missed or conflicting steps, etc. Arch goal is simplicity. I would take in this case we are not trying to be the largest wiki, but the most accurate. [[User:Gm5729|gkey]] ([[User talk:Gm5729|talk]]) 17:30, 7 June 2013 (UTC)<br />
<br />
== Isn't Arch Way and Arch Linux same thing? ==<br />
<br />
It seems to me that Arch Way and Arch Linux are similar to Beginners guide and the Installation Guide. They both should be combined/merged so Arch wiki does not seem so daunting. Less places to have to remember and refer too. [[User:Gm5729|gkey]] ([[User talk:Gm5729|talk]]) 17:33, 7 June 2013 (UTC)</div>Gm5729https://wiki.archlinux.org/index.php?title=User_talk:Gm5729&diff=261695User talk:Gm57292013-06-07T17:30:20Z<p>Gm5729: Consolidate/Merge Beginner Guide and Installation Guide</p>
<hr />
<div>Recommend that this Beginners Guide and Installation Guide be combined to cut down on rendundancy, missed or conflicting steps, etc. Arch goal is simplicity. I would take in this case we are not trying to be the largest wiki, but the most accurate. [[User:Gm5729|gkey]] ([[User talk:Gm5729|talk]]) 17:30, 7 June 2013 (UTC)</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261690GRUB Legacy2013-06-07T16:20:16Z<p>Gm5729: /* How to upgrade */</p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261689GRUB Legacy2013-06-07T16:19:55Z<p>Gm5729: /* How to upgrade */</p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].<br />
<br />
# FRAMEBUFFER RESOLUTION SETTINGS<br />
# +-------------------------------------------------+<br />
# | 640x480 800x600 1024x768 1280x1024<br />
# ----+--------------------------------------------<br />
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775<br />
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793<br />
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794<br />
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795<br />
# +-------------------------------------------------+<br />
# for more details and different resolutions see<br />
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261688GRUB Legacy2013-06-07T16:19:16Z<p>Gm5729: </p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].<br />
<br />
<br />
<br />
# FRAMEBUFFER RESOLUTION SETTINGS<br />
# +-------------------------------------------------+<br />
# | 640x480 800x600 1024x768 1280x1024<br />
# ----+--------------------------------------------<br />
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775<br />
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793<br />
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794<br />
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795<br />
# +-------------------------------------------------+<br />
# for more details and different resolutions see<br />
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261687GRUB Legacy2013-06-07T16:18:39Z<p>Gm5729: </p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].<br />
<br />
<br />
<br />
# FRAMEBUFFER RESOLUTION SETTINGS<br />
# +-------------------------------------------------+<br />
# | 640x480 800x600 1024x768 1280x1024<br />
# ----+--------------------------------------------<br />
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775<br />
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793<br />
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794<br />
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795<br />
# +-------------------------------------------------+<br />
# for more details and different resolutions see<br />
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution<br />
<br />
==See also==<br />
* [http://www.gnu.org/software/grub/ GNU GRUB]<br />
* [http://www.troubleshooters.com/linux/grub/index.htm GRUB Grotto]<br />
* [[Boot Debugging]] - Debugging with Grub, set module values</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261686GRUB Legacy2013-06-07T16:18:22Z<p>Gm5729: </p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].<br />
<br />
<br />
<br />
# FRAMEBUFFER RESOLUTION SETTINGS<br />
# +-------------------------------------------------+<br />
# | 640x480 800x600 1024x768 1280x1024<br />
# ----+--------------------------------------------<br />
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775<br />
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793<br />
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794<br />
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795<br />
# +-------------------------------------------------+<br />
# for more details and different resolutions see<br />
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution<br />
<br />
== Troubleshooting ==<br />
<br />
=== /boot/grub/stage1 not read correctly ===<br />
If you see this error message while trying to set up GRUB, and you are not using a fresh partition table, it is worth checking it.<br />
<br />
# fdisk -l /dev/sda<br />
<br />
This will show you the partition table for {{ic|/dev/sda}}. So check here, whether the "Id" values of your partitions are correct. <br />
The "System" column will show you the description of the "Id" values.<br />
<br />
If your boot partition is marked as being "HPFS/NTFS", for example, then you have to change it to "Linux". To do this, go to fdisk,<br />
<br />
# fdisk /dev/sda<br />
<br />
change a partition's system id with [t], select you partition number and type in the new system id (Linux = 83). <br />
You can also list all available system ids by typing "L" instead of a system id.<br />
<br />
If you have changed a partitions system id, you should [v]erify your partition table and then [w]rite it.<br />
<br />
Now try to set up GRUB again.<br />
<br />
[[https://bbs.archlinux.org/viewtopic.php?pid=799930 Here]] is the forum post reporting this problem.<br />
<br />
=== Accidental install to a Windows partition ===<br />
<br />
If you accidentally install GRUB to a Windows partition, GRUB will write some information to the boot sector of the partition, erasing the reference to the Windows bootloader. (This is true for NTLDR the bootloader for Windows XP and earlier, unsure about later versions).<br />
<br />
To fix this you will need to use the Windows Recovery Console for your Windows release. Because many computer manufacturers do not include this with their product (many choose to use a recovery partition) Microsoft has made them available for download. If you use XP, look at [http://tips.vlaurie.com/2006/05/recovery-console-for-those-without-an-xp-disk/ this page] to be able to turn the floppy disks to a Recovery CD. Boot the Recovery CD (or enable Windows Recovery mode) and run {{ic|fixboot}} to repair the partition boot sector. After this, you will have to install GRUB again---this time, to the MBR, not to the Windows partition---to boot Linux.<br />
<br />
See [[MBR#Restoring a Windows boot record|further discussion here]].<br />
<br />
=== Edit GRUB entries in the boot menu ===<br />
<br />
Once you have selected and entry in the boot menu, you can edit it by pressing key {{Keypress|e}}. Use tab-completion if you need to to discover devices then {{Keypress|Esc}} to exit. Then you can try to boot by pressing {{Keypress|b}}. <br />
{{Note|These settings '''will not be saved'''.}}<br />
<br />
=== device.map error ===<br />
<br />
If an error is raised mentioning {{ic|/boot/grub/device.map}} during installation or boot, run:<br />
<br />
# grub-install --recheck /dev/sda<br />
<br />
to force GRUB to recheck the device map, even if it already exists. This may be necessary after resizing partitions or adding/removing drives.<br />
<br />
=== KDE reboot pull-down menu fails ===<br />
<br />
If you have opened a sub-menu with the list of all operating systems configured in GRUB, selected one, and upon restart, you still booted your default OS, then you might want to check if you have the line:<br />
<br />
default saved<br />
<br />
in {{ic|/boot/grub/menu.lst}}.<br />
<br />
=== GRUB fails to find or install to any virtio ''/dev/vd*'' or other non-BIOS devices ===<br />
I had trouble installing GRUB while installing Arch Linux in an virtual KVM machine using a virtio device for hard drive. To install GRUB, I figured out the following:<br />
Enter a virtual console by typing {{Keypress|Ctrl+Alt+F2}} or any other F-key for a free virtual console.<br />
This assumes that your root file system is mounted in the folder {{ic|/mnt}} and the boot file system is either mounted or stored in the folder {{ic|/mnt/boot}}.<br />
<br />
1. Assure that all needed GRUB files is present in your boot directory (assuming it is mounted in {{ic|/mnt/boot}} folder), by issuing the command:<br />
<br />
# ls /mnt/boot/grub<br />
<br />
2. If the {{ic|/mnt/boot/grub}} folder already contains all the needed files, jump to step 3. Otherwise, do the following commands (replacing {{ic|/mnt}}, {{ic|your_kernel}} and {{ic|your_initrd}} with the real paths and file names). You should also have the {{ic|menu.lst}} file written to this folder:<br />
<br />
# mkdir -p /mnt/boot/grub # if the folder is not yet present<br />
# cp -r /boot/grub/stage1 /boot/grub/stage2 /mnt/boot/grub<br />
# cp -r your_kernel your_initrd /mnt/boot<br />
<br />
3. Start the GRUB shell with the following command:<br />
<br />
# grub --device-map=/dev/null<br />
<br />
4. Enter the following commands. Replace {{ic|/dev/vda}}, and {{ic|(hd0,0)}} with the correct device and partition corresponding to your setup.<br />
<br />
device (hd0) /dev/vda<br />
root (hd0,0)<br />
setup (hd0)<br />
quit<br />
<br />
5. If GRUB reports no error messages, then you probably are done. You also need to add appropriate modules to the ramdisk. For more information, please refer to the KVM guide on [[KVM#Preparing_an_.28Arch.29_Linux_guest|Preparing an (Arch) Linux guest]]<br />
<br />
==See also==<br />
* [http://www.gnu.org/software/grub/ GNU GRUB]<br />
* [http://www.troubleshooters.com/linux/grub/index.htm GRUB Grotto]<br />
* [[Boot Debugging]] - Debugging with Grub, set module values</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261685GRUB Legacy2013-06-07T16:18:04Z<p>Gm5729: </p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].<br />
<br />
<br />
<br />
# FRAMEBUFFER RESOLUTION SETTINGS<br />
# +-------------------------------------------------+<br />
# | 640x480 800x600 1024x768 1280x1024<br />
# ----+--------------------------------------------<br />
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775<br />
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793<br />
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794<br />
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795<br />
# +-------------------------------------------------+<br />
# for more details and different resolutions see<br />
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution<br />
<br />
== Troubleshooting ==<br />
<br />
=== GRUB Error 17 ===<br />
{{Note| the solution below works also for GRUB Error 15}}<br />
'''The first check to do is to unplug any external drive. Seems obvious, but sometimes we get tired ;)'''<br />
<br />
If your partition table gets messed up, an unpleasant "GRUB error 17" message might be the only thing that greets you on your next reboot. There are a number of reasons why the partition table could get messed up. Commonly, users who manipulate their partitions with [[GParted]] -- particularly logical drives -- can cause the order of the partitions to change. For example, you delete {{ic|/dev/sda6}} and resize {{ic|/dev/sda7}}, then finally re-create what used to be {{ic|/dev/sda6}} only now it appears at the bottom of the list, {{ic|/dev/sda9}} for example. Although the physical order of the partitions/logical drives has not changed, the order in which they are recognized has changed.<br />
<br />
Fixing the partition table is easy. Boot from your Arch CD/DVD/USB, login as root and fix the partition table:<br />
<br />
# fdisk /dev/sda<br />
<br />
Once in disk, enter e[x]tra/expert mode, [f]ix the partition order, then [w]rite the table and exit.<br />
<br />
You can verify that the partition table was indeed fixed by issuing an {{ic|fdisk -l}}. Now you just need to fix GRUB. See the [[#Bootloader installation]] section above.<br />
<br />
Basically you need to tell GRUB the correct location of your {{ic|/boot}} then re-write GRUB to the [[MBR]] on the disk.<br />
<br />
For example:<br />
<br />
# grub<br />
<br />
grub> root (hd0,6)<br />
grub> setup (hd0)<br />
grub> quit<br />
<br />
See [[http://stringofthoughts.wordpress.com/2009/05/24/grub-error-17-debianubuntu this page]] for a more in-depth summary of this section.<br />
<br />
=== /boot/grub/stage1 not read correctly ===<br />
If you see this error message while trying to set up GRUB, and you are not using a fresh partition table, it is worth checking it.<br />
<br />
# fdisk -l /dev/sda<br />
<br />
This will show you the partition table for {{ic|/dev/sda}}. So check here, whether the "Id" values of your partitions are correct. <br />
The "System" column will show you the description of the "Id" values.<br />
<br />
If your boot partition is marked as being "HPFS/NTFS", for example, then you have to change it to "Linux". To do this, go to fdisk,<br />
<br />
# fdisk /dev/sda<br />
<br />
change a partition's system id with [t], select you partition number and type in the new system id (Linux = 83). <br />
You can also list all available system ids by typing "L" instead of a system id.<br />
<br />
If you have changed a partitions system id, you should [v]erify your partition table and then [w]rite it.<br />
<br />
Now try to set up GRUB again.<br />
<br />
[[https://bbs.archlinux.org/viewtopic.php?pid=799930 Here]] is the forum post reporting this problem.<br />
<br />
=== Accidental install to a Windows partition ===<br />
<br />
If you accidentally install GRUB to a Windows partition, GRUB will write some information to the boot sector of the partition, erasing the reference to the Windows bootloader. (This is true for NTLDR the bootloader for Windows XP and earlier, unsure about later versions).<br />
<br />
To fix this you will need to use the Windows Recovery Console for your Windows release. Because many computer manufacturers do not include this with their product (many choose to use a recovery partition) Microsoft has made them available for download. If you use XP, look at [http://tips.vlaurie.com/2006/05/recovery-console-for-those-without-an-xp-disk/ this page] to be able to turn the floppy disks to a Recovery CD. Boot the Recovery CD (or enable Windows Recovery mode) and run {{ic|fixboot}} to repair the partition boot sector. After this, you will have to install GRUB again---this time, to the MBR, not to the Windows partition---to boot Linux.<br />
<br />
See [[MBR#Restoring a Windows boot record|further discussion here]].<br />
<br />
=== Edit GRUB entries in the boot menu ===<br />
<br />
Once you have selected and entry in the boot menu, you can edit it by pressing key {{Keypress|e}}. Use tab-completion if you need to to discover devices then {{Keypress|Esc}} to exit. Then you can try to boot by pressing {{Keypress|b}}. <br />
{{Note|These settings '''will not be saved'''.}}<br />
<br />
=== device.map error ===<br />
<br />
If an error is raised mentioning {{ic|/boot/grub/device.map}} during installation or boot, run:<br />
<br />
# grub-install --recheck /dev/sda<br />
<br />
to force GRUB to recheck the device map, even if it already exists. This may be necessary after resizing partitions or adding/removing drives.<br />
<br />
=== KDE reboot pull-down menu fails ===<br />
<br />
If you have opened a sub-menu with the list of all operating systems configured in GRUB, selected one, and upon restart, you still booted your default OS, then you might want to check if you have the line:<br />
<br />
default saved<br />
<br />
in {{ic|/boot/grub/menu.lst}}.<br />
<br />
=== GRUB fails to find or install to any virtio ''/dev/vd*'' or other non-BIOS devices ===<br />
I had trouble installing GRUB while installing Arch Linux in an virtual KVM machine using a virtio device for hard drive. To install GRUB, I figured out the following:<br />
Enter a virtual console by typing {{Keypress|Ctrl+Alt+F2}} or any other F-key for a free virtual console.<br />
This assumes that your root file system is mounted in the folder {{ic|/mnt}} and the boot file system is either mounted or stored in the folder {{ic|/mnt/boot}}.<br />
<br />
1. Assure that all needed GRUB files is present in your boot directory (assuming it is mounted in {{ic|/mnt/boot}} folder), by issuing the command:<br />
<br />
# ls /mnt/boot/grub<br />
<br />
2. If the {{ic|/mnt/boot/grub}} folder already contains all the needed files, jump to step 3. Otherwise, do the following commands (replacing {{ic|/mnt}}, {{ic|your_kernel}} and {{ic|your_initrd}} with the real paths and file names). You should also have the {{ic|menu.lst}} file written to this folder:<br />
<br />
# mkdir -p /mnt/boot/grub # if the folder is not yet present<br />
# cp -r /boot/grub/stage1 /boot/grub/stage2 /mnt/boot/grub<br />
# cp -r your_kernel your_initrd /mnt/boot<br />
<br />
3. Start the GRUB shell with the following command:<br />
<br />
# grub --device-map=/dev/null<br />
<br />
4. Enter the following commands. Replace {{ic|/dev/vda}}, and {{ic|(hd0,0)}} with the correct device and partition corresponding to your setup.<br />
<br />
device (hd0) /dev/vda<br />
root (hd0,0)<br />
setup (hd0)<br />
quit<br />
<br />
5. If GRUB reports no error messages, then you probably are done. You also need to add appropriate modules to the ramdisk. For more information, please refer to the KVM guide on [[KVM#Preparing_an_.28Arch.29_Linux_guest|Preparing an (Arch) Linux guest]]<br />
<br />
==See also==<br />
* [http://www.gnu.org/software/grub/ GNU GRUB]<br />
* [http://www.troubleshooters.com/linux/grub/index.htm GRUB Grotto]<br />
* [[Boot Debugging]] - Debugging with Grub, set module values</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261684GRUB Legacy2013-06-07T16:17:45Z<p>Gm5729: </p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].<br />
<br />
<br />
<br />
# FRAMEBUFFER RESOLUTION SETTINGS<br />
# +-------------------------------------------------+<br />
# | 640x480 800x600 1024x768 1280x1024<br />
# ----+--------------------------------------------<br />
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775<br />
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793<br />
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794<br />
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795<br />
# +-------------------------------------------------+<br />
# for more details and different resolutions see<br />
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution<br />
<br />
== Advanced Debugging ==<br />
<br />
Content moved to [[Boot_Debugging]]<br />
<br />
== Troubleshooting ==<br />
<br />
=== GRUB Error 17 ===<br />
{{Note| the solution below works also for GRUB Error 15}}<br />
'''The first check to do is to unplug any external drive. Seems obvious, but sometimes we get tired ;)'''<br />
<br />
If your partition table gets messed up, an unpleasant "GRUB error 17" message might be the only thing that greets you on your next reboot. There are a number of reasons why the partition table could get messed up. Commonly, users who manipulate their partitions with [[GParted]] -- particularly logical drives -- can cause the order of the partitions to change. For example, you delete {{ic|/dev/sda6}} and resize {{ic|/dev/sda7}}, then finally re-create what used to be {{ic|/dev/sda6}} only now it appears at the bottom of the list, {{ic|/dev/sda9}} for example. Although the physical order of the partitions/logical drives has not changed, the order in which they are recognized has changed.<br />
<br />
Fixing the partition table is easy. Boot from your Arch CD/DVD/USB, login as root and fix the partition table:<br />
<br />
# fdisk /dev/sda<br />
<br />
Once in disk, enter e[x]tra/expert mode, [f]ix the partition order, then [w]rite the table and exit.<br />
<br />
You can verify that the partition table was indeed fixed by issuing an {{ic|fdisk -l}}. Now you just need to fix GRUB. See the [[#Bootloader installation]] section above.<br />
<br />
Basically you need to tell GRUB the correct location of your {{ic|/boot}} then re-write GRUB to the [[MBR]] on the disk.<br />
<br />
For example:<br />
<br />
# grub<br />
<br />
grub> root (hd0,6)<br />
grub> setup (hd0)<br />
grub> quit<br />
<br />
See [[http://stringofthoughts.wordpress.com/2009/05/24/grub-error-17-debianubuntu this page]] for a more in-depth summary of this section.<br />
<br />
=== /boot/grub/stage1 not read correctly ===<br />
If you see this error message while trying to set up GRUB, and you are not using a fresh partition table, it is worth checking it.<br />
<br />
# fdisk -l /dev/sda<br />
<br />
This will show you the partition table for {{ic|/dev/sda}}. So check here, whether the "Id" values of your partitions are correct. <br />
The "System" column will show you the description of the "Id" values.<br />
<br />
If your boot partition is marked as being "HPFS/NTFS", for example, then you have to change it to "Linux". To do this, go to fdisk,<br />
<br />
# fdisk /dev/sda<br />
<br />
change a partition's system id with [t], select you partition number and type in the new system id (Linux = 83). <br />
You can also list all available system ids by typing "L" instead of a system id.<br />
<br />
If you have changed a partitions system id, you should [v]erify your partition table and then [w]rite it.<br />
<br />
Now try to set up GRUB again.<br />
<br />
[[https://bbs.archlinux.org/viewtopic.php?pid=799930 Here]] is the forum post reporting this problem.<br />
<br />
=== Accidental install to a Windows partition ===<br />
<br />
If you accidentally install GRUB to a Windows partition, GRUB will write some information to the boot sector of the partition, erasing the reference to the Windows bootloader. (This is true for NTLDR the bootloader for Windows XP and earlier, unsure about later versions).<br />
<br />
To fix this you will need to use the Windows Recovery Console for your Windows release. Because many computer manufacturers do not include this with their product (many choose to use a recovery partition) Microsoft has made them available for download. If you use XP, look at [http://tips.vlaurie.com/2006/05/recovery-console-for-those-without-an-xp-disk/ this page] to be able to turn the floppy disks to a Recovery CD. Boot the Recovery CD (or enable Windows Recovery mode) and run {{ic|fixboot}} to repair the partition boot sector. After this, you will have to install GRUB again---this time, to the MBR, not to the Windows partition---to boot Linux.<br />
<br />
See [[MBR#Restoring a Windows boot record|further discussion here]].<br />
<br />
=== Edit GRUB entries in the boot menu ===<br />
<br />
Once you have selected and entry in the boot menu, you can edit it by pressing key {{Keypress|e}}. Use tab-completion if you need to to discover devices then {{Keypress|Esc}} to exit. Then you can try to boot by pressing {{Keypress|b}}. <br />
{{Note|These settings '''will not be saved'''.}}<br />
<br />
=== device.map error ===<br />
<br />
If an error is raised mentioning {{ic|/boot/grub/device.map}} during installation or boot, run:<br />
<br />
# grub-install --recheck /dev/sda<br />
<br />
to force GRUB to recheck the device map, even if it already exists. This may be necessary after resizing partitions or adding/removing drives.<br />
<br />
=== KDE reboot pull-down menu fails ===<br />
<br />
If you have opened a sub-menu with the list of all operating systems configured in GRUB, selected one, and upon restart, you still booted your default OS, then you might want to check if you have the line:<br />
<br />
default saved<br />
<br />
in {{ic|/boot/grub/menu.lst}}.<br />
<br />
=== GRUB fails to find or install to any virtio ''/dev/vd*'' or other non-BIOS devices ===<br />
I had trouble installing GRUB while installing Arch Linux in an virtual KVM machine using a virtio device for hard drive. To install GRUB, I figured out the following:<br />
Enter a virtual console by typing {{Keypress|Ctrl+Alt+F2}} or any other F-key for a free virtual console.<br />
This assumes that your root file system is mounted in the folder {{ic|/mnt}} and the boot file system is either mounted or stored in the folder {{ic|/mnt/boot}}.<br />
<br />
1. Assure that all needed GRUB files is present in your boot directory (assuming it is mounted in {{ic|/mnt/boot}} folder), by issuing the command:<br />
<br />
# ls /mnt/boot/grub<br />
<br />
2. If the {{ic|/mnt/boot/grub}} folder already contains all the needed files, jump to step 3. Otherwise, do the following commands (replacing {{ic|/mnt}}, {{ic|your_kernel}} and {{ic|your_initrd}} with the real paths and file names). You should also have the {{ic|menu.lst}} file written to this folder:<br />
<br />
# mkdir -p /mnt/boot/grub # if the folder is not yet present<br />
# cp -r /boot/grub/stage1 /boot/grub/stage2 /mnt/boot/grub<br />
# cp -r your_kernel your_initrd /mnt/boot<br />
<br />
3. Start the GRUB shell with the following command:<br />
<br />
# grub --device-map=/dev/null<br />
<br />
4. Enter the following commands. Replace {{ic|/dev/vda}}, and {{ic|(hd0,0)}} with the correct device and partition corresponding to your setup.<br />
<br />
device (hd0) /dev/vda<br />
root (hd0,0)<br />
setup (hd0)<br />
quit<br />
<br />
5. If GRUB reports no error messages, then you probably are done. You also need to add appropriate modules to the ramdisk. For more information, please refer to the KVM guide on [[KVM#Preparing_an_.28Arch.29_Linux_guest|Preparing an (Arch) Linux guest]]<br />
<br />
==See also==<br />
* [http://www.gnu.org/software/grub/ GNU GRUB]<br />
* [http://www.troubleshooters.com/linux/grub/index.htm GRUB Grotto]<br />
* [[Boot Debugging]] - Debugging with Grub, set module values</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261683GRUB Legacy2013-06-07T16:17:23Z<p>Gm5729: </p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].<br />
<br />
<br />
<br />
# FRAMEBUFFER RESOLUTION SETTINGS<br />
# +-------------------------------------------------+<br />
# | 640x480 800x600 1024x768 1280x1024<br />
# ----+--------------------------------------------<br />
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775<br />
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793<br />
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794<br />
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795<br />
# +-------------------------------------------------+<br />
# for more details and different resolutions see<br />
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution<br />
<br />
== Tips and tricks ==<br />
<br />
Additional configuration notes.<br />
<br />
=== Graphical boot ===<br />
<br />
For those desiring eye candy, see [[grub-gfx]]. [[GRUB]] also offers enhanced graphical capabilities, such as background images and bitmap fonts.<br />
<br />
=== Framebuffer resolution ===<br />
<br />
One can use the resolution given in the {{ic|menu.lst}}, but you might want to use your LCD wide-screen at its full native resolution. Here is what you can do to achieve this:<br />
<br />
On [[Wikipedia:VESA BIOS Extensions#Linux video mode numbers|Wikipedia]], there is a list of extended framebuffer resolutions (i.e. beyond the ones in the VBE standard). But, for example, the one I want to use for 1440x900 ({{ic|1=vga=867}}) does not work. This is because the graphic card manufacturers are free to choose any number they wish, as this is not part of the VBE 3 standard. This is why these codes change from one card to the other (possibly even for the same manufacturer).<br />
<br />
So instead of using that table, you can use one of the tools mentioned below to get the correct code:<br />
<br />
==== GRUB recognized value ====<br />
<br />
This is an easy way to find the resolution code using only GRUB itself.<br />
<br />
On the kernel line, specify that the kernel should ask you which mode to use.<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=ask'''<br />
<br />
Now reboot. GRUB will now present a list of suitable codes to use and the option to scan for even more.<br />
<br />
You can pick the code you would like to use (do not forget it, it is needed for the next step) and boot using it.<br />
<br />
Now replace {{ic|ask}} in the kernel line with the correct one you have picked.<br />
<br />
e.g. the kernel line for {{ic|[369] 1680x1050x32}} would be:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=0x369'''<br />
<br />
==== hwinfo ====<br />
<br />
# Install {{Pkg|hwinfo}} from '''[community]'''.<br />
# Run {{ic|hwinfo --framebuffer}} as root.<br />
# Pick up the code corresponding to the desired resolution.<br />
# Use the 6 digit code with 0x prefix in {{ic|1=vga=}} kernel option in {{ic|menu.lst}}. Or convert it to decimal to avoid the use of 0x prefix.<br />
<br />
Example output of '''hwinfo''':<br />
<br />
Mode 0x0364: 1440x900 (+1440), 8 bits<br />
Mode 0x0365: 1440x900 (+5760), 24 bits<br />
<br />
And the kernel line:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=0x0365'''<br />
<br />
{{Note|''vbetest'' gives you VESA mode to which we need to add 512 to get the correct value to use in kernel option line. While ''hwinfo'' gives you directly the correct value needed by the kernel.}}<br />
<br />
==== vbetest ====<br />
<br />
# Install the {{AUR|lrmi}} package from the [[AUR]] that contains the '''vbetest''' tool (x86_64 users will need to use [[#hwinfo]] above).<br />
# Run {{ic|vbetest}} as root <br />
# Then note the number in [ ] corresponding to your desired resolution.<br />
# Press 'q' to quit '''vbetest''' interactive prompt. <br />
## As an option, in a console as root, you can test the mode you just picked up by running {{ic|vbetest -m <yourcode>}} and see a pattern like [http://www.phoronix.net/image.php?id=803&image=x_vbespy_5 this one]<br />
# Add '''512''' to the discovered value picked up above and use the total value to define the {{ic|1=vga=}} parameter in the kernel options of {{ic|menu.lst}}.<br />
# Reboot to enjoy the result<br />
<br />
For example '''vbetest''' on one computer:<br />
<br />
[356] 1440x900 (256 color palette)<br />
[357] 1440x900 (8:8:8)<br />
<br />
So here the number you want is 357. Then, 357 + 512 = 869, so you will use '''vga=869'''. Add your value to the end of the kernel line in {{ic|menu.lst}} as shown below:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=869'''<br />
<br />
{{Note|<br />
* (8:8:8) is for 24-bit color (24bit is 32bit)<br />
* (5:6:5) is for 16-bit color<br />
* (5:5:5) is for 15-bit color<br />
}}<br />
<br />
=== Naming partitions ===<br />
==== By Label ====<br />
If you alter (or plan to alter) partition sizes from time to time, you might want to consider defining your drive/partitions by a label. You can label ext2, ext3, ext4 partitions by:<br />
<br />
e2label </dev/drive|partition> label<br />
<br />
The label name can be up to 16 characters long but cannot have spaces for GRUB to understand it. Then define it in your {{ic|menu.lst}}:<br />
<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/Arch_Linux ro<br />
<br />
==== By UUID ====<br />
<br />
The [[Persistent_block_device_naming#by-uuid | UUID]] (Universally Unique IDentifier) of a partition may be discovered with {{ic|blkid}} or {{ic|ls -l /dev/disk/by-uuid}}. It is defined in {{ic|menu.lst}} with either:<br />
<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/<uuid number><br />
<br />
or<br />
<br />
kernel /boot/vmlinuz-linux root=UUID=<uuid number><br />
<br />
=== Boot as root (single-user mode) ===<br />
<br />
At the boot loader, select an entry and edit it ('e' key). Append the following parameters to the kernel options:<br />
[...] single init=/bin/bash<br />
This will start in single-user mode (init 1), i.e. you will end up to a root prompt without being asked for password.<br />
This may be useful for recovery features, like resetting the root password.<br />
However, this is a huge security flaw if you have not set any [[Grub#Password_protection|password protection]] for grub.<br />
<br />
=== Password protection ===<br />
<br />
You can enable password protection in the GRUB configuration file for operating systems you wish to have protected. Bootloader password protection may be desired if your BIOS lacks such functionality and you need the extra security.<br />
<br />
First, choose a password you can remember and then encrypt it:<br />
<br />
# grub-md5-crypt<br />
Password:<br />
Retype password:<br />
$1$ZOGor$GABXUQ/hnzns/d5JYqqjw<br />
<br />
Then add your password to the beginning of the GRUB configuration file at {{ic|/boot/grub/menu.lst}} (the password must be at the beginning of the configuration file for GRUB to be able to recognize it):<br />
<br />
{{bc|<br />
# general configuration<br />
timeout 5<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
password --md5 $1$ZOGor$GABXUQ/hnzns/d5JYqqjw<br />
}}<br />
<br />
{{Note|Remember that Grub uses the standard QWERTY layout for input.}}<br />
<br />
Then for each operating system you wish to protect, add the {{ic|lock}} command:<br />
<br />
{{bc|<nowiki><br />
# (0) Arch Linux<br />
title Arch Linux<br />
lock<br />
root (hd0,1)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/Arch_Linux ro<br />
initrd /boot/initramfs-linux.img<br />
</nowiki>}}<br />
<br />
{{Warning|If you disable booting from other boot devices (like a CD drive) in the BIOS's settings and then password protect all your operating system entries, it could be difficult to re-enable booting back into the operating systems if the password is forgotten.}}<br />
It is always possible to reset your BIOS settings by setting the appropriate jumper on the motherboard (see your motherboard's manual, as it is specific to every model). So in case other have access to the hardware, there is basically no way to prevent boot breakthroughs.<br />
<br />
=== Restart with named boot choice ===<br />
<br />
If you realize that you often need to switch to some other non-default OS (e.g. Windows) having to reboot and wait for the GRUB menu to appear is tedious. GRUB offers a way to record your OS choice when restarting instead of waiting for the menu, by designating a temporary new default which will be reset as soon as it has been used.<br />
<br />
Supposing a simple {{ic|menu.lst}} setup like this:<br />
<br />
{{hc<br />
|/boot/grub/menu.lst<br />
|<nowiki><br />
# general configuration:<br />
timeout 10<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
# (0) Arch<br />
title Arch Linux<br />
root (hd0,1)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/ARCH ro<br />
initrd /boot/initramfs-linux.img<br />
<br />
# (1) Windows<br />
title Windows XP<br />
rootnoverify (hd0,0)<br />
makeactive<br />
chainloader +1<br />
</nowiki>}}<br />
<br />
Arch is the default (0). We want to restart in to Windows. Change {{ic|default 0}} to {{ic|default saved}} -- this will record the current default in a {{ic|default}} file in the GRUB directory whenever the '''savedefault''' command is used. Now add the line {{ic|savedefault 0}} to the bottom of the Windows entry. Whenever Windows is booted, it will reset the default to Arch, thus making changing the default to Windows temporary. <br />
<br />
Now all that is needed is a way to easily change the default manually. This can be accomplished using the command {{ic|grub-set-default}}. So, to reboot into Windows, enter the following command:<br />
<br />
{{bc|$ sudo grub-set-default 1 && sudo shutdown -r now}}<br />
<br />
For ease of use, you might to wish to implement the "[[Allow users to shutdown]] fix" (including {{ic|/sbin/grub-set-default}} amongst the commands the user is allowed to issue without supplying a password).<br />
<br />
=== LILO and GRUB interaction ===<br />
<br />
If the [[LILO]] package is installed on your system, remove it with<br />
<br />
{{bc|# pacman -R lilo}}<br />
<br />
as some tasks (e.g. kernel compilation using {{ic|make all}}) will make a LILO call, and LILO will then be installed over GRUB. LILO may have been included in your base system, depending on your installer media version and whether you selected/deselected it during the package selection stage.<br />
<br />
{{Note|{{ic|pacman -R lilo}} will not remove LILO from the MBR if it has been installed there; it will merely remove the {{pkg|lilo}} package. The LILO bootloader installed to the MBR will be overwritten when GRUB (or another bootloader) is installed over it.}}<br />
<br />
=== GRUB boot disk ===<br />
<br />
First, format a floppy disk:<br />
<br />
fdformat /dev/fd0<br />
mke2fs /dev/fd0<br />
<br />
Now mount the disk:<br />
<br />
mount -t ext2 /dev/fd0 /mnt/fl<br />
<br />
Install GRUB to the disk:<br />
<br />
grub-install --root-directory=/mnt/fl '(fd0)'<br />
<br />
Copy your {{ic|menu.lst}} file to the disk:<br />
<br />
cp /boot/grub/menu.lst /mnt/fl/boot/grub/menu.lst<br />
<br />
Now unmount your floppy:<br />
<br />
umount /mnt/fl<br />
<br />
Now you should be able to restart your computer with the disk in the drive and it should boot to GRUB. Make sure that your floppy disk is set to have higher priority than your hard drive when booting in your BIOS first, of course.<br />
<br />
See also: [http://www.supergrubdisk.org/ Super GRUB Disk]<br />
<br />
===Hide GRUB menu===<br />
<br />
The {{ic|hiddenmenu}} option can be used in order to hide the menu by default. That way no menu is displayed and the default option is going to be automatically selected after the timeout passes.<br />
Still, you are able to press {{Keypress|Esc}} and the menu shows up. To use it, just add to your {{ic|/boot/grub/menu.lst}}:<br />
hiddenmenu<br />
<br />
== Advanced Debugging ==<br />
<br />
Content moved to [[Boot_Debugging]]<br />
<br />
== Troubleshooting ==<br />
<br />
=== GRUB Error 17 ===<br />
{{Note| the solution below works also for GRUB Error 15}}<br />
'''The first check to do is to unplug any external drive. Seems obvious, but sometimes we get tired ;)'''<br />
<br />
If your partition table gets messed up, an unpleasant "GRUB error 17" message might be the only thing that greets you on your next reboot. There are a number of reasons why the partition table could get messed up. Commonly, users who manipulate their partitions with [[GParted]] -- particularly logical drives -- can cause the order of the partitions to change. For example, you delete {{ic|/dev/sda6}} and resize {{ic|/dev/sda7}}, then finally re-create what used to be {{ic|/dev/sda6}} only now it appears at the bottom of the list, {{ic|/dev/sda9}} for example. Although the physical order of the partitions/logical drives has not changed, the order in which they are recognized has changed.<br />
<br />
Fixing the partition table is easy. Boot from your Arch CD/DVD/USB, login as root and fix the partition table:<br />
<br />
# fdisk /dev/sda<br />
<br />
Once in disk, enter e[x]tra/expert mode, [f]ix the partition order, then [w]rite the table and exit.<br />
<br />
You can verify that the partition table was indeed fixed by issuing an {{ic|fdisk -l}}. Now you just need to fix GRUB. See the [[#Bootloader installation]] section above.<br />
<br />
Basically you need to tell GRUB the correct location of your {{ic|/boot}} then re-write GRUB to the [[MBR]] on the disk.<br />
<br />
For example:<br />
<br />
# grub<br />
<br />
grub> root (hd0,6)<br />
grub> setup (hd0)<br />
grub> quit<br />
<br />
See [[http://stringofthoughts.wordpress.com/2009/05/24/grub-error-17-debianubuntu this page]] for a more in-depth summary of this section.<br />
<br />
=== /boot/grub/stage1 not read correctly ===<br />
If you see this error message while trying to set up GRUB, and you are not using a fresh partition table, it is worth checking it.<br />
<br />
# fdisk -l /dev/sda<br />
<br />
This will show you the partition table for {{ic|/dev/sda}}. So check here, whether the "Id" values of your partitions are correct. <br />
The "System" column will show you the description of the "Id" values.<br />
<br />
If your boot partition is marked as being "HPFS/NTFS", for example, then you have to change it to "Linux". To do this, go to fdisk,<br />
<br />
# fdisk /dev/sda<br />
<br />
change a partition's system id with [t], select you partition number and type in the new system id (Linux = 83). <br />
You can also list all available system ids by typing "L" instead of a system id.<br />
<br />
If you have changed a partitions system id, you should [v]erify your partition table and then [w]rite it.<br />
<br />
Now try to set up GRUB again.<br />
<br />
[[https://bbs.archlinux.org/viewtopic.php?pid=799930 Here]] is the forum post reporting this problem.<br />
<br />
=== Accidental install to a Windows partition ===<br />
<br />
If you accidentally install GRUB to a Windows partition, GRUB will write some information to the boot sector of the partition, erasing the reference to the Windows bootloader. (This is true for NTLDR the bootloader for Windows XP and earlier, unsure about later versions).<br />
<br />
To fix this you will need to use the Windows Recovery Console for your Windows release. Because many computer manufacturers do not include this with their product (many choose to use a recovery partition) Microsoft has made them available for download. If you use XP, look at [http://tips.vlaurie.com/2006/05/recovery-console-for-those-without-an-xp-disk/ this page] to be able to turn the floppy disks to a Recovery CD. Boot the Recovery CD (or enable Windows Recovery mode) and run {{ic|fixboot}} to repair the partition boot sector. After this, you will have to install GRUB again---this time, to the MBR, not to the Windows partition---to boot Linux.<br />
<br />
See [[MBR#Restoring a Windows boot record|further discussion here]].<br />
<br />
=== Edit GRUB entries in the boot menu ===<br />
<br />
Once you have selected and entry in the boot menu, you can edit it by pressing key {{Keypress|e}}. Use tab-completion if you need to to discover devices then {{Keypress|Esc}} to exit. Then you can try to boot by pressing {{Keypress|b}}. <br />
{{Note|These settings '''will not be saved'''.}}<br />
<br />
=== device.map error ===<br />
<br />
If an error is raised mentioning {{ic|/boot/grub/device.map}} during installation or boot, run:<br />
<br />
# grub-install --recheck /dev/sda<br />
<br />
to force GRUB to recheck the device map, even if it already exists. This may be necessary after resizing partitions or adding/removing drives.<br />
<br />
=== KDE reboot pull-down menu fails ===<br />
<br />
If you have opened a sub-menu with the list of all operating systems configured in GRUB, selected one, and upon restart, you still booted your default OS, then you might want to check if you have the line:<br />
<br />
default saved<br />
<br />
in {{ic|/boot/grub/menu.lst}}.<br />
<br />
=== GRUB fails to find or install to any virtio ''/dev/vd*'' or other non-BIOS devices ===<br />
I had trouble installing GRUB while installing Arch Linux in an virtual KVM machine using a virtio device for hard drive. To install GRUB, I figured out the following:<br />
Enter a virtual console by typing {{Keypress|Ctrl+Alt+F2}} or any other F-key for a free virtual console.<br />
This assumes that your root file system is mounted in the folder {{ic|/mnt}} and the boot file system is either mounted or stored in the folder {{ic|/mnt/boot}}.<br />
<br />
1. Assure that all needed GRUB files is present in your boot directory (assuming it is mounted in {{ic|/mnt/boot}} folder), by issuing the command:<br />
<br />
# ls /mnt/boot/grub<br />
<br />
2. If the {{ic|/mnt/boot/grub}} folder already contains all the needed files, jump to step 3. Otherwise, do the following commands (replacing {{ic|/mnt}}, {{ic|your_kernel}} and {{ic|your_initrd}} with the real paths and file names). You should also have the {{ic|menu.lst}} file written to this folder:<br />
<br />
# mkdir -p /mnt/boot/grub # if the folder is not yet present<br />
# cp -r /boot/grub/stage1 /boot/grub/stage2 /mnt/boot/grub<br />
# cp -r your_kernel your_initrd /mnt/boot<br />
<br />
3. Start the GRUB shell with the following command:<br />
<br />
# grub --device-map=/dev/null<br />
<br />
4. Enter the following commands. Replace {{ic|/dev/vda}}, and {{ic|(hd0,0)}} with the correct device and partition corresponding to your setup.<br />
<br />
device (hd0) /dev/vda<br />
root (hd0,0)<br />
setup (hd0)<br />
quit<br />
<br />
5. If GRUB reports no error messages, then you probably are done. You also need to add appropriate modules to the ramdisk. For more information, please refer to the KVM guide on [[KVM#Preparing_an_.28Arch.29_Linux_guest|Preparing an (Arch) Linux guest]]<br />
<br />
==See also==<br />
* [http://www.gnu.org/software/grub/ GNU GRUB]<br />
* [http://www.troubleshooters.com/linux/grub/index.htm GRUB Grotto]<br />
* [[Boot Debugging]] - Debugging with Grub, set module values</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261682GRUB Legacy2013-06-07T16:16:52Z<p>Gm5729: /* Configuration */</p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].<br />
<br />
<br />
<br />
# FRAMEBUFFER RESOLUTION SETTINGS<br />
# +-------------------------------------------------+<br />
# | 640x480 800x600 1024x768 1280x1024<br />
# ----+--------------------------------------------<br />
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775<br />
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793<br />
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794<br />
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795<br />
# +-------------------------------------------------+<br />
# for more details and different resolutions see<br />
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution<br />
<br />
== Bootloader installation ==<br />
<br />
=== Manual recovery of GRUB libs ===<br />
<br />
The {{ic|*stage*}} files are expected to be in {{ic|/boot/grub}}, which may not be the case if the bootloader was not installed during system installation or if the partition/filesystem was damaged, accidentally deleted, etc. <br />
<br />
Manually copy the GRUB libs like so:<br />
{{bc|# cp -a /usr/lib/grub/i386-pc/* /boot/grub}}<br />
<br />
{{Note|Do not forget to mount the system's boot partition if your setup uses a separate one! The above assumes that either the boot partition resides on the root filesystem or is mounted to /boot on the root file system!}}<br />
<br />
=== General notes about bootloader installation === <br />
GRUB may be installed from a separate medium (e.g. a LiveCD), or directly from a running Arch install. The GRUB bootloader is ''seldom'' required to be reinstalled and installation is ''not'' necessary when:<br />
<br />
* The configuration file is updated.<br />
* The {{pkg|grub}} package is updated.<br />
<br />
Installation is ''necessary'' when:<br />
<br />
* A bootloader is not already installed.<br />
* Another operating system overwrites the Linux bootloader.<br />
* The bootloader fails for some unknown reason.<br />
<br />
Before continuing, a few notes:<br />
<br />
* Be sure that your GRUB configuration is correct ({{ic|/boot/grub/menu.lst}}) before proceeding. Refer to [[#Finding GRUB's root]] to ensure your devices are defined correctly.<br />
* GRUB must be installed on the [[MBR]] (first sector of the hard disk), or the first partition of the first storage device to be recognized by most BIOSes. To allow individual distributions the ability to manage their own GRUB menus, multiple instances of GRUB can be used, see [[#chainloader and configfile]].<br />
* Installing the GRUB bootloader may need to be done from within a {{ic|chroot}}ed environment (i.e. from installed environment via a separate medium) for cases like RAID configurations or if you forgot/broke your GRUB installation. You will need to [[Change Root]] from a LiveCD or another Linux installation to do so.<br />
<br />
First, enter the GRUB shell:<br />
<br />
{{bc|# grub}}<br />
<br />
Use the {{ic|root}} command with the output from the {{ic|find}} command (see [[#Finding GRUB's root]]) to instruct GRUB which partition contains stage1 (and therefore, {{ic|/boot}}):<br />
<br />
{{bc|grub> root (hd1,0)}}<br />
<br />
{{Tip|The GRUB shell also supports tab-completion. If you type 'root (hd' then press {{Keypress|Tab}} twice you will see the available storage devices, this can also be done for partitions. Tab-completion also works from the GRUB boot menu. If there is an error in your configuration file you can edit in the boot menu and use tab-completion to help find devices and partitions. See [[#Edit GRUB entries in the boot menu]].}}<br />
<br />
=== Installing to the MBR ===<br />
<br />
The following example installs GRUB to the [[MBR]] of the first drive:<br />
<br />
{{bc|grub> setup (hd0)}}<br />
<br />
=== Installing to a partition ===<br />
<br />
The following example installs GRUB to the first partition of the first drive:<br />
<br />
{{bc|grub> setup (hd0,0)}}<br />
<br />
After running {{ic|setup}}, enter {{ic|quit}} to exit the shell. If you chrooted, [[Change Root|exit your chroot and unmount partitions]]. Now reboot to test.<br />
<br />
=== Alternate method (grub-install) ===<br />
<br />
{{Note|This procedure is known to be less reliable, the recommended method is to use the GRUB shell.}}<br />
<br />
Use the {{ic|grub-install}} command followed by the location to install the bootloader. For example to install the GRUB bootloader to the MBR of the first drive:<br />
<br />
{{bc|# grub-install /dev/sda}}<br />
<br />
GRUB will indicate whether it successfully installs. If it does not, you will have to use the GRUB shell method.<br />
<br />
== Tips and tricks ==<br />
<br />
Additional configuration notes.<br />
<br />
=== Graphical boot ===<br />
<br />
For those desiring eye candy, see [[grub-gfx]]. [[GRUB]] also offers enhanced graphical capabilities, such as background images and bitmap fonts.<br />
<br />
=== Framebuffer resolution ===<br />
<br />
One can use the resolution given in the {{ic|menu.lst}}, but you might want to use your LCD wide-screen at its full native resolution. Here is what you can do to achieve this:<br />
<br />
On [[Wikipedia:VESA BIOS Extensions#Linux video mode numbers|Wikipedia]], there is a list of extended framebuffer resolutions (i.e. beyond the ones in the VBE standard). But, for example, the one I want to use for 1440x900 ({{ic|1=vga=867}}) does not work. This is because the graphic card manufacturers are free to choose any number they wish, as this is not part of the VBE 3 standard. This is why these codes change from one card to the other (possibly even for the same manufacturer).<br />
<br />
So instead of using that table, you can use one of the tools mentioned below to get the correct code:<br />
<br />
==== GRUB recognized value ====<br />
<br />
This is an easy way to find the resolution code using only GRUB itself.<br />
<br />
On the kernel line, specify that the kernel should ask you which mode to use.<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=ask'''<br />
<br />
Now reboot. GRUB will now present a list of suitable codes to use and the option to scan for even more.<br />
<br />
You can pick the code you would like to use (do not forget it, it is needed for the next step) and boot using it.<br />
<br />
Now replace {{ic|ask}} in the kernel line with the correct one you have picked.<br />
<br />
e.g. the kernel line for {{ic|[369] 1680x1050x32}} would be:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=0x369'''<br />
<br />
==== hwinfo ====<br />
<br />
# Install {{Pkg|hwinfo}} from '''[community]'''.<br />
# Run {{ic|hwinfo --framebuffer}} as root.<br />
# Pick up the code corresponding to the desired resolution.<br />
# Use the 6 digit code with 0x prefix in {{ic|1=vga=}} kernel option in {{ic|menu.lst}}. Or convert it to decimal to avoid the use of 0x prefix.<br />
<br />
Example output of '''hwinfo''':<br />
<br />
Mode 0x0364: 1440x900 (+1440), 8 bits<br />
Mode 0x0365: 1440x900 (+5760), 24 bits<br />
<br />
And the kernel line:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=0x0365'''<br />
<br />
{{Note|''vbetest'' gives you VESA mode to which we need to add 512 to get the correct value to use in kernel option line. While ''hwinfo'' gives you directly the correct value needed by the kernel.}}<br />
<br />
==== vbetest ====<br />
<br />
# Install the {{AUR|lrmi}} package from the [[AUR]] that contains the '''vbetest''' tool (x86_64 users will need to use [[#hwinfo]] above).<br />
# Run {{ic|vbetest}} as root <br />
# Then note the number in [ ] corresponding to your desired resolution.<br />
# Press 'q' to quit '''vbetest''' interactive prompt. <br />
## As an option, in a console as root, you can test the mode you just picked up by running {{ic|vbetest -m <yourcode>}} and see a pattern like [http://www.phoronix.net/image.php?id=803&image=x_vbespy_5 this one]<br />
# Add '''512''' to the discovered value picked up above and use the total value to define the {{ic|1=vga=}} parameter in the kernel options of {{ic|menu.lst}}.<br />
# Reboot to enjoy the result<br />
<br />
For example '''vbetest''' on one computer:<br />
<br />
[356] 1440x900 (256 color palette)<br />
[357] 1440x900 (8:8:8)<br />
<br />
So here the number you want is 357. Then, 357 + 512 = 869, so you will use '''vga=869'''. Add your value to the end of the kernel line in {{ic|menu.lst}} as shown below:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=869'''<br />
<br />
{{Note|<br />
* (8:8:8) is for 24-bit color (24bit is 32bit)<br />
* (5:6:5) is for 16-bit color<br />
* (5:5:5) is for 15-bit color<br />
}}<br />
<br />
=== Naming partitions ===<br />
==== By Label ====<br />
If you alter (or plan to alter) partition sizes from time to time, you might want to consider defining your drive/partitions by a label. You can label ext2, ext3, ext4 partitions by:<br />
<br />
e2label </dev/drive|partition> label<br />
<br />
The label name can be up to 16 characters long but cannot have spaces for GRUB to understand it. Then define it in your {{ic|menu.lst}}:<br />
<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/Arch_Linux ro<br />
<br />
==== By UUID ====<br />
<br />
The [[Persistent_block_device_naming#by-uuid | UUID]] (Universally Unique IDentifier) of a partition may be discovered with {{ic|blkid}} or {{ic|ls -l /dev/disk/by-uuid}}. It is defined in {{ic|menu.lst}} with either:<br />
<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/<uuid number><br />
<br />
or<br />
<br />
kernel /boot/vmlinuz-linux root=UUID=<uuid number><br />
<br />
=== Boot as root (single-user mode) ===<br />
<br />
At the boot loader, select an entry and edit it ('e' key). Append the following parameters to the kernel options:<br />
[...] single init=/bin/bash<br />
This will start in single-user mode (init 1), i.e. you will end up to a root prompt without being asked for password.<br />
This may be useful for recovery features, like resetting the root password.<br />
However, this is a huge security flaw if you have not set any [[Grub#Password_protection|password protection]] for grub.<br />
<br />
=== Password protection ===<br />
<br />
You can enable password protection in the GRUB configuration file for operating systems you wish to have protected. Bootloader password protection may be desired if your BIOS lacks such functionality and you need the extra security.<br />
<br />
First, choose a password you can remember and then encrypt it:<br />
<br />
# grub-md5-crypt<br />
Password:<br />
Retype password:<br />
$1$ZOGor$GABXUQ/hnzns/d5JYqqjw<br />
<br />
Then add your password to the beginning of the GRUB configuration file at {{ic|/boot/grub/menu.lst}} (the password must be at the beginning of the configuration file for GRUB to be able to recognize it):<br />
<br />
{{bc|<br />
# general configuration<br />
timeout 5<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
password --md5 $1$ZOGor$GABXUQ/hnzns/d5JYqqjw<br />
}}<br />
<br />
{{Note|Remember that Grub uses the standard QWERTY layout for input.}}<br />
<br />
Then for each operating system you wish to protect, add the {{ic|lock}} command:<br />
<br />
{{bc|<nowiki><br />
# (0) Arch Linux<br />
title Arch Linux<br />
lock<br />
root (hd0,1)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/Arch_Linux ro<br />
initrd /boot/initramfs-linux.img<br />
</nowiki>}}<br />
<br />
{{Warning|If you disable booting from other boot devices (like a CD drive) in the BIOS's settings and then password protect all your operating system entries, it could be difficult to re-enable booting back into the operating systems if the password is forgotten.}}<br />
It is always possible to reset your BIOS settings by setting the appropriate jumper on the motherboard (see your motherboard's manual, as it is specific to every model). So in case other have access to the hardware, there is basically no way to prevent boot breakthroughs.<br />
<br />
=== Restart with named boot choice ===<br />
<br />
If you realize that you often need to switch to some other non-default OS (e.g. Windows) having to reboot and wait for the GRUB menu to appear is tedious. GRUB offers a way to record your OS choice when restarting instead of waiting for the menu, by designating a temporary new default which will be reset as soon as it has been used.<br />
<br />
Supposing a simple {{ic|menu.lst}} setup like this:<br />
<br />
{{hc<br />
|/boot/grub/menu.lst<br />
|<nowiki><br />
# general configuration:<br />
timeout 10<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
# (0) Arch<br />
title Arch Linux<br />
root (hd0,1)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/ARCH ro<br />
initrd /boot/initramfs-linux.img<br />
<br />
# (1) Windows<br />
title Windows XP<br />
rootnoverify (hd0,0)<br />
makeactive<br />
chainloader +1<br />
</nowiki>}}<br />
<br />
Arch is the default (0). We want to restart in to Windows. Change {{ic|default 0}} to {{ic|default saved}} -- this will record the current default in a {{ic|default}} file in the GRUB directory whenever the '''savedefault''' command is used. Now add the line {{ic|savedefault 0}} to the bottom of the Windows entry. Whenever Windows is booted, it will reset the default to Arch, thus making changing the default to Windows temporary. <br />
<br />
Now all that is needed is a way to easily change the default manually. This can be accomplished using the command {{ic|grub-set-default}}. So, to reboot into Windows, enter the following command:<br />
<br />
{{bc|$ sudo grub-set-default 1 && sudo shutdown -r now}}<br />
<br />
For ease of use, you might to wish to implement the "[[Allow users to shutdown]] fix" (including {{ic|/sbin/grub-set-default}} amongst the commands the user is allowed to issue without supplying a password).<br />
<br />
=== LILO and GRUB interaction ===<br />
<br />
If the [[LILO]] package is installed on your system, remove it with<br />
<br />
{{bc|# pacman -R lilo}}<br />
<br />
as some tasks (e.g. kernel compilation using {{ic|make all}}) will make a LILO call, and LILO will then be installed over GRUB. LILO may have been included in your base system, depending on your installer media version and whether you selected/deselected it during the package selection stage.<br />
<br />
{{Note|{{ic|pacman -R lilo}} will not remove LILO from the MBR if it has been installed there; it will merely remove the {{pkg|lilo}} package. The LILO bootloader installed to the MBR will be overwritten when GRUB (or another bootloader) is installed over it.}}<br />
<br />
=== GRUB boot disk ===<br />
<br />
First, format a floppy disk:<br />
<br />
fdformat /dev/fd0<br />
mke2fs /dev/fd0<br />
<br />
Now mount the disk:<br />
<br />
mount -t ext2 /dev/fd0 /mnt/fl<br />
<br />
Install GRUB to the disk:<br />
<br />
grub-install --root-directory=/mnt/fl '(fd0)'<br />
<br />
Copy your {{ic|menu.lst}} file to the disk:<br />
<br />
cp /boot/grub/menu.lst /mnt/fl/boot/grub/menu.lst<br />
<br />
Now unmount your floppy:<br />
<br />
umount /mnt/fl<br />
<br />
Now you should be able to restart your computer with the disk in the drive and it should boot to GRUB. Make sure that your floppy disk is set to have higher priority than your hard drive when booting in your BIOS first, of course.<br />
<br />
See also: [http://www.supergrubdisk.org/ Super GRUB Disk]<br />
<br />
===Hide GRUB menu===<br />
<br />
The {{ic|hiddenmenu}} option can be used in order to hide the menu by default. That way no menu is displayed and the default option is going to be automatically selected after the timeout passes.<br />
Still, you are able to press {{Keypress|Esc}} and the menu shows up. To use it, just add to your {{ic|/boot/grub/menu.lst}}:<br />
hiddenmenu<br />
<br />
== Advanced Debugging ==<br />
<br />
Content moved to [[Boot_Debugging]]<br />
<br />
== Troubleshooting ==<br />
<br />
=== GRUB Error 17 ===<br />
{{Note| the solution below works also for GRUB Error 15}}<br />
'''The first check to do is to unplug any external drive. Seems obvious, but sometimes we get tired ;)'''<br />
<br />
If your partition table gets messed up, an unpleasant "GRUB error 17" message might be the only thing that greets you on your next reboot. There are a number of reasons why the partition table could get messed up. Commonly, users who manipulate their partitions with [[GParted]] -- particularly logical drives -- can cause the order of the partitions to change. For example, you delete {{ic|/dev/sda6}} and resize {{ic|/dev/sda7}}, then finally re-create what used to be {{ic|/dev/sda6}} only now it appears at the bottom of the list, {{ic|/dev/sda9}} for example. Although the physical order of the partitions/logical drives has not changed, the order in which they are recognized has changed.<br />
<br />
Fixing the partition table is easy. Boot from your Arch CD/DVD/USB, login as root and fix the partition table:<br />
<br />
# fdisk /dev/sda<br />
<br />
Once in disk, enter e[x]tra/expert mode, [f]ix the partition order, then [w]rite the table and exit.<br />
<br />
You can verify that the partition table was indeed fixed by issuing an {{ic|fdisk -l}}. Now you just need to fix GRUB. See the [[#Bootloader installation]] section above.<br />
<br />
Basically you need to tell GRUB the correct location of your {{ic|/boot}} then re-write GRUB to the [[MBR]] on the disk.<br />
<br />
For example:<br />
<br />
# grub<br />
<br />
grub> root (hd0,6)<br />
grub> setup (hd0)<br />
grub> quit<br />
<br />
See [[http://stringofthoughts.wordpress.com/2009/05/24/grub-error-17-debianubuntu this page]] for a more in-depth summary of this section.<br />
<br />
=== /boot/grub/stage1 not read correctly ===<br />
If you see this error message while trying to set up GRUB, and you are not using a fresh partition table, it is worth checking it.<br />
<br />
# fdisk -l /dev/sda<br />
<br />
This will show you the partition table for {{ic|/dev/sda}}. So check here, whether the "Id" values of your partitions are correct. <br />
The "System" column will show you the description of the "Id" values.<br />
<br />
If your boot partition is marked as being "HPFS/NTFS", for example, then you have to change it to "Linux". To do this, go to fdisk,<br />
<br />
# fdisk /dev/sda<br />
<br />
change a partition's system id with [t], select you partition number and type in the new system id (Linux = 83). <br />
You can also list all available system ids by typing "L" instead of a system id.<br />
<br />
If you have changed a partitions system id, you should [v]erify your partition table and then [w]rite it.<br />
<br />
Now try to set up GRUB again.<br />
<br />
[[https://bbs.archlinux.org/viewtopic.php?pid=799930 Here]] is the forum post reporting this problem.<br />
<br />
=== Accidental install to a Windows partition ===<br />
<br />
If you accidentally install GRUB to a Windows partition, GRUB will write some information to the boot sector of the partition, erasing the reference to the Windows bootloader. (This is true for NTLDR the bootloader for Windows XP and earlier, unsure about later versions).<br />
<br />
To fix this you will need to use the Windows Recovery Console for your Windows release. Because many computer manufacturers do not include this with their product (many choose to use a recovery partition) Microsoft has made them available for download. If you use XP, look at [http://tips.vlaurie.com/2006/05/recovery-console-for-those-without-an-xp-disk/ this page] to be able to turn the floppy disks to a Recovery CD. Boot the Recovery CD (or enable Windows Recovery mode) and run {{ic|fixboot}} to repair the partition boot sector. After this, you will have to install GRUB again---this time, to the MBR, not to the Windows partition---to boot Linux.<br />
<br />
See [[MBR#Restoring a Windows boot record|further discussion here]].<br />
<br />
=== Edit GRUB entries in the boot menu ===<br />
<br />
Once you have selected and entry in the boot menu, you can edit it by pressing key {{Keypress|e}}. Use tab-completion if you need to to discover devices then {{Keypress|Esc}} to exit. Then you can try to boot by pressing {{Keypress|b}}. <br />
{{Note|These settings '''will not be saved'''.}}<br />
<br />
=== device.map error ===<br />
<br />
If an error is raised mentioning {{ic|/boot/grub/device.map}} during installation or boot, run:<br />
<br />
# grub-install --recheck /dev/sda<br />
<br />
to force GRUB to recheck the device map, even if it already exists. This may be necessary after resizing partitions or adding/removing drives.<br />
<br />
=== KDE reboot pull-down menu fails ===<br />
<br />
If you have opened a sub-menu with the list of all operating systems configured in GRUB, selected one, and upon restart, you still booted your default OS, then you might want to check if you have the line:<br />
<br />
default saved<br />
<br />
in {{ic|/boot/grub/menu.lst}}.<br />
<br />
=== GRUB fails to find or install to any virtio ''/dev/vd*'' or other non-BIOS devices ===<br />
I had trouble installing GRUB while installing Arch Linux in an virtual KVM machine using a virtio device for hard drive. To install GRUB, I figured out the following:<br />
Enter a virtual console by typing {{Keypress|Ctrl+Alt+F2}} or any other F-key for a free virtual console.<br />
This assumes that your root file system is mounted in the folder {{ic|/mnt}} and the boot file system is either mounted or stored in the folder {{ic|/mnt/boot}}.<br />
<br />
1. Assure that all needed GRUB files is present in your boot directory (assuming it is mounted in {{ic|/mnt/boot}} folder), by issuing the command:<br />
<br />
# ls /mnt/boot/grub<br />
<br />
2. If the {{ic|/mnt/boot/grub}} folder already contains all the needed files, jump to step 3. Otherwise, do the following commands (replacing {{ic|/mnt}}, {{ic|your_kernel}} and {{ic|your_initrd}} with the real paths and file names). You should also have the {{ic|menu.lst}} file written to this folder:<br />
<br />
# mkdir -p /mnt/boot/grub # if the folder is not yet present<br />
# cp -r /boot/grub/stage1 /boot/grub/stage2 /mnt/boot/grub<br />
# cp -r your_kernel your_initrd /mnt/boot<br />
<br />
3. Start the GRUB shell with the following command:<br />
<br />
# grub --device-map=/dev/null<br />
<br />
4. Enter the following commands. Replace {{ic|/dev/vda}}, and {{ic|(hd0,0)}} with the correct device and partition corresponding to your setup.<br />
<br />
device (hd0) /dev/vda<br />
root (hd0,0)<br />
setup (hd0)<br />
quit<br />
<br />
5. If GRUB reports no error messages, then you probably are done. You also need to add appropriate modules to the ramdisk. For more information, please refer to the KVM guide on [[KVM#Preparing_an_.28Arch.29_Linux_guest|Preparing an (Arch) Linux guest]]<br />
<br />
==See also==<br />
* [http://www.gnu.org/software/grub/ GNU GRUB]<br />
* [http://www.troubleshooters.com/linux/grub/index.htm GRUB Grotto]<br />
* [[Boot Debugging]] - Debugging with Grub, set module values</div>Gm5729https://wiki.archlinux.org/index.php?title=GRUB_Legacy&diff=261681GRUB Legacy2013-06-07T16:16:09Z<p>Gm5729: </p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[Category:System recovery]]<br />
[[cs:GRUB]]<br />
[[de:GRUB-legacy]]<br />
[[el:GRUB]]<br />
[[es:GRUB]]<br />
[[fr:GRUB]]<br />
[[he:GRUB]]<br />
[[it:GRUB Legacy]]<br />
[[nl:GRUB]]<br />
[[ru:GRUB]]<br />
[[tr:Grub]]<br />
[[uk:GRUB]]<br />
[[zh-CN:GRUB Legacy]]<br />
{{Article summary start}}<br />
{{Article summary text|Covers various aspects of Arch Linux's default bootloader, the GRand Unified Bootloader (GRUB).}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Boot Debugging}}<br />
{{Article summary wiki|grub-gfx}}<br />
{{Article summary wiki|Kernel parameters}}<br />
{{Article summary end}}<br />
<br />
[http://www.gnu.org/software/grub/grub-legacy.html GRUB Legacy] is a [http://www.gnu.org/software/grub/manual/multiboot/ multiboot] bootloader previously maintained by the [[GNU Project]]. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. <br />
<br />
Briefly, the ''bootloader'' is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the Linux kernel. The kernel, in turn, initializes the rest of the operating system.<br />
<br />
{{Note|GRUB Legacy has been deprecated and replaced by [[GRUB|GRUB version 2.x]] in Arch Linux. See the news [https://www.archlinux.org/news/grub-legacy-no-longer-supported/ here]. Users are recommended to switch to GRUB2 or [[Syslinux]] instead. See [[#Upgrading to GRUB2]] below.}}<br />
<br />
== Installation ==<br />
<br />
GRUB Legacy has been dropped from the [[official repositories]] in favor of [[GRUB|GRUB version 2.x]]. {{AUR|grub-legacy}} is still available from the [[AUR]].<br />
<br />
Additionally, GRUB must be installed to the boot sector of a drive or partition to serve as a bootloader. This is covered in the [[#Bootloader installation]] section.<br />
<br />
== Upgrading to GRUB2 ==<br />
=== Is upgrading necessary? ===<br />
The short answer is No. GRUB legacy will not be removed from your system and will stay fully functional.<br />
<br />
However, as any other packages which are not supported anymore, bugs are unlikely to be fixed. So you should consider upgrading to [[GRUB|GRUB version 2.x]], or one of the other supported [[Boot Loader]]s.<br />
<br />
GRUB legacy does not support [[GUID Partition Table|GPT]] disks, [[Btrfs]] filesystem and [[UEFI]] firmwares.<br />
<br />
=== How to upgrade ===<br />
Upgrade from GRUB Legacy to [[GRUB|GRUB version 2.x]] is the much same as installing GRUB on a running Arch Linux. Detailed instructions is covered [[GRUB#Installation|here]].<br />
<br />
== Configuration ==<br />
<br />
The configuration file is located at {{ic|/boot/grub/menu.lst}}. Edit this file to suit your needs.<br />
<br />
* {{ic|timeout #}} -- time to wait (in seconds) before the {{ic|default}} operating system is automatically loaded.<br />
* {{ic|default #}} -- the default boot entry that is chosen when the {{ic|timeout}} has expired.<br />
<br />
An example configuration ({{ic|/boot}} is on a separate partition):<br />
<br />
{{hc<br />
|/boot/grub/menu.lst<br />
|<nowiki><br />
# Config file for GRUB - The GNU GRand Unified Bootloader<br />
# /boot/grub/menu.lst<br />
<br />
# DEVICE NAME CONVERSIONS<br />
#<br />
# Linux GRUB<br />
# -------------------------<br />
# /dev/fd0 (fd0)<br />
# /dev/sda (hd0)<br />
# /dev/sdb2 (hd1,1)<br />
# /dev/sda3 (hd0,2)<br />
#<br />
<br />
# FRAMEBUFFER RESOLUTION SETTINGS<br />
# +-------------------------------------------------+<br />
# | 640x480 800x600 1024x768 1280x1024<br />
# ----+--------------------------------------------<br />
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775<br />
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793<br />
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794<br />
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795<br />
# +-------------------------------------------------+<br />
# for more details and different resolutions see<br />
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution<br />
<br />
# general configuration:<br />
timeout 5<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
# boot sections follow<br />
# each is implicitly numbered from 0 in the order of appearance below<br />
#<br />
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.<br />
#<br />
#-*<br />
<br />
# (0) Arch Linux<br />
title Arch Linux<br />
root (hd0,0)<br />
kernel /vmlinuz-linux root=/dev/sda3 ro<br />
initrd /initramfs-linux.img<br />
<br />
# (1) Windows<br />
#title Windows<br />
#rootnoverify (hd0,0)<br />
#makeactive<br />
#chainloader +1<br />
</nowiki>}}<br />
<br />
=== Dual booting with Windows ===<br />
<br />
Add the following to the end of your {{ic|/boot/grub/menu.lst}} (assuming that your Windows partition is on the first partition of the first drive):<br />
<br />
{{hc|/boot/grub/menu.lst|<nowiki><br />
title Windows<br />
rootnoverify (hd0,0)<br />
makeactive<br />
chainloader +1<br />
</nowiki>}}<br />
<br />
{{Note|If you are attempting to dual-boot with Windows 7, you should comment out the line {{ic|makeactive}}.}}<br />
<br />
{{Note|Windows 2000 and later versions do NOT need to be on the first partition to boot (contrary to popular belief). If the Windows partition changes (i.e. if you add a partition before the Windows partition), you will need to edit the Windows {{ic|boot.ini}} file to reflect the change (see [http://vlaurie.com/computers2/Articles/bootini.htm this article] for details on how to do that).}}<br />
<br />
If Windows is located on another hard disk, the {{ic|map}} command must be used. This will make your Windows install think it is actually on the first drive. Assuming that your Windows partition is on the first partition of the second drive:<br />
<br />
{{hc|/boot/grub/menu.lst|<nowiki><br />
title Windows<br />
map (hd0) (hd1)<br />
map (hd1) (hd0)<br />
rootnoverify (hd1,0)<br />
makeactive<br />
chainloader +1<br />
</nowiki>}}<br />
<br />
{{Note|If you are attempting to dual-boot with Windows 7, you should comment out the line {{ic|makeactive}}.}}<br />
<br />
=== Dual booting with GNU/Linux ===<br />
<br />
This can be done the same way that an Arch Linux install is defined. For example:<br />
{{hc|/boot/grub/menu.lst|<nowiki><br />
title Other Linux<br />
root (hd0,2)<br />
kernel /path/to/kernel root=/dev/sda3 ro<br />
initrd /path/to/initrd<br />
</nowiki>}}<br />
<br />
{{Note| There may be other options that are required, and an initial RAM disk may not be used. Examine the other distribution's {{ic|/boot/grub/menu.lst}} to match boot options, or see [[#chainloader and configfile]] (recommended).}}<br />
<br />
=== {{ic|chainloader}} and {{ic|configfile}} ===<br />
<br />
To facilitate system maintenance, the {{ic|chainloader}} or {{ic|configfile}} command should be used to boot another Linux distribution that provides an "automagic" GRUB configuration mechanism (e.g. Debian, Ubuntu, openSUSE). This allows the distribution to manage its own {{ic|menu.lst}} and boot options.<br />
<br />
* The {{ic|chainloader}} command will load another bootloader (rather than a kernel image); useful if another bootloader is installed in a partition's boot sector (GRUB, for example). This allows one to install a "main" instance of GRUB to the [[MBR]] and distribution-specific instances of GRUB to each partition boot record (PBR).<br />
<br />
* The {{ic|configfile}} command will instruct the currently running GRUB instance to load the specified configuration file. This can be used to load another distribution's {{ic|menu.lst}} without a separate GRUB installation. The caveat of this approach is that other {{ic|menu.lst}} may not be compatible with the installed version of GRUB; some distributions heavily patch their versions of GRUB.<br />
<br />
For example, GRUB is to be installed to the [[MBR]] and some other bootloader (be it GRUB or [[LILO]]) is already installed to the boot sector of {{ic|(hd0,2)}}.<br />
<br />
---------------------------------------------<br />
| | | | % |<br />
| M | | | B % |<br />
| B | (hd0,0) | (hd0,1) | L % (hd0,2) |<br />
| R | | | % |<br />
| | | | % |<br />
---------------------------------------------<br />
| ^<br />
| chainloading |<br />
-----------------------------<br />
<br />
One can simply include in {{ic|menu.lst}}:<br />
<br />
title Other Linux<br />
root (hd0,2)<br />
chainloader +1<br />
<br />
Or, if the bootloader on {{ic|(hd0,2)}} is GRUB:<br />
<br />
title Other Linux<br />
root (hd0,2)<br />
configfile /boot/grub/menu.lst<br />
<br />
The {{ic|chainloader}} command can also be used to load the MBR of a second drive:<br />
<br />
title Other drive<br />
rootnoverify (hd1)<br />
chainloader +1<br />
<br />
=== Dual booting with GNU/Linux (GRUB2) ===<br />
<br />
If the other Linux distribution uses GRUB2 (e.g. Ubuntu 9.10+), and you installed its boot loader to its root partition, you can add an entry like this one to your {{ic|/boot/grub/menu.lst}}:<br />
{{hc|/boot/grub/menu.lst|<nowiki><br />
# other Linux using GRUB2<br />
title Ubuntu<br />
root (hd0,2)<br />
kernel /boot/grub/core.img<br />
</nowiki>}}<br />
<br />
Selecting this entry at boot will load the other distribution's GRUB2 menu assuming that the distribution is installed on {{ic|/dev/sda3}}.<br />
<br />
== Bootloader installation ==<br />
<br />
=== Manual recovery of GRUB libs ===<br />
<br />
The {{ic|*stage*}} files are expected to be in {{ic|/boot/grub}}, which may not be the case if the bootloader was not installed during system installation or if the partition/filesystem was damaged, accidentally deleted, etc. <br />
<br />
Manually copy the GRUB libs like so:<br />
{{bc|# cp -a /usr/lib/grub/i386-pc/* /boot/grub}}<br />
<br />
{{Note|Do not forget to mount the system's boot partition if your setup uses a separate one! The above assumes that either the boot partition resides on the root filesystem or is mounted to /boot on the root file system!}}<br />
<br />
=== General notes about bootloader installation === <br />
GRUB may be installed from a separate medium (e.g. a LiveCD), or directly from a running Arch install. The GRUB bootloader is ''seldom'' required to be reinstalled and installation is ''not'' necessary when:<br />
<br />
* The configuration file is updated.<br />
* The {{pkg|grub}} package is updated.<br />
<br />
Installation is ''necessary'' when:<br />
<br />
* A bootloader is not already installed.<br />
* Another operating system overwrites the Linux bootloader.<br />
* The bootloader fails for some unknown reason.<br />
<br />
Before continuing, a few notes:<br />
<br />
* Be sure that your GRUB configuration is correct ({{ic|/boot/grub/menu.lst}}) before proceeding. Refer to [[#Finding GRUB's root]] to ensure your devices are defined correctly.<br />
* GRUB must be installed on the [[MBR]] (first sector of the hard disk), or the first partition of the first storage device to be recognized by most BIOSes. To allow individual distributions the ability to manage their own GRUB menus, multiple instances of GRUB can be used, see [[#chainloader and configfile]].<br />
* Installing the GRUB bootloader may need to be done from within a {{ic|chroot}}ed environment (i.e. from installed environment via a separate medium) for cases like RAID configurations or if you forgot/broke your GRUB installation. You will need to [[Change Root]] from a LiveCD or another Linux installation to do so.<br />
<br />
First, enter the GRUB shell:<br />
<br />
{{bc|# grub}}<br />
<br />
Use the {{ic|root}} command with the output from the {{ic|find}} command (see [[#Finding GRUB's root]]) to instruct GRUB which partition contains stage1 (and therefore, {{ic|/boot}}):<br />
<br />
{{bc|grub> root (hd1,0)}}<br />
<br />
{{Tip|The GRUB shell also supports tab-completion. If you type 'root (hd' then press {{Keypress|Tab}} twice you will see the available storage devices, this can also be done for partitions. Tab-completion also works from the GRUB boot menu. If there is an error in your configuration file you can edit in the boot menu and use tab-completion to help find devices and partitions. See [[#Edit GRUB entries in the boot menu]].}}<br />
<br />
=== Installing to the MBR ===<br />
<br />
The following example installs GRUB to the [[MBR]] of the first drive:<br />
<br />
{{bc|grub> setup (hd0)}}<br />
<br />
=== Installing to a partition ===<br />
<br />
The following example installs GRUB to the first partition of the first drive:<br />
<br />
{{bc|grub> setup (hd0,0)}}<br />
<br />
After running {{ic|setup}}, enter {{ic|quit}} to exit the shell. If you chrooted, [[Change Root|exit your chroot and unmount partitions]]. Now reboot to test.<br />
<br />
=== Alternate method (grub-install) ===<br />
<br />
{{Note|This procedure is known to be less reliable, the recommended method is to use the GRUB shell.}}<br />
<br />
Use the {{ic|grub-install}} command followed by the location to install the bootloader. For example to install the GRUB bootloader to the MBR of the first drive:<br />
<br />
{{bc|# grub-install /dev/sda}}<br />
<br />
GRUB will indicate whether it successfully installs. If it does not, you will have to use the GRUB shell method.<br />
<br />
== Tips and tricks ==<br />
<br />
Additional configuration notes.<br />
<br />
=== Graphical boot ===<br />
<br />
For those desiring eye candy, see [[grub-gfx]]. [[GRUB]] also offers enhanced graphical capabilities, such as background images and bitmap fonts.<br />
<br />
=== Framebuffer resolution ===<br />
<br />
One can use the resolution given in the {{ic|menu.lst}}, but you might want to use your LCD wide-screen at its full native resolution. Here is what you can do to achieve this:<br />
<br />
On [[Wikipedia:VESA BIOS Extensions#Linux video mode numbers|Wikipedia]], there is a list of extended framebuffer resolutions (i.e. beyond the ones in the VBE standard). But, for example, the one I want to use for 1440x900 ({{ic|1=vga=867}}) does not work. This is because the graphic card manufacturers are free to choose any number they wish, as this is not part of the VBE 3 standard. This is why these codes change from one card to the other (possibly even for the same manufacturer).<br />
<br />
So instead of using that table, you can use one of the tools mentioned below to get the correct code:<br />
<br />
==== GRUB recognized value ====<br />
<br />
This is an easy way to find the resolution code using only GRUB itself.<br />
<br />
On the kernel line, specify that the kernel should ask you which mode to use.<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=ask'''<br />
<br />
Now reboot. GRUB will now present a list of suitable codes to use and the option to scan for even more.<br />
<br />
You can pick the code you would like to use (do not forget it, it is needed for the next step) and boot using it.<br />
<br />
Now replace {{ic|ask}} in the kernel line with the correct one you have picked.<br />
<br />
e.g. the kernel line for {{ic|[369] 1680x1050x32}} would be:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=0x369'''<br />
<br />
==== hwinfo ====<br />
<br />
# Install {{Pkg|hwinfo}} from '''[community]'''.<br />
# Run {{ic|hwinfo --framebuffer}} as root.<br />
# Pick up the code corresponding to the desired resolution.<br />
# Use the 6 digit code with 0x prefix in {{ic|1=vga=}} kernel option in {{ic|menu.lst}}. Or convert it to decimal to avoid the use of 0x prefix.<br />
<br />
Example output of '''hwinfo''':<br />
<br />
Mode 0x0364: 1440x900 (+1440), 8 bits<br />
Mode 0x0365: 1440x900 (+5760), 24 bits<br />
<br />
And the kernel line:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=0x0365'''<br />
<br />
{{Note|''vbetest'' gives you VESA mode to which we need to add 512 to get the correct value to use in kernel option line. While ''hwinfo'' gives you directly the correct value needed by the kernel.}}<br />
<br />
==== vbetest ====<br />
<br />
# Install the {{AUR|lrmi}} package from the [[AUR]] that contains the '''vbetest''' tool (x86_64 users will need to use [[#hwinfo]] above).<br />
# Run {{ic|vbetest}} as root <br />
# Then note the number in [ ] corresponding to your desired resolution.<br />
# Press 'q' to quit '''vbetest''' interactive prompt. <br />
## As an option, in a console as root, you can test the mode you just picked up by running {{ic|vbetest -m <yourcode>}} and see a pattern like [http://www.phoronix.net/image.php?id=803&image=x_vbespy_5 this one]<br />
# Add '''512''' to the discovered value picked up above and use the total value to define the {{ic|1=vga=}} parameter in the kernel options of {{ic|menu.lst}}.<br />
# Reboot to enjoy the result<br />
<br />
For example '''vbetest''' on one computer:<br />
<br />
[356] 1440x900 (256 color palette)<br />
[357] 1440x900 (8:8:8)<br />
<br />
So here the number you want is 357. Then, 357 + 512 = 869, so you will use '''vga=869'''. Add your value to the end of the kernel line in {{ic|menu.lst}} as shown below:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda1 ro '''vga=869'''<br />
<br />
{{Note|<br />
* (8:8:8) is for 24-bit color (24bit is 32bit)<br />
* (5:6:5) is for 16-bit color<br />
* (5:5:5) is for 15-bit color<br />
}}<br />
<br />
=== Naming partitions ===<br />
==== By Label ====<br />
If you alter (or plan to alter) partition sizes from time to time, you might want to consider defining your drive/partitions by a label. You can label ext2, ext3, ext4 partitions by:<br />
<br />
e2label </dev/drive|partition> label<br />
<br />
The label name can be up to 16 characters long but cannot have spaces for GRUB to understand it. Then define it in your {{ic|menu.lst}}:<br />
<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/Arch_Linux ro<br />
<br />
==== By UUID ====<br />
<br />
The [[Persistent_block_device_naming#by-uuid | UUID]] (Universally Unique IDentifier) of a partition may be discovered with {{ic|blkid}} or {{ic|ls -l /dev/disk/by-uuid}}. It is defined in {{ic|menu.lst}} with either:<br />
<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/<uuid number><br />
<br />
or<br />
<br />
kernel /boot/vmlinuz-linux root=UUID=<uuid number><br />
<br />
=== Boot as root (single-user mode) ===<br />
<br />
At the boot loader, select an entry and edit it ('e' key). Append the following parameters to the kernel options:<br />
[...] single init=/bin/bash<br />
This will start in single-user mode (init 1), i.e. you will end up to a root prompt without being asked for password.<br />
This may be useful for recovery features, like resetting the root password.<br />
However, this is a huge security flaw if you have not set any [[Grub#Password_protection|password protection]] for grub.<br />
<br />
=== Password protection ===<br />
<br />
You can enable password protection in the GRUB configuration file for operating systems you wish to have protected. Bootloader password protection may be desired if your BIOS lacks such functionality and you need the extra security.<br />
<br />
First, choose a password you can remember and then encrypt it:<br />
<br />
# grub-md5-crypt<br />
Password:<br />
Retype password:<br />
$1$ZOGor$GABXUQ/hnzns/d5JYqqjw<br />
<br />
Then add your password to the beginning of the GRUB configuration file at {{ic|/boot/grub/menu.lst}} (the password must be at the beginning of the configuration file for GRUB to be able to recognize it):<br />
<br />
{{bc|<br />
# general configuration<br />
timeout 5<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
password --md5 $1$ZOGor$GABXUQ/hnzns/d5JYqqjw<br />
}}<br />
<br />
{{Note|Remember that Grub uses the standard QWERTY layout for input.}}<br />
<br />
Then for each operating system you wish to protect, add the {{ic|lock}} command:<br />
<br />
{{bc|<nowiki><br />
# (0) Arch Linux<br />
title Arch Linux<br />
lock<br />
root (hd0,1)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/Arch_Linux ro<br />
initrd /boot/initramfs-linux.img<br />
</nowiki>}}<br />
<br />
{{Warning|If you disable booting from other boot devices (like a CD drive) in the BIOS's settings and then password protect all your operating system entries, it could be difficult to re-enable booting back into the operating systems if the password is forgotten.}}<br />
It is always possible to reset your BIOS settings by setting the appropriate jumper on the motherboard (see your motherboard's manual, as it is specific to every model). So in case other have access to the hardware, there is basically no way to prevent boot breakthroughs.<br />
<br />
=== Restart with named boot choice ===<br />
<br />
If you realize that you often need to switch to some other non-default OS (e.g. Windows) having to reboot and wait for the GRUB menu to appear is tedious. GRUB offers a way to record your OS choice when restarting instead of waiting for the menu, by designating a temporary new default which will be reset as soon as it has been used.<br />
<br />
Supposing a simple {{ic|menu.lst}} setup like this:<br />
<br />
{{hc<br />
|/boot/grub/menu.lst<br />
|<nowiki><br />
# general configuration:<br />
timeout 10<br />
default 0<br />
color light-blue/black light-cyan/blue<br />
<br />
# (0) Arch<br />
title Arch Linux<br />
root (hd0,1)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/ARCH ro<br />
initrd /boot/initramfs-linux.img<br />
<br />
# (1) Windows<br />
title Windows XP<br />
rootnoverify (hd0,0)<br />
makeactive<br />
chainloader +1<br />
</nowiki>}}<br />
<br />
Arch is the default (0). We want to restart in to Windows. Change {{ic|default 0}} to {{ic|default saved}} -- this will record the current default in a {{ic|default}} file in the GRUB directory whenever the '''savedefault''' command is used. Now add the line {{ic|savedefault 0}} to the bottom of the Windows entry. Whenever Windows is booted, it will reset the default to Arch, thus making changing the default to Windows temporary. <br />
<br />
Now all that is needed is a way to easily change the default manually. This can be accomplished using the command {{ic|grub-set-default}}. So, to reboot into Windows, enter the following command:<br />
<br />
{{bc|$ sudo grub-set-default 1 && sudo shutdown -r now}}<br />
<br />
For ease of use, you might to wish to implement the "[[Allow users to shutdown]] fix" (including {{ic|/sbin/grub-set-default}} amongst the commands the user is allowed to issue without supplying a password).<br />
<br />
=== LILO and GRUB interaction ===<br />
<br />
If the [[LILO]] package is installed on your system, remove it with<br />
<br />
{{bc|# pacman -R lilo}}<br />
<br />
as some tasks (e.g. kernel compilation using {{ic|make all}}) will make a LILO call, and LILO will then be installed over GRUB. LILO may have been included in your base system, depending on your installer media version and whether you selected/deselected it during the package selection stage.<br />
<br />
{{Note|{{ic|pacman -R lilo}} will not remove LILO from the MBR if it has been installed there; it will merely remove the {{pkg|lilo}} package. The LILO bootloader installed to the MBR will be overwritten when GRUB (or another bootloader) is installed over it.}}<br />
<br />
=== GRUB boot disk ===<br />
<br />
First, format a floppy disk:<br />
<br />
fdformat /dev/fd0<br />
mke2fs /dev/fd0<br />
<br />
Now mount the disk:<br />
<br />
mount -t ext2 /dev/fd0 /mnt/fl<br />
<br />
Install GRUB to the disk:<br />
<br />
grub-install --root-directory=/mnt/fl '(fd0)'<br />
<br />
Copy your {{ic|menu.lst}} file to the disk:<br />
<br />
cp /boot/grub/menu.lst /mnt/fl/boot/grub/menu.lst<br />
<br />
Now unmount your floppy:<br />
<br />
umount /mnt/fl<br />
<br />
Now you should be able to restart your computer with the disk in the drive and it should boot to GRUB. Make sure that your floppy disk is set to have higher priority than your hard drive when booting in your BIOS first, of course.<br />
<br />
See also: [http://www.supergrubdisk.org/ Super GRUB Disk]<br />
<br />
===Hide GRUB menu===<br />
<br />
The {{ic|hiddenmenu}} option can be used in order to hide the menu by default. That way no menu is displayed and the default option is going to be automatically selected after the timeout passes.<br />
Still, you are able to press {{Keypress|Esc}} and the menu shows up. To use it, just add to your {{ic|/boot/grub/menu.lst}}:<br />
hiddenmenu<br />
<br />
== Advanced Debugging ==<br />
<br />
Content moved to [[Boot_Debugging]]<br />
<br />
== Troubleshooting ==<br />
<br />
=== GRUB Error 17 ===<br />
{{Note| the solution below works also for GRUB Error 15}}<br />
'''The first check to do is to unplug any external drive. Seems obvious, but sometimes we get tired ;)'''<br />
<br />
If your partition table gets messed up, an unpleasant "GRUB error 17" message might be the only thing that greets you on your next reboot. There are a number of reasons why the partition table could get messed up. Commonly, users who manipulate their partitions with [[GParted]] -- particularly logical drives -- can cause the order of the partitions to change. For example, you delete {{ic|/dev/sda6}} and resize {{ic|/dev/sda7}}, then finally re-create what used to be {{ic|/dev/sda6}} only now it appears at the bottom of the list, {{ic|/dev/sda9}} for example. Although the physical order of the partitions/logical drives has not changed, the order in which they are recognized has changed.<br />
<br />
Fixing the partition table is easy. Boot from your Arch CD/DVD/USB, login as root and fix the partition table:<br />
<br />
# fdisk /dev/sda<br />
<br />
Once in disk, enter e[x]tra/expert mode, [f]ix the partition order, then [w]rite the table and exit.<br />
<br />
You can verify that the partition table was indeed fixed by issuing an {{ic|fdisk -l}}. Now you just need to fix GRUB. See the [[#Bootloader installation]] section above.<br />
<br />
Basically you need to tell GRUB the correct location of your {{ic|/boot}} then re-write GRUB to the [[MBR]] on the disk.<br />
<br />
For example:<br />
<br />
# grub<br />
<br />
grub> root (hd0,6)<br />
grub> setup (hd0)<br />
grub> quit<br />
<br />
See [[http://stringofthoughts.wordpress.com/2009/05/24/grub-error-17-debianubuntu this page]] for a more in-depth summary of this section.<br />
<br />
=== /boot/grub/stage1 not read correctly ===<br />
If you see this error message while trying to set up GRUB, and you are not using a fresh partition table, it is worth checking it.<br />
<br />
# fdisk -l /dev/sda<br />
<br />
This will show you the partition table for {{ic|/dev/sda}}. So check here, whether the "Id" values of your partitions are correct. <br />
The "System" column will show you the description of the "Id" values.<br />
<br />
If your boot partition is marked as being "HPFS/NTFS", for example, then you have to change it to "Linux". To do this, go to fdisk,<br />
<br />
# fdisk /dev/sda<br />
<br />
change a partition's system id with [t], select you partition number and type in the new system id (Linux = 83). <br />
You can also list all available system ids by typing "L" instead of a system id.<br />
<br />
If you have changed a partitions system id, you should [v]erify your partition table and then [w]rite it.<br />
<br />
Now try to set up GRUB again.<br />
<br />
[[https://bbs.archlinux.org/viewtopic.php?pid=799930 Here]] is the forum post reporting this problem.<br />
<br />
=== Accidental install to a Windows partition ===<br />
<br />
If you accidentally install GRUB to a Windows partition, GRUB will write some information to the boot sector of the partition, erasing the reference to the Windows bootloader. (This is true for NTLDR the bootloader for Windows XP and earlier, unsure about later versions).<br />
<br />
To fix this you will need to use the Windows Recovery Console for your Windows release. Because many computer manufacturers do not include this with their product (many choose to use a recovery partition) Microsoft has made them available for download. If you use XP, look at [http://tips.vlaurie.com/2006/05/recovery-console-for-those-without-an-xp-disk/ this page] to be able to turn the floppy disks to a Recovery CD. Boot the Recovery CD (or enable Windows Recovery mode) and run {{ic|fixboot}} to repair the partition boot sector. After this, you will have to install GRUB again---this time, to the MBR, not to the Windows partition---to boot Linux.<br />
<br />
See [[MBR#Restoring a Windows boot record|further discussion here]].<br />
<br />
=== Edit GRUB entries in the boot menu ===<br />
<br />
Once you have selected and entry in the boot menu, you can edit it by pressing key {{Keypress|e}}. Use tab-completion if you need to to discover devices then {{Keypress|Esc}} to exit. Then you can try to boot by pressing {{Keypress|b}}. <br />
{{Note|These settings '''will not be saved'''.}}<br />
<br />
=== device.map error ===<br />
<br />
If an error is raised mentioning {{ic|/boot/grub/device.map}} during installation or boot, run:<br />
<br />
# grub-install --recheck /dev/sda<br />
<br />
to force GRUB to recheck the device map, even if it already exists. This may be necessary after resizing partitions or adding/removing drives.<br />
<br />
=== KDE reboot pull-down menu fails ===<br />
<br />
If you have opened a sub-menu with the list of all operating systems configured in GRUB, selected one, and upon restart, you still booted your default OS, then you might want to check if you have the line:<br />
<br />
default saved<br />
<br />
in {{ic|/boot/grub/menu.lst}}.<br />
<br />
=== GRUB fails to find or install to any virtio ''/dev/vd*'' or other non-BIOS devices ===<br />
I had trouble installing GRUB while installing Arch Linux in an virtual KVM machine using a virtio device for hard drive. To install GRUB, I figured out the following:<br />
Enter a virtual console by typing {{Keypress|Ctrl+Alt+F2}} or any other F-key for a free virtual console.<br />
This assumes that your root file system is mounted in the folder {{ic|/mnt}} and the boot file system is either mounted or stored in the folder {{ic|/mnt/boot}}.<br />
<br />
1. Assure that all needed GRUB files is present in your boot directory (assuming it is mounted in {{ic|/mnt/boot}} folder), by issuing the command:<br />
<br />
# ls /mnt/boot/grub<br />
<br />
2. If the {{ic|/mnt/boot/grub}} folder already contains all the needed files, jump to step 3. Otherwise, do the following commands (replacing {{ic|/mnt}}, {{ic|your_kernel}} and {{ic|your_initrd}} with the real paths and file names). You should also have the {{ic|menu.lst}} file written to this folder:<br />
<br />
# mkdir -p /mnt/boot/grub # if the folder is not yet present<br />
# cp -r /boot/grub/stage1 /boot/grub/stage2 /mnt/boot/grub<br />
# cp -r your_kernel your_initrd /mnt/boot<br />
<br />
3. Start the GRUB shell with the following command:<br />
<br />
# grub --device-map=/dev/null<br />
<br />
4. Enter the following commands. Replace {{ic|/dev/vda}}, and {{ic|(hd0,0)}} with the correct device and partition corresponding to your setup.<br />
<br />
device (hd0) /dev/vda<br />
root (hd0,0)<br />
setup (hd0)<br />
quit<br />
<br />
5. If GRUB reports no error messages, then you probably are done. You also need to add appropriate modules to the ramdisk. For more information, please refer to the KVM guide on [[KVM#Preparing_an_.28Arch.29_Linux_guest|Preparing an (Arch) Linux guest]]<br />
<br />
==See also==<br />
* [http://www.gnu.org/software/grub/ GNU GRUB]<br />
* [http://www.troubleshooters.com/linux/grub/index.htm GRUB Grotto]<br />
* [[Boot Debugging]] - Debugging with Grub, set module values</div>Gm5729https://wiki.archlinux.org/index.php?title=Beginners%27_guide&diff=261679Beginners' guide2013-06-07T16:00:17Z<p>Gm5729: /* Time zone */</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch]]<br />
[[Category:About Arch]]<br />
[[ar:Beginners' Guide/Installation]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ja:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pl:Beginners' Guide/Installation]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ro:Ghidul începătorilor/Instalare]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
[[zh-TW:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== Installation ==<br />
<br />
You are now presented with a shell prompt, automatically logged in as root.<br />
<br />
=== Change the language ===<br />
<br />
{{Tip|These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.}}<br />
<br />
By default, the keyboard layout is set to {{ic|us}}. If you have a non-[[Wikipedia:File:KB United States-NoAltGr.svg|US]] keyboard layout, run:<br />
<br />
# loadkeys ''layout''<br />
<br />
...where ''layout'' can be {{ic|fr}}, {{ic|uk}}, {{ic|dvorak}}, {{ic|be-latin1}}, etc. See [[KEYMAP#Keyboard layouts|here]] for a comprehensive list.<br />
<br />
The font should also be changed, because most languages use more glyphs than the 26 letter [[Wikipedia:English alphabet|English alphabet]]. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it ''exactly'' as you see it:<br />
<br />
# setfont Lat2-Terminus16<br />
<br />
By default, the language is set to English (US). If you would like to change the language for the install process ''(German, in this example)'', remove the {{ic|#}} in front of the [http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 locale] you want from {{ic|/etc/locale.gen}}, along with English (US). Please choose the {{ic|UTF-8}} entry.<br />
<br />
Use {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
# export LANG=de_DE.UTF-8<br />
<br />
Remember, {{Keypress|LAlt+LShift}} activates and deactivates the keymap.<br />
<br />
=== Establish an internet connection ===<br />
<br />
{{Warning|As of v197, udev no longer assigns network interface names according to the wlanX and ethX naming scheme. If you are coming from a different distribution or are reinstalling Arch and not aware of the new interface naming style, please do not assume that your wireless interface is named wlan0, or that your wired interface is named eth0. You can use the command {{ic|ip link}} to discover the names of your interfaces.}}<br />
<br />
The {{ic|dhcpcd}} network daemon starts automatically during boot and it will attempt to start a wired connection. Try to ping a server to see if a connection was established. For example, Google's DNS servers:<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, first check if there is an issue with your cable or wireless signal strength. If not, you will need to set up the network manually, as explained below. Once a connection is established move on to [[#Prepare the storage drive|Prepare the storage drive]].<br />
<br />
==== Wired ====<br />
<br />
Follow this procedure if you need to set up a wired connection via a static IP address.<br />
<br />
First, disable the dhcpcd service which was started automatically at boot:<br />
<br />
# systemctl stop dhcpcd.service<br />
<br />
Identify the name of your Ethernet interface.<br />
<br />
{{hc|# ip link|<br />
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT<br />
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br />
2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000<br />
link/ether 00:11:25:31:69:20 brd ff:ff:ff:ff:ff:ff<br />
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000<br />
link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff}}<br />
<br />
In this example, the Ethernet interface is {{ic|enp2s0f0}}. If you are unsure, your Ethernet interface is likely to start with the letter "e", and unlikely to be "lo" or start with the letter "w". You can also use {{ic|iwconfig}} and see which interfaces are not wireless:<br />
<br />
{{hc|# iwconfig|2=<br />
enp2s0f0 no wireless extensions.<br />
wlp3s0 IEEE 802.11bgn ESSID:"NETGEAR97"<br />
Mode:Managed Frequency:2.427 GHz Access Point: 2C:B0:5D:9C:72:BF<br />
Bit Rate=65 Mb/s Tx-Power=16 dBm<br />
Retry long limit:7 RTS thr:off Fragment thr:off<br />
Power Management:on<br />
Link Quality=61/70 Signal level=-49 dBm<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:430 Missed beacon:0<br />
lo no wireless extensions.}}<br />
<br />
In this example, neither {{ic|enp2s0f0}} nor the loopback device have wireless extensions, meaning {{ic|enp2s0f0}} is our Ethernet interface.<br />
<br />
You also need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you are on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface (e.g. {{ic|enp2s0f0}}):<br />
<br />
# ip link set enp2s0f0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add ''ip_address''/''subnetmask'' dev ''interface_name''<br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev enp2s0f0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via ''ip_address''<br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|Currently, you may include a maximum of three {{ic|nameserver}} lines.}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Network Configuration]] page.<br />
<br />
==== Wireless ====<br />
<br />
Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process.<br />
<br />
First, identify the name of your wireless interface.<br />
<br />
{{hc|# iw dev|2=<br />
phy#0<br />
Interface wlp3s0<br />
ifindex 3<br />
wdev 0x1<br />
addr 00:21:6a:5e:52:bc<br />
type managed<br />
}}<br />
<br />
In this example, {{ic|wlp3s0}} is the available wireless interface. If you are unsure, your wireless interface is likely to start with the letter "w", and unlikely to be "lo" or start with the letter "e". <br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
Bring the interface up with:<br />
<br />
# ip link set wlp3s0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If you get output like {{ic|SIOCSIFFLAGS: No such file or directory}}, this means you will need to manually load the firmware. If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset. For example, if you have an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
{{Tip|Use {{ic|iw dev wlp3s0 scan <nowiki>|</nowiki> grep SSID}} to scan for available networks.}}<br />
<br />
Next, use {{ic|wpa_supplicant}} to connect to a network:<br />
# wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase "''ssid''" "''psk''")<br />
<br />
You need to replace ''ssid'' with the name of your network (e.g. "Linksys etc...") and ''psk'' with your wireless password. Leave the quotes around the network name and password!<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
==== Analog modem, ISDN or PPoE DSL ====<br />
<br />
For xDSL, dial-up and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. See [[Proxy settings]] for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, and is [http://gparted.sourceforge.net/livecd.php provided as a "live" CD]. It is also included on live CDs of most Linux distributions such as [[Wikipedia:Ubuntu (operating system)|Ubuntu]] and [[Wikipedia:Linux Mint|Linux Mint]]. A drive should first be [[partitioning|partitioned]] and the partitions should be formatted with a [[File Systems|file system]] before rebooting.<br />
<br />
The recommendation for a system that will boot via UEFI rather than MBR legacy boot is to format the drive using a GPT partition table. This means that if the drive was previously already partitioned with an MBR (MSDOS) partition table it will now have a new partition table created which will destroy all other data on the drive. Once the new partition table has been created on a drive, only then can individual partitions be created with any chosen format type. When using Gparted, selecting the option to create a new partition table gives an "msdos" partition table by default. If you are intending to follow the advice to create a GPT partition table then you need to choose "Advanced" and then select "gpt" from the drop-down menu. This cannot be done if you have a pre-existing Windows installation on the drive which you wish not to destroy. It is therefore extremely important to not change the partition table to GPT if you intend on having a dual boot system. Leave the Windows install untouched and try to get the Linux install working with UEFI on a drive that contains an MBR (legacy) partition table. <br />
<br />
In addition, some newer computers come pre-installed with Windows 8 which will be using Secure Boot. Arch Linux currently does not support Secure Boot, but some Windows 8 installations have been seen not to boot if Secure Boot is turned off in the BIOS. In some cases it is necessary to turn off both Secure Boot as well as Fastboot in the BIOS options in order to allow Windows 8 to boot without Secure Boot. However there are potential security risks in turning off Secure Boot for booting up Windows 8. Therefore, it may be a better option to keep the Windows 8 install intact and have an independent hard drive for the Linux install - which can then be partitioned from scratch using a GPT partition table. Once that is done, creating several ext4/FAT32/swap partitions on the second drive may be a better way forward if the computer has two drives available. This is often not easy or possible on a small laptop. Currently, Secure Boot is still not in a fully stable state for reliable operation, even for Linux distributions that support it.<br />
<br />
See [[Swap]] for details if you wish to set up a swap partition or swap file. A swap file is easier to resize than a partition and can be created at any point after installation, but cannot be used with a Btrfs filesystem.<br />
<br />
If you have already done so, proceed to [[#Mount the partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools: {{ic|fdisk}}, {{ic|gdisk}}, {{ic|cfdisk}}, {{ic|cgdisk}}, {{ic|parted}}.<br />
<br />
{{Tip|Use the {{ic|lsblk}} command to list the hard disks attached to your system, along with the sizes of their existing partitions. This will help you to be confident you are partitioning the right disk.}}<br />
<br />
{{Box BLUE|Notes regarding [[UEFI]] boot:|<br />
* If you have a UEFI motherboard, you will need to create an extra [[Unified Extensible Firmware Interface#EFI_System_Partition|UEFI System Partition]].<br />
* It is recommended to always use GPT for UEFI boot, as some UEFI firmwares do not allow UEFI-MBR boot.}}<br />
<br />
{{Box BLUE|Notes regarding [[GPT]] partitioning:|<br />
* If you are not dual booting with Windows, then it is advisable to use GPT instead of MBR. Read [[GPT]] for a list of advantages.<br />
* If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned drive, you will need to create an extra [[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]] of size 1007 KiB and {{ic|EF02}} type code. Syslinux does not need one.<br />
* Some BIOS systems may have issues with GPT. See http://mjg59.dreamwidth.org/8035.html and http://rodsbooks.com/gdisk/bios.html for more info and possible workarounds.}}<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
The example system will contain a 15 GB root partition, and a [[Partitioning#/home|home]] partition for the remaining space. Choose either [[MBR]] or [[GPT]]. Do not choose both!<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
{| class="wikitable"<br />
|-<br />
| rowspan="2" | '''MBR'''<br />
| rowspan="2"| {{ic|cfdisk&nbsp;/dev/sda}}<br />
| '''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "15360" – {{Keypress|Enter}} for Beginning – {{Keypress|Enter}} for Bootable.<br />
|-<br />
|<br />
'''Home:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
|-<br />
| rowspan="2" | '''GPT'''<br />
| rowspan="2"| {{ic|cgdisk&nbsp;/dev/sda}}<br />
| '''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for the first sector (2048) – type in "15G" – {{Keypress|Enter}} for the default hex code (8300) – {{Keypress|Enter}} for a blank partition name.<br />
|-<br />
| '''Home:'''<br />
<br />
* Press the down arrow a couple of times to move to the larger free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for the first sector – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size; for example "30G") – {{Keypress|Enter}} for the default hex code (8300) – {{Keypress|Enter}} for a blank partition name.<br />
|}<br />
<br />
If you chose MBR, here is what it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15360<br />
sda2 Primary Linux 133000*<br />
<br />
If you chose GPT, here is what it should look like:<br />
<br />
Part. # Size Partition Type Partition Name<br />
----------------------------------------------------------------<br />
1007.0 KiB free space<br />
1 15.0 GiB Linux filesystem<br />
2 123.45 GiB Linux filesystem<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to exit without saving changes and then restart cfdisk (or cgdisk).<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
{{Warning|Double check and triple check that it is actually {{ic|/dev/sda1}} and {{ic|/dev/sda2}} that you want to format. You can use {{ic|lsblk}} to help with this.}}<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda2<br />
<br />
If you have made a partition dedicated to swap (code 82), do not forget to format and activate it with:<br />
<br />
# mkswap /dev/sda''X''<br />
# swapon /dev/sda''X''<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To display the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
{{Note|Do not mount more than one partition to the same directory. And pay attention, because the mounting order is important.}}<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example when using {{ic|cfdisk}} above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount the home partition and any other separate partition ({{ic|/boot}}, {{ic|/var}}, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda2 /mnt/home<br />
<br />
In case you have a UEFI motherboard, mount the UEFI partition:<br />
<br />
# mkdir -p /mnt/boot/efi<br />
# mount /dev/sda''X'' /mnt/boot/efi<br />
<br />
=== Select a mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it is worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
<nowiki>Server = http://mirror.example.xyz/archlinux/$repo/os/$arch</nowiki><br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
* {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it is usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|<br />
* Use the [https://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting mirrors|Sorting mirrors]] and [[Reflector]].<br />
* [https://archlinux.org/mirrors/status/ Arch Linux MirrorStatus] reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc.}}<br />
<br />
{{Note|<br />
* Whenever in the future you change your list of mirrors, always remember to force pacman to refresh all package lists with {{ic|pacman -Syy}}. This is considered to be good practice and will avoid possible headaches. See [[Mirrors]] for more information.<br />
* If you are using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described above.<br />
* Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent pacman from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id&#61;68944] and [https://bbs.archlinux.org/viewtopic.php?id&#61;65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default pacman file downloader with an alternative (see [[Improve Pacman Performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.}}<br />
<br />
=== Install the base and base-devel system ===<br />
<br />
The base and base-devel system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
The {{ic|-i}} switch can be omitted if you wish to install every package from the ''base'' ''base-devel'' group without prompting.<br />
<br />
# pacstrap -i /mnt base base-devel<br />
<br />
{{Note|If pacman fails to verify your packages, check the system time with {{ic|cal}}. If the system date is invalid (e.g. it shows the year 2010), signing keys will be considered expired (or invalid), signature checks on packages will fail and installation will be interrupted. Make sure to correct the system time, either by doing so manually or with the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
{{Note|If pacman complains that {{ic|error: failed to commit transaction (invalid or corrupted package)}}, run the following command:<br />
# pacman-key --init && pacman-key --populate archlinux<br />
}}<br />
<br />
This will give you a basic Arch system with GNU tools that may be necessary for other uses. Other packages can be installed later using [[pacman]].<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. UUIDs will be used because they have certain advantages (see [[fstab#Identifying filesystems]]). If you would prefer to use labels instead, replace the {{ic|-U}} option with {{ic|-L}}.<br />
<br />
# genfstab -U -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
{{Warning|The fstab file should always be checked after generating it. If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
A few considerations:<br />
<br />
* Only the root ({{ic|/}}) partition needs {{ic|1}} for the last field. Everything else should have either {{ic|2}} or {{ic|0}} (see [[fstab#Field definitions]]).<br />
<br />
=== Chroot and configure the base system ===<br />
<br />
Next, we [[chroot]] into our newly installed system:<br />
<br />
# arch-chroot /mnt<br />
<br />
{{Note|Use {{ic|arch-chroot /mnt /bin/bash}} to chroot into a bash shell.}}<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
Closely following and understanding these steps is of key importance to ensure a properly configured system.<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English (US), as long as you choose their {{ic|UTF-8}} encoding:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file does not exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
# echo LANG=en_US.UTF-8 > /etc/locale.conf<br />
# export LANG=en_US.UTF-8<br />
<br />
{{Note|If you set some other language than English (US) at the beginning of the install, the above commands would be something like:<br />
# echo LANG<nowiki>=</nowiki>de_DE.UTF-8 > /etc/locale.conf<br />
# export LANG<nowiki>=</nowiki>de_DE.UTF-8<br />
}}<br />
<br />
To use other locales for other {{ic|LC_*}} variables, run {{ic|locale}} to see the available options and add them to {{ic|locale.conf}}. It is not recommended to set the {{ic|LC_ALL}} variable. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
==== Console font and keymap ====<br />
<br />
If you set a keymap at [[#Change_the_language|the beginning]] of the install process, load it now, as well, because the environment has changed. For example:<br />
<br />
# loadkeys ''de-latin1''<br />
# setfont Lat2-Terminus16<br />
<br />
To make them available after reboot, edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=de-latin1<br />
FONT=Lat2-Terminus16<br />
}}<br />
<br />
* {{ic|KEYMAP}} – Please note that this setting is only valid for your TTYs, not any graphical window managers or Xorg.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe, but some foreign characters may show up as white squares or as other symbols. It is recommended that you change it to {{ic|Lat2-Terminus16}}, because according to {{ic|/usr/share/kbd/consolefonts/README.Lat2-Terminus16}}, it claims to support "about 110 language sets".<br />
<br />
* Possible option {{ic|FONT_MAP}} – Defines the console map to load at boot. Read {{ic|man setfont}}. Removing it or leaving it blank is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Time zone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime<br />
<br />
: {{Note|{{ic|/etc/localtime}} may not already be in /etc, so the link will be brand new.}}<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
==== Hardware clock ====<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
To synchronize your "UTC" time over the internet, see [[Network Time Protocol daemon|NTPd]].<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC in Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and disable any time-related services, like [[Network Time Protocol daemon|NTPd]] . This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight saving time|DST]] kicks in. So please do not ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|This is just an example, you do not need to set it. All needed modules are automatically loaded by udev, so you will rarely need to add something here. Only add modules that you know are missing.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example are the [[VirtualBox#Arch Linux guests|VirtualBox Guest Additions]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Hostname ====<br />
<br />
Set the [[Wikipedia:hostname|hostname]] to your liking (e.g. ''arch''):<br />
<br />
# echo ''myhostname'' > /etc/hostname<br />
<br />
{{Note|There is no need to edit {{ic|/etc/hosts}}.}}<br />
<br />
=== Configure the network ===<br />
<br />
You need to configure the network again, but this time for your newly installed environment. The procedure and prerequisites are very similar to the one described [[#Establish an internet connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Network Configuration]] and [[Wireless Setup]].}}<br />
<br />
{{Note|If you would like to use the old interface naming scheme (ie. eth* and wlan*) you can accomplish this by creating an empty file at {{ic|/etc/udev/rules.d/80-net-name-slot.rules}} which will mask the file of the same name located under {{ic|/usr/lib/udev/rules.d}} (alternatively, instead of an empty file, using a symlink to {{ic|/dev/null}} is also an acceptable masking method).}}<br />
<br />
==== Wired ====<br />
<br />
===== Dynamic IP =====<br />
<br />
; Using dhcpcd<br />
<br />
If you only use a single fixed wired network connection, you do not need a network management service and can simply enable the {{ic|dhcpcd}} service. Here, {{ic|''interface_name''}} is your wired interface:<br />
<br />
# systemctl enable dhcpcd@''interface_name''.service<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-dhcp my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}):<br />
<br />
# nano my-network<br />
<br />
Enable the {{ic|my-network}} profile:<br />
<br />
# netctl enable my-network<br />
<br />
; Using netctl-ifplugd<br />
<br />
Alternatively, you can use {{ic|netctl-ifplugd}}, which gracefully handles dynamic connections to new networks:<br />
<br />
Install {{Pkg|ifplugd}}, which is required for {{ic|netctl-ifplugd}}:<br />
<br />
# pacman -S ifplugd<br />
<br />
Then enable for interface that you want:<br />
<br />
# systemctl enable netctl-ifplugd@<interface>.service<br />
<br />
{{Tip|[[Netctl]] also provides {{ic|netctl-auto}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-ifplugd}}.}}<br />
<br />
===== Static IP =====<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-static my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|Address}}, {{ic|Gateway}} and {{ic|DNS}}):<br />
<br />
# nano my-network<br />
<br />
* Notice the {{ic|/24}} in {{ic|Address}} which is the [[wikipedia:Classless Inter-Domain Routing#CIDR notation|CIDR notation]] of a {{ic|255.255.255.0}} netmask<br />
<br />
Enable above created profile to start it at every boot:<br />
<br />
# netctl enable my-network<br />
<br />
==== Wireless ====<br />
<br />
{{Note|If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless Setup#Drivers and firmware|here]]), install the package containing your firmware. Most of the time, the {{Pkg|linux-firmware}} package will contain the needed firmware. Though for some devices, the required firmware might be in its own package. For example:<br />
{{bc|# pacman -S zd1211-firmware}}<br />
See [[Wireless Setup]] for more info.}}<br />
<br />
Install {{pkg|iw}}, {{pkg|wpa_supplicant}} and {{pkg|wpa_actiond}} which you will need to connect to a network:<br />
<br />
# pacman -S iw wpa_supplicant wpa_actiond<br />
<br />
===== Adding wireless networks =====<br />
; Using wifi-menu<br />
<br />
Install {{pkg|dialog}}, which is required for {{ic|wifi-menu}}:<br />
<br />
# pacman -S dialog<br />
<br />
After finishing the rest of this installation and rebooting, you can connect to the network with {{ic|wifi-menu ''interface_name''}} (where {{ic|''interface_name''}} is the interface of your wireless chipset).<br />
<br />
# wifi-menu ''interface_name''<br />
<br />
{{Warning|This must be done *after* your reboot when you are no longer chrooted. The process spawned by this command will conflict with the one you have running outside of the chroot. Alternatively, you could just configure a network profile manually using the following templates so that you do not have to worry about using {{ic|wifi-menu}} at all.}}<br />
<br />
; Using manual netctl profiles<br />
<br />
Copy a network profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/wireless-wpa my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|ESSID}} and {{ic|Key}}):<br />
<br />
# nano my-network<br />
<br />
===== Connect automaticly to known networks =====<br />
Enable the {{ic|netctl-auto}} service, which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
# systemctl enable netctl-auto@''interface_name''.service<br />
<br />
{{Tip|[[Netctl]] also provides {{ic|netctl-ifplugd}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-auto}}.}}<br />
<br />
==== Analog modem, ISDN or PPoE DSL ====<br />
<br />
For xDSL, dial-up and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
{{Tip|Most users can skip this step and use the defaults provided in {{ic|mkinitcpio.conf}}. The initramfs image (from the {{ic|/boot}} folder) has already been generated based on this file when the {{Pkg|linux}} package (the Linux kernel) was installed earlier with {{ic|pacstrap}}.}}<br />
<br />
Here you need to set the right [[Mkinitcpio#HOOKS|hooks]] if the root is on a USB drive, if you use RAID, LVM, or if {{ic|/usr}} is on a separate partition.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} as needed and re-generate the initramfs image with:<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Note|Arch VPS installations on QEMU (e.g. when using {{ic|virt-manager}}) may need {{ic|virtio}} modules in {{ic|mkinitcpio.conf}} to be able to boot.<br />
<br />
{{hc|# nano /etc/mkinitcpio.conf|2=<br />
MODULES="virtio virtio_blk virtio_pci virtio_net"}}}}<br />
<br />
=== Set the root password ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, two bootloaders are available: Syslinux and GRUB. Choose the bootloader as per your convenience.<br />
<br />
* Syslinux is (currently) limited to loading only files from the partition where it was installed. Its configuration file is considered to be easier to understand. An example configuration can be found [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 here].<br />
<br />
* GRUB is more feature-rich and supports more complex scenarios. Its configuration file(s) is more similar to a scripting language, which may be difficult for beginners to manually write. It is recommended that they automatically generate one.<br />
<br />
{{Note|Some BIOS systems may have issues with GPT. See http://mjg59.dreamwidth.org/8035.html and http://rodsbooks.com/gdisk/bios.html for more info and possible workarounds.}}<br />
<br />
===== Syslinux =====<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the bootloader ({{ic|-i}}), mark the partition ''active'' by setting the boot flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
{{Note|If you have partitioned the drive as GPT, install {{Pkg|gptfdisk}} package, as well ({{ic|pacman -S gptfdisk}}), because it contains {{ic|sgdisk}}, which will be used to set the GPT-specific boot flag.}}<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -i -a -m<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as in [[#Prepare the storage drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|2=<br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
===== GRUB =====<br />
<br />
Install the {{Pkg|grub-bios}} package and then run {{ic|grub-install}} to install the bootloader:<br />
<br />
{{Note|Change {{ic|/dev/sda}} to reflect the drive you installed Arch on. Do not append a partition number (do not use {{ic|sda''X''}}).}}<br />
<br />
{{Note|For GPT-partitioned drives on BIOS motherboards, GRUB needs a "[[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]]".}}<br />
<br />
# pacman -S grub-bios<br />
# grub-install --recheck /dev/sda<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
For UEFI boot, the drive needs to be GPT-partitioned and an "[[Unified Extensible Firmware Interface#EFI System Partition|UEFI System Partition]]" (512 MiB or larger, type {{ic|EF00}}, formatted with FAT32) must be present and mounted on {{ic|/boot/efi}}. If you have followed this guide from the beginning, you have already done all of these.<br />
<br />
While there are other [[UEFI Bootloaders|UEFI bootloaders]] available, using EFISTUB is recommended. Below are instructions for setting up EFISTUB and GRUB (of course you choose only one of them).<br />
<br />
{{Note|Syslinux does not yet support UEFI.}}<br />
<br />
===== EFISTUB =====<br />
<br />
The Linux kernel can act as its own bootloader using EFISTUB. This is the UEFI boot method recommended by developers and simpler compared to {{ic|grub-efi-x86_64}}. The steps below set up rEFInd to provide a menu for EFISTUB kernels, as well as for booting other UEFI bootloaders. Alternative EFISTUB boot managers can be found on the page [[UEFI Bootloaders#Booting EFISTUB]]. Both rEFInd and [[gummiboot]] can detect Windows UEFI bootloaders in case of dual-boot.<br />
<br />
1. Mount the UEFI System Partition on {{ic|/mnt/boot/efi}} and chroot back into {{ic|/mnt}}.<br />
<br />
2. [[UEFI Bootloaders#Setting up EFISTUB|Copy the kernel and initramfs files]] to {{ic|/mnt/boot/efi}}:<br />
<br />
# mkdir -p /boot/efi/EFI/arch/<br />
# cp /boot/vmlinu'''z'''-linux /boot/efi/EFI/arch/vmlinuz-arch'''.efi'''<br />
# cp /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
# cp /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
<br />
Every time the kernel and initramfs files are updated in {{ic|/boot}}, they need to be updated in {{ic|/boot/efi/EFI/arch}}. This can be automated [[UEFI Bootloaders#Systemd|using systemd]].<br />
<br />
3. For the rEFInd boot manager, install the {{Pkg|refind-efi}} and {{Pkg|efibootmgr}} packages:<br />
<br />
# pacman -S refind-efi efibootmgr<br />
<br />
4. Install rEFInd to the UEFI System Partition (summarized from [[UEFI Bootloaders#Using rEFInd]]):<br />
<br />
# mkdir -p /boot/efi/EFI/refind<br />
# cp /usr/lib/refind/refind_x64.efi /boot/efi/EFI/refind/refind_x64.efi<br />
# cp /usr/lib/refind/config/refind.conf /boot/efi/EFI/refind/refind.conf<br />
# cp -r /usr/share/refind/icons /boot/efi/EFI/refind/icons<br />
<br />
5. Create a {{ic|refind_linux.conf}} file with the kernel parameters to be used by rEFInd:<br />
<br />
{{hc|# nano /boot/efi/EFI/arch/refind_linux.conf|2=<br />
"Boot to X" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=graphical.target"<br />
"Boot to console" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=multi-user.target"}}<br />
<br />
{{Note|{{ic|refind_linux.conf}} is copied in the directory {{ic|/boot/efi/EFI/arch/}} where the initramfs and the kernel have been copied to in step 2.}}<br />
{{Note|In {{ic|refind_linux.conf}}, sdaX refers to your root file system, not your boot partition, if you created them separately.}}<br />
<br />
6. Add rEFInd to UEFI boot menu using [[UEFI#efibootmgr|efibootmgr]]. Replace X and Y with the drive and partition of the UEFI System Partition. For example, in {{ic|/dev/sdc5}}, X is "c" and Y is "5".<br />
<br />
{{Warning|Using {{ic|efibootmgr}} on Apple Macs may brick the firmware and may need reflash of the motherboard ROM. For Macs, use {{AUR|mactel-boot}}, or "bless" from within OS X.}}<br />
<br />
# efibootmgr -c -d /dev/sdX -p Y -w -L "rEFInd" -l '\EFI\refind\refind_x64.efi'<br />
<br />
{{Note|On some systems, the above command will not work properly. It will execute without any visible error, but the UEFI boot menu will not have been correctly updated with a new entry. To determine whether the command executed properly, run {{ic|efibootmgr}} without any arguments and see if a new entry has appeared in the list displayed. If there is no new entry, then it will not be possible to enter rEFInd upon reboot, as the UEFI boot menu has been left unchanged. In this case, you will instead have to enter the UEFI shell and manually add an entry to the UEFI boot menu with the {{ic|bcfg}} command, as described [[Unified Extensible Firmware Interface#bcfg|here]].}}<br />
<br />
===== GRUB =====<br />
<br />
Install the {{Pkg|grub-efi-x86_64}} and {{Pkg|efibootmgr}} packages and then run {{ic|grub-install}} to install the bootloader:<br />
<br />
{{Note|In case you have a system with 32-bit EFI, like pre-2008 Apple Macs, install {{ic|grub-efi-i386}} instead of {{ic|grub-efi-x86_64}}.}}<br />
<br />
# pacman -S grub-efi-x86_64 efibootmgr<br />
# grub-install --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Next, while using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
{{Note|{{ic|grub-install}} should create a new entry in the UEFI boot menu. If it does not, you will instead have to enter the UEFI shell and manually add an entry to the UEFI boot menu with the {{ic|bcfg}} command, as described [[Unified Extensible Firmware Interface#bcfg|here]].}}<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them:<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Reboot the computer:<br />
<br />
# reboot<br />
<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it.}}<noinclude><br />
{{Beginners' Guide navigation}}</noinclude></div>Gm5729https://wiki.archlinux.org/index.php?title=Beginners%27_guide&diff=261677Beginners' guide2013-06-07T15:54:21Z<p>Gm5729: /* Install the base and base-devel system */</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch]]<br />
[[Category:About Arch]]<br />
[[ar:Beginners' Guide/Installation]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ja:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pl:Beginners' Guide/Installation]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ro:Ghidul începătorilor/Instalare]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
[[zh-TW:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== Installation ==<br />
<br />
You are now presented with a shell prompt, automatically logged in as root.<br />
<br />
=== Change the language ===<br />
<br />
{{Tip|These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.}}<br />
<br />
By default, the keyboard layout is set to {{ic|us}}. If you have a non-[[Wikipedia:File:KB United States-NoAltGr.svg|US]] keyboard layout, run:<br />
<br />
# loadkeys ''layout''<br />
<br />
...where ''layout'' can be {{ic|fr}}, {{ic|uk}}, {{ic|dvorak}}, {{ic|be-latin1}}, etc. See [[KEYMAP#Keyboard layouts|here]] for a comprehensive list.<br />
<br />
The font should also be changed, because most languages use more glyphs than the 26 letter [[Wikipedia:English alphabet|English alphabet]]. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it ''exactly'' as you see it:<br />
<br />
# setfont Lat2-Terminus16<br />
<br />
By default, the language is set to English (US). If you would like to change the language for the install process ''(German, in this example)'', remove the {{ic|#}} in front of the [http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 locale] you want from {{ic|/etc/locale.gen}}, along with English (US). Please choose the {{ic|UTF-8}} entry.<br />
<br />
Use {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
# export LANG=de_DE.UTF-8<br />
<br />
Remember, {{Keypress|LAlt+LShift}} activates and deactivates the keymap.<br />
<br />
=== Establish an internet connection ===<br />
<br />
{{Warning|As of v197, udev no longer assigns network interface names according to the wlanX and ethX naming scheme. If you are coming from a different distribution or are reinstalling Arch and not aware of the new interface naming style, please do not assume that your wireless interface is named wlan0, or that your wired interface is named eth0. You can use the command {{ic|ip link}} to discover the names of your interfaces.}}<br />
<br />
The {{ic|dhcpcd}} network daemon starts automatically during boot and it will attempt to start a wired connection. Try to ping a server to see if a connection was established. For example, Google's DNS servers:<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, first check if there is an issue with your cable or wireless signal strength. If not, you will need to set up the network manually, as explained below. Once a connection is established move on to [[#Prepare the storage drive|Prepare the storage drive]].<br />
<br />
==== Wired ====<br />
<br />
Follow this procedure if you need to set up a wired connection via a static IP address.<br />
<br />
First, disable the dhcpcd service which was started automatically at boot:<br />
<br />
# systemctl stop dhcpcd.service<br />
<br />
Identify the name of your Ethernet interface.<br />
<br />
{{hc|# ip link|<br />
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT<br />
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br />
2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000<br />
link/ether 00:11:25:31:69:20 brd ff:ff:ff:ff:ff:ff<br />
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000<br />
link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff}}<br />
<br />
In this example, the Ethernet interface is {{ic|enp2s0f0}}. If you are unsure, your Ethernet interface is likely to start with the letter "e", and unlikely to be "lo" or start with the letter "w". You can also use {{ic|iwconfig}} and see which interfaces are not wireless:<br />
<br />
{{hc|# iwconfig|2=<br />
enp2s0f0 no wireless extensions.<br />
wlp3s0 IEEE 802.11bgn ESSID:"NETGEAR97"<br />
Mode:Managed Frequency:2.427 GHz Access Point: 2C:B0:5D:9C:72:BF<br />
Bit Rate=65 Mb/s Tx-Power=16 dBm<br />
Retry long limit:7 RTS thr:off Fragment thr:off<br />
Power Management:on<br />
Link Quality=61/70 Signal level=-49 dBm<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:430 Missed beacon:0<br />
lo no wireless extensions.}}<br />
<br />
In this example, neither {{ic|enp2s0f0}} nor the loopback device have wireless extensions, meaning {{ic|enp2s0f0}} is our Ethernet interface.<br />
<br />
You also need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you are on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface (e.g. {{ic|enp2s0f0}}):<br />
<br />
# ip link set enp2s0f0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add ''ip_address''/''subnetmask'' dev ''interface_name''<br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev enp2s0f0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via ''ip_address''<br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|Currently, you may include a maximum of three {{ic|nameserver}} lines.}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Network Configuration]] page.<br />
<br />
==== Wireless ====<br />
<br />
Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process.<br />
<br />
First, identify the name of your wireless interface.<br />
<br />
{{hc|# iw dev|2=<br />
phy#0<br />
Interface wlp3s0<br />
ifindex 3<br />
wdev 0x1<br />
addr 00:21:6a:5e:52:bc<br />
type managed<br />
}}<br />
<br />
In this example, {{ic|wlp3s0}} is the available wireless interface. If you are unsure, your wireless interface is likely to start with the letter "w", and unlikely to be "lo" or start with the letter "e". <br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
Bring the interface up with:<br />
<br />
# ip link set wlp3s0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If you get output like {{ic|SIOCSIFFLAGS: No such file or directory}}, this means you will need to manually load the firmware. If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset. For example, if you have an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
{{Tip|Use {{ic|iw dev wlp3s0 scan <nowiki>|</nowiki> grep SSID}} to scan for available networks.}}<br />
<br />
Next, use {{ic|wpa_supplicant}} to connect to a network:<br />
# wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase "''ssid''" "''psk''")<br />
<br />
You need to replace ''ssid'' with the name of your network (e.g. "Linksys etc...") and ''psk'' with your wireless password. Leave the quotes around the network name and password!<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
==== Analog modem, ISDN or PPoE DSL ====<br />
<br />
For xDSL, dial-up and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. See [[Proxy settings]] for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, and is [http://gparted.sourceforge.net/livecd.php provided as a "live" CD]. It is also included on live CDs of most Linux distributions such as [[Wikipedia:Ubuntu (operating system)|Ubuntu]] and [[Wikipedia:Linux Mint|Linux Mint]]. A drive should first be [[partitioning|partitioned]] and the partitions should be formatted with a [[File Systems|file system]] before rebooting.<br />
<br />
The recommendation for a system that will boot via UEFI rather than MBR legacy boot is to format the drive using a GPT partition table. This means that if the drive was previously already partitioned with an MBR (MSDOS) partition table it will now have a new partition table created which will destroy all other data on the drive. Once the new partition table has been created on a drive, only then can individual partitions be created with any chosen format type. When using Gparted, selecting the option to create a new partition table gives an "msdos" partition table by default. If you are intending to follow the advice to create a GPT partition table then you need to choose "Advanced" and then select "gpt" from the drop-down menu. This cannot be done if you have a pre-existing Windows installation on the drive which you wish not to destroy. It is therefore extremely important to not change the partition table to GPT if you intend on having a dual boot system. Leave the Windows install untouched and try to get the Linux install working with UEFI on a drive that contains an MBR (legacy) partition table. <br />
<br />
In addition, some newer computers come pre-installed with Windows 8 which will be using Secure Boot. Arch Linux currently does not support Secure Boot, but some Windows 8 installations have been seen not to boot if Secure Boot is turned off in the BIOS. In some cases it is necessary to turn off both Secure Boot as well as Fastboot in the BIOS options in order to allow Windows 8 to boot without Secure Boot. However there are potential security risks in turning off Secure Boot for booting up Windows 8. Therefore, it may be a better option to keep the Windows 8 install intact and have an independent hard drive for the Linux install - which can then be partitioned from scratch using a GPT partition table. Once that is done, creating several ext4/FAT32/swap partitions on the second drive may be a better way forward if the computer has two drives available. This is often not easy or possible on a small laptop. Currently, Secure Boot is still not in a fully stable state for reliable operation, even for Linux distributions that support it.<br />
<br />
See [[Swap]] for details if you wish to set up a swap partition or swap file. A swap file is easier to resize than a partition and can be created at any point after installation, but cannot be used with a Btrfs filesystem.<br />
<br />
If you have already done so, proceed to [[#Mount the partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools: {{ic|fdisk}}, {{ic|gdisk}}, {{ic|cfdisk}}, {{ic|cgdisk}}, {{ic|parted}}.<br />
<br />
{{Tip|Use the {{ic|lsblk}} command to list the hard disks attached to your system, along with the sizes of their existing partitions. This will help you to be confident you are partitioning the right disk.}}<br />
<br />
{{Box BLUE|Notes regarding [[UEFI]] boot:|<br />
* If you have a UEFI motherboard, you will need to create an extra [[Unified Extensible Firmware Interface#EFI_System_Partition|UEFI System Partition]].<br />
* It is recommended to always use GPT for UEFI boot, as some UEFI firmwares do not allow UEFI-MBR boot.}}<br />
<br />
{{Box BLUE|Notes regarding [[GPT]] partitioning:|<br />
* If you are not dual booting with Windows, then it is advisable to use GPT instead of MBR. Read [[GPT]] for a list of advantages.<br />
* If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned drive, you will need to create an extra [[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]] of size 1007 KiB and {{ic|EF02}} type code. Syslinux does not need one.<br />
* Some BIOS systems may have issues with GPT. See http://mjg59.dreamwidth.org/8035.html and http://rodsbooks.com/gdisk/bios.html for more info and possible workarounds.}}<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
The example system will contain a 15 GB root partition, and a [[Partitioning#/home|home]] partition for the remaining space. Choose either [[MBR]] or [[GPT]]. Do not choose both!<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
{| class="wikitable"<br />
|-<br />
| rowspan="2" | '''MBR'''<br />
| rowspan="2"| {{ic|cfdisk&nbsp;/dev/sda}}<br />
| '''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "15360" – {{Keypress|Enter}} for Beginning – {{Keypress|Enter}} for Bootable.<br />
|-<br />
|<br />
'''Home:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
|-<br />
| rowspan="2" | '''GPT'''<br />
| rowspan="2"| {{ic|cgdisk&nbsp;/dev/sda}}<br />
| '''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for the first sector (2048) – type in "15G" – {{Keypress|Enter}} for the default hex code (8300) – {{Keypress|Enter}} for a blank partition name.<br />
|-<br />
| '''Home:'''<br />
<br />
* Press the down arrow a couple of times to move to the larger free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for the first sector – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size; for example "30G") – {{Keypress|Enter}} for the default hex code (8300) – {{Keypress|Enter}} for a blank partition name.<br />
|}<br />
<br />
If you chose MBR, here is what it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15360<br />
sda2 Primary Linux 133000*<br />
<br />
If you chose GPT, here is what it should look like:<br />
<br />
Part. # Size Partition Type Partition Name<br />
----------------------------------------------------------------<br />
1007.0 KiB free space<br />
1 15.0 GiB Linux filesystem<br />
2 123.45 GiB Linux filesystem<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to exit without saving changes and then restart cfdisk (or cgdisk).<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
{{Warning|Double check and triple check that it is actually {{ic|/dev/sda1}} and {{ic|/dev/sda2}} that you want to format. You can use {{ic|lsblk}} to help with this.}}<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda2<br />
<br />
If you have made a partition dedicated to swap (code 82), do not forget to format and activate it with:<br />
<br />
# mkswap /dev/sda''X''<br />
# swapon /dev/sda''X''<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To display the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
{{Note|Do not mount more than one partition to the same directory. And pay attention, because the mounting order is important.}}<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example when using {{ic|cfdisk}} above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount the home partition and any other separate partition ({{ic|/boot}}, {{ic|/var}}, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda2 /mnt/home<br />
<br />
In case you have a UEFI motherboard, mount the UEFI partition:<br />
<br />
# mkdir -p /mnt/boot/efi<br />
# mount /dev/sda''X'' /mnt/boot/efi<br />
<br />
=== Select a mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it is worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
<nowiki>Server = http://mirror.example.xyz/archlinux/$repo/os/$arch</nowiki><br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
* {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it is usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|<br />
* Use the [https://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting mirrors|Sorting mirrors]] and [[Reflector]].<br />
* [https://archlinux.org/mirrors/status/ Arch Linux MirrorStatus] reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc.}}<br />
<br />
{{Note|<br />
* Whenever in the future you change your list of mirrors, always remember to force pacman to refresh all package lists with {{ic|pacman -Syy}}. This is considered to be good practice and will avoid possible headaches. See [[Mirrors]] for more information.<br />
* If you are using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described above.<br />
* Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent pacman from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id&#61;68944] and [https://bbs.archlinux.org/viewtopic.php?id&#61;65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default pacman file downloader with an alternative (see [[Improve Pacman Performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.}}<br />
<br />
=== Install the base and base-devel system ===<br />
<br />
The base and base-devel system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
The {{ic|-i}} switch can be omitted if you wish to install every package from the ''base'' ''base-devel'' group without prompting.<br />
<br />
# pacstrap -i /mnt base base-devel<br />
<br />
{{Note|If pacman fails to verify your packages, check the system time with {{ic|cal}}. If the system date is invalid (e.g. it shows the year 2010), signing keys will be considered expired (or invalid), signature checks on packages will fail and installation will be interrupted. Make sure to correct the system time, either by doing so manually or with the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
{{Note|If pacman complains that {{ic|error: failed to commit transaction (invalid or corrupted package)}}, run the following command:<br />
# pacman-key --init && pacman-key --populate archlinux<br />
}}<br />
<br />
This will give you a basic Arch system with GNU tools that may be necessary for other uses. Other packages can be installed later using [[pacman]].<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. UUIDs will be used because they have certain advantages (see [[fstab#Identifying filesystems]]). If you would prefer to use labels instead, replace the {{ic|-U}} option with {{ic|-L}}.<br />
<br />
# genfstab -U -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
{{Warning|The fstab file should always be checked after generating it. If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
A few considerations:<br />
<br />
* Only the root ({{ic|/}}) partition needs {{ic|1}} for the last field. Everything else should have either {{ic|2}} or {{ic|0}} (see [[fstab#Field definitions]]).<br />
<br />
=== Chroot and configure the base system ===<br />
<br />
Next, we [[chroot]] into our newly installed system:<br />
<br />
# arch-chroot /mnt<br />
<br />
{{Note|Use {{ic|arch-chroot /mnt /bin/bash}} to chroot into a bash shell.}}<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
Closely following and understanding these steps is of key importance to ensure a properly configured system.<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English (US), as long as you choose their {{ic|UTF-8}} encoding:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file does not exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
# echo LANG=en_US.UTF-8 > /etc/locale.conf<br />
# export LANG=en_US.UTF-8<br />
<br />
{{Note|If you set some other language than English (US) at the beginning of the install, the above commands would be something like:<br />
# echo LANG<nowiki>=</nowiki>de_DE.UTF-8 > /etc/locale.conf<br />
# export LANG<nowiki>=</nowiki>de_DE.UTF-8<br />
}}<br />
<br />
To use other locales for other {{ic|LC_*}} variables, run {{ic|locale}} to see the available options and add them to {{ic|locale.conf}}. It is not recommended to set the {{ic|LC_ALL}} variable. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
==== Console font and keymap ====<br />
<br />
If you set a keymap at [[#Change_the_language|the beginning]] of the install process, load it now, as well, because the environment has changed. For example:<br />
<br />
# loadkeys ''de-latin1''<br />
# setfont Lat2-Terminus16<br />
<br />
To make them available after reboot, edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=de-latin1<br />
FONT=Lat2-Terminus16<br />
}}<br />
<br />
* {{ic|KEYMAP}} – Please note that this setting is only valid for your TTYs, not any graphical window managers or Xorg.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe, but some foreign characters may show up as white squares or as other symbols. It is recommended that you change it to {{ic|Lat2-Terminus16}}, because according to {{ic|/usr/share/kbd/consolefonts/README.Lat2-Terminus16}}, it claims to support "about 110 language sets".<br />
<br />
* Possible option {{ic|FONT_MAP}} – Defines the console map to load at boot. Read {{ic|man setfont}}. Removing it or leaving it blank is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Time zone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
==== Hardware clock ====<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
To synchronize your "UTC" time over the internet, see [[Network Time Protocol daemon|NTPd]].<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC in Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and disable any time-related services, like [[Network Time Protocol daemon|NTPd]] . This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight saving time|DST]] kicks in. So please do not ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|This is just an example, you do not need to set it. All needed modules are automatically loaded by udev, so you will rarely need to add something here. Only add modules that you know are missing.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example are the [[VirtualBox#Arch Linux guests|VirtualBox Guest Additions]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Hostname ====<br />
<br />
Set the [[Wikipedia:hostname|hostname]] to your liking (e.g. ''arch''):<br />
<br />
# echo ''myhostname'' > /etc/hostname<br />
<br />
{{Note|There is no need to edit {{ic|/etc/hosts}}.}}<br />
<br />
=== Configure the network ===<br />
<br />
You need to configure the network again, but this time for your newly installed environment. The procedure and prerequisites are very similar to the one described [[#Establish an internet connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Network Configuration]] and [[Wireless Setup]].}}<br />
<br />
{{Note|If you would like to use the old interface naming scheme (ie. eth* and wlan*) you can accomplish this by creating an empty file at {{ic|/etc/udev/rules.d/80-net-name-slot.rules}} which will mask the file of the same name located under {{ic|/usr/lib/udev/rules.d}} (alternatively, instead of an empty file, using a symlink to {{ic|/dev/null}} is also an acceptable masking method).}}<br />
<br />
==== Wired ====<br />
<br />
===== Dynamic IP =====<br />
<br />
; Using dhcpcd<br />
<br />
If you only use a single fixed wired network connection, you do not need a network management service and can simply enable the {{ic|dhcpcd}} service. Here, {{ic|''interface_name''}} is your wired interface:<br />
<br />
# systemctl enable dhcpcd@''interface_name''.service<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-dhcp my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}):<br />
<br />
# nano my-network<br />
<br />
Enable the {{ic|my-network}} profile:<br />
<br />
# netctl enable my-network<br />
<br />
; Using netctl-ifplugd<br />
<br />
Alternatively, you can use {{ic|netctl-ifplugd}}, which gracefully handles dynamic connections to new networks:<br />
<br />
Install {{Pkg|ifplugd}}, which is required for {{ic|netctl-ifplugd}}:<br />
<br />
# pacman -S ifplugd<br />
<br />
Then enable for interface that you want:<br />
<br />
# systemctl enable netctl-ifplugd@<interface>.service<br />
<br />
{{Tip|[[Netctl]] also provides {{ic|netctl-auto}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-ifplugd}}.}}<br />
<br />
===== Static IP =====<br />
<br />
; Using netctl<br />
<br />
Copy a sample profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/ethernet-static my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|Address}}, {{ic|Gateway}} and {{ic|DNS}}):<br />
<br />
# nano my-network<br />
<br />
* Notice the {{ic|/24}} in {{ic|Address}} which is the [[wikipedia:Classless Inter-Domain Routing#CIDR notation|CIDR notation]] of a {{ic|255.255.255.0}} netmask<br />
<br />
Enable above created profile to start it at every boot:<br />
<br />
# netctl enable my-network<br />
<br />
==== Wireless ====<br />
<br />
{{Note|If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless Setup#Drivers and firmware|here]]), install the package containing your firmware. Most of the time, the {{Pkg|linux-firmware}} package will contain the needed firmware. Though for some devices, the required firmware might be in its own package. For example:<br />
{{bc|# pacman -S zd1211-firmware}}<br />
See [[Wireless Setup]] for more info.}}<br />
<br />
Install {{pkg|iw}}, {{pkg|wpa_supplicant}} and {{pkg|wpa_actiond}} which you will need to connect to a network:<br />
<br />
# pacman -S iw wpa_supplicant wpa_actiond<br />
<br />
===== Adding wireless networks =====<br />
; Using wifi-menu<br />
<br />
Install {{pkg|dialog}}, which is required for {{ic|wifi-menu}}:<br />
<br />
# pacman -S dialog<br />
<br />
After finishing the rest of this installation and rebooting, you can connect to the network with {{ic|wifi-menu ''interface_name''}} (where {{ic|''interface_name''}} is the interface of your wireless chipset).<br />
<br />
# wifi-menu ''interface_name''<br />
<br />
{{Warning|This must be done *after* your reboot when you are no longer chrooted. The process spawned by this command will conflict with the one you have running outside of the chroot. Alternatively, you could just configure a network profile manually using the following templates so that you do not have to worry about using {{ic|wifi-menu}} at all.}}<br />
<br />
; Using manual netctl profiles<br />
<br />
Copy a network profile from {{ic|/etc/netctl/examples}} to {{ic|/etc/netctl}}:<br />
<br />
# cd /etc/netctl<br />
# cp examples/wireless-wpa my-network<br />
<br />
Edit the profile as needed (modify {{ic|Interface}}, {{ic|ESSID}} and {{ic|Key}}):<br />
<br />
# nano my-network<br />
<br />
===== Connect automaticly to known networks =====<br />
Enable the {{ic|netctl-auto}} service, which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
# systemctl enable netctl-auto@''interface_name''.service<br />
<br />
{{Tip|[[Netctl]] also provides {{ic|netctl-ifplugd}}, which can be used to handle wired profiles in conjunction with {{ic|netctl-auto}}.}}<br />
<br />
==== Analog modem, ISDN or PPoE DSL ====<br />
<br />
For xDSL, dial-up and ISDN connections, see [[Direct Modem Connection]].<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
{{Tip|Most users can skip this step and use the defaults provided in {{ic|mkinitcpio.conf}}. The initramfs image (from the {{ic|/boot}} folder) has already been generated based on this file when the {{Pkg|linux}} package (the Linux kernel) was installed earlier with {{ic|pacstrap}}.}}<br />
<br />
Here you need to set the right [[Mkinitcpio#HOOKS|hooks]] if the root is on a USB drive, if you use RAID, LVM, or if {{ic|/usr}} is on a separate partition.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} as needed and re-generate the initramfs image with:<br />
<br />
# mkinitcpio -p linux<br />
<br />
{{Note|Arch VPS installations on QEMU (e.g. when using {{ic|virt-manager}}) may need {{ic|virtio}} modules in {{ic|mkinitcpio.conf}} to be able to boot.<br />
<br />
{{hc|# nano /etc/mkinitcpio.conf|2=<br />
MODULES="virtio virtio_blk virtio_pci virtio_net"}}}}<br />
<br />
=== Set the root password ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, two bootloaders are available: Syslinux and GRUB. Choose the bootloader as per your convenience.<br />
<br />
* Syslinux is (currently) limited to loading only files from the partition where it was installed. Its configuration file is considered to be easier to understand. An example configuration can be found [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 here].<br />
<br />
* GRUB is more feature-rich and supports more complex scenarios. Its configuration file(s) is more similar to a scripting language, which may be difficult for beginners to manually write. It is recommended that they automatically generate one.<br />
<br />
{{Note|Some BIOS systems may have issues with GPT. See http://mjg59.dreamwidth.org/8035.html and http://rodsbooks.com/gdisk/bios.html for more info and possible workarounds.}}<br />
<br />
===== Syslinux =====<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the bootloader ({{ic|-i}}), mark the partition ''active'' by setting the boot flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
{{Note|If you have partitioned the drive as GPT, install {{Pkg|gptfdisk}} package, as well ({{ic|pacman -S gptfdisk}}), because it contains {{ic|sgdisk}}, which will be used to set the GPT-specific boot flag.}}<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -i -a -m<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as in [[#Prepare the storage drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|2=<br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
===== GRUB =====<br />
<br />
Install the {{Pkg|grub-bios}} package and then run {{ic|grub-install}} to install the bootloader:<br />
<br />
{{Note|Change {{ic|/dev/sda}} to reflect the drive you installed Arch on. Do not append a partition number (do not use {{ic|sda''X''}}).}}<br />
<br />
{{Note|For GPT-partitioned drives on BIOS motherboards, GRUB needs a "[[GRUB#GUID Partition Table (GPT) specific instructions|BIOS Boot Partition]]".}}<br />
<br />
# pacman -S grub-bios<br />
# grub-install --recheck /dev/sda<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
For UEFI boot, the drive needs to be GPT-partitioned and an "[[Unified Extensible Firmware Interface#EFI System Partition|UEFI System Partition]]" (512 MiB or larger, type {{ic|EF00}}, formatted with FAT32) must be present and mounted on {{ic|/boot/efi}}. If you have followed this guide from the beginning, you have already done all of these.<br />
<br />
While there are other [[UEFI Bootloaders|UEFI bootloaders]] available, using EFISTUB is recommended. Below are instructions for setting up EFISTUB and GRUB (of course you choose only one of them).<br />
<br />
{{Note|Syslinux does not yet support UEFI.}}<br />
<br />
===== EFISTUB =====<br />
<br />
The Linux kernel can act as its own bootloader using EFISTUB. This is the UEFI boot method recommended by developers and simpler compared to {{ic|grub-efi-x86_64}}. The steps below set up rEFInd to provide a menu for EFISTUB kernels, as well as for booting other UEFI bootloaders. Alternative EFISTUB boot managers can be found on the page [[UEFI Bootloaders#Booting EFISTUB]]. Both rEFInd and [[gummiboot]] can detect Windows UEFI bootloaders in case of dual-boot.<br />
<br />
1. Mount the UEFI System Partition on {{ic|/mnt/boot/efi}} and chroot back into {{ic|/mnt}}.<br />
<br />
2. [[UEFI Bootloaders#Setting up EFISTUB|Copy the kernel and initramfs files]] to {{ic|/mnt/boot/efi}}:<br />
<br />
# mkdir -p /boot/efi/EFI/arch/<br />
# cp /boot/vmlinu'''z'''-linux /boot/efi/EFI/arch/vmlinuz-arch'''.efi'''<br />
# cp /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img<br />
# cp /boot/initramfs-linux-fallback.img /boot/efi/EFI/arch/initramfs-arch-fallback.img<br />
<br />
Every time the kernel and initramfs files are updated in {{ic|/boot}}, they need to be updated in {{ic|/boot/efi/EFI/arch}}. This can be automated [[UEFI Bootloaders#Systemd|using systemd]].<br />
<br />
3. For the rEFInd boot manager, install the {{Pkg|refind-efi}} and {{Pkg|efibootmgr}} packages:<br />
<br />
# pacman -S refind-efi efibootmgr<br />
<br />
4. Install rEFInd to the UEFI System Partition (summarized from [[UEFI Bootloaders#Using rEFInd]]):<br />
<br />
# mkdir -p /boot/efi/EFI/refind<br />
# cp /usr/lib/refind/refind_x64.efi /boot/efi/EFI/refind/refind_x64.efi<br />
# cp /usr/lib/refind/config/refind.conf /boot/efi/EFI/refind/refind.conf<br />
# cp -r /usr/share/refind/icons /boot/efi/EFI/refind/icons<br />
<br />
5. Create a {{ic|refind_linux.conf}} file with the kernel parameters to be used by rEFInd:<br />
<br />
{{hc|# nano /boot/efi/EFI/arch/refind_linux.conf|2=<br />
"Boot to X" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=graphical.target"<br />
"Boot to console" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=multi-user.target"}}<br />
<br />
{{Note|{{ic|refind_linux.conf}} is copied in the directory {{ic|/boot/efi/EFI/arch/}} where the initramfs and the kernel have been copied to in step 2.}}<br />
{{Note|In {{ic|refind_linux.conf}}, sdaX refers to your root file system, not your boot partition, if you created them separately.}}<br />
<br />
6. Add rEFInd to UEFI boot menu using [[UEFI#efibootmgr|efibootmgr]]. Replace X and Y with the drive and partition of the UEFI System Partition. For example, in {{ic|/dev/sdc5}}, X is "c" and Y is "5".<br />
<br />
{{Warning|Using {{ic|efibootmgr}} on Apple Macs may brick the firmware and may need reflash of the motherboard ROM. For Macs, use {{AUR|mactel-boot}}, or "bless" from within OS X.}}<br />
<br />
# efibootmgr -c -d /dev/sdX -p Y -w -L "rEFInd" -l '\EFI\refind\refind_x64.efi'<br />
<br />
{{Note|On some systems, the above command will not work properly. It will execute without any visible error, but the UEFI boot menu will not have been correctly updated with a new entry. To determine whether the command executed properly, run {{ic|efibootmgr}} without any arguments and see if a new entry has appeared in the list displayed. If there is no new entry, then it will not be possible to enter rEFInd upon reboot, as the UEFI boot menu has been left unchanged. In this case, you will instead have to enter the UEFI shell and manually add an entry to the UEFI boot menu with the {{ic|bcfg}} command, as described [[Unified Extensible Firmware Interface#bcfg|here]].}}<br />
<br />
===== GRUB =====<br />
<br />
Install the {{Pkg|grub-efi-x86_64}} and {{Pkg|efibootmgr}} packages and then run {{ic|grub-install}} to install the bootloader:<br />
<br />
{{Note|In case you have a system with 32-bit EFI, like pre-2008 Apple Macs, install {{ic|grub-efi-i386}} instead of {{ic|grub-efi-x86_64}}.}}<br />
<br />
# pacman -S grub-efi-x86_64 efibootmgr<br />
# grub-install --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Next, while using a manually created {{ic|grub.cfg}} is absolutely fine, it is recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
{{Note|{{ic|grub-install}} should create a new entry in the UEFI boot menu. If it does not, you will instead have to enter the UEFI shell and manually add an entry to the UEFI boot menu with the {{ic|bcfg}} command, as described [[Unified Extensible Firmware Interface#bcfg|here]].}}<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them:<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Reboot the computer:<br />
<br />
# reboot<br />
<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it.}}<noinclude><br />
{{Beginners' Guide navigation}}</noinclude></div>Gm5729https://wiki.archlinux.org/index.php?title=Arch_compared_to_other_distributions&diff=261670Arch compared to other distributions2013-06-07T15:33:47Z<p>Gm5729: /* Source-based */</p>
<hr />
<div>[[Category:About Arch]]<br />
[[cs:Arch Compared to Other Distributions]]<br />
[[da:Arch Compared to Other Distributions]]<br />
[[de:Arch vs. Distribution X]]<br />
[[el:Arch Compared to Other Distributions]]<br />
[[es:Arch Compared to Other Distributions]]<br />
[[fa:آرچ در مقایسه با سایر توزیعها]]<br />
[[fr:Arch vs autres distributions]]<br />
[[hu:Arch Compared to Other Distributions]]<br />
[[id:Arch Compared to Other Distributions]]<br />
[[it:Arch Compared to Other Distributions]]<br />
[[ja:Arch Compared to Other Distributions]]<br />
[[ko:Arch Compared to Other Distributions]]<br />
[[lt:Arch Compared to Other Distributions]]<br />
[[nl:Arch Compared to Other Distributions]]<br />
[[pl:Arch Compared to Other Distributions]]<br />
[[pt:Arch Compared to Other Distributions]]<br />
[[ro: Arch în comparație cu alte distribuții]]<br />
[[ru:Arch Compared to Other Distributions]]<br />
[[sk:Arch Compared to Other Distributions]]<br />
[[th:Arch Compared to Other Distributions]]<br />
[[tr:Arch_ile_diğer_dağıtımların_karşılaştırması]]<br />
[[uk:Arch Compared to Other Distributions]]<br />
[[zh-CN:Arch Compared to Other Distributions]]<br />
{{Article summary start}}<br />
{{Article summary text|A brief comparison of Arch Linux with other popular GNU/Linux distributions and BSDs.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Arch Linux}}<br />
{{Article summary wiki|The Arch Way}}<br />
{{Article summary heading|External links}}<br />
{{Article summary link|DistroWatch.com|http://distrowatch.com/}}<br />
{{Article summary end}}<br />
This page attempts to draw a comparison between Arch Linux and other popular GNU/Linux distributions and UNIX-like operating systems. The summaries that follow are brief descriptions that may help a person decide if Arch Linux will suit their needs. Although reviews and descriptions can be useful, first-hand experience is invariably the best way to compare distributions.<br />
<br />
== Source-based ==<br />
<br />
Source-based distributions are highly portable, giving the advantage of controlling and compiling the entire OS and applications for a particular machine architecture and usage scheme, with the disadvantage of the time-consuming nature of source compilation. The Arch base and all packages are compiled for i686 and x86-64 architectures, offering a potential performance boost over <br />
----<br />
i386/(Has not Linus deprecated i386 from the kernel now?)<br />
i486/i586 binary distributions, with the added advantage of expedient installation.<br />
<br />
=== Gentoo Linux ===<br />
<br />
Both Arch Linux and Gentoo Linux are rolling release systems, making packages available to the distribution a short time after they are released upstream. The Gentoo packages and base system are built directly from source code according to user-specified 'USE flags'. Arch provides a ports-like system for building packages from source, though the Arch base system is designed to be installed as pre-built i686/x86_64 binary. This generally makes Arch quicker to build and update, and allows Gentoo to be more systemically customizable. Arch supports i686 and x86_64 while Gentoo officially supports x86, PPC, SPARC, Alpha, AMD64, ARM, MIPS, HP/PA, S/390, sh, and Itanium architectures. Because both the Gentoo and Arch installations only include a base system, both are considered to be highly customizable. Gentoo users will generally feel quite comfortable with most aspects of Arch.<br />
<br />
=== Sorcerer/Lunar-Linux/Source Mage ===<br />
<br />
Sorcerer/Lunar-Linux/Source Mage (SLS) are all source-based distributions originally related to one another. SLS distributions use a rather simple set of script files to create package descriptions, and use a global configuration file to configure the compilation process, much like the [[Arch Build System]]. The SLS tools do full dependency checking, including handling optional features, package tracking, removal and upgrading. There are no binary packages for any of the SLS family, although they all provide the ability to roll back to earlier installed packages easily.<br />
<br />
The installation process involves configuring a simple base system from the shell and ncurses menus, then optionally recompiling the base system afterward. Like Arch, there is no default WM/DE/DM, and Xorg is not included in the base installation. Several X server alternatives are available (X.Org 6.8 or 7, XFree86).<br />
<br />
SLS has a very complicated history. Perhaps the best write-up about it can be found at [http://wiki.sourcemage.org/SourceMage/History the SourceMage wiki].<br />
<br />
== Minimalist ==<br />
<br />
The minimalist distributions are quite comparable to Arch, sharing several similarities. All are considered 'simple' from a technical standpoint.<br />
<br />
=== LFS ===<br />
<br />
LFS, (or Linux From Scratch) exists simply as documentation. The book instructs the user on obtaining the source code for a minimal base package set for a functional GNU/Linux system, and how to manually compile, patch and configure it from scratch. LFS is as minimal as it gets, and offers an excellent and educational process of building and customizing a base system. Arch provides these very same packages, plus [[systemd]], a few extra tools and the powerful [[pacman]] package manager as its base system, already compiled for i686/x86-64. LFS provides no online repositories; sources are manually obtained, compiled and installed with {{ic|make}}. (Several manual methods of package management exist, and are mentioned in LFS Hints). Along with the minimal Arch base system, the Arch community and developers provide and maintain many thousands of binary packages installable via pacman as well as [[PKGBUILD]] build scripts for use with the [[Arch Build System]]. Arch also includes the [[makepkg]] tool for expediently building or customizing {{ic|.pkg.tar.xz}} packages, readily installable by pacman. Judd Vinet built Arch from scratch, and then wrote pacman in C. Historically, Arch was sometimes humorously described simply as "Linux, with a nice package manager."<br />
<br />
=== CRUX ===<br />
<br />
Before creating Arch, Judd Vinet admired and used CRUX; a minimalist distribution created by Per Lidén. Originally inspired by ideas in common with CRUX and BSD, Arch was built from scratch, and [[pacman]] was then coded in C. Arch and CRUX share some guiding principles: for instance, both are architecture-optimized, minimalist and K.I.S.S.-oriented. Both ship with ports-like systems, and, like *BSD, both provide a minimal base environment to build upon. Arch features pacman, which handles binary system package management and works seamlessly with the [[Arch Build System]]. CRUX uses a community contributed system called prt-get, which, in combination with its own ports system, handles dependency resolution, but builds all packages from source (though the CRUX base installation is binary). Arch officially supports x86-64 and i686 only, whereas CRUX officially offers only x86_64.<br />
<br />
Arch uses a rolling-release system and features a large array of binary package repositories as well as the [[Arch User Repository]]. CRUX provides a more slimmed-down officially supported ports system in addition to a comparatively modest community repository.<br />
<br />
=== Slackware ===<br />
<br />
* Slackware and Arch are quite similar in that both are simple distributions focused on elegance and minimalism. <br />
<br />
* Slackware is famous for its lack of branding and completely vanilla packages, from the kernel up. Arch typically applies patching only to avoid severe breakage or to ensure packages will compile cleanly. <br />
<br />
* Slackware uses BSD-style init scripts, Arch uses [[systemd]]. <br />
<br />
* Arch supplies a package management system in [[pacman]] which, unlike Slackware's standard tools, offers automatic dependency resolution and allows for more automated system upgrades. Slackware users typically prefer their method of manual dependency resolution, citing the level of system control it grants them, as well as Slackware's excellent supply of pre-installed libraries and dependencies. <br />
<br />
* Arch is a rolling-release system. Slackware is seen as more conservative in its release cycle, preferring proven stable packages. Arch is more 'bleeding-edge' in this respect. <br />
<br />
* Arch Linux provides many thousands of binary packages within its official repositories whereas Slackware official repositories are more modest. <br />
<br />
* Arch offers the [[Arch Build System]], an actual ports-like system and also the [[AUR]], a very large collection of PKGBUILDs contributed by users. Slackware offers a similar, though slimmer system at [http://www.slackbuilds.org slackbuilds.org] which is a semi-official repository of Slackbuilds, which are analogous to Arch PKGBUILDs. Slackware users will generally be quite comfortable with most aspects of Arch.<br />
<br />
== General ==<br />
<br />
These distributions offer a broad range of advantages and strengths, and can be made to serve most operating system uses.<br />
<br />
=== Debian GNU/Linux ===<br />
<br />
* Debian is the largerst upstream linux distribution with a bigger community and features stable, testing, and unstable branches, offering over 30,000 high quality binary packages. The available number of Arch binary packages is more modest. However, when including the AUR, the quantities are very comparable. <br />
<br />
* Debian has a more vehement stance on free software but still includes non-free software in its non-free repos. Arch is more lenient, and therefore inclusive, concerning 'non-free' packages as defined by GNU, thereby leaving the choice to the users.<br />
<br />
* Debian's design approach focuses more on stability and stringent testing and focus based mostly on its famous "Debian social contract". Arch is focused more on the philosophy of simplicity, minimalism, and offering bleeding edge software. Arch packages are more current than Debian Stable and Testing, being more comparable to the Debian Unstable branch. <br />
<br />
* Both Debian and Arch offer well-regarded package management systems. <br />
<br />
* Arch is a rolling release, whereas Debian Stable is released with "frozen" packages. Debian unstable is rolling.<br />
<br />
* Debian is available for many architectures, including alpha, arm, hppa, i386, x86_64, ia64, m68k, mips, mipsel, powerpc, s390, and sparc, whereas Arch is officially i686 and x86_64, with community ports for arm (for Raspberry Pi for example) only. <br />
<br />
* Arch provides more expedient support for building custom, installable packages from outside sources, with a ports-like package build system. Debian does not offer a ports system, relying instead on its huge binary repositories.<br />
<br />
* The Arch installation system only offers a minimal base, transparently exposed during system configuration, whereas Debian's methods offer a more automatically configured approach as well as several alternative methods of installation. <br />
<br />
* Debian utilizes the SysVinit by default even though systemd and upstart are available for users to configure, whereas Arch uses [[systemd]] by default for overall better performance. <br />
<br />
* Arch keeps patching to a minimum, thus avoiding problems that upstream are unable to review, whereas Debian patches its packages more liberally for a wider audience.<br />
<br />
=== Fedora ===<br />
<br />
* Fedora is community developed, yet corporately backed by Red Hat; it is often presented as a bleeding edge testbed release system; Fedora packages and projects migrate to RHEL and some eventually become adopted by other distributions. Arch too is generally considered bleeding edge, although it is a rolling-release and does not serve as a testing branch for another distribution.<br />
<br />
* Fedora packages are RPM format, using the YUM package manager, and official graphical package tools are also available. Arch uses [[pacman]] to manage tar.xz packages and does not officially support a graphical frontend.<br />
<br />
* Fedora refuses to include MP3 media support and other non-free software in official repositories due to its dedication to free software, though third-party repositories are available for such packages. Arch is more lenient in its disposition toward MP3 and non-free software, leaving the discernment to the user.<br />
<br />
* Fedora offers many installation options including a graphical installer as well as a minimal option. Fedora "spins" also provide alternative assortments of desktop environments to choose from, each with a modest assortment of default packages. Arch, on the other hand, only provides a few scripts meant to ease the process of a minimal base system install.<br />
<br />
* Fedora has a scheduled release cycle, but officially supports discrete version upgrades with the FedUp tool. Arch is a rolling-release system.<br />
<br />
* '''The Arch Way''' focuses on simplicity, lightweight elegance and empowering the user, whereas '''Fedora Core Values''' focus on free software, community development and bleeding edge systemic innovation.<br />
<br />
* Arch features a ports system, whereas Fedora does not.<br />
<br />
* '''Both Arch and Fedora are targeted at experienced users and developers.''' Both strongly encourage their users to contribute to project development.<br />
<br />
* Fedora has earned much community recognition for integration of SELinux, GCJ compiled packages (to remove the need for Sun's JRE), and prolific upstream contribution; Red Hat and thus, Fedora developers by extension, contribute the highest percentage of Linux kernel code as compared to any other project.<br />
<br />
* Arch Linux provides what is widely regarded as the most thorough and comprehensive distribution wiki. The Fedora wiki is used in the original sense of the word "wiki", or a way to exchange information between developers, testers and users rapidly. It is not meant to be an end-user knowledge base like Arch's. Fedora's wiki resembles an issue tracker or a corporate wiki.<br />
<br />
=== Frugalware ===<br />
<br />
* Arch is command-line oriented. <br />
<br />
* Frugalware does not support the JFS filesystem by default. <br />
<br />
* Both Arch and Frugalware are promoted as i686 optimized. <br />
<br />
* Arch can be installed as a minimal environment first and later expanded with pacman according to the user's choices and needs. Frugalware is installed from a DVD, with default software choices and desktop environment chosen for the user already.<br />
<br />
* Frugalware has a scheduled release cycle. Again, Arch is more focused on simplicity, minimalism, code-correctness and bleeding edge packages within a rolling-release model.<br />
<br />
== Beginner-friendly ==<br />
<br />
Sometimes called "newbie distros", the beginner-friendly distributions share a lot of similarities, though Arch is quite different from them. Arch may be a better choice if you want to learn about GNU/Linux by building up from a very minimal base, as an installation of Arch installs very few packages in comparison. Specific differences between distributions are described below.<br />
<br />
=== Ubuntu ===<br />
<br />
* Ubuntu is an immensely popular Debian-based distribution commercially sponsored by Canonical Ltd., while Arch is an independently developed system built from scratch.<br />
<br />
* Both projects have very different goals and are targeted at a different user base. Arch is designed for users who desire a do-it-yourself approach, whereas Ubuntu provides an autoconfigured system which is meant to be more user-friendly. Arch is presented as a much more minimalist design from the base installation onward, relying heavily on the user to customize it to their own specific needs. In general, developers and tinkerers will probably like Arch better than Ubuntu, though many Arch users have started on Ubuntu and eventually migrated to Arch.<br />
<br />
* Current Ubuntu development and promotion seem to be heavily embracing the touch screen device market, whereas Arch development is more generally focused on a user-centric model which empowers its community to create customized solutions to be developed collaboratively.<br />
<br />
* Ubuntu moves between discrete releases every 6 months, whereas Arch is a rolling-release system with a new snapshot issued every month.<br />
<br />
* Arch offers a ports-like package build system, while Ubuntu does not.<br />
<br />
* The two communities differ in some ways as well. The Arch community is much smaller and is strongly encouraged to contribute to the distribution. In contrast, the Ubuntu community is relatively large and can therefore tolerate a much larger percentage of users who do not actively contribute to development, packaging, or repository maintenance.<br />
<br />
=== Mandriva ===<br />
<br />
Mandriva Linux (formerly Mandrake Linux) was created in 1998 with the goal of making GNU/Linux easy to use for everyone. It is RPM-based and uses the urpmi package manager. Again, Arch takes a simpler approach, being text-based and relying on more manual configuration and is aimed at intermediate to advanced users.<br />
<br />
=== openSUSE ===<br />
<br />
openSUSE is centered around the RPM package format and its well-regarded YaST2 GUI-driven configuration tool, which is a one-stop shop for most users' system configuration needs, including package management. Arch does not offer such a facility as it goes against [[The Arch Way]]. openSUSE, therefore, is widely regarded as more appropriate for less-experienced users, or those who want a more GUI-driven environment, auto-configuration and expected functionality out of the box.<br />
<br />
=== PCLinuxOS ===<br />
<br />
* PCLinuxOS is a popular Mandriva-based distribution providing a complete DE, designed for user-friendliness and is described as "simple", though its definition of simple is quite different than the Arch definition. Arch is designed as a simple base system to be customized from the ground up and is aimed more toward advanced users.<br />
<br />
* PCLOS uses the apt package manager as a wrapper for RPM packages. Arch uses its own independently-developed [[pacman]] package manager with {{ic|.pkg.tar.xz}} packages. <br />
<br />
* PCLOS is very GUI-driven, provides GUI hardware configuration tools and the Synaptic package management front-end, and claims to have little or no reliance on the shell. Arch is command-line oriented and designed for more simple approaches to system configuration, management and maintenance.<br />
<br />
* PCLOS recommends 256&nbsp;MB RAM as part of its minimum system requirements. Being more lightweight, Arch can run on systems with much less system memory, requiring only 64&nbsp;MB of RAM for a base i686 install, and will run flawlessly on more modern systems.<br />
<br />
== The *BSDs ==<br />
<br />
<nowiki>*</nowiki>BSDs share a common origin and descend directly from the work done at UC Berkeley to produce a freely redistributable, free of cost, {{ic|UNIX}} system. They are not GNU/Linux distributions, but rather, {{ic|UNIX}}-like operating systems. Therefore, although Arch and the *BSDs share the concept of a tightly-integrated base and ports system, along with a similar init framework, they are absolutely not related from a code standpoint, except for perhaps {{ic|vi}}, as Arch's {{ic|vi}} is the original BSD {{ic|vi}} (most *BSDs do not use the original BSD {{ic|vi}} anymore). *BSDs were derived from the original AT&T {{ic|UNIX}} code and have a true {{ic|UNIX}} heritage. To learn more about the *BSD variants, visit the vendor's site.<br />
<br />
=== FreeBSD ===<br />
<br />
* Both Arch and [http://www.freebsd.org/about.html FreeBSD] offer software which can be obtained using binaries or compiled using 'ports' systems. <br />
<br />
* Like other *BSDs, the FreeBSD base is developed fundamentally as a system designed as a whole, with each application 'ported' over to FreeBSD and made sure to work in the process. In contrast, GNU/Linux distributions such as Arch exist as amalgams combined from many separate sources. <br />
<br />
* The FreeBSD license is generally more protective of the ''coder'', in contrast to the GPL, which favors protection of the ''code'' itself. Arch is released under the GPL. <br />
<br />
* In FreeBSD, like Arch, decisions are delegated to you, the power user. This may be the most interesting comparison to Arch since it goes head-to-head in package modernity and has a somewhat sizable, smart, active, no-nonsense community. <br />
<br />
* Both systems share many similarities and FreeBSD users will generally feel quite comfortable with most aspects of Arch.<br />
<br />
=== NetBSD ===<br />
<br />
* NetBSD is a free, secure, and highly portable {{ic|UNIX}}-like open-source operating system available for over 50 platforms, from 64-bit Opteron machines and desktop systems to hand-held and embedded devices. Its clean design and advanced features make it excellent in both production and research environments, and it is user-supported with complete source. Many applications are easily available through pkgsrc, the NetBSD Packages Collection. <br />
<br />
* Arch may not operate on the vast number of devices NetBSD operates on, but for an i686 system it may offer more applications. <br />
<br />
* NetBSD's pkgsrc provides a source based method of installation similar to Arch's ABS; however binary packages are also available using pkg_tools. <br />
<br />
* Arch does share similarities with NetBSD: both require manual configuration, they are minimalist and lightweight, both offer ports systems as well as binaries and both have active, no-nonsense developers and communities.<br />
<br />
=== OpenBSD ===<br />
<br />
The OpenBSD project produces a free, multi-platform 4.4BSD-based {{ic|UNIX}}-like operating system.<br />
<br />
* OpenBSD focuses on portability, standardization, code correctness, proactive security, and integrated cryptography. In contrast, Arch focuses more on simplicity, elegance, minimalism and bleeding edge software. OpenBSD is self-described as ''"perhaps the #1 security OS"''.<br />
<br />
* Both Arch and OpenBSD offer a small, elegant, base install.<br />
<br />
* Both offer a ports and packaging system to allow for easy installation and management of programs which are not part of the base operating system.<br />
<br />
* In contrast to a GNU/Linux system like Arch, but in common with most other BSD-based operating systems, the OpenBSD kernel and userland programs, such as the shell and common tools (like {{ic|ls}}, {{ic|cp}}, {{ic|cat}} and {{ic|ps}}), are developed together in a single source repository.</div>Gm5729