Hi,

A follow up. I attempted again to build the image following the basic
tutorial from the manual, but I consistently have the same result: the
image does not boot.

I was able to dig further in the error I am having, because I was able to
get into an (initramfs) prompt when the boot fails to find /sbin/init.

If I unpack the initramfs.img file that live-build produces, then extract
with cpio, I can see that the reported missing function from my previous
messages (/init: Live: not found), is defined in the
/lib/live/boot/9990-main.sh script. In the extracted folder from (cpio
-id), the file has the right contents.

The problem is, when the live image boots, all scripts in that folder seems
to be zeroed. When the boot fails to find /init (because mountroot fails),
I get into an (initramfs) prompt. If I ls -l the file, it says it has the
correct number of bytes. However, if I open the file with vi, I only see ^@
signs (i.e., the file is full of zeroes). If I cat the file, it displays no
output.

So, the far i got was, /init fails because /bin/live-boot sources files
from /lib/live/boot/*, and those files are zeroed, hence, the functions
defined in those files does not get loaded, and the mountroot initramfs
hook fails, making /init (inside initramfs) unable to find /sbin/init to
boot the live system.

Any ideas on why this happened, or how can I fix it? Seems like a strange
bug loading the initramfs image, but only when the live system boots; if I
unpack the initramfs.img image, its contents seems ok.

One strange think I found is that, the scripts are correct inside
/bin/boot/* (i.e., /bin/boot/9990-main.sh is correct, viewed from the
initramfs boot prompt). Is there any reason why those scripts are both in
/bin/boot and /lib/live/boot/* inside the initramfs?

Thanks!

2015-10-05 22:05 GMT-03:00 Ronoaldo José de Lana Pereira <ronoa...@gmail.com
>:

> So, I was able to get a more detailed description on what seems wrong with
> my images, but I have no clues on how to fix it.
>
> I found that I cound use "-serial stdio" parameter to qemu to get the full
> boot output on the console, and I appended the "console=ttyS0" parameter to
> the boot screen on the qemu window.
>
> In my custom build image, I got this error this time:
> https://paste.debian.net/314571
> With a build of lb clean && sudo lb build (basic system image, as
> described in the docs), I got this error: https://paste.debian.net/314573
>
> The output seems to be related to errors mounting the root live file
> system, hence it does not seems to be able to run the expected /sbin/init
> from systemd.
>
> These images were built using the live-build package from jessie (4.0.3-1).
>
> Any clues on what I did wrong?
>
> Best regards,
>
> 2015-10-05 20:33 GMT-03:00 Ronoaldo José de Lana Pereira <
> ronoa...@gmail.com>:
>
>> Hi Diederik, it was a typo, sorry.
>>
>> 2015-10-05 17:56 GMT-03:00 Diederik de Haas <didi.deb...@cknow.org>:
>>
>>> On Monday 05 October 2015 17:15:21 Ronoaldo José de Lana Pereira wrote:
>>> > My custom images were failing with an error executing /init,
>>> complaining
>>> > about a missing /etc/ini.d/rcS file.
>>>
>>> Is that a typo or did it say a missing /etc/init.d/rcS (note the *init.d*
>>> part)?
>>
>>
>>
>>
>> --
>> Ronoaldo Pereira
>> ronoaldo.com <http://www.ronoaldo.com/>
>>
>
>
>
> --
> Ronoaldo Pereira
> ronoaldo.com <http://www.ronoaldo.com/>
>



-- 
Ronoaldo Pereira
ronoaldo.com <http://www.ronoaldo.com/>

Reply via email to