Wiki.TinyCoreLinux.Com
Location : Tiny Core Linux >
Remastering
This guide assumes you are comfortable with the command line.
In the core there is a gzipped cpio archive. This can then be bundled along with the kernel for the boot method you like, for example an ISO image.
The remaster process can be done from inside TC (with advcomp.tce loaded, and mkisofs-tools.tce if you want to create an ISO image), or from any other Linux distribution that has the required tools (cpio, tar, gzip, advdef, mkisofs if making an ISO)
Note: advcomp.tce is optional. If not installed, skip all the advdef commands.
First, get the kernel and tinycore.gz from the iso:
If you are going to create an ISO image, instead of copying only two files, copy everything instead:
Then, extract tinycore.gz for adding/removing something:
Now, the full filesystem is in /tmp/extract. Feel free to add, remove, or edit anything you like.
If you are remastering 2.x where x <= 1 and you added any kernel modules then execute
You must use chroot because "depmod -b /tmp/extract" will not follow the kernel.tclocal symbolic link to find modules under /usr/local.
For versions 2.x where x >= 2 and later:
If you added shared libraries then execute
Afterwards, pack it up:
It is only packed at level 2 to save time, as advdef -z4 is equivalent to about -11 on gzip.
Now, you have an edited tinycore.gz. If going to boot any other way than CD, copy it over with the kernel to your boot device.
(Above, mind the mkisofs command line spans three lines above.)
TC-remastered.iso can now be burned or started in a virtual machine.
You may find useful ISO Master
, a GUI tool to edit disk image. It is available in the repository as a .tcz extension.
Remastering
Table of contents
Remastering TC
This guide assumes you are comfortable with the command line.
In the core there is a gzipped cpio archive. This can then be bundled along with the kernel for the boot method you like, for example an ISO image.
The remaster process can be done from inside TC (with advcomp.tce loaded, and mkisofs-tools.tce if you want to create an ISO image), or from any other Linux distribution that has the required tools (cpio, tar, gzip, advdef, mkisofs if making an ISO)
Note: advcomp.tce is optional. If not installed, skip all the advdef commands.
Unpacking
First, get the kernel and tinycore.gz from the iso:
sudo mkdir /mnt/tmp sudo mount tinycore.iso /mnt/tmp -o loop,ro cp /mnt/tmp/boot/bzImage /mnt/tmp/boot/tinycore.gz /tmp sudo umount /mnt/tmp
If you are going to create an ISO image, instead of copying only two files, copy everything instead:
sudo mkdir /mnt/tmp sudo mount tinycore.iso /mnt/tmp -o loop,ro cp -a /mnt/tmp/boot /tmp mv /tmp/boot/tinycore.gz /tmp sudo umount /mnt/tmp
Then, extract tinycore.gz for adding/removing something:
mkdir /tmp/extract cd /tmp/extract zcat /tmp/tinycore.gz | sudo cpio -i -H newc -d
Now, the full filesystem is in /tmp/extract. Feel free to add, remove, or edit anything you like.
Packing
If you are remastering 2.x where x <= 1 and you added any kernel modules then execute
sudo chroot /tmp/extract depmod -a 2.6.29.1-tinycore
You must use chroot because "depmod -b /tmp/extract" will not follow the kernel.tclocal symbolic link to find modules under /usr/local.
For versions 2.x where x >= 2 and later:
sudo depmod -b /tmp/extract 2.6.29.1-tinycore
If you added shared libraries then execute
sudo ldconfig -r /tmp/extract
Afterwards, pack it up:
cd /tmp/extract find | sudo cpio -o -H newc | gzip -2 > ../tinycore.gz cd /tmp advdef -z4 tinycore.gz
It is only packed at level 2 to save time, as advdef -z4 is equivalent to about -11 on gzip.
Now, you have an edited tinycore.gz. If going to boot any other way than CD, copy it over with the kernel to your boot device.
Creating an iso
If you would like to create an ISO image:cd /tmp mv tinycore.gz boot mkdir newiso mv boot newiso mkisofs -l -J -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 rm -rf newiso
(Above, mind the mkisofs command line spans three lines above.)
TC-remastered.iso can now be burned or started in a virtual machine.
GUI Tools
You may find useful ISO Master
Dynamic root filesystem remastering
Contributors to this page: helander
,
PingPing
,
bmarkus
,
danielibarnes
,
dentonlt
,
fab
,
thehatsrule
and
curaga
.
Page last modified on Wednesday 06 of January, 2010 06:56:27 MST by helander.