Difference between pages "Install/ru/Partitioning" and "Subarches"

< Install(Difference between pages)
(Введение)
 
 
Line 1: Line 1:
<noinclude>
+
= Download/Browse Funtoo Linux Subarches =
{{InstallPart|процесс разбиения диска и создания файловых систем}}
+
__NOTITLE__
</noinclude>
+
This page provides an overview of Funtoo Linux sub-architectures (also called ''subarches'') designed for quick and easy reference. Funtoo Linux provides optimized installation images for all sub-architectures listed below. Clicking on a particular subarch will bring you to a detail page where you can learn more about that subarch and download a stage3 for installation.
=== Подготовка жесткого диска ===
+
 
+
В этой части  мы научимся различным способам установки Funtoo Linux -- и загрузки с -- жесткого диска.
+
 
+
==== Введение ====
+
 
+
В прежние времена существовал лишь один способ загрузить PC-совместимый компьютер. Все наши дектопы и сервера имели стандартный PC BIOS, все наши харды использовали MBR и были разбиты используя схему разбивки MBR.  Вот как это все было и нам это нравилось!
+
 
+
Затем появились EFI и UEFI,  встроенные программы нового образца наряду со схемой разбивки GPT, поддерживающая диски размером более 2.2TБ. Неожиданно, нам стали доступны различные способы установки и загрузки Линукс систем . То, что было единым методом, стало чем-то более сложным.
+
 
+
Воспользуемся моментом и рассмотрим доступные способы конфигурации жесткого диска для загрузки Funtoo Linux. Данное Руководство рекомендует способ "по-старинке" , загрузка BIOS и использование MBR.  Данный способ работает (за исключением редких случаев) и всесторонне поддерживается. И в этом нет ничего плохого. Если Ваш жесткий диск 2TБ или меньшего размера это не является препятствием для использования всего дискового пространства.
+
 
+
Но, бывают ситуации когда метод "по-старинке"  не является оптимальным. Если Ваш жесткий диск размером более 2TБ , MBR разбивка не сможет обеспечить доступ ко всему дисковому пространству.  Это одна из причин.  Вторая причина: существуют  "PC" системы, которые более не поддерживают  BIOS загрузку  и  форсируют UEFI загрузку. Из чувства сострадания к тем, кто попал в затруднение перед выбором, это Руководство также описывает установку и загрузку UEFI систем.
+
 
+
Мы всё же рекомендуем разбивку "по-старинке". Загрузчик, который мы используем для загрузки Линукс в этом руководстве называется GRUB,  таки образом мы называем метод '''BIOS + GRUB (MBR)''' . Это традиционный способ установки на PC-совместимые компьютеры.
+
 
