Archive

Archive for January, 2007

openSUSE 10.2 Network Boot and Installation HOWTO

January 31st, 2007

Introduction

The Preboot Execution Environment (in short PXE) is a protocol that enables a computer to be booted on the network. PXE is saved in ROM on newer network cards and, depending on the boot sequence configured in the computer’s BIOS, loaded and executed after turning on the computer.

This HOWTO describes how to setup an openSUSE 10.2 machine to act as a network boot and install server. I have used this method to install openSUSE 10.2 on my Tablet PC (Toshiba Portege M200).

The plan is to have a DHCP server assigning IPs, TFTP server for PXELINUX to be loaded (to load the openSUSE installer) and an NFS share to supply the installation files.

Prerequests

  • PXE boot capable machine
  • Packages - all of them can be found on the DVD or in the main openSUSE repository.
    • dhcp-server - to automatically asign IPs.
    • tftp - to share the boot image
    • syslinux - to supply the boot image (pxelinux.0)
    • yast2-tftp-server - Graphical configurator for a TFTP server
    • yast2-dhcp-server - Graphical configurator for a DHCP server
    • yast2-nfs-server - Graphical configurator for a NFS server.
  • A network cable
  • openSUSE 10.2 DVD

All of the graphical configurators used in this HOWTO can be found in Yast2 in the Network Services section.

[[Image:software/suse-netboot-screens/yast2-network-services.png|center|640|480]]

Network Interface Setup

For the purpose of this HOWTO I will set and use the IP 192.168.69.1 for the network interface. This can be configured in Yast in the Network Devices section using the Network Card configurator.

[[Image:software/suse-netboot-screens/card-setup-1.png|center|640|480]]

[[Image:software/suse-netboot-screens/card-setup-2.png|center|640|480]]

[[Image:software/suse-netboot-screens/card-setup-3.png|center|640|480]]

The last step is to bring the interface up:

ifconfig eth0 up 192.168.69.1

NFS Configuration

For the purpose of this HOWTO I am going to share the openSUSE 10.2 DVD as shown. This is going to be the installation source supplied for the installation as you will see later.

[[Image:software/suse-netboot-screens/nfs-1.png|center|640|480]]

[[Image:software/suse-netboot-screens/nfs-2.png|center|640|480]]

TFTP Configuration

Time to configure PXELINUX to be offered by the TFTP server.

[[Image:software/suse-netboot-screens/tftp.png|center|640|480]]

We will also tell PXELINUX to boot the linux kernel we will copy from the openSUSE 10.2 DVD.

cp /usr/share/syslinux/pxelinux.0 /tftpboot
cp /media/SU1020.001/boot/i386/loader/initrd /tftpboot/
cp /media/SU1020.001/boot/i386/loader/linux /tftpboot/
mkdir /tftpboot/pxelinux.cfg
cd /tftpboot/pxelinux.cfg
touch default
chmod 777 default

The boot configuration in the file default should be as follows:

default linux
label linux
kernel linux
append initrd=initrd install=nfs://192.168.69.1/media/SU1020.001
implicit         0
display         message
prompt          1
timeout         1

DHCPD Configuration

[[Image:software/suse-netboot-screens/dhcpd-1.png|center|640|480]]

[[Image:software/suse-netboot-screens/dhcpd-2.png|center|640|480]]

[[Image:software/suse-netboot-screens/dhcpd-3.png|center|640|480]]

[[Image:software/suse-netboot-screens/dhcpd-4.png|center|640|480]]

The configurator will create the /etc/dhcpd.conf file, but with this configuration the dhcp server won’t know about the existance of the tftp server, so we have to add 2 the next-server and filename options. Finally the configuration should look like this:

option domain-name "mydomainname";
ddns-update-style none;
   default-lease-time 14400;
   subnet 192.168.69.0 netmask 255.255.255.0 {
   range 192.168.69.2 192.168.69.254;
   default-lease-time 14400;
   max-lease-time 172800;
   next-server 192.168.69.1;
   filename "pxelinux.0";
}

[[Image:software/suse-netboot-screens/dhcpd-5.png|center|640|480]]

Booting

You can now boot the machine and the result should be something simliar to:

Trying to load: pxelinux.cfg/01-88-99-aa-bb-cc-dd
Trying to load: pxelinux.cfg/C000025B
Trying to load: pxelinux.cfg/C000025
...
Trying to load: pxelinux.cfg/default

and then the system should boot.

References and More Information

Coding

Mac OS X: A Month Later

January 14th, 2007

My main OS on the iMac is openSUSE Linux. I’ve decided to keep the Mac OS X to play with it when I am bored.

I have found workarounds for 2 of the issues I’ve had:

Mouse Acceleration

I found this “trick” while I was talking on the phone and clicking absolutly randomly around. :-). While it doesn’t fix the issue 100% it does make stuff more usable for me. Open System Preferences -> Universal Access and set the Initial Delay to Short. Screenshot:

[[Image:software/osx-accel-fix.png|center]]

Keybindings in GUI

To start using Ctrl instead of the Apple key go to System Preferences -> Keyboard and Mouse -> Modifier Keys swap Control and Command.

To fix page up/down/home/end create a file (and directory path if not exisiting yet) ~/Library/Keybindings/DefaultKeyBinding.dict with the following contents:

/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
"^\010" = "deleteWordBackward:";
"\UF729" = "moveToBeginningOfLine:";
"^\UF729" = "moveToBeginningOfDocument:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:";
"\UF72B" = "moveToEndOfLine:";
"^\UF72B" = "moveToEndOfDocument:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:";
"^\UF702" = "moveWordBackward:";
"^\UF703" = "moveWordForward:";
"$^\UF702" = "moveWordBackwardAndModifySelection:";
"$^\UF703" = "moveWordForwardAndModifySelection:";
"\UF72C" = "pageUp:";
"\UF72D" = "pageDown:";
}

Keybindings in Terminal

In the Window Settings -> Keyboard swap shift xxxkeys with the equivalen without shift - e.g shift page up with page up. To get the backspace key working in the Terminal app “Delete key sends backspace” should be ticked. Also do not forget to click on “Use Settings as Defaults.

Create or append to ~/.inputrc the following content:

# Be 8 bit clean.
set input-meta on
set output-meta on
set convert-meta off

# allow the use of the Home/End keys
“\e[1~”: beginning-of-line
“\e[4~”: end-of-line

# allow the use of the Delete/Insert keys
“\e[3~”: delete-char
“\e[2~”: quoted-insert

# mappings for “page up” and “page down” to step to the beginning/end
# of the history
“\e[5~”: beginning-of-history
“\e[6~”: end-of-history

# alternate mappings for “page up” and “page down” to search the history
# “\e[5~”: history-search-backward
# “\e[6~”: history-search-forward

Source - http://tech.inhelsinki.nl/gnu_developement_under_mac_os_x/

Coding