febootstrap: what am I doing wrong?
by Hilko Bengen
Good evening,
I just tried following the steps in "Tip: Creating throwaway appliances
with febootstrap"[1] on my workstation at home running Debian/unstable.
I ran into problems:
,----
| $ mkdir supermin.d
| $ febootstrap --names 'bash' 'coreutils' -o supermin.d
| Get: 1 http://ftp.de.debian.org/debian/ sid/main bash amd64 4.1-3 [1325 kB]
| Get: 2 http://ftp.de.debian.org/debian/ sid/main base-files amd64 6.4 [69.1 kB]
| Get: 3 http://ftp.de.debian.org/debian/ sid/main coreutils amd64 8.5-1 [5102 kB]
| Get: 4 http://ftp.de.debian.org/debian/ sid/main libacl1 amd64 2.2.49-5 [28.7 kB]
| Get: 5 http://ftp.de.debian.org/debian/ sid/main libattr1 amd64 1:2.4.44-3 [18.4 kB]
| Get: 6 http://ftp.de.debian.org/debian/ sid/main dash amd64 0.5.5.1-7.4 [108 kB]
| Get: 7 http://ftp.de.debian.org/debian/ sid/main debianutils amd64 4 [75.4 kB]
| Get: 8 http://ftp.de.debian.org/debian/ sid/main dpkg amd64 1.16.0.3 [2227 kB]
| Get: 9 http://ftp.de.debian.org/debian/ sid/main libbz2-1.0 amd64 1.0.5-6 [46.4 kB]
| Get: 10 http://ftp.de.debian.org/debian/ sid/main libc6 amd64 2.13-4 [4312 kB]
| Get: 11 http://ftp.de.debian.org/debian/ sid/main libc-bin amd64 2.13-4 [1079 kB]
| Get: 12 http://ftp.de.debian.org/debian/ sid/main gawk amd64 1:3.1.7.dfsg-5 [806 kB]
| Get: 13 http://ftp.de.debian.org/debian/ sid/main libgcc1 amd64 1:4.6.0-10 [42.8 kB]
| Get: 14 http://ftp.de.debian.org/debian/ sid/main gcc-4.6-base amd64 4.6.0-10 [131 kB]
| Get: 15 http://ftp.de.debian.org/debian/ sid/main libselinux1 amd64 2.0.98-1+b1 [89.2 kB]
| Get: 16 http://ftp.de.debian.org/debian/ sid/main mawk amd64 1.3.3-15 [90.1 kB]
| Get: 17 http://ftp.de.debian.org/debian/ sid/main libncurses5 amd64 5.9-1 [382 kB]
| Get: 18 http://ftp.de.debian.org/debian/ sid/main original-awk amd64 2010-05-23-1 [73.4 kB]
| Get: 19 http://ftp.de.debian.org/debian/ sid/main sensible-utils all 0.0.6 [6428 B]
| Get: 20 http://ftp.de.debian.org/debian/ sid/main xz-utils amd64 5.0.0-2 [201 kB]
| Get: 21 http://ftp.de.debian.org/debian/ sid/main liblzma2 amd64 5.0.0-2 [184 kB]
| Get: 22 http://ftp.de.debian.org/debian/ sid/main zlib1g amd64 1:1.2.3.4.dfsg-3 [79.2 kB]
| Fetched 16.5 MB in 13s (1261 kB/s)
`----
No obvious problems so far.
,----
| $ ls -lh supermin.d/
|
| total 100K
| -rw-r--r-- 1 bengen bengen 52K May 29 18:59 base.img
| -rw-r--r-- 1 bengen bengen 42K May 29 18:59 hostfiles
`----
Well, base.img and hostfiles have been created, but base.img is
considerably smaller than in the example.
,----
| $ cat > init
| #!/bin/bash -
| echo Welcome to my world
| bash -i
| $ chmod +x init
| $ echo init | cpio -o -H newc --quiet > supermin.d/init.img
| $ febootstrap-supermin-helper -f ext2 supermin.d x86_64 kernel initrd root
| febootstrap-supermin-helper: ext2: parent directory not found: /lib/modules: File not found by ext2_lookup
`----
Running febootstrap-supermin-helper with -vv produces these lines before
the error:
,----
| ext2_file_stat /var/tmp 041777
| supermin helper [06516ms] visiting supermin.d/init.img
| cpio header 070701016E4031000081ED000003E8000003E8000000014DE27BEC00000030000000090000000000000000000000000000000500000000
| ext2 read_file init 100755
| ext2 read_file dirname init basename init
| cpio header 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000
| ext2 read_file TRAILER!!! 0
| ext2_file_stat /lib/modules/2.6.39-1-amd64 040755
| febootstrap-supermin-helper: ext2: parent directory not found: /lib/modules: File not found by ext2_lookup
`----
Any hints on how to further debug this?
Ending on a high note, I have prepared a patch for febootstrap that gets
rid of the insmod.static dependency, clearing the path for "proper"
Debian packages of febootstrap 3 (and libguestfs). I'll post it once I
have been able to verify that it works correctly.
Cheers,
-Hilko
[1] http://rwmj.wordpress.com/2010/12/10/tip-creating-throwaway-appliances-wi...
13 years, 6 months
[PATCH 1/4] febootstrap: Look for insmod.static, mke2fs in /sbin
by Hilko Bengen
---
configure.ac | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index da03c9f..7606bca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,8 @@ dnl For ArchLinux handler.
AC_CHECK_PROG(PACMAN,[pacman],[pacman],[no])
dnl Required programs, libraries.
-AC_PATH_PROG([INSMODSTATIC],[insmod.static],[no])
+AC_PATH_PROG([INSMODSTATIC],[insmod.static],[no],
+ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR])
if test "x$INSMODSTATIC" = "xno" ; then
AC_MSG_FAILURE([insmod.static program not found
@@ -82,9 +83,10 @@ fi
AC_DEFINE_UNQUOTED([INSMODSTATIC],["$INSMODSTATIC"],
[Full path to the insmod.static program.])
-AC_PATH_PROG([MKE2FS],[mke2fs],[no])
+AC_PATH_PROG([MKE2FS],[mke2fs],[no],
+ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR])
if test "x$MKE2FS" = "xno" ; then
- AC_MSG_FAILURE([mke2fs program not found (is /sbin in your current path?)])
+ AC_MSG_FAILURE([mke2fs program not found])
fi
AC_DEFINE_UNQUOTED([MKE2FS],["$MKE2FS"],
[Full path to the mke2fs program.])
--
1.7.5.3
13 years, 6 months