WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Core & TinyCore ISO pimped-up to Core64 & TinyCore64 ISO. Upload to site maybe?  (Read 2119 times)

SeventhSin

  • Guest
Hi,

It has always seemed to me that Core64 is a bit like the Holy Ghost, meaning that it is talked about but nowhere to be seen.

Having found myself with a bit of time to spare, I took it upon myself to take the base Core-10.1 & TinyCore-10.1 ISOs and pimp them up to Core64 & TinyCore64, AKA 64 bit KERNEL + 32 bit user land. TinyCore64 has been pimped-up further with Xfbdev instead of Xvesa, for obvious reasons. No other change has been made to the base ISOs. They are in use on my dev VMs as we speak.

Below, the ISO pimping script. Feel free to test, use, modify and make the ISOs available on the website if there are no impediments to that.

Code: [Select]
#!/bin/sh


CORE32_ISO_NAME=Core-10.1
TINY32_ISO_NAME=TinyCore-10.1

CORE64_ISO_NAME=Core64-10.1
TINY64_ISO_NAME=TinyCore64-10.1

BLD_DIR=$(pwd)
DLD_DIR=${BLD_DIR}/dld
TMP_DIR=${BLD_DIR}/tmp
OUT_DIR=${BLD_DIR}/out
DLD_URL=https://distro.ibiblio.org/tinycorelinux/10.x/x86

[[ -d ${TMP_DIR} ]] && sudo rm -rf ${TMP_DIR}
[[ -d ${OUT_DIR} ]] && sudo rm -rf ${OUT_DIR}
[[ -d ${DLD_DIR} ]] || mkdir ${DLD_DIR}

mkdir ${TMP_DIR} ${OUT_DIR}

cd ${DLD_DIR}

[[ -f ${CORE32_ISO_NAME}.iso ]] || wget ${DLD_URL}/release/${CORE32_ISO_NAME}.iso
[[ -f ${TINY32_ISO_NAME}.iso ]] || wget ${DLD_URL}/release/${TINY32_ISO_NAME}.iso
[[ -f vmlinuz64 ]] || wget ${DLD_URL}/release/distribution_files/vmlinuz64
[[ -f modules64.gz ]] || wget ${DLD_URL}/release/distribution_files/modules64.gz
[[ -f rootfs.gz ]] || wget ${DLD_URL}/release/distribution_files/rootfs.gz
[[ -f Xfbdev.tcz ]] || wget ${DLD_URL}/tcz/Xfbdev.tcz

cd ${BLD_DIR}

[[ $(which mkisofs) ]] || tce-load -wil mkisofs-tools.tcz


sudo mkdir -p ${TMP_DIR}/${CORE64_ISO_NAME}/base ${TMP_DIR}/${CORE64_ISO_NAME}/mods
sudo mkdir -p ${TMP_DIR}/${TINY64_ISO_NAME}/base ${TMP_DIR}/${TINY64_ISO_NAME}/mods

sudo mount ${DLD_DIR}/${CORE32_ISO_NAME}.iso ${TMP_DIR}/${CORE64_ISO_NAME}/base -o loop,ro
sudo mount ${DLD_DIR}/${TINY32_ISO_NAME}.iso ${TMP_DIR}/${TINY64_ISO_NAME}/base -o loop,ro

sudo cp -r ${TMP_DIR}/${CORE64_ISO_NAME}/base/* ${TMP_DIR}/${CORE64_ISO_NAME}/mods/
sudo cp -r ${TMP_DIR}/${TINY64_ISO_NAME}/base/* ${TMP_DIR}/${TINY64_ISO_NAME}/mods/

sudo sh -c "cat ${DLD_DIR}/rootfs.gz ${DLD_DIR}/modules64.gz > ${TMP_DIR}/${CORE64_ISO_NAME}/mods/boot/core.gz"
sudo cp ${DLD_DIR}/vmlinuz64 ${TMP_DIR}/${CORE64_ISO_NAME}/mods/boot
sudo sh -c "cat ${DLD_DIR}/rootfs.gz ${DLD_DIR}/modules64.gz > ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/core.gz"
sudo cp ${DLD_DIR}/vmlinuz64 ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot

sudo sed -i 's#/boot/vmlinuz#/boot/vmlinuz64#g' ${TMP_DIR}/${CORE64_ISO_NAME}/mods/boot/isolinux/isolinux.cfg
sudo sed -i 's#/boot/vmlinuz#/boot/vmlinuz64#g' ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/isolinux/isolinux.cfg
sudo sed -i 's#APPEND loglevel=3#APPEND loglevel=3 vga=791#g' ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/isolinux/isolinux.cfg
sudo sed -i 's#TinyCore#TinyCore64#g' ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/isolinux/isolinux.cfg

sudo rm -rf ${TMP_DIR}/${TINY64_ISO_NAME}/mods/cde/optional/Xvesa*
sudo cp ${DLD_DIR}/Xfbdev* ${TMP_DIR}/${TINY64_ISO_NAME}/mods/cde/optional/
sudo sed -i 's#Xvesa#Xfbdev#g' ${TMP_DIR}/${TINY64_ISO_NAME}/mods/cde/onboot.lst

sudo rm -f ${TMP_DIR}/${CORE64_ISO_NAME}/mods/boot/vmlinuz ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/vmlinuz

sudo umount ${TMP_DIR}/${CORE64_ISO_NAME}/base/ ${TMP_DIR}/${TINY64_ISO_NAME}/base/

sudo chown -R root:root ${TMP_DIR}/${CORE64_ISO_NAME}/mods && sudo chown -R root:root ${TMP_DIR}/${TINY64_ISO_NAME}/mods
sudo chmod -R 755 ${TMP_DIR}/${CORE64_ISO_NAME}/mods && sudo chmod -R 755 ${TMP_DIR}/${TINY64_ISO_NAME}/mods

sudo mkisofs -l -J -r -V Core64 -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin \
             -c boot/isolinux/boot.cat -o ${OUT_DIR}/${CORE64_ISO_NAME}.iso ${TMP_DIR}/${CORE64_ISO_NAME}/mods

sudo mkisofs -l -J -r -V TinyCore64 -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin \
             -c boot/isolinux/boot.cat -o ${OUT_DIR}/${TINY64_ISO_NAME}.iso ${TMP_DIR}/${TINY64_ISO_NAME}/mods

md5sum ${OUT_DIR}/${CORE64_ISO_NAME}.iso > ${OUT_DIR}/${CORE64_ISO_NAME}.iso.md5.txt
md5sum ${OUT_DIR}/${TINY64_ISO_NAME}.iso > ${OUT_DIR}/${TINY64_ISO_NAME}.iso.md5.txt

echo "=================================================================================="
echo "Done. ${CORE64_ISO_NAME}.iso and ${TINY64_ISO_NAME}.iso available in '${OUT_DIR}/'"
echo "=================================================================================="

exit 0
« Last Edit: July 18, 2019, 01:49:18 PM by SeventhSin »

SeventhSin

  • Guest
Forgot to update boot menus on TinyCore64 from "Boot Core" to "Boot Core64". Updated script below.

Code: [Select]
#!/bin/sh


CORE32_ISO_NAME=Core-10.1
TINY32_ISO_NAME=TinyCore-10.1

CORE64_ISO_NAME=Core64-10.1
TINY64_ISO_NAME=TinyCore64-10.1

BLD_DIR=$(pwd)
DLD_DIR=${BLD_DIR}/dld
TMP_DIR=${BLD_DIR}/tmp
OUT_DIR=${BLD_DIR}/out
DLD_URL=https://distro.ibiblio.org/tinycorelinux/10.x/x86

[[ -d ${TMP_DIR} ]] && sudo rm -rf ${TMP_DIR}
[[ -d ${OUT_DIR} ]] && sudo rm -rf ${OUT_DIR}
[[ -d ${DLD_DIR} ]] || mkdir ${DLD_DIR}

mkdir ${TMP_DIR} ${OUT_DIR}

cd ${DLD_DIR}

[[ -f ${CORE32_ISO_NAME}.iso ]] || wget ${DLD_URL}/release/${CORE32_ISO_NAME}.iso
[[ -f ${TINY32_ISO_NAME}.iso ]] || wget ${DLD_URL}/release/${TINY32_ISO_NAME}.iso
[[ -f vmlinuz64 ]] || wget ${DLD_URL}/release/distribution_files/vmlinuz64
[[ -f modules64.gz ]] || wget ${DLD_URL}/release/distribution_files/modules64.gz
[[ -f rootfs.gz ]] || wget ${DLD_URL}/release/distribution_files/rootfs.gz
[[ -f Xfbdev.tcz ]] || wget ${DLD_URL}/tcz/Xfbdev.tcz

cd ${BLD_DIR}

[[ $(which mkisofs) ]] || tce-load -wil mkisofs-tools.tcz


sudo mkdir -p ${TMP_DIR}/${CORE64_ISO_NAME}/base ${TMP_DIR}/${CORE64_ISO_NAME}/mods
sudo mkdir -p ${TMP_DIR}/${TINY64_ISO_NAME}/base ${TMP_DIR}/${TINY64_ISO_NAME}/mods

sudo mount ${DLD_DIR}/${CORE32_ISO_NAME}.iso ${TMP_DIR}/${CORE64_ISO_NAME}/base -o loop,ro
sudo mount ${DLD_DIR}/${TINY32_ISO_NAME}.iso ${TMP_DIR}/${TINY64_ISO_NAME}/base -o loop,ro

sudo cp -r ${TMP_DIR}/${CORE64_ISO_NAME}/base/* ${TMP_DIR}/${CORE64_ISO_NAME}/mods/
sudo cp -r ${TMP_DIR}/${TINY64_ISO_NAME}/base/* ${TMP_DIR}/${TINY64_ISO_NAME}/mods/

sudo sh -c "cat ${DLD_DIR}/rootfs.gz ${DLD_DIR}/modules64.gz > ${TMP_DIR}/${CORE64_ISO_NAME}/mods/boot/core.gz"
sudo cp ${DLD_DIR}/vmlinuz64 ${TMP_DIR}/${CORE64_ISO_NAME}/mods/boot
sudo sh -c "cat ${DLD_DIR}/rootfs.gz ${DLD_DIR}/modules64.gz > ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/core.gz"
sudo cp ${DLD_DIR}/vmlinuz64 ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot

sudo sed -i 's#/boot/vmlinuz#/boot/vmlinuz64#g' ${TMP_DIR}/${CORE64_ISO_NAME}/mods/boot/isolinux/isolinux.cfg
sudo sed -i 's#/boot/vmlinuz#/boot/vmlinuz64#g' ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/isolinux/isolinux.cfg
sudo sed -i 's#APPEND loglevel=3#APPEND loglevel=3 vga=791#g' ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/isolinux/isolinux.cfg
sudo sed -i 's#Core#Core64#g' ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/isolinux/isolinux.cfg

sudo rm -rf ${TMP_DIR}/${TINY64_ISO_NAME}/mods/cde/optional/Xvesa*
sudo cp ${DLD_DIR}/Xfbdev* ${TMP_DIR}/${TINY64_ISO_NAME}/mods/cde/optional/
sudo sed -i 's#Xvesa#Xfbdev#g' ${TMP_DIR}/${TINY64_ISO_NAME}/mods/cde/onboot.lst

sudo rm -f ${TMP_DIR}/${CORE64_ISO_NAME}/mods/boot/vmlinuz ${TMP_DIR}/${TINY64_ISO_NAME}/mods/boot/vmlinuz

sudo umount ${TMP_DIR}/${CORE64_ISO_NAME}/base/ ${TMP_DIR}/${TINY64_ISO_NAME}/base/

sudo chown -R root:root ${TMP_DIR}/${CORE64_ISO_NAME}/mods && sudo chown -R root:root ${TMP_DIR}/${TINY64_ISO_NAME}/mods
sudo chmod -R 755 ${TMP_DIR}/${CORE64_ISO_NAME}/mods && sudo chmod -R 755 ${TMP_DIR}/${TINY64_ISO_NAME}/mods

sudo mkisofs -l -J -r -V Core64 -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin \
             -c boot/isolinux/boot.cat -o ${OUT_DIR}/${CORE64_ISO_NAME}.iso ${TMP_DIR}/${CORE64_ISO_NAME}/mods

sudo mkisofs -l -J -r -V TinyCore64 -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin \
             -c boot/isolinux/boot.cat -o ${OUT_DIR}/${TINY64_ISO_NAME}.iso ${TMP_DIR}/${TINY64_ISO_NAME}/mods

md5sum ${OUT_DIR}/${CORE64_ISO_NAME}.iso > ${OUT_DIR}/${CORE64_ISO_NAME}.iso.md5.txt
md5sum ${OUT_DIR}/${TINY64_ISO_NAME}.iso > ${OUT_DIR}/${TINY64_ISO_NAME}.iso.md5.txt

echo "=================================================================================="
echo "Done. ${CORE64_ISO_NAME}.iso and ${TINY64_ISO_NAME}.iso available in '${OUT_DIR}/'"
echo "=================================================================================="

exit 0