aboutsummaryrefslogtreecommitdiffstats
path: root/doc/debian-live-problems.txt
blob: 28116c13ee50f04e2860b0d634556253d7802cc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

Always use the unstable version of live-build in your host build machine. At
the time of writing this means version 3.0~a67-1. You can grab the one-off .deb
here:

    http://packages.debian.org/sid/live-build

### Errors when building flat ("plain") filesystem images

NOTE: these problems should have been fixed by removing the rootfs stage from
caching?

When building a chroot-filesystem=none image, if you encounter:

    cp: cannot create regular file `binary/live/filesystem.packages': No such file or directory

You will need to:

    mkdir binary/live
    rm -rf cache/binary_rootfs

If you don't run the second line as well, you will get the error:

    cp: cannot stat `cache/binary_rootfs/filesystem.*': No such file or directory

### Missing symlinked files

When building hdd images, often targetting the FAT32 filesystem, all symlinks
get removed from the binary image. If you are trying to create a "plainroot"
image using ext3 or any unix-style filesystem, this is a big problem. To
disable this step, edit /usr/lib/live/build/binary_includes on the host build
system, and around line 57 comment out the line:

	find binary -type l | xargs rm -f

If you get a boot error like:

    Kernel panic - not syncing: Attempted to kill init!

Then init may be unable to link to necessary library (like lib/ld-linux.so.3),
because of some badness in the binary build system. If you can't do the above
hack editing the symlink deletion out, you could do:

    lb clean --binary
    lb config
    lb binary_chroot
    lb binary_rootfs
    lb binary_hdd

### mksquashfs Segfaults in qemu

mksquashfs always segfaults when run inside of qemu. Perhaps due to large
memory requirements of mksquashfs?

One hack workaround is to install the squashfs-tools in the host build system,
then edit the file /usr/lib/live/build/binary_rootfs and around line 377
comment out:

    Chroot chroot "mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}"

and insert:

    cd chroot
    mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}
    cd ..

Previously tried adding the following mksquashfs arguments, but they didn't fix
the problem:

    export MKSQUASHFS_OPTIONS="-processors 1 -read-queue 8 -write-queue 16 -fragment-queue 8"

### squashfs image too small

The Calculate_partition_size function seems to be too optimistic; sometimes
images will not fit in the generated partitions.

Add the following below line 132 of /usr/lib/live/build/binary_hdd in your host
environment to add an extra 50MB to the partition size (probably way more than
necessary):

    DU_DIM="$(echo 50 + $DU_DIM | bc)"

### Adding packages to config/packages.chroot

When a new package is added to config/packages.chroot, the entire build
environment must be refreshed (lb clean --purge). 

Otherwise you will get an error like:

    E: Unable to locate package <packagename>