Gentoo Linux Sparc Quick Install Reference
1. Sparc Quick Install Reference
This guide is aimed at people who have prior experience of installing Gentoo
Linux. For more detailed instructions, please consult the Gentoo Handbook.
The installation ISOs and netboot images are on the Gentoo
Mirrors. The 'universal' and 'minimal' CDs are bootable and contain
the tools necessary to install Gentoo. The 'universal' CD also contains
stages and some distfiles. The 'packages' CD contains additional precompiled
packages for GRP installs. The netboot images contain no stages and a subset of
the standard toolset (note that you will have to use vi instead of
nano when netbooting).
Use stop+A (keyboard) or send a break (serial console) whilst booting to
enter OBP. Boot from either the universal or the minimal Gentoo CD using the
command boot cdrom, or from the netboot images using boot net.
Press return to use the default kernel, or hit tab to see a list of
alternative kernels.
Note:
For more information on OBP, see the OpenBoot PROM (OBP)
Reference or consult Sun's "OpenBoot 3.x Command Reference" (P/N
802-3242). |
Code Listing 1.1: Beginning settings |
# date (Make sure your time and date is correct. If wrong, set it with date MMDDhhmmCCYY )
# modprobe module_name (Optional - Load any necessary modules)
# ifconfig eth0 a.b.c.d netmask e.f.g.h broadcast i.j.k.l (Configure the network)
# route add -net default gw a.b.c.d netmask 0.0.0.0 metric 1 eth0 (Configure the default gateway)
# echo "nameserver a.b.c.d" > /etc/resolv.conf (Set up DNS)
# fdisk /dev/sda (Partition your drive)
|
A sun disclabel is required for sparc machines. This can be created using 's'.
A seperate /boot is not recommended for sparc. The root partition must be entirely within
the first 1GByte of the disc for all sparc32 machines. The recommended filesystem is
ext3. At least 512MBytes of RAM + swap is required for bootstrap and some larger compiles.
Initialise your partitions using mke2fs (Ext2), mke2fs
-j (Ext3) and mkswap (swap partition). For instance:
mke2fs -j /dev/sda1.
Continue by mounting the partitions and extracting the appropriate stage
file.
Code Listing 1.2: Preparing the Installation |
(Activate the swap partition) # swapon /dev/sdax
(Mount the root partition) # mount /dev/sdax /mnt/gentoo
(Go to the mountpoint) # cd /mnt/gentoo
(Extract a stage tarball...) # tar xvjpf /mnt/cdrom/stages/stage?-*.tar.bz2
( download the latest tarball...) # links http://www.gentoo.org/main/en/mirrors.xml
( ... and extract) # tar xvjpf stage*
(Optional: unpack a portage tree) # tar xvjf /mnt/cdrom/snapshots/portage-*.tar.bz2 -C /mnt/gentoo/usr
(Optional: copy over distfiles) # cp -R /mnt/cdrom/distfiles /mnt/gentoo/usr/portage/distfiles
(Select a mirror) # mirrorselect -a -s4 -o >> /mnt/gentoo/etc/make.conf
(Copy over nameserver information) # cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
(Mount the proc filesystem) # mount -t proc none /mnt/gentoo/proc
(Chroot into the new environment) # chroot /mnt/gentoo /bin/bash
(Load the necessary variables) # env-update; source /etc/profile
(Network-only, non-GRP: update Portage) # emerge --sync
|
Now we install Gentoo:
Code Listing 1.3: Installing Gentoo |
(Stage1 only:)
( Change USE, CFLAGS and CXXFLAGS. Do not change CHOST) # nano -w /etc/make.conf
( Bootstrap system) # cd /usr/portage; scripts/bootstrap.sh
(Stage1 and Stage2 only:)
( Install base system) # emerge system
|
Note:
Suitable CFLAGS for Sparc systems are -mcpu=your_cpu -O2 -pipe, where your_cpu is
one of ultrasparc3, ultrasparc, v9 (64 bit systems) or hypersparc,
supersparc, v8 or v7 (32 bit systems). The -frename-registers flag
may also be of interest. Note that, unlike on x86 systems, -fomit-frame-pointer is not
recommended. |
Next we set up the necessary information:
Code Listing 1.4: Setting up Configuration Files |
(Set timezone information) # ln -sf /usr/share/zoneinfo/ /etc/localtime
(Edit fstab file) # nano -w /etc/fstab
|
Use the following as a template (don't copy verbatim) for
/etc/fstab:
Code Listing 1.5: /etc/fstab |
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/sdax none swap sw 0 0
/dev/sdax / ext3 noatime 0 1
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs nodev,nosuid,noexec 0 0
|
Continue by installing the Linux kernel. Available kernel packages for Sparc
are sparc-sources (2.4) and development-sources (2.6). The
ultra1 USE flag should be set on Ultra 1 and Netra i 1 "Enterprise" and
"Creator" models for proper support for the onboard HME Ethernet controller.
Code Listing 1.6: Installing the Kernel |
(Install the kernel sources) # emerge
# cd /usr/src/linux; make menuconfig
( (2) Include shmfs, procfs, devfs if not using udev)
( (3) Compile your kernel)
( - 2.4 kernels on sparc32) # make dep && make clean vmlinux modules modules_install
( - 2.4 kernels on sparc64) # make dep && make clean vmlinux image modules modules_install
( - 2.6 kernels on sparc32 # make && make modules_install
( - 2.6 kernels on sparc64 # make && make image modules_install
( (4) Copy over the kernel)
( - 2.4 kernels on sparc32) # cp vmlinux /boot/image
( - 2.4 kernels on sparc64) # cp arch/sparc64/boot/image /boot
( - 2.6 kernels on sparc32) # cp arch/sparc/boot/image /boot
( - 2.6 kernels on sparc64) # cp arch/sparc64/boot/image /boot
# cp System.map /boot
|
Now install other tools you might want:
Code Listing 1.7: Install important system tools |
(Install system logger; choice: sysklogd, metalog, msyslog, syslog-ng) # emerge syslog-ng
(Have the systemlogger automatically started at boot) # rc-update add syslog-ng default
(Install cron daemon; choice: vixie-cron, dcron, fcron) # emerge vixie-cron
(Have the cron daemon automatically started at boot) # rc-update add vixie-cron default
(Domain name init script) # rc-update add domainname default
(2.6.x kernels only: udev can be used in place of devfs) # emerge udev
|
Note: For more information on configuring udev, see the Gentoo udev Guide. Note that the
RC_DEVICE_TARBALL="no" option is preferred on Sparc systems. |
Finalise the settings for your Gentoo system:
Code Listing 1.8: Finalise the Configuration Settings |
(Set root password) # passwd
(Create a user) # useradd your_user -m -G users,wheel,audio -s /bin/bash
(Set password for that user) # passwd your_user
(Set the system hostname) # echo mymachine > /etc/hostname
(Set the system domainname) # echo mydomain.com > /etc/dnsdomainname
(Set the hostsfile, ex:"127.0.0.1 localhost mymachine") # nano -w /etc/hosts
(Configure basic system settings; follow comments) # nano -w /etc/rc.conf
|
Code Listing 1.9: Set up Networking |
(Setup networking; dhcp-users should set iface_eth0="dhcp") # nano -w /etc/conf.d/net
(List modules to be loaded at startup) # nano -w /etc/modules.autoload.d/kernel-
(start networking automatically at boot) # rc-update add net.eth0 default
(Only if you have multiple network interfaces:)
(1) Create initscripts for each interface) # ln -s /etc/init.d/net.eth0 /etc/init.d/net.ethx
(2) Automatically start at boot) # rc-update add net.ethx default
|
Now install the bootloader.
Code Listing 1.10: Installing SILO |
# emerge silo
# nano -w /etc/silo.conf
partition = 1
root = /dev/sda1
timeout = 150
image = /boot/image
label = Gentoo
# silo
|
Now unmount all partitions and reboot into your new system:
Code Listing 1.11: Finishing off and installing GUI |
(Exiting the chroot) # exit; cd /
(Unmounting partitions) # umount /mnt/gentoo/proc /mnt/gentoo
(Reboot; Remove the install CD from the tray) # reboot
(After booting:)
(GRP-users only)
( (1) Mount CD2) # mount /dev/cdroms/cdrom0 /mnt/cdrom
( (2) Copy over packages) # cp -a /mnt/cdrom/packages/* /usr/portage/packages/
( (3) Install extra software) # USE="bindist" emerge -k xfree gnome kde mozilla
( (4) Configure your Xserver) # $EDITOR /etc/X11/XF86Config
|
You can get more information from the Gentoo
Documentation.
The contents of this document are licensed under the Creative Commons - Attribution / Share Alike license.
|