Modify init.gz



  • Brief resume :
    Lenovos don’t have a standard 512B MBR. (/dev/sda1 starts @ 2048)
    So no integrated FOG function can clone an HD (as MBR is replaced by standard Win7 one).
    PXE boot can’t be used as first boot device neither as the chainloader (booting from local HD) is broken (probably because of this long MBR too).
    Way found (thanks to Tom Elliott) is to debug-upload a well configured /dev/sda2 to FOG, and to debug-deploy it to destination HD using partimage.
    Tom has kindly (and fast) built an init.gz that has all the keymaps, so debug mode is now easy for a non-QWERTY keyboard.
    As I would like to keep the original MBR (which allows to boot from /dev/sda3 : Recovery partition by pressing F11 key at startup), I have to use debug mode.
    So I need to add a small restore_pc1sda2.sh script in /root that mounts FOG_SERVER:/images and starts the restore process of ONLY /dev/sda2
    FOG Wiki is telling to gunzip init.gz, but I’m told :
    [QUOTE]gzip: init.gz: not in gzip format[/QUOTE]Could someone please assist on how to decompress init.gz and recompress it ?
    Thanks (once more) for your time.
    Nicolas



  • Thank Tom !
    worked as expected :)
    Nicolas
    PS : sorry for the delay, motorbike fall has taken me away from computers these days.


  • Senior Developer

    My init gz is compressed in lzma to make it smaller. However if you decompress it you want be able to decompress as lzma. To extract run this command.

    lzma -d -c /tftpboot/fog/images/init.gz > /tftpboot/fog/images/init
    

    Mount the init file as per normal instruction. Add your script. Unmount the file and recompress as gz. To recompress run this command.

    gzip -9 < /tftpboot/fog/images/init >  /tftpboot/fog/images/init.gz
    

Log in to reply
 

475
Online

38914
Users

10684
Topics

101325
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.