+
If you need to use UEFI to boot, we recommend not using the MBR at all for booting, as some systems support this, but others don't. Instead, we recommend using UEFI to boot GRUB, which in turn will load Linux. We refer to this method as the '''UEFI + GRUB (GPT)''' method.
+
 
+
And yes, there are even more methods, some of which are documented on the [[Boot Methods]] page. We used to recommend a '''BIOS + GRUB (GPT)''' method but it is not consistently supported across a wide variety of hardware.
+
 
+
'''The big question is -- which boot method should you use?''' Here's how to tell.
+
 
+
;Principle 1 - Old School: If you can reliably boot System Rescue CD and it shows you an initial light blue menu, you are booting the CD using the BIOS, and it's likely that you can thus boot Funtoo Linux using the BIOS. So, go old-school and use BIOS booting, ''unless'' you have some reason to use UEFI, such as having a >2.2TB system disk. In that case, see Principle 2, as your system may also support UEFI booting.
+
 
+
;Principle 2 - New School: If you can reliably boot System Rescue CD and it shows you an initial black and white menu -- congratulations, your system is configured to support UEFI booting. This means that you are ready to install Funtoo Linux to boot via UEFI. Your system may still support BIOS booting, but just be trying UEFI first. You can poke around in your BIOS boot configuration and play with this.
+
 
+
;What's the Big Difference between Old School and New School?: Here's the deal. If you go with old-school MBR partitions, your <code>/boot</code> partition will be an ext2 filesystem, and you'll use <code>fdisk</code> to create your MBR partitions. If you go with new-school GPT partitions and UEFI booting, your <code>/boot</code> partition will be a vfat filesystem, because this is what UEFI is able to read, and you will use <code>gdisk</code> to create your GPT partitions. And you'll install GRUB a bit differently. That's about all it comes down to, in case you were curious.
+
 
+
;Also Note: To install Funtoo Linux to boot via the New School UEFI method, you must boot System Rescue CD using UEFI -- and see an initial black and white screen. Otherwise, UEFI will not be active and you will not be able to set it up!
+
 
+
{{Note|'''Some motherboards may appear to support UEFI, but don't.''' Do your research. For example, the Award BIOS in my Gigabyte GA-990FXA-UD7 rev 1.1 has an option to enable UEFI boot for CD/DVD. '''This is not sufficient for enabling UEFI boot for hard drives and installing Funtoo Linux.''' UEFI must be supported for both removable media (so you can boot System Rescue CD using UEFI) as well as fixed media (so you can boot your new Funtoo Linux installation.) It turns out that later revisions of this board (rev 3.0) have a new BIOS that fully supports UEFI boot.  This may point to a third principle -- know thy hardware.}}
+
 
+
==== Old-School (BIOS/MBR) Method ====
+
 
