Difference between pages "GUID Booting Guide" and "GNOME First Steps"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
{{Article
=== What is GNOME? ===
|Keywords=GPT, GUID, UEFI, EFI, Linux, Funtoo, Gentoo
 
|Article Category=General
"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." — [http://gnome.org GNOME]
|Author=Drobbins
 
=== Prerequisites ===
 
==== From a Clean Install ====
 
Ensure that the [[X Window System]] is installed.
 
=== Preparing to emerge ===
 
To get your system ready to emerge gnome, first set your system flavor to desktop, and enable the gnome profile mix-in. To accomplish this, do the following:
{{console|recipe=setup,setup-light|desc=Set profile|body=
# ##i##eselect profile set-flavor funtoo/1.0/linux-gnu/flavor/desktop
# ##i##eselect profile add funtoo/1.0/linux-gnu/mix-ins/gnome
}}
}}
== Introduction ==


GPT, which stands for GUID Partition Table, is a disk partitioning scheme that was introduced by Intel for Itanium architecture systems, as part of EFI, the Extensible Firmware Interface. While you are probably not using an Itanium architecture computer, and you are likely using a BIOS-based rather than an EFI-based system, you still may want to use GPT partitioning. Why? Because the standard MBR-based partitioning scheme only supports system disks that are less than 2TiB in size. On modern systems, especially systems with hardware RAID logical volumes, it is very easy to go beyond the 2TiB limit. GUID partition tables support disks that are larger than 2TiB in size.
By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.
 
=== Emerging ===
 
You are provided with two packages that will pull in this desktop environment:
 
* ''gnome''
 
{{fancynote|This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.}}
 
* ''gnome-light''
 
{{fancynote|As the name implies, this pulls in the base minimal you need to get a functioning GNOME Desktop Environment.}}
 
==== GNOME 3.14 from a clean install ====
 
===== gnome =====
 
To emerge ''gnome'' run the following command
 
{{console|desc=Emerging GNOME|body=
# ##i## emerge gnome
}}


=== GPT Technology Overview ===
===== gnome-light =====


This section contains a technical overview of GPT technology.
To emerge ''gnome-light'' run the following command


GUID partition tables support up to 512 partitions. GPT data structures are stored in the first sectors of the drive with a secondary copy stored at the end of the drive. This allows the partitioning scheme of your disk to be recovered in situations where the primary partition table has been corrupted.
{{console|recipe=setup-light|desc=Emerging a minimal GNOME environment (alternative)|body=
# ##i## emerge gnome-light
}}


For compatibility with legacy partitioning tools, GPT partitioning tools typically rewrite the MBR partition table (generally located in the first sector of the disk) in a way those tools will interpret it like ''"This disk has only one partition (of an unknown type) covering the whole disk".''
==== Upgrading from GNOME 3.12 ====


It is possible to convert an existing MBR-partitioned disk to GPT format using the <tt>gdisk</tt> command. Please carefully read the <tt>gdisk</tt> man page before using this capability, as it is potentially dangerous, particularly if you are performing it on your boot disk.
To update either ''gnome'' or ''gnome-light'' run the following command:


{{ important|Funtoo Linux fully supports GPT on x86-32bit and x86-64-bit systems.
{{console|body=
# ##i## emerge -vauDN world
}}
}}
=== Subsystems ===
==== Bluetooth ====
For bluetooth support, ensure that:
# Bluetooth support is enabled in your kernel (using modules is fine).
# Your bluetooth hardware is turned on.
# Add the <code>bluetooth</code> startup script to the default runlevel, and start it.
This can be done as follows:


=== Booting GPT ===
<console>
# ##i##rc-update add bluetooth default
# ##i##rc
</console>


If you decide to use a GPT-based partitioning scheme for your system disk, either out of necessity due to a 2TiB+ disk, or because you want to try GPT out, then the question arises -- how do you get the darn thing to boot? This is where the new <tt>GRUB</tt> boot loader comes in. The new {{c|GRUB}} (version 2.0, found at <tt>sys-boot/grub</tt>) is a redesign of the original {{c|GRUB}} (version 0.9x, now called {{c|sys-boot/grub-legacy}} in Funtoo) boot-loader that includes very mature support for booting from GPT-based disks.
Once this is done, you should now be able to navigate to ''Settings'' -> ''Bluetooth'' and turn bluetooth on. The icon next to devices should now animate and you should be able to discover and add devices such as keyboards.


Now, let's take a look at how to get GPT-based booting working under Funtoo Linux.
{{Note|1=
Additional kernel drivers may need to be enabled for certain input devices. For example, for the bluetooth Apple Magic Trackpad, the following option must be enabled in your kernel:


== Getting Started ==
{{kernelop|title=Device Drivers,HID support,HID bus support,Special HID drivers|desc=
<M> Apple Magic Mouse/Trackpad multi-touch support
}}}}


The first thing you'll need to do is to use a LiveCD. I recommend [http://www.sysresccd.org/Main_Page System Rescue CD] for this task as it is Gentoo-based and includes all the proper tools. Go ahead and boot the LiveCD, and then get to the point where you are ready to partition your system disk.
==== Printing ====


At this point, you have two choices as to what partitioning tool to use. You can use either <tt>gdisk</tt> or <tt>parted</tt>. <tt>gdisk</tt> is a very nice <tt>fdisk</tt>-like partitioning tool that supports GPT partitioning. It is rather new software but seems to work quite well. The other tool you can use, GNU <tt>parted</tt>, has been around for a while and is more mature, but is harder to use.
To enable printing support, add <code>cupsd</code> to the default runlevel:


We'll take a look at how to create partitions using <tt>gdisk</tt>. Alternatively, <code>cgdisk</code>, curses-based gdisk for users familiar with cfdisk or <code>sgdisk</code>, command-line tool can be used for creating and managing GPT partitions.
<console>
# ##i##rc-update add cupsd default
# ##i##rc
</console>


== Partitioning Using Gdisk ==
You should now be able to navigate to ''Settings'' -> ''Printers'' and add printers to your system, and print.


OK, the first step is using <tt>gdisk</tt> is to start it up, specifying the disk you want to modify:
==== Scanning ====


{{console|body=# ##i##gdisk /dev/sda}}
To enable scanning support, add your user account to the <code>lp</code> group. This will allow your user to access the USB scanner.
You should find <tt>gdisk</tt> very familiar to <tt>fdisk</tt>. Here is the partition table we want to end up with:


{{console|body=Command (? for help): ##i##p
Then, <code>emerge xsane</code>, and run it. It should be able to access your scanner.
Disk /dev/sda: 312581808 sectors, 149.1 GiB
Disk identifier (GUID): 17
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 312581774
Total free space is 0 sectors (0 bytes)


Number  Start (sector)    End (sector)  Size      Code  Name
=== Finishing Touches ===
  1              34          204833  100.0 MiB  0700  Linux/Windows data
  2          204834          270369  512.0 kiB  EF02  BIOS boot partition
  3          270370        1318945  512.0 MiB  8200  Linux swap
  4        1318946      312581774  148.4 GiB  0700  Linux/Windows data


Command (? for help): }}
==== X ====


Above, you'll see that we have a 100 MiB boot partition, a 512 kiB &quot;BIOS boot partition&quot;, 512 MiB of swap, and the remaining disk used by a 148.4 GiB root partition.
===== Setting up xdm (GUI log-in) =====
 
Typically, you will want to use <code>gdm</code>, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.
 
To enable gdm, edit <code>/etc/conf.d/xdm</code> and set <code>DISPLAYMANAGER</code> to <code>gdm</code> instead of <code>xdm</code>. Then, perform the following steps to add <code>xdm</code> to the default runlevel, and have it start automatically from now on when your system starts:
 
{{Note|Funtoo's <code>/etc/init.d/xdm</code> initscript has been modified to start the requisite services <code>dbus</code>, <code>openrc-settingsd</code> and <code>consolekit</code> prior to starting <code>gdm</code>.}}
 
{{console|recipe=setup|desc=Enable the GNOME display manager|body=
# ##i## rc-update add xdm default
}}
 
Then, if you want to start it now do:
 
{{console|body=
# ##i##rc
}}


The one new thing here is the &quot;BIOS boot partition.&quot; What is it? In GRUB-speak, this BIOS boot partition is basically the location of the meat of GRUB's boot loading code - the quivalent of the <tt>stage1_5</tt> and <tt>stage2</tt> files in legacy GRUB. Since GPT-based partition tables have less &quot;bonus&quot; space than their MBR equivalents, and explicit partition of code <tt>EF02</tt> is required to hold the guts of the boot loader.
But you should reboot to avoid having an open login terminal.


In all other respects, the partition table is similar to that of an MBR-based disk. We have a boot and root partition with code <tt>0700</tt>, and a Linux swap partition with code <tt>8200</tt>. One this partition table has been written to disk and appropriate <tt>mkfs</tt> and <tt>mkswap</tt> commands are issued, <tt>/dev/sda1</tt> will be used to hold <tt>/boot</tt>, <tt>/dev/sda2</tt> will be used by the new GRUB directly, <tt>/dev/sda3</tt> will house our swap and <tt>/dev/sda4</tt> will hold our root filesystem.
===== Setting up xinitrc (text log-in) =====


Go ahead and create filesystems on these partitions, and then mount the root and boot filesystems to <tt>/mnt/gentoo</tt> and <tt>/mnt/gentoo/boot</tt> respectively. Now go ahead and unpack a stage3 tarball to <tt>/mnt/gentoo</tt> and chroot in as you normally do.
Adding the following to your <code>~/.xinitrc</code> file is sufficient:


== Configuring The Kernel ==
<pre>
# Fix Missing Applications in Gnome
export XDG_MENU_PREFIX=gnome-


Your kernel will need a couple of extra GPT-related options enabled in order for it to make sense of your GPT partitions and find your filesystems.
# Properly Launch the Desired X Session
exec ck-launch-session gnome-session
</pre>


{{kernelop|title=Enable the block layer,Partition Types|desc=
Additionaly, if you need support for different input sources, there is no longer a need to configure IBus or SCIM in your <code>.xinitrc</code> file as GNOME uses IBus natively. Simply configure it in the Control Center under Region & Language.
[*] Advanced Partition Selection (PARTITION_ADVANCED)
[*] EFI GUID Partition Support (EFI_PARTITION)
}}


If you are using a non-Funtoo distribution then you may need to append a proper <tt>rootfstype=</tt> option to your kernel boot options to allow Linux to properly mount the root filesystem when <tt>Advanced Partition Selection</tt> is enabled. [[Boot-Update]] does this for you automatically.
=== Automatically Starting Applications at Login ===


Now just go ahead and compile and install your kernel, and copy it to <tt>/boot/bzImage</tt>.
When using an old-fashioned <code>.xinitrc</code>, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the <code>~/.xprofile</code> file. Here's my sample <code>.xprofile</code> to start <code>xflux</code> to dim the screen at night:


== Booting The System ==
<pre>
xflux -z 87107
</pre>


To get the system booted, you will want to first edit <tt>/etc/fstab</tt> inside the chroot so that it reflects the partitions and filesystems you just created. For Funtoo Linux systems, this is done by emerging {{c|boot-update}}, which is the universal boot loader configurator for Funtoo Linux.
{{Note|Remember to add a <code>&</code> at the end of any command that doesn't return to the shell prompt after running.}}


{{console|body=# ##i##emerge boot-update}}
=== games ===
Gnome has several games that can be added on to your install.  By default most games are not included in gnome's emerge.


[[Boot-Update]] is a front-end for the GRUB 1.9x boot loader and provides a necessary simplified configuration interface. <tt>boot-update</tt> is used to generate boot loader configuration files. But before we get to <tt>boot-update</tt>, we first need to install GRUB to your hard disk. This is done as follows:
Users wishing to play games need to be added to the games group:
{{console|body=###i## gpasswd -a $USER games}}


{{console|body=# ##i##grub-install /dev/sda}}
game list:
<tt>grub-install</tt> will detect and use <tt>/dev/sda2</tt> and use it to store its boot loader logic.
;gnome-sudoku
;gnome-mastermind
;gnome-nibbles
;gnome-robots
;gnome-chess
;gnome-hearts
;gnome-mahjongg
;gnome-mines
;gnome-klotski
;gnome-tetravex


Now it's time to create an <tt>/etc/boot.conf</tt> file. For more information on all available options, consult the [[Boot-Update]] guide -- I'll show you a sample configuration for the sample GPT partition scheme above:
game system emulators:


<pre>boot {
;gnomeboyadvance
        generate grub
;gnome-mud
        default bzImage
}


&quot;Funtoo Linux&quot; {
=== Significant Known Issues (Workarounds Available) ===
        kernel bzImage
}</pre>
Once <tt>/etc/boot.conf</tt> has been created, then type:


{{console|body=# ##i##boot-update}}
[https://bugs.funtoo.org/browse/FL-1678 FL-1678]: Bluetooth interface gives wrong pairing key
This will auto-generate a <tt>/boot/grub/grub.cfg</tt> file for you, and you will now be able to reboot into Funtoo Linux using a GPT partitioning scheme.


For more information on all the options available for <tt>/etc/boot.conf</tt>, please consult the [[Boot-Update]] guide.
[https://bugs.funtoo.org/browse/FL-1687 FL-1687]: Wallpaper corruption when resuming from suspend


[[Category:Articles]]
[[Category:Desktop]]
{{ArticleFooter}}
[[Category:First Steps]]
[[Category:Official Documentation]]

Revision as of 17:45, February 22, 2015

What is GNOME?

"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." — GNOME

Prerequisites

From a Clean Install

Ensure that the X Window System is installed.

Preparing to emerge

To get your system ready to emerge gnome, first set your system flavor to desktop, and enable the gnome profile mix-in. To accomplish this, do the following:

root # eselect profile set-flavor funtoo/1.0/linux-gnu/flavor/desktop
root # eselect profile add funtoo/1.0/linux-gnu/mix-ins/gnome

Console: Set profile

By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.

Emerging

You are provided with two packages that will pull in this desktop environment:

  • gnome
   Note

This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.

  • gnome-light
   Note

As the name implies, this pulls in the base minimal you need to get a functioning GNOME Desktop Environment.

GNOME 3.14 from a clean install

gnome

To emerge gnome run the following command

root #  emerge gnome

Console: Emerging GNOME

gnome-light

To emerge gnome-light run the following command

root #  emerge gnome-light

Console: Emerging a minimal GNOME environment (alternative)

Upgrading from GNOME 3.12

To update either gnome or gnome-light run the following command:

root #  emerge -vauDN world

Subsystems

Bluetooth

For bluetooth support, ensure that:

  1. Bluetooth support is enabled in your kernel (using modules is fine).
  2. Your bluetooth hardware is turned on.
  3. Add the bluetooth startup script to the default runlevel, and start it.

This can be done as follows:

root # rc-update add bluetooth default
root # rc

Once this is done, you should now be able to navigate to Settings -> Bluetooth and turn bluetooth on. The icon next to devices should now animate and you should be able to discover and add devices such as keyboards.

   Note

Additional kernel drivers may need to be enabled for certain input devices. For example, for the bluetooth Apple Magic Trackpad, the following option must be enabled in your kernel:

Under Device Drivers-->HID support-->HID bus support-->Special HID drivers:

<M> Apple Magic Mouse/Trackpad multi-touch support

Printing

To enable printing support, add cupsd to the default runlevel:

root # rc-update add cupsd default
root # rc

You should now be able to navigate to Settings -> Printers and add printers to your system, and print.

Scanning

To enable scanning support, add your user account to the lp group. This will allow your user to access the USB scanner.

Then, emerge xsane, and run it. It should be able to access your scanner.

Finishing Touches

X

Setting up xdm (GUI log-in)

Typically, you will want to use gdm, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.

To enable gdm, edit /etc/conf.d/xdm and set DISPLAYMANAGER to gdm instead of xdm. Then, perform the following steps to add xdm to the default runlevel, and have it start automatically from now on when your system starts:

   Note

Funtoo's /etc/init.d/xdm initscript has been modified to start the requisite services dbus, openrc-settingsd and consolekit prior to starting gdm.

root #  rc-update add xdm default

Console: Enable the GNOME display manager

Then, if you want to start it now do:

root # rc

But you should reboot to avoid having an open login terminal.

Setting up xinitrc (text log-in)

Adding the following to your ~/.xinitrc file is sufficient:

# Fix Missing Applications in Gnome
export XDG_MENU_PREFIX=gnome-

# Properly Launch the Desired X Session
exec ck-launch-session gnome-session

Additionaly, if you need support for different input sources, there is no longer a need to configure IBus or SCIM in your .xinitrc file as GNOME uses IBus natively. Simply configure it in the Control Center under Region & Language.

Automatically Starting Applications at Login

When using an old-fashioned .xinitrc, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the ~/.xprofile file. Here's my sample .xprofile to start xflux to dim the screen at night:

xflux -z 87107
   Note

Remember to add a & at the end of any command that doesn't return to the shell prompt after running.

games

Gnome has several games that can be added on to your install. By default most games are not included in gnome's emerge.

Users wishing to play games need to be added to the games group:

root # gpasswd -a $USER games

game list:

gnome-sudoku
gnome-mastermind
gnome-nibbles
gnome-robots
gnome-chess
gnome-hearts
gnome-mahjongg
gnome-mines
gnome-klotski
gnome-tetravex

game system emulators:

gnomeboyadvance
gnome-mud

Significant Known Issues (Workarounds Available)

FL-1678: Bluetooth interface gives wrong pairing key

FL-1687: Wallpaper corruption when resuming from suspend