[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: create hdd live with backports kernel



(forgot to cc the list, resending...)

I have spent some time today investigating your problem alongside other
work, and I can't replicate the problem.

I created a new VM into which I installed Debian 7.8 amd64 (What I had
to hand). I installed live-build v3.0.5-1, created an empty build
directory, and created the necessary auto files. To start with I
populated the auto/config file with settings inline with those I have
been using in a sid VM for sid based images, but building a Wheezy image
this time. It went perfectly.

Then:
 - I switched from iso-hybrid to a hdd build, it went perfectly.
 - I switched to i386 686-pae, and after clearing the cached amd64
bootstrap (with sudo lb clean --cache), it went perfectly.
 - I enabled backports, which went perfectly (not that any notable
difference was expected).
 - I created a package-lists file in which to specify initramfs as
pointed out as being necessary by someone previously in this discussion,
and set the kernel package (with --linux-packages
"linux-image-3.16.0-0.bpo.4"). This went perfectly!!!

I haven't actually tried to use the image, but:
 - The build completed successfully.
 - Checking out chroot/boot I see a single set of kernel files, with the
correct version and type (3.16.0-0.bpo.4-686-pae). No sign of 3.2.

So, it seems to me that this is entirely user error. I have no idea how
exactly, but somehow you're completely messing it up.

It is obvious to me that the error in the log output you've provided is
coming from line 172 in scripts/build/binary_syslinux. This line is
trying to rename the kernel files to simpler names (due to a filename
length restriction in syslinux). live-build v4.x improves this code,
ignoring all but the latest version of these kernel files. The reason
the error is occurring is because the 3.x code here is expecting there
to be only a single set of kernel files, but somehow you've ended up
with two. (The line is: mv binary/live/vmlinuz-* binary/live/vmlinuz).
With two files matching the wildcard, it incorrectly assumes
binary/live/vmlinuz is a directory, and correctly complains that it does
not exist.

As I said, live-build v4.x improves this code, which wouldn't fail here,
unlike 3.x, however the real problem is why on earth you've got two
versions of the kernel files. My test build did not end up with the 3.2
kernel, unlike yours. Clearly you're doing something wrong to end up
with it.

I do notice in the quoted message of yours below that you're issuing
multiple 'lb config' commands to update your config with changes. This
is not something I do. I don't know whether it makes a difference or
not, I wouldn;t have thought so, but try just putting your settings in
the auto/config file and avoiding this to see if it makes a difference.
Also note that you can supply more than one setting in the same 'lb
config' command.

So my advice, get a clean directory, create the auto files (you can get
a copy from /usr/share/doc/live-build/examples), populate auto/config
with your configuration, then execute the following:
1) lb config
2) lb build
If you make a mistake and need to start over, do 'lb clean' before
repeating the two commands above. Depending on what/how you mess up, you
may also want to do 'lb clean --cache' and delete the config directory.

If in doing that it works for you (and it should, because otherwise
you're doing something wrong or there's some issue with your system),
then great, otherwise, if we're to figure out what's wrong, you'll need
to provide a copy of your config, and precise details of what you did
(starting from having a clean build directory).

