3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Tiny Core Linux 5.2 x86_64のisoカスタマイズ

Last updated at Posted at 2014-02-04

公式サイトの手順が現バージョンに合っていなかったので書いた。

以下を簡単にする方法

  • 動作環境 : MacOS, CentOS6.5
  1. GitHubのCorePure64-5.2リポジトリをclone
  2. sh 1_extract_rootfs64.sh
  3. extractフォルダにiso_data/boot/rootfs64.gzの中身が展開されるので、好きにカスタマイズする。
  4. sh 2_build_iso.sh にてisoを作成

ディレクトリ構造

  • 作業ディレクトリ
    • ~/iso : CorePure64-5.2.iso のマウント用 (展開が終わったら削除してよい)
    • ~/iso_data : CorePure64-5.2.iso の展開先
    • ~/extract : CorePure64-5.2.iso/boot/rootfs64.gz の展開先
  • iso出力
    • ~/TC-remastered.iso

事前準備

isoをダウンロード
$ wget http://distro.ibiblio.org/tinycorelinux/5.x/x86_64/release/CorePure64-5.2.iso

CentOSの場合

centosの場合(advancecompはepelから取得)
$ sudo yum install -y advancecomp
$ sudo yum install -y genisoimage
isoをiso_dataフォルダに展開
$ mkdir iso
$ sudo mount -o loop CorePure64-5.2.iso iso
$ cp -a iso iso_data
$ sudo umount iso
$ rmdir iso
  • CorePure64-5.2.iso をマウントして iso_data/以下にコピー

再構築手順

rootfs64.gzをextractフォルダに展開
$ mkdir extract
$ cd extract
$ zcat ../iso_data/boot/rootfs64.gz | sudo cpio -i -H newc -d
カスタマイズ
$ sudo mkdir mnt/sda1
rootfs64.gzの再構築
$ sudo find | sudo cpio -o -H newc | gzip -2 > ~/rootfs64.gz
$ cd
rootfs64.gzの圧縮率を高める
$ advdef -z4 rootfs64.gz
isoの作成
$ sudo mv rootfs64.gz iso_data/boot/rootfs64.gz
$ cd iso_data
$ sudo 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 .
$ rm -rf newiso

起動時にsataのHDDを自動マウントする方法

/opt/bootlocal.sh
+#!/bin/sh
+mount /dev/sda1 /mnt/sda1
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?