Custom init.gz


  • Senior Developer

    I’ve tried a diff of my init.gz and the FOG built init.gz, and, really, the only main differences I’m finding are binaries that I’m using are slightly more modern. Things like pigz is 2.3, clamav is set for 0.97.8, my customized chntpw-source-110511.zip, parted-3.1, the buildroot packaged version of ntfs-3g and tools, and gptfdisk from the buildroot system. It just seems strange that a customized version of init.gz would lose a partition after partimage runs.


  • Senior Developer

    I’m still not having any luck with a custom init.gz file.

    I’ve followed the instructions on the WIKI page, but it just doesn’t seem to work with even the direct copies from what the WIKI page states, or with my modified versions. If I fix all the minor issues with the absolute instructions given, or if I use my own, uploading an image will only copy the rec.img.000 file when I set the system to do a Single Disk, Resizable image. I’ve modified the fog script so output information and sleep at various times, at it seems, with the custom built init.gz system, after it finishes copying rec.img.000 it, seemingly, removes the ${hd}2 variable from availability, but right before it does the first partition copy, it does exist. If I use the init.gz file that FOG has already created, all works fine. I’m just trying to figure out what the main differences are.

    Can anyone help?


  • Senior Developer

    So I found out, today, why It isn’t creating the sys.img.000 file. It’s because, with my custom init.gz, it doesn’t recognize the /dev/sda2 partition. I don’t know why it doesn’t, but it doesn’t. I think it’s because the device_table.txt file, isn’t actually set in the config to use the static table versus the dynamic one, but for whatever reason, it only cares about it on the single disk, resizable option. I’ll keep testing to try to narrow it down. I’ve removed the references to partclone as it doesn’t build for some reason. It could be I haven’t got a clue (most likely) or because fog actually manually writes it’s partclone files to the system any way. I’m building now with static table reference.

    Just for posterity, I think I need to add this here. To add the fog components to the menu system, after you copy customize to package in buildroot, don’t forget to add source “package/customize/Config.in” somewhere in package/Config.in file. I added mine at the top, right above busybox. Don’t place it outside of a menu reference, so my source line is the 2nd line in the file.


  • Senior Developer

    My guess is the reason I’m not seeing both partitions get made is a lack of timing to register that it still has to process the sys partition.

    Well, that’s not the case. I’ve added a statement to this upload process to watch when and what’s happening along with a couple of sleep statements in between. It seems to recognize the command and variables properly, just won’t run the system.


  • Senior Developer

    Alright, I had to do some, slightly heavy, modding to chntpw-source-110511.zip so I’ll upload it here in case any one else finds it useful.

    As I had to mod the file, I removed the Makefile patch from the package/customize/chntpw folder as well, so I’m not trying to patch the files I already fixed to get working with buildroot2013.05

    [url="/_imported_xf_attachments/0/386_chntpw-source-110511.zip?:"]chntpw-source-110511.zip[/url]


  • Senior Developer

    One other change that needs to happen is:
    in package/customize/chntpw/chntpw.mk
    Change line 22 from: toolchain/patch-kernel.sh $(CHNTPW_DIR) package/customize/chntpw *.patch
    TO:
    support/scripts/apply-patches.sh $(CHNTPW_DIR) package/customize/chntpw *.patch

    And change any other files that may make the same reference. Of toolchain/patch-kernel.sh to support/scripts/apply-patches.sh (e.g. selectcore, pigz, dmidecode, and chntpw)


  • Senior Developer

    Just for assurance,

    uLibc is being built on:
    0.9.33.2
    gcc is being build on:
    4.7.3
    Kernel headers are:
    3.10.9
    Binutils are at 2.23.2
    Busybox is still 1.21.0

    I don’t know what else to place.


  • Senior Developer

    I’ll post my config file once I get it all working, but more, or less, it’s the same as it was, with the changes from fs/skeleton to system/skeleton and with target/generic/device_table.txt to system/device_table.txt

    I’m also attempting to remove ntfsprogsfog and parted as that is built into to system naturally. Partclone is added, but I don’t know if it’s compiling. It probably doesn’t help too much that fog/scripts is directly copying the files to the filesystem.

    [url="/_imported_xf_attachments/0/385_mybuildroot.txt?:"]mybuildroot.txt[/url]


  • Senior Developer

    Ran into a few issues. First, the kernel headers needs a few lines input into the sysinfo.h file. You can download the kernel and unpack it. Then do a search for sysinfo.h, there are multiple, but do the one in the ./include/uapi/linux/sysinfo.h folder of the kernel-dir. You’ll need to add, near the top:
    #ifndef __kernel_long_t
    typedef long __kernel_long_t;
    typedef unsigned long __kernel_ulong_t;
    #endif
    below the define _LINUX_SYSINFO_H part.
    Once done, re-tar it backinto linux-<kernelver>.tar.bz2
    In selectcore, make a change to:
    package/customize/selectcore/selectcore.mk file on line:
    27 from
    $(CONFIG_UPDATE) $(SELECTCORE_DIR)/build-aux TO:
    $(call CONFIG_UPDATE,$$(SELECTCORE_DIR)/build-aux)


Log in to reply
 

359
Online

6.2k
Users

13.6k
Topics

128.1k
Posts