Handbook:PPC/Installation/Bootloader/hu

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Handbook:PPC/Installation/Bootloader and the translation is 100% complete.
PPC kézikönyv
A Gentoo Linux telepítése
A telepítésről
Telepítőképfájl kiválasztása
Hálózat beállítása
Adathordozók előkészítése
Stage fájl
Alaprendszer telepítése
Kernel beállítása
Rendszer beállítása
Eszközök telepítése
Bootloader beállítása
Telepítés véglegesítése
Munka a Gentoo rendszerrel
Portage bemutatása
USE jelölőzászlók
Portage jellemzői
Init-szkript rendszer
Környezeti változók
Munka a Portage szoftvercsomag-kezelővel
Fájlok és könyvtárak
Változók
Szoftverágak keverése
További eszközök
Egyéni szoftvercsomag-tárolóhely
Fejlett funkciók
Hálózat beállítása OpenRC init-rendszeren
Munka elkezdése
Fejlett beállítások
Moduláris hálózat
Vezeték nélküli (Wi-Fi)
Funkcionalitás hozzáadása
Dinamikus menedzsment



Bootloader opciók

Now that the kernel is configured and compiled and the necessary system configuration files are filled in correctly, it is time to install a program that will fire up the kernel when the system is started. Such a program is called a boot loader.

The boot loader to use depends upon the type of PPC machine.

For a NewWorld Apple or IBM machine, grub needs to be selected. OldWorld Apple machines havs one option: BootX. The Pegasos does not require a boot loader, but it is necessary to emerge bootcreator to create SmartFirmware boot menus.

NewWorld Macs

GRUB

Installation

root #emerge --ask sys-boot/grub

Setup bootstrap partition

First, prepare the bootstrap partition that was created created during the preparing the disk step. Following the example, this partition should be /dev/sda2. Optionally, confirm this by using parted:

Replace /dev/sda with the correct device if required.

root #parted /dev/sda print

In this output, partition 2 has the bootstrap information so /dev/sda2 is the correct path to use.

Format this partition as HFS using the hformat command which is part of the sys-fs/hfsutils package:

root #dd if=/dev/zero of=/dev/sda2 bs=512
root #hformat -l bootstrap /dev/sda2

Create a directory to mount the bootstrap partition and then mount it:

root #mkdir /boot/NWBB
root #mount --types hfs /dev/sda2 /boot/NWBB

Setup GRUB

root #grub-install --macppc-directory=/boot/NWBB /dev/sda2

If it installs without errors, unmount the bootstrap:

root #umount /boot/NWBB

Next, bless the partition so it will boot:

root #hmount /dev/sda2
root #hattrib -t tbxi -c UNIX :System:Library:CoreServices:BootX
root #hattrib -b :System:Library:CoreServices
root #humount

Finally, build the grub.cfg file:

root #grub-mkconfig -o /boot/grub/grub.cfg

OldWorld Macs

BootX

Important
BootX can only be used on OldWorld Apple systems with MacOS classic 7 to 9. For machines under 32MB of RAM use MacOS classic 7.

Since BootX boots Linux from within MacOS, the kernel will need to be copied from the Linux Partition to the MacOS partition. First, mount the MacOS partition from outside of the chroot. Use mac-fdisk -l to find the MacOS partition number, sda6 is used as an example here. Once the partition is mounted, we'll copy the kernel to the system folder so BootX can find it.

root #exit
cdimage ~#mkdir /mnt/mac
cdimage ~#mount /dev/sda6 /mnt/mac -t hfs
cdimage ~#cp /mnt/gentoo/usr/src/linux/vmlinux "/mnt/mac/System Folder/Linux Kernels/kernel-6.6.21-gentoo"

Now that the kernel is copied over, we'll need to reboot to set up BootX.

cdimage ~#cd /
cdimage ~#umount -l /mnt/gentoo/dev{/pts,/shm,}
cdimage ~#umount -l /mnt/gentoo{/proc,/sys,}
cdimage ~#umount -l /mnt/mac
cdimage ~#reboot

Of course, don't forget to remove the bootable CD, otherwise the CD will be booted again instead of MacOS.

Once the machine has booted into MacOS, open the BootX control panel. When not using genkernel, select Options and uncheck Use specified RAM disk. If genkernel is used, ensure that the genkernel initrd is selected instead of the Installation CD initrd. If not using genkernel, there is now an option to specify the machine's Linux root disk and partition. Fill these in with the appropriate values. Depending upon the kernel configuration, additional boot arguments may need to be applied.

BootX can be configured to start Linux upon boot. If this is done, then the machine will boot into MacOS first and, during startup, BootX will load and start Linux. See the BootX home page for more information.

Important
Make sure to include support for the HFS and HFS+ filesystems in the kernel, otherwise upgrades or changes to the kernel on the MacOS partition will not be possible.

Pegasos

Note
Pegasos also has Grub support but this is currently undocumented in Gentoo. Please add this to the main wiki and notify on this page's discussion once ready to migrated here.

BootCreator

Important
BootCreator will build a nice SmartFirmware bootmenu written in Forth for the Pegasos.

Először győződjön meg arról, hogy a bootcreator telepítve van a rendszeren:

root #emerge --ask sys-boot/bootcreator

Now copy the file /etc/bootmenu.example into /etc/bootmenu/ and edit it to suit personal needs:

root #cp /etc/bootmenu.example /etc/bootmenu
root #nano -w /etc/bootmenu

Below is a complete /etc/bootmenu config file. vmlinux and initrd should be replaced by the kernel and initrd image names.

FILE /etc/bootmenuExample bootcreator configuration file
#
# Example description file for bootcreator 1.1
#
  
[VERSION]
1
  
[TITLE]
Boot Menu
  
[SETTINGS]
AbortOnKey = false
Timeout    = 9
Default    = 1
  
[SECTION]
Local HD -> Morphos      (Normal)
ide:0 boot2.img ramdebug edebugflags="logkprintf"
  
[SECTION]
Local HD -> Linux (Normal)
ide:0 kernel-6.6.21-gentoo video=radeonfb:1024x768@70 root=/dev/sda3
  
[SECTION]
Local HD -> Genkernel (Normal)
ide:0 kernel-genkernel-ppc-6.6.21-gentoo root=/dev/ram0
root=/dev/sda3 initrd=initramfs-genkernel-ppc-6.6.21-gentoo

Finally the bootmenu must be transferred into Forth and copied to the boot partition, so that the SmartFirmware can read it. Therefore it is necessar to call bootcreator:

root #bootcreator /etc/bootmenu /boot/menu
Note
Be sure to have a look into the SmartFirmware's settings when rebooting, that menu is the file that will be loaded by default.


Rendszer újraindítása

Lépjen ki a chrootolt környezetből, és válassza le az összes felcsatolt partíciót. Ezt követően írja be azt az egyetlen mágikus parancsot, amely elindítja a végső, valódi tesztet: reboot.

(chroot) livecd #exit
livecd~#cd
livecd~#umount -l /mnt/gentoo/dev{/shm,/pts,}
livecd~#umount -R /mnt/gentoo
livecd~#reboot

Ne feledje el eltávolítani az Live ISO telepítőt, különben ismét elindulhat a számítógépen az újonnan telepített Gentoo rendszer helyett!

Miután újraindította a számítógépet, és belépett a frissen feltelepített Gentoo környezetben, bölcs dolog véglegesíteni a Gentoo telepítést.