+
{{Note|Use this method if you are booting using your BIOS, and if your System Rescue CD initial boot menu was light blue. If you're going to use the new-school method, [[#New-School (UEFI/GPT) Method|click here to jump down to UEFI/GPT.]]}}
+
 
+
===== Preparation =====
+
 
+
First, it's a good idea to make sure that you've found the correct hard disk to partition. Try this command and verify that <code>/dev/sda</code> is the disk that you want to partition:
+
  
 +
{{#widget:AddThis}}
 +
{{Note|The cpuid application can be used to help identify your processor and its microarchitecture.
 
<console>
 
<console>
# ##i##fdisk -l /dev/sda
+
###i## emerge cpuid; cpuid | tail -n 1
 +
</console>}}
  
Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors
+
== ARM ==
Units = sectors of 1 * 512 = 512 bytes
+
Sector size (logical/physical): 512 bytes / 512 bytes
+
I/O size (minimum/optimal): 512 bytes / 512 bytes
+
Disk label type: gpt
+
  
 +
{{TableStart}}
 +
<tr><th class="warn" colspan="3">32-bit ARM Processors</th></tr>
 +
{{#ask:[[CPU Family::32-bit ARM Processors]]
 +
|?#
 +
|?Subarch
 +
|?CFLAGS
 +
|?Description
 +
|format=template
 +
|link=none
 +
|headers=hide
 +
|searchlabel=... further results
 +
|sep=,
 +
|template=SubarchList
 +
}}
 +
{{TableEnd}}
  
#        Start          End    Size  Type            Name
+
== PC-Compatible ==
1        2048  1250263694  596.2G  Linux filesyste Linux filesystem
+
</console>
+
  
Now, it's recommended that you erase any existing MBR or GPT partition tables on the disk, which could confuse the system's BIOS at boot time. We do this using <code>sgdisk</code>:
+
{{TableStart}}
{{fancywarning|This will make any existing partitions inaccessible! You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}
+
<tr><th class="warn" colspan="3">64-bit AMD Processors</th></tr>
 
+
{{#ask:[[CPU Family::64-bit AMD Processors]]
<console>
+
|?#
# ##i##sgdisk --zap-all /dev/sda
+
|?Subarch
 
+
|?CFLAGS
Creating new GPT entries.
+
|?Description
GPT data structures destroyed! You may now partition the disk using fdisk or
+
|format=template
other utilities.
+
|link=none
</console>
+
|headers=hide
 
+
|searchlabel=... further results
This output is also nothing to worry about, as the command still succeded:
+
|sep=,
 
+
|template=SubarchList
<console>
+
}}
***************************************************************
+
<tr><th class="warn" colspan="3">64-bit Intel Processors</th></tr>
Found invalid GPT and valid MBR; converting MBR to GPT format
+
{{#ask:[[CPU Family::64-bit Intel Processors]]
in memory.
+
|?#
***************************************************************
+
|?Subarch
</console>
+
|?CFLAGS
 
+
|?Description
===== Partitioning =====
+
|format=template
 
+
|link=none
Now we will use <code>fdisk</code> to create the MBR partition table and partitions:
+
|headers=hide
 
+
|searchlabel=... further results
<console>
+
|sep=,
# ##i##fdisk /dev/sda
+
|template=SubarchList
</console>
+
 
+
Within <code>fdisk</code>, follow these steps:
+
 
+
'''Empty the partition table''':
+
 
+
<console>
+
Command (m for help): ##i##o ↵
+
</console>
+
 
+
'''Create Partition 1''' (boot):
+
 
+
<console>
+
Command (m for help): ##i##n ↵
+
Partition type (default p): ##i##↵
+
Partition number (1-4, default 1): ##i##↵
+
First sector: ##i##
+
Last sector: ##i##+128M ↵
+
</console>
+
 
+
'''Create Partition 2''' (swap):
+
 
+
<console>
+
Command (m for help): ##i##n ↵
+
Partition type (default p): ##i##↵
+
Partition number (2-4, default 2): ##i##↵
+
First sector: ##i##↵
+
Last sector: ##i##+2G ↵
+
Command (m for help): ##i##t ↵
+
Partition number (1,2, default 2): ##i## ↵
+
Hex code (type L to list all codes): ##i##82 ↵
+
</console>
+
 
+
'''Create the root partition:'''
+
 
+
<console>
+
Command (m for help): ##i##n ↵
+
Partition type (default p): ##i##↵
+
Partition number (3,4, default 3): ##i##↵
+
First sector: ##i##↵
+
Last sector: ##i##↵
+
</console>
+
 
+
'''Verify the partition table:'''
+
 
+
<console>
+
Command (m for help): ##i##p
+
 
+
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
+
Units: sectors of 1 * 512 = 512 bytes
+
Sector size (logical/physical): 512 bytes / 512 bytes
+
I/O size (minimum/optimal): 512 bytes / 512 bytes
+
Disklabel type: dos
+
Disk identifier: 0x82abc9a6
+
 
+
Device    Boot    Start      End    Blocks  Id System
+
/dev/sda1          2048    264191    131072  83 Linux
+
/dev/sda2        264192  4458495  2097152  82 Linux swap / Solaris
+
/dev/sda3        4458496 625142447 310341976  83 Linux
+
</console>
+
 
+
'''Write the parition table to disk:'''
+
 
+
<console>
+
Command (m for help): ##i##w
+
</console>
+
 
+
Your new MBR partition table will now be written to your system disk.
+
 
+
{{Note|You're done with partitioning! Now, jump over to [[#Creating filesystems|Creating filesystems]].}}
+
 
+
==== New-School (UEFI/GPT) Method ====
+
 
+
{{Note|Use this method if you are booting using UEFI, and if your System Rescue CD initial boot menu was black and white. If it was light blue, this method will not work.}}
+
 
+
The <tt>gdisk</tt> commands to create a GPT partition table are as follows. Adapt sizes as necessary, although these defaults will work for most users. Start <code>gdisk</code>:
+
 
+
<console>
+
# ##i##gdisk
+
</console>
+
 
+
Within <tt>gdisk</tt>, follow these steps:
+
 
+
'''Create a new empty partition table''' (This ''will'' erase all data on the disk when saved):
+
 
+
<console>
+
Command: ##i##o ↵
+
This option deletes all partitions and creates a new protective MBR.
+
Proceed? (Y/N): ##i##y ↵
+
</console>
+
 
+
'''Create Partition 1''' (boot):
+
 
+
<console>
+
Command: ##i##n ↵
+
Partition Number: ##i##1 ↵
+
First sector: ##i##↵
+
Last sector: ##i##+500M ↵
+
Hex Code: ##i##↵
+
</console>
+
 
+
'''Create Partition 2''' (swap):
+
 
+
<console>
+
Command: ##i##n ↵
+
Partition Number: ##i##2 ↵
+
First sector: ##i##↵
+
Last sector: ##i##+4G ↵
+
Hex Code: ##i##8200 ↵
+
</console>
+
 
+
'''Create Partition 3''' (root):
+
 
+
<console>
+
Command: ##i##n ↵
+
Partition Number: ##i##3 ↵
+
First sector: ##i##↵
+
Last sector: ##i##↵##!i## (for rest of disk)
+
Hex Code: ##i##↵
+
</console>
+
 
+
Along the way, you can type "<tt>p</tt>" and hit Enter to view your current partition table. If you make a mistake, you can type "<tt>d</tt>" to delete an existing partition that you created. When you are satisfied with your partition setup, type "<tt>w</tt>" to write your configuration to disk:
+
 
+
'''Write Partition Table To Disk''':
+
 
+
<console>
+
Command: ##i##w ↵
+
Do you want to proceed? (Y/N): ##i##Y ↵
+
</console>
+
 
+
The partition table will now be written to disk and <tt>gdisk</tt> will close.
+
 
+
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:
+
 
+
* <tt>/dev/sda1</tt>, which will be used to hold the <tt>/boot</tt> filesystem,
+
* <tt>/dev/sda2</tt>, which will be used for swap space, and
+
* <tt>/dev/sda3</tt>, which will hold your root filesystem.
+
 
+
==== Creating filesystems ====
+
 
+
{{Note|This section covers both BIOS ''and'' UEFI installs. Don't skip it!}}
+
 
+
Before your newly-created partitions can be used, the block devices need to be initialized with filesystem ''metadata''. This process is known as ''creating a filesystem'' on the block devices. After filesystems are created on the block devices, they can be mounted and used to store files.
+
 
+
Let's keep this simple. Are you using old-school MBR partitions? If so, let's create an ext2 filesystem on /dev/sda1:
+
 
+
<console>
+
# ##i##mkfs.ext2 /dev/sda1
+
</console>
+
 
+
If you're using new-school GPT partitions for UEFI, you'll want to create a vfat filesystem on /dev/sda1, because this is what UEFI is able to read:
+
 
+
<console>
+
# ##i##mkfs.vfat -F 32 /dev/sda1
+
</console>
+
 
+
Now, let's create a swap partition. This partition will be used as disk-based virtual memory for your Funtoo Linux system.
+
 
+
You will not create a filesystem on your swap partition, since it is not used to store files. But it is necessary to initialize it using the <code>mkswap</code> command. Then we'll run the <code>swapon</code> command to make your newly-initialized swap space immediately active within the live CD environment, in case it is needed during the rest of the install process:
+
 
+
<console>
+
# ##i##mkswap /dev/sda2
+
# ##i##swapon /dev/sda2
+
</console>
+
 
+
Now, we need to create a root filesystem. This is where Funtoo Linux will live. We generally recommend ext4 or XFS root filesystems. If you're not sure, choose ext4. Here's how to create a root ext4 filesystem:
+
 
+
<console>
+
# ##i##mkfs.ext4 /dev/sda3
+
</console>
+
 
+
...and here's how to create an XFS root filesystem, if you choose to use XFS:
+
 
+
<console>
+
# ##i##mkfs.xfs /dev/sda3
+
</console>
+
 
+
Your filesystems (and swap) have all now been initialized, so that that can be mounted (attached to your existing directory heirarchy) and used to store files. We are ready to begin installing Funtoo Linux on these brand-new filesystems.
+
 
+
{{fancywarning|1=
+
When deploying an OpenVZ host, please use ext4 exclusively. The Parallels development team tests extensively with ext4, and modern versions of <code>openvz-rhel6-stable</code> are '''not''' compatible with XFS, and you may experience kernel bugs.
+
 
}}
 
}}
 
+
<tr><th class="warn" colspan="3">64-bit PC-Compatible (Generic) Processors</th></tr>
==== Mounting filesystems ====
+
{{#ask:[[CPU Family::64-bit Processors (PC-Compatible, Generic)]]
 
+
|?#
Mount the newly-created filesystems as follows, creating <code>/mnt/funtoo</code> as the installation mount point:
+
|?Subarch
 
+
|?CFLAGS
<console>
+
|?Description
# ##i##mkdir /mnt/funtoo
+
|format=template
# ##i##mount /dev/sda3 /mnt/funtoo
+
|link=none
# ##i##mkdir /mnt/funtoo/boot
+
|headers=hide
# ##i##mount /dev/sda1 /mnt/funtoo/boot
+
|searchlabel=... further results
</console>
+
|sep=,
 
+
|template=SubarchList
Optionally, if you have a separate filesystem for <code>/home</code> or anything else:
+
}}
 
+
<tr><th class="warn" colspan="3">32-bit AMD Processors</th></tr>
<console>
+
{{#ask:[[CPU Family::32-bit AMD Processors]]
# ##i##mkdir /mnt/funtoo/home
+
|?#
# ##i##mount /dev/sda4 /mnt/funtoo/home
+
|?Subarch
</console>
+
|?CFLAGS
 
+
|?Description
If you have <code>/tmp</code> or <code>/var/tmp</code> on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:
+
|format=template
 
+
|link=none
<console>
+
|headers=hide
# ##i##chmod 1777 /mnt/funtoo/tmp
+
|searchlabel=... further results
</console>
+
|sep=,
 +
|template=SubarchList
 +
}}
 +
<tr><th class="warn" colspan="3">32-bit Intel Processors</th></tr>
 +
{{#ask:[[CPU Family::32-bit Intel Processors]]
 +
|?#
 +
|?Subarch
 +
|?CFLAGS
 +
|?Description
 +
|format=template
 +
|link=none
 +
|headers=hide
 +
|searchlabel=... further results
 +
|sep=,
 +
|template=SubarchList
 +
}}
 +
<tr><th class="warn" colspan="3">32-bit PC-Compatible (Generic) Processors</th></tr>
 +
{{#ask:[[CPU Family::32-bit Processors (PC-Compatible, Generic)]]
 +
|?#
 +
|?Subarch
 +
|?CFLAGS
 +
|?Description
 +
|format=template
 +
|link=none
 +
|headers=hide
 +
|searchlabel=... further results
 +
|sep=,
 +
|template=SubarchList
 +
}}
 +
{{TableEnd}}

Revision as of 07:16, January 6, 2015

Download/Browse Funtoo Linux Subarches

This page provides an overview of Funtoo Linux sub-architectures (also called subarches) designed for quick and easy reference. Funtoo Linux provides optimized installation images for all sub-architectures listed below. Clicking on a particular subarch will bring you to a detail page where you can learn more about that subarch and download a stage3 for installation.

Note

The cpuid application can be used to help identify your processor and its microarchitecture.

# emerge cpuid; cpuid | tail -n 1

ARM

32-bit ARM Processors
armv7a_hardfpThis subarch supports the ARMv7-A architecture with hardware floating point. CPU support includes Cortex-A5 (with hardware FPU), Cortex-A7, A8, A9, A12, A15, A17, and Qualcomm Krait and other ARMv7-A CPUs.-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard
armv5teThis subarch supports the ARMv5 architecture with vector extensions, which is compatible with Pogoplug, SheevaPlug, TonidoPlug, Raspberry Pi, BeagleBoard, CuBox, PandaBoard, and TrimSlice.-O2 -pipe -march=armv5te
armv6j_hardfpThis subarch supports the ARM11 series processors, including compatible CPUs such as the Broadcom BCM2835 (Raspberry Pi).-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard

PC-Compatible

64-bit AMD Processors
amd64-bulldozerThe amd64-bulldozer subarch supports the AMD bulldozer microarchitecture CPUs, which were released from late 2011 through the first quarter of 2012 as a replacement for K10 microarchitecture CPUs.-march=bdver1 -O2 -pipe
amd64-jaguarAMD jaguar microarchitecture debuted in mid-2013 and is targeted at low-power devices, including notebooks, tablets and small form-factor desktops and servers. It is perhaps most well-known for being the microarchitecture used for the Playstation 4 and Xbox One,-march=btver2 -O2 -pipe
amd64-k10The amd64-k10 subarch provides support for the AMD Family 10h processors, which were released in late 2007 as a successor to the AMD K8 series processors.-march=amdfam10 -O2 -pipe
amd64-piledriverThe amd64-piledriver subarch supports the AMD Piledriver microarchitecture produced by AMD from mid-2012 through 2015, which is the successor to the AMD bulldozer microarchitecture.-march=bdver2 -O2 -pipe
amd64-steamrollerThe amd64-steamroller subarch supports the AMD steamroller microarchitecture, produced from early 2014. It is the successor to the AMD Piledriver microarchitecture.-march=bdver3 -O2 -pipe
64-bit Intel Processors
atom_64The atom_64 sub-architecture supports 64-bit capable Intel Atom CPUs.-O2 -fomit-frame-pointer -march=atom -pipe
core2_64The core2_64 subarch supports 64-bit-capable processors based on the Core microarchitecture and all processors of the Penryn microarchitecture. This includes all Intel Core 2 branded processors, some Celeron, some Pentium and some Xeon branded processors.-march=core2 -O2 -pipe
corei7The corei7 subarch supports the Nehalem, Westmere, Sandy Bridge, Ivy Bridge, and Haswell microarchitecture-based Intel Pentium/Celeron, Intel Core i3, i5, i7 and Xeon Processors.-march=corei7 -O2 -pipe
intel64-haswellThe intel64-haswell subarch specifically supports processors based on Intel's Haswell microarchitecture. Haswell desktop processors are branded as 4th Generation Intel Core i3, Core i5, and Core i7 Processors.-march=core-avx2 -O2 -pipe
intel64-ivybridgeThe intel64-ivybridge subarch specifically supports processors based on Intel's Ivy Bridge microarchitecture and AVX instructions. These processors are branded as 3rd Generation Intel Core i3, Core i5, and Core i7 Processors.-march=core-avx-i -O2 -pipe
64-bit PC-Compatible (Generic) Processors
generic_64The generic_64 subarch is designed to support 64-bit PC-compatible CPUs, such as the AMD K8-series processors, which were introduced in late 2003.-mtune=generic -O2 -pipe
32-bit AMD Processors
athlon-xpThis subarch supports 32-bit AMD Athlon XP processors.-O2 -fomit-frame-pointer -march=athlon-xp -pipe
32-bit Intel Processors
atom_32This subarch supports 32-bit Intel Atom processors.-O2 -fomit-frame-pointer -march=atom -pipe
pentium4This subarch supports 32-bit Intel Pentium 4 processors.-O2 -fomit-frame-pointer -march=pentium4 -pipe
32-bit PC-Compatible (Generic) Processors
generic_32This subarch supports generic 32-bit PC-compatible processors.-mtune=generic -O2 -fomit-frame-pointer -pipe
i686This subarch supports P6-class (Intel Pentium Pro instruction set) processors.-O2 -march=i686 -mtune=generic -pipe