Skip to content

Instantly share code, notes, and snippets.

@Jared314
Last active June 11, 2022 13:08
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Jared314/1273268 to your computer and use it in GitHub Desktop.
Save Jared314/1273268 to your computer and use it in GitHub Desktop.
Remaster Tiny Core Linux Core for x64
#!/bin/sh
# Ubuntu 12.04
# sudo apt-get -y install p7zip-full genisoimage
wget http://www.tinycorelinux.net/4.x/x86/release/Core-current.iso
wget http://www.tinycorelinux.net/4.x/x86/release/distribution_files/core64.gz
wget http://www.tinycorelinux.net/4.x/x86/release/distribution_files/vmlinuz64
# extract files
7z x Core-current.iso -ocore-current
rm -rf core-current/[BOOT]
chmod 744 core-current/boot/isolinux/isolinux.bin
# replace 32-bit files
rm core-current/boot/core.gz
rm core-current/boot/vmlinuz
mv core64.gz core-current/boot/core64.gz
mv vmlinuz64 core-current/boot/vmlinuz64
# modify the boot script
sed 's/core.gz/core64.gz/g;s/vmlinuz/vmlinuz64/g' core-current/boot/isolinux/isolinux.cfg > core-current/boot/isolinux/isolinux64.cfg
rm core-current/boot/isolinux/isolinux.cfg
mv core-current/boot/isolinux/isolinux64.cfg core-current/boot/isolinux/isolinux.cfg
# build iso
mkisofs -l -J -R -r -V TC-Core64 -no-emul-boot -boot-load-size 4 \
-boot-info-table -b boot/isolinux/isolinux.bin \
-c boot/isolinux/boot.cat -o core64-current.iso core-current
# cleanup
rm -rf core-current
@Alex-ZL
Copy link

Alex-ZL commented Mar 20, 2013

thx, helpful script!
Now "micorcore-current" need to be replaced with "Core-current", for the it's name has been changed.

@Jared314
Copy link
Author

Updated the script to work with the new name.

@Frankiepaul
Copy link

/sorry/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment