I needed a reasonably complete development environment including git (which was not already included in my machine).

if git was not previously install then run:

sudo apt git

Then I create my sandbox for my experiments and filled it with the current revision:

$ mkdir sandbox
$ cd sandbox

$ sudo git clone git://git.ipfire.org/ipfire-2.x.git
Cloning into 'ipfire-2.x'...
remote: Enumerating objects: 62, done.
remote: Counting objects: 100% (62/62), done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 148087 (delta 17), reused 0 (delta 0), pack-reused 148025
Receiving objects: 100% (148087/148087), 55.49 MiB | 18.02 MiB/s, done.
Resolving deltas: 100% (102395/102395), done.

$ cd ipfire-2.x

$ sudo ./make.sh downloadsrc
Preload all source files
7zip (17.04)                                                                                                                            [ DONE ]
acl (2.3.1)                                                                                                                             [ DONE ]
acpid (2.0.32)                                                                                                                          [ DONE ]
alac (0.0.7)                                                                                                                            [ DONE ]
...

Then, after a LOOOOOONG time

...
zerofree (1.1.1)                                                                                                                        [ DONE ]
zlib (1.2.11)                                                                                                                           [ DONE ]
zstd (1.5.1)                                                                                                                            [ DONE ]
***Verifying md5sums
all files md5sum match                                                                                                                  [ DONE ]
$ 

Now we need to get the toolchain, which cannot be built on a 64bit machine (it is a good idea to get it anyways, since compilation time is substantial).

$ sudo ./make.sh gettoolchain
Nov 15 20:03:22: Load toolchain tar.gz for i686
Nov 15 20:06:04: toolchain md5 ok

Now we are all set to start the first, normal compilation:

$ sudo ./make.sh build
Using installed toolchain                                                 [ SKIP ]
Resetting our nice level to 10                                            [ DONE ]
Checking if we're running as root user                                    [ DONE ]
Checking for necessary space on disk                                      [ DONE ]
*** Building LFS                         version   options    time (sec)   status
stage2                             [     ipfire ]            [        1 ] [ DONE ]
linux-libc-header                  [   2.6.12.0 ]            [        5 ] [ DONE ]
man-pages                          [       2.34 ]            [       12 ] [ DONE ]
glibc                              [      2.3.6 ]
. . .

... after a LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONG time ...

. . .
util-linux                         [      2.12r ]            [       11 ] [ DONE ]
vim                                [        7.0 ]            [       38 ] [ DONE ]
grub                               [       0.97 ]            [       16 ] [ DONE ]
*** Building IPFire (Last stage took 1790 secs) version   options    time (sec)   status
configroot                         [     ipfire ]            [        1 ] [ DONE ]
backup                             [     ipfire ]            [        0 ] [ DONE ]
dhcp                               [      3.1.0 ]            [       21 ] [ DONE ]
. . .

... after a LOOOOOOOOOOOOOOOOOOOOOOONG time ...

. . .
minicom                            [        2.4 ]            [       14 ] [ DONE ]
ddrescue                           [       1.12 ]            [        2 ] [ DONE ]
imspector                          [   20101008 ]            [       23 ] [ DONE ]
*** Building installer (Last stage took 11284 secs) version   options    time (sec)   status
as86                               [    0.16.17 ]            [        1 ] [ DONE ]
mbr                                [      1.1.8 ]            [        3 ] [ DONE ]
memtest                            [       4.10 ]            [        2 ] [ DONE ]
...
pcmciautils                        [        014 ]            [        2 ] [ DONE ]
installer                          [     ipfire ]            [        2 ] [ DONE ]
initrd                             [     ipfire ]            [       35 ] [ DONE ]
*** Building packages (Last stage took 1058 secs) version   options    time (sec)   status
strip                              [     ipfire ]            [       40 ] [ DONE ]
Generating packages list from logs                                        [ DONE ]
cdrom                              [     ipfire ] [ ED=full ][      136 ] [ DONE ]
usb-stick                          [     ipfire ] [ ED=full ][       22 ] [ DONE ]
flash-images                       [     ipfire ] [ ED=full ][      134 ] [ FAIL ]

ERROR: Building flash-images ED=full
    Check /home/mcon/sandbox/ipfire-2.x/log/_build.packages.log for errors if applicable

Oops, what went wrong?

It turns out it's a problem of interaction with ubuntu/gnome handling of mounted filesystems: when a filesystem is mounted ubuntu scans it to present it in the “Places” menu. If it will be unmounted too soon it may still be “busy”.

This may be cured inserting a delay in the right place i.e.: …/lfs/flash-images#170 should become:

    sed -i -e "s|6:2345:respawn:|#6:2345:respawn:|g" $(MNThdd)/etc/inittab
    sed -i -e "s|#7:2345:respawn:|7:2345:respawn:|g" $(MNThdd)/etc/inittab

    sleep 10 #<-- this line added by MCon

    umount $(MNThdd)/boot
    umount $(MNThdd)

Restart the build. This time everything is fine:

...
installer                       [     ipfire ]            [        0 ] [ DONE ]
initrd                          [     ipfire ]            [        0 ] [ DONE ]
*** Building packages (Last stag      version)  options    time (sec)   status
strip                           [     ipfire ]            [       49 ] [ DONE ]
Generating packages list from logs                                     [ DONE ]
cdrom                           [     ipfire ] [ ED=full ][      140 ] [ DONE ]
usb-stick                       [     ipfire ] [ ED=full ][       22 ] [ DONE ]
flash-images                    [     ipfire ] [ ED=full ][      213 ] [ DONE ]
core-updates                    [     ipfire ]            [        2 ] [ DONE ]
7zip                            [       4.65 ]            [        0 ] [ DONE ]
alsa                            [     1.0.23 ]            [        1 ] [ DONE ]
...
watchdog                        [        5.9 ]            [        0 ] [ DONE ]
xfsprogs                        [      2.9.4 ]            [        0 ] [ DONE ]
xvid                            [      1.2.1 ]            [        0 ] [ DONE ]
xen-image                       [     ipfire ] [ ED=full ][      200 ] [ DONE ]
Generating files list from logs                                        [ DONE ]
*** Checking Logfiles for new Fi      versionge options1 s time (sec)   status
Changes in cdrtools-2.01.01 check rootfile!
***Build is finished now and took 0 hour(s) 12 minute(s) 24 second(s)!

At this point you have a completely rebuilt IPFire and we can turn to building something new.