zoukankan      html  css  js  c++  java
  • tinycore remaster方法

    11.1. Prerequisites
    You need a Linux distribution with the required programs available:
    cpio, tar, gzip, advdef, and mkisofs. This need not be Tiny Core
    itself, but remastering inside Tiny Core is the most tested option.
    For remastering on Core, install the extensions advcomp.tcz and
    optionally mkisofs-tools.tcz if creating an ISO image.
    11.2. Unpacking
    First, we’ll extract the kernel and initrd image from the latest Core
    ISO.

    sudo mkdir /mnt/tmp
    sudo mount TinyCore-current.iso /mnt/tmp -o loop,ro
    cd /mnt/tmp
    cp boot/vmlinuz boot/tinycore.gz /tmp
    sudo umount /mnt/tmp
    

      

    If you are going to create an ISO image, instead of copying only
    these two files, copy everything:

    sudo mkdir /mnt/tmp
    sudo mount TinyCore-current.iso /mnt/tmp -o loop,ro
    cp -a /mnt/tmp/boot /tmp
    mv /tmp/boot/tinycore.gz /tmp
    sudo umount /mnt/tmp
    

      

    With the files copied into /tmp, we’ll be unpacking the initrd image
    next.

    $ sudo mkdir /tmp/extract
    $ cd /tmp/extract
    $ zcat /tmp/tinycore.gz | sudo cpio -i -H newc -d
    

      

    Please note the use of sudo where needed; root rights are required
    to preserve permissions correctly. If your host distribution sets non-
    default flags for /tmp, you may also need to change the permissions
    of the /tmp/extract directory - it needs to be root:root 755 in order
    to produce a bootable image.
    Now, with the initrd image laid bare before our eyes, feel free to do
    any edits, additions, or removals needed.

    11.3. Packing
    With the modifications done, these steps create the initrd image
    from the extracted directory tree:

    $ cd /tmp/extract
    $ sudo find | sudo cpio -o -H newc | 
    gzip -2 > ../tinycore.gz
    $ cd /tmp
    $ advdef -z4 tinycore.gz
    

      

    The image is compressed using gzip’s level 2 to save time.
    Advdef is used to re-compress the image with a slightly better
    implementation, producing a smaller image that is faster to boot.

    11.4. Creating an ISO image

    The following commands create a bootable ISO image, ready to be
    burned or booted in a virtual machine:

    cd /tmp
    mv tinycore.gz boot
    mkdir newiso
    mv boot newiso
    mkisofs -l -J -r -V TC-custom -no-emul-boot 
    -boot-load-size 4 
    -boot-info-table -b boot/isolinux/isolinux.bin 
    -c boot/isolinux/boot.cat -o TC-remastered.iso newiso
    # Optionally clean-up the temp dir
    rm -rf newiso
    

      

    注: v6.4版本亲测有效,只是需要换一下文件名

    转自: 《corebook——into the Core—A look at  Tiny Core linux》

  • 相关阅读:
    iOS 字符串遍历
    ImageView通过matrix实现手势缩放,放大,缩小 ,移动
    Xcode 清理存储空间
    iOS学习之字符串(NSString)的截取、匹配、分隔
    convertRect:toView: 和 convertRect:fromView:方法浅析
    社区团购很火爆,影响到小城市菜市场水果店的生意了
    工业级推荐系统 思维导图
    RecBole推荐系统思维导图
    Flink + 强化学习搭建实时推荐系统 思维导图
    传统开源推荐系统介绍思维导图
  • 原文地址:https://www.cnblogs.com/pinganzi/p/5168369.html
Copyright © 2011-2022 走看看