Difference between revisions of "Build FOG file system with BuildRoot"

From FOG Project
Jump to: navigation, search
m (Tom-elliott.7271 moved page Build FOG file system with BuildRoot - init.gz to Build FOG file system with BuildRoot: Init is not known simply as init.gz, it's also now (1.x.x) known as init.xz and init_32.xz. Page with init.gz in name is not co...)
(Compile the buildroot toolchain and build the filesystem image)
Line 1: Line 1:
== Ubuntu Desktop 11.10 ==
+
In order for the FOG Client to boot on the hosts, it requires a kernel and a filesystem image containing its filesystem. Buildroot helps building the toolchain (uclibc) and generate that image with busybox and all the packages we need.
 +
This page will tell you how to build the filesystem on your own from SVN.
  
=== Ubuntu update ===
+
== Debian 7 ==
 +
 
 +
=== Debian update ===
 
   
 
   
 
  sudo apt-get update
 
  sudo apt-get update
Line 8: Line 11:
 
=== install all essential package ===
 
=== install all essential package ===
  
  sudo apt-get install build-essential subversion libqt4-dev bison flex gettext texinfo zlib1g-dev uuid-dev
+
  sudo apt-get install build-essential subversion libqt4-dev bison flex gettext texinfo zlib1g-dev uuid-dev ncurses-dev unzip libpci-dev libssl-dev
  
  
=== Download the FOG source ===
+
=== Download the relevant FOG source ===
  
cd ~/Desktop
+
  svn checkout https://freeghost.svn.sourceforge.net/svnroot/freeghost/trunk/src fogsrc
mkdir svn
 
cd svn
 
  svn checkout https://freeghost.svn.sourceforge.net/svnroot/freeghost/trunk  
 
  
  
 
=== Download Buildroot ===
 
=== Download Buildroot ===
 
   
 
   
cd ..
+
  wget http://buildroot.uclibc.org/downloads/buildroot-2014.08.tar.bz2
  wget http://buildroot.uclibc.org/downloads/buildroot-2011.08.tar.gz
+
  tar xjf buildroot-2014.08.tar.bz2
  tar xvfz buildroot-2011.08.tar.gz
 
  
 
=== Copy source to Buildroot ===
 
=== Copy source to Buildroot ===
  
  cp -rf svn/trunk/src/buildroot/* buildroot-2011.08/
+
  cp -r fogsvn/buildroot/* buildroot-2014.08/
  cd buildroot-2011.08
+
  cd buildroot-2014.08
  mv fog.buildroot.config .config
+
  mv fog.buildroot.config.32 .config # or config.64 for 64 bits
  
 
=== build FOG file system ===
 
=== build FOG file system ===
  make xconfig
+
  make menuconfig
 +
# This will download all the required packages from their sources, it's around 300 MB
 
  make source
 
  make source
 +
# All packages are now in buildroot-2014.08/dl/ So we compile:
 
  make
 
  make
  gzip -9 < output/images/rootfs.ext2 > init.gz
+
  # Here is our init.xz
 +
cp output/images/rootfs.ext2.xz init.xz
  
  copy init.gz to your FOG server /tftpboot/fog/images/init.gz
+
  copy init.xz to your FOG server /tftpboot/fog/images/init_32.xz (or init.xz for 64 bits)

Revision as of 22:59, 18 November 2014

In order for the FOG Client to boot on the hosts, it requires a kernel and a filesystem image containing its filesystem. Buildroot helps building the toolchain (uclibc) and generate that image with busybox and all the packages we need. This page will tell you how to build the filesystem on your own from SVN.

Debian 7

Debian update

sudo apt-get update
sudo apt-get upgrade

install all essential package

sudo apt-get install build-essential subversion libqt4-dev bison flex gettext texinfo zlib1g-dev uuid-dev ncurses-dev unzip libpci-dev libssl-dev


Download the relevant FOG source

svn checkout https://freeghost.svn.sourceforge.net/svnroot/freeghost/trunk/src fogsrc


Download Buildroot

wget http://buildroot.uclibc.org/downloads/buildroot-2014.08.tar.bz2
tar xjf buildroot-2014.08.tar.bz2

Copy source to Buildroot

cp -r fogsvn/buildroot/* buildroot-2014.08/
cd buildroot-2014.08
mv fog.buildroot.config.32 .config # or config.64 for 64 bits

build FOG file system

make menuconfig
# This will download all the required packages from their sources, it's around 300 MB
make source
# All packages are now in buildroot-2014.08/dl/ So we compile:
make
# Here is our init.xz
cp output/images/rootfs.ext2.xz init.xz
copy init.xz to your FOG server /tftpboot/fog/images/init_32.xz (or init.xz for 64 bits)