On 27/01/2015 22:38, upiter77@lycos.com wrote:
> hi
>
> My live-build version:
>
> # dpkg -l | grep live-build
> ii live-build 3.0.5-1 all Live System Build Scripts
>
> The main problem seems to be: "mv: target `binary/live/vmlinuz' is not
> a directory":
>
> Selecting previously unselected package syslinux.
> Unpacking syslinux (from .../syslinux_2%3a4.05+dfsg-6+deb7u1_i386.deb)
> ...
> Processing triggers for man-db ...
> Setting up syslinux-common (2:4.05+dfsg-6+deb7u1) ...
> Setting up syslinux (2:4.05+dfsg-6+deb7u1) ...
> mv: target `binary/live/vmlinuz' is not a directory
> P: Begin unmounting filesystems...
> P: Saving caches...
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
>
> and again "bianry.img" was not created:
>
> # ls
> auto binary.list cache chroot.packages.install config
> binary binary.packages chroot chroot.packages.live local
>
> because of different versions:
>
> # ls binary/live
> filesystem.packages initrd.img-3.2.0-4-rt-686-pae
> filesystem.packages-remove memtest
> filesystem.squashfs vmlinuz-3.16.0-0.bpo.4-686-pae
> initrd.img-3.16.0-0.bpo.4-686-pae vmlinuz-3.2.0-4-rt-686-pae
>
> and I cannot understand why still tried to build
> "initrd.img-3.2.0-4-rt-686-pae"
>
> In my config ist just one image flavour:
>
> #lb config --linux-flavours 686-pae
> #lb config --linux-packages linux-image-3.16.0-0.bpo.4
>
> On 2015-01-22 13:27, jnqnfe wrote:
>
>> The following line in your output/log tells us that it's made it into
>> the chrook_hooks script: [2015-01-13 22:54:34] lb chroot_hooks
>> clearly it is getting as far as outputting "Begin executing hooks..."
>> since that appears in your output/log. The important line in your
>> ouput/log is this one: mount: special device config does not exist
>> This tells us that the mount program cannot find something called
>> 'config'. If you look in the chroot_hooks script, the very first
>> thing it does, after the usual script initialisation stuff is execute
>> the following block of code (copied from LB v4.0.4-1): # Make build
>> config available to chroot hooks. First, make the bind # mount and
>> then make it read-only. This can't happen in one mount # command,
>> then the resulting mount will be rw (see mount(8)). Making it # ro
>> prevents modifications and prevents accidentally removing the #
>> contents of the config directory when removing the chroot. mkdir -p
>> chroot/live-build/config mount -o bind config
>> chroot/live-build/config mount -o remount,ro,bind config
>> chroot/live-build/config So, it is trying to mount the
>> chroot/live-build/config directory it just created, to your config
>> directory. According to the error, your config directory does not
>> exist at this point... Do you have a config directory prior to or at
>> the start of your build process? (Running lb config prior to lb build
>> will create it, though lb build will run lb config automatically if
>> you don't do it manually). There should be no reason for not having a
>> config directory. Check it exists, and if so, check the permissions
>> (or just delete and allow it to be recreated). Try ensuring that a
>> clean build is done by executing lb clean before anything else. Which
>> version of live-build are you using? 3.x or 4.x? I am not familiar
>> with 3.x. If that is what you are using, perhaps it has a bug, but if
>> 4.x, I'd lean towards user error... On 22/01/2015 12:35,
>> upiter77@lycos.com wrote: hi Has anyone an idea for this BUG, why the
>> binary.img won't be created? On 2015-01-14 09:50, upiter77@lycos.com
>> wrote: Hi Today I have tried to craete hdd image with backports
>> kernel, but binary.img was not created:
>> .......................................................................................
>> [2015-01-14 10:40:09] lb binary_grub [2015-01-14 10:40:09] lb
>> binary_grub2 [2015-01-14 10:40:09] lb binary_syslinux P: Begin
>> installing syslinux... Reading package lists... Done Building
>> dependency tree Reading state information... Done Suggested packages:
>> os-prober Recommended packages: mtools libcrypt-passwdmd5-perl The
>> following NEW packages will be installed: syslinux syslinux-common 0
>> upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to
>> get 1031 kB of archives. After this operation, 3393 kB of additional
>> disk space will be used. Get:1 http://ftp.de.debian.org/debian/ [1]
>> [1 [1]] wheezy/main syslinux-common all 2:4.05+dfsg-6+deb7u1 [934 kB]
>> Get:2 http://ftp.de.debian.org/debian/ [1] [1 [1]] wheezy/main
>> syslinux i386 2:4.05+dfsg-6+deb7u1 [96.1 kB] Fetched 1031 kB in 0s
>> (2805 kB/s) Selecting previously unselected package syslinux-common.
>> (Reading database ... 67291 files and directories currently
>> installed.) Unpacking syslinux-common (from
>> .../syslinux-common_2%3a4.05+dfsg-6+deb7u1_all.deb) ... Selecting
>> previously unselected package syslinux. Unpacking syslinux (from
>> .../syslinux_2%3a4.05+dfsg-6+deb7u1_i386.deb) ... Processing triggers
>> for man-db ... Setting up syslinux-common (2:4.05+dfsg-6+deb7u1) ...
>> Setting up syslinux (2:4.05+dfsg-6+deb7u1) ... mv: target
>> `binary/live/vmlinuz' is not a directory P: Begin unmounting
>> filesystems... P: Saving caches... Reading package lists... Done
>> Building dependency tree Reading state information... Done # ls auto
>> binary.list cache chroot.packages.install config binary
>> binary.packages chroot chroot.packages.live local Knows anyone a
>> solution? greetings Piotr On 2015-01-14 07:08, Charles Samuels wrote:
>> On Tuesday, January 13, 2015 10:08:19 PM Charles Samuels wrote:
>> Solved: I add this to config/package-lists/my.list.chroot: Setting up
>> user-setup (1.48) ... Processing triggers for initramfs-tools ...
>> update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64 df:
>> Warning: cannot read table of mounted file systems: No such file or
>> directory live-boot: core filesystems devices utils udev wget
>> blockdev. [2015-01-13 22:54:34] lb chroot_includes P: Begin copying
>> chroot includes... [2015-01-13 22:54:34] lb chroot_hooks P: Begin
>> executing hooks... mount: special device config does not exist P:
>> Begin unmounting filesystems... P: Saving caches... Reading package
>> lists... Done Building dependency tree Reading state information...
>> Done and then live-build exits without creating an image. How is it
>> getting 3.2.0-4 and why does live-build appear to want to install
>> linux-image-amd64 and the one I specify in
>> LB_LINUX_PACKAGES="linux-image-3.16.0-0.bpo.4"? Charles
>
> Links:
> ------
> [1] http://ftp.de.debian.org/debian/ [1]
>
>
>
> Links:
> ------
> [1] http://ftp.de.debian.org/debian/
>
>


Reply to: