Bering-uClibc 5.x - User Guide - Installing the Disk Image
Installing the Disk Image | ||
---|---|---|
Prev | Bering-uClibc 5.x - User Guide | Next |
Contents
- 1 Choosing An Image File to Download
- 2 Download Location
- 3 Copying to the Installation Media
Choosing An Image File to Download
For Bering-uClibc 5.x there are several different disk image files available for download. These offer a choice of tailored variants of the same basic distribution and you should only need to download one of them - the one that best matches your requirements. The different variables are:
- The Linux kernel optimisations:
- i486 is the most basic and most widely compatible kernel variant, suitable for Intel 486 CPUs (or better).
- i686 is a variant which is optimised for Intel Pentium Pro CPUs (or better) and supports multiple CPUs / CPU cores.
- geode is a variant which is optimised for AMD Geode CPUs such as are used in e.g. the PC Engines ALIX boards.
- x86_64 is a variant optimised for 64bit systems.
- The boot media type:
- syslinux for flash drive or hard drive devices such as a USB or Compact Flash drive or a standard hard disk.
- isolinux for CD-ROM devices (optionally in conjunction with a floppy disk for storing configuration changes).
- pxelinux for PXE network booting.
- The console type:
- vga for a standard VGA console.
- ser for an RS-232 Serial console.
If in doubt then start with the first (most standard) option in each case - in other words the combination i486_syslinux_vga.
Download Location
Image file(s) should be downloaded from the LEAF files area on SourceForge: http://sourceforge.net/projects/leaf/files/
For the most standard Image variant, look for a file named like Bering-uClibc_5.x_i486_isolinux_vga.tar.gz
(ISO image to boot from CD-ROM) or Bering-uClibc_5.x_i486_syslinux_vga.tar.gz
(Image to boot from USB-/Flash-/HD-drives).
It is advised to choose the latest available Bering-uClibc_5.x version.
Copying to the Installation Media
Copying an isolinux Image to CD-ROM
The CD-ROM Images (boot media type isolinux) are delivered as .iso
files which must be copied to CD-ROM media using an optical media "burning" program.
Alternatively and especially for testing purposes, a Virtual PC solution (such as "qemu") can boot directly from a .iso
file.
The structure of the files and directories within the ISO image is as follows:
firmware.tgz isolinux/ boot.cat isolinux.bin isolinux.cfg isolinux.dpy linux leaf.cfg modules.tgz readme *.lrp *.lwp
Install from CD-ROM to hard disk
(Note: This works only for versions 5.1.4 and later.)
Once you have created an ISO image file as shown above, you'll be able to boot from the ISO image.
By default the Package hdsupp.lrp
will be installed with all programs in place to format your already partitioned hard disk, install a bootloader and copy all files from the ISO image to the hard disk. It also makes the necessary changes to syslinux.cfg
and leaf.cfg
. The remaining step before reboot is eventually to toogle the bootable flag for your hard disk partition.
We assume in the following steps, that your hard disk is known as /dev/sda and you need only one partition.
Step 1: Partition your hard disk
Start the fdisk utility to partition your hard disk.
fdisk /dev/sda
To create a new partition type "n", choose "p" for a new primary partition, "1" for the partition number, accept the default values for First and Last Sector. To change the partition system id to W95 FAT32, choose "t" and "b".
You may have a look before writing the changes to your hard disk with the command "p". It should show something like this:
Device Boot Start End Blocks Id System /dev/sda1 2048 524287 261120 b W95 FAT32
Save your changes with the command "w".
Step 2: Install to hard disk
To run the installation from CD ROM to hard disk, start the LEAF configuration menu
with "lrcfg".
Choose "i) Install to FAT partition".
It will show the available FAT partitions:
Available partitions to install LEAF: 1) /dev/sda1 - 261120 kB W95 FAT32
Select partition:
Type "1" to select your partition /dev/sda1 as installation target.
Syslinux will be installed to /dev/sda1, MBR code on /dev/sda1 will be updated. Are you shure? (y/N)
Type "y", if you are shure and want to continue.
Format /dev/sda1? (y/N)?
Again type "y", if you are shure and want to continue. Your storage device will now be formatted.
Copy all files to storage? (y/N)?
Usually you will and respond with "y". Wait until you are requested to press any key to return.
Step 3: Toogle the bootable flag for your partition.
Last step is to toggle the bootable flag for the partition /dev/sda1. Again run fdisk.
fdisk /dev/sda
Print your partition table to screen with the command "p". It should look like this:
Device Boot Start End Blocks Id System /dev/sda1 * 2048 524287 261120 b W95 FAT32
If the asterisk is missing below the Boot row, type "a" and "1" to make the first partition bootable, and save your changes with the command "w". Otherwise leave the fdisk utility with "q".
Reboot, but be shure, that you have removed the CD from the drive before it the boot process starts.
Copying a syslinux Image to Flash Media via a USB Interface on a Linux PC
The Images suitable for flash media (boot media type syslinux) are delivered as .tar.gz
files which must be extracted onto suitably prepared flash media. The generic term "flash media" includes Compact Flash cards and USB "pen" or "thumb" drives.
The structure of the files and directories within the .tar.gz
file is as follows:
firmware.tgz leaf.cfg modules.sqfs readme syslinux/ syslinux.cfg syslinux.dpy linux *.lrp *.lwp
The following assumes that the flash media has been physically removed from the system which will be running Bering-uClibc 5.x and can be accessed on another Linux system using a USB interface such as a Compact Flash-to-USB adaptor.
Preparing the Flash Media
For a standard Bering-uClibc 5.x installation, the flash media must:
- Be at least 100MB in size for a full installation.
- By removing some of the large Packages this can be reduced significantly. 8MB is probably the absolute bare minimum.
- Have a single disk partition, which is flagged as bootable.
- Have a FAT32 file system on the boot partition. It is advised to format the disk with "-r 1024" to have enough root directory entries to install the Packages.
mkfs.vfat -r 1024 /dev/sdaX
Next you need to install the [http://syslinux.zytor.com/wiki/index.php/SYSLINUX SYSLINUX onto the boot partition. Open a command prompt and cd to your 'syslinux/linux' folder. Run:
./syslinux -i /dev/sdX1
replacing X with the device node of your media.
Install the MBR code on the flash media:
dd bs=440 count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sdX
once again replace X with the device node of your media. This will write the Syslinux mbr code (mbr.bin) into the master boot record of the drive.
Installing SYSLINUX results in file ldlinux.sys
being created in the root of the FAT32 file system. Do not attempt to edit or move this file since that will break the SYSLINUX operation.
For Bering-uClibc 5.x the Linux kernel and the SYSLINUX configuration files have been relocated to the syslinux/
directory of the boot disk. However, file ldlinux.sys
should remain in the root directory (although by using the -d directory argument to syslinux this can be moved to a different pre-existing directory on the boot disk, if desired).
If the other requirements (i.e. the single, bootable, FAT32-formatted disk partition) are not met you will also need to use:
- fdisk or parted to partition the drive.
- mkfs.vfat to create the FAT32 file system.
Extracting the Image Files
Once the flash media is prepared the contents of the disk Image need to be extracted. Change to the directory where the flash media is mounted and extract the contents of the downloaded file with a command like the following
tar -xvzf ~/Download/Bering-uClibc_5.0_i486_syslinux_vga.tar.gz
Note that this assumes the downloaded file is located in your $HOME/Download
directory.
Do these extra steps if you are using the *_syslinux_vga.* images
Because all *.c32 files shall match the same syslinux version, and if you don't know which syslinux version was used to generate the distribution c32 files, copy hdt.c32, menu.c32, vesamenu.c32, libcom32.c32 and libutil.c32
files from the SYSLINUX program you used to create ldlinux.sys
to ./syslinux
directory of your mounted flash media.
For instance, in SYSLINUX 6.03 these files are in syslinux-6.03/bios/com32/hdt/hdt.c32, syslinux-6.03/bios/com32/menu/menu.c32, and syslinux-6.03/bios/com32/menu/vesamenu.c32
.
They can also be found in /usr/lib/syslinux/modules/bios
on Debian Jessie.
An easy way to find these files is to:
cd ~/Download/syslinux-6.03
find . | grep filename.c32
Note: You don't have to do anything if you are using the *_syslinux_serial.* images since they do not use these *.c32
files, so there will be no version conflicts.
Remove the flash media from the Linux PC and proceed to the next Chapter.
Copying a pxelinux Image to a Network Boot Server
Note: pxelinux boot support is currently under development and is not yet available in the standard Bering-uClibc 5.x downloads. Refer to Trac ticket #3 for the latest status.
Much of the complexity of a pxelinux installation is associated with setup of the DHCP server that delivers the PXE boot filename, the TFTP server that delivers the initial boot image etc. These are not specific to Bering-uClibc 5.x and so are not covered in detail here but some guidelines and pointers to other sources of information can be found in the Network Booting Appendix.
The Images suitable for network booting (boot media type pxelinux) are delivered as .tar.gz
files which must be extracted onto suitable file server(s).
The structure of the files and directories within the .tar.gz
file is as follows:
tftpboot/ bering-uclibc/ 5/ gpxelinux.0 pxelinux.0 pxelinux.cfg/ default pxelinux.dpy fileserver/ bering-uclibc/ 5/ pxelinux/ initrd.lrp linux firmware.tgz leaf.cfg modules.tgz readme *.lrp *.lwp
File Server Protocol Selection
Bering-uClibc 5.x supports a number of different file sharing protocol options for network boot and installation (or at least it is planned to). These are:
- FTP
- File Transfer Protocol, on TCP port 21
- TFTP
- Trivial File Transfer Protocol, on UDP port 69
- Note that a TFTP server is essential for delivering the initial boot image,
(g)pxelinux.0
, and its configuration file. - The same TFTP server can also be used for delivering the Linux kernel file (
linux
) and the initial RAM disk file (initrd.lrp
).
- Note that a TFTP server is essential for delivering the initial boot image,
- HTTP
- HyperText Transport Protocol, on TCP port 80
- SSH
- Secure SHell, on TCP port 22
- Note that this is not supported by
(g)pxelinux.0
for delivering the Linux kernel file (linux
) and the initial RAM disk files (initrd.lrp
ndinitmod.lrp
) and hence cannot be used as the only network boot protocol.
- Note that this is not supported by
For the purposes of this document it is assumed that TFTP will be used only to deliver (g)pxelinux.0
and pxelinux.cfg/default
and that an HTTP server will be used to deliver the remainder of the files.
DHCP Server Configuration
It is assumed that you know how to configure your DHCP server for PXE booting. See the Network Booting Appendix for some Hints and Tips.
In summary, the DHCP server needs to:
- Issue an IPv4 address to the Bering-uClibc 5.x machine.
- Specify the "next server" IP address and a PXE "boot filename". Based on the structure within the pxelinux
.tar.gz
file this "boot filename" probably needs to be specified as:bering-uclibc/5/gpxelinux.0
since it is normally relative to thetftpboot/
level of the directory structure.
Prev | Up | Next |