Tiny Core Linux
General TC => Remasters / Remixes - Unofficial => Topic started by: remus on May 03, 2018, 11:37:15 PM
-
Hi all,
My procedure for remastering a standard mc 3.8.4 boot cd isn't working for mc9
Last time I did this (And it was many years ago) I followed the following procedure.
- boot in virutalbox vm with mc iso
- format virtual hard drive space in virtual machine (work space ex: /mnt/sda1/temp)
- use tce-load to install mkisofs-tools.tcz and syslinux.tcz
- attach usb flash drive with qremaster file and mc iso, and copy to /mnt/sda1/temp
- cd to /mnt/sda1/temp (where my iso and qremaster are)
- run following command
sudo sh qremaster -t 50 -H syslog= waitusb=8 nodhcp= noautologin= showapps= noutc= tz=EST-10 cron= mc3.8.4.iso output.iso
- Copy output.iso to usb flash drive
- power down this virtual machine
- test output.iso with my boot codes in another vm that has is setup with some apps.
I simply observe the boot up process, it should show me time is set to zone 10. It should show apps at bootup, it should not autologin.
So I'm doing this same old technique for mc 9 and its not working.
Can anyone provide some suggestions or helpful comments ?
-
- use tce-load to install mkisofs-tools.tcz and syslinux.tcz
...
So I'm doing this same old technique for mc 9 and its not working.
My guess is most likely due to the update of the syslinux.tcz
It had broken the "tc-install" extension before.
See this post (http://forum.tinycorelinux.net/index.php/topic,20504.0.html)
Since version 5.00, some c32 modules need additional files (libraries) so to work correctly.
Syslinux Wiki (https://www.syslinux.org/wiki/index.php?title=Library_modules)
Isolinux Wiki (https://www.syslinux.org/wiki/index.php?title=ISOLINUX#How_Can_I_Make_a_Bootable_CD_With_ISOLINUX.3F)
You'll need ldlinux.c32 which is most likely referring to /usr/local/share/syslinux/ldlinux.c32 on TC.
-
Just in case my post is a bit unclear
qremaster is not generating any errors, it is producing output.iso
when I boot from output.iso none of my integrated boot codes are evident.
-
A quick search with the keyword "qremaster" leads me here (http://forum.tinycorelinux.net/index.php?topic=8522.0) and here (http://forum.tinycorelinux.net/index.php/topic,15093.0.html).
The tcz extensions for newer TC (TC9) are stored in /mnt/disk/tce/optional.
Neither /opt/tce nor /tmp/builtin.
Is your copy of "qremaster" patched ?
You should ask the author @danielibarnes, send him a PM.
Or you could do the remastering manually, that gives you the best flexibility. :)
-
tcz extensions are stored in /mnt/disk/tce/optional on mc 3.8.4 as well.
I'm not trying to integrate tcz's into my boot cd.
I actually use a /mnt/disk/tce folder on my system to store tcz's and settings as per usual.
I just want to integrate "bootcodes" into my boot cd so I don't have to manually enter them each time the server has to reboot for any reason.
I can contact the author of qremaster and see how I go there.
Can you suggest a resource to study to learn how to remaster manually ?
Thanks :)
-
Hi remus
If all you want to do is modify the boot codes in the ISO, you could always cheat:
http://forum.tinycorelinux.net/index.php/topic,9857.msg53876.html#msg53876
-
There are many ways in remastering, which generally involves in
Unpacking initrd
tc@box:~$ sudo mkdir /tmp/extract
tc@box:~$ cd /tmp/extract
tc@box:/tmp/extract$ zcat /path/to/core.gz | sudo cpio -i -H newc -d
Adding files (make sure the permissions are OK)
tc@box:/tmp/extract$ sudo unsquashfs -d . -f /etc/sysconfig/tcedir/optional/mylocale.tcz
tc@box:/tmp/extract$ ls -l usr/lib/locale/locale-archive
-rw-r--r-- 1 root root 3702256 Jul 19 2017 usr/lib/locale/locale-archive
Repacking initrd
tc@box:/tmp/extract$ sudo su
root@box:/tmp/extract# find | cpio -o -H newc | gzip -9 > /tmp/my_own_core.gz
root@box:/tmp/extract# exit
tc@box:/tmp/extract$ cd /tmp
tc@box:/tmp$ ls -l /tmp/my_own_core.gz
-rw-r--r-- 1 root root 10678758 May 4 22:46 /tmp/my_own_core.gz
Modifying the ISO files
tc@box:/tmp$ mkdir /mnt/CD /tmp/cdroot
tc@box:/tmp$ sudo mount /path/to/TC.iso /mnt/CD
tc@box:/tmp$ cp -r /mnt/CD/boot /tmp/cdroot
tc@box:/tmp$ chmod +w /tmp/cdroot/boot/isolinux/isolinux.cfg
tc@box:/tmp$ vi /tmp/cdroot/boot/isolinux/isolinux.cfg
...
append loglevel=3 lang="zh_TW.utf8"
...
tc@box:/tmp$ sudo cp -f /tmp/my_own_core.gz /tmp/cdroot/boot/corepure64.gz
Creating ISO file
sudo mkisofs -l -J -R -no-emul-boot \
-V TC-custom \
-boot-load-size 4 -boot-info-table \
-b boot/isolinux/isolinux.bin \
-c boot/isolinux/boot.cat -quiet -r \
-o output.iso /tmp/cdroot/
Verifying the ISO
qemu-system-x86_64 -m 512 -cdrom /tmp/output.iso
-
Thanks polikuo
Your examples have worked perfectly.
I'll document 'here' exactly what I did to remaster a stock Core-9.0.iso file and integrate a few boots codes.
Setup basic VirtualBox virtual Machine (setting network to 'bridged', setting storage/optical drive to 'Core-9.0.iso')
Boot up vm
copy Core-9.0.iso to usb flash drive
attach usb flash drive to my vm
mount the usb flash drive in vm using $ mount /mnt/sdb1
installed mkisofs-tools
$ tce-load -wi mkisofs-tools
Executed the following commands as per your example
tc@box:/tmp$ mkdir /mnt/CD /tmp/cdroot
tc@box:/tmp$ sudo mount /mnt/sdb1/Core-9.0.iso /mnt/CD
tc@box:/tmp$ cp -r /mnt/CD/boot /tmp/cdroot
tc@box:/tmp$ chmod +w /tmp/cdroot/boot/isolinux/isolinux.cfg
tc@box:/tmp$ vi /tmp/cdroot/boot/isolinux/isolinux.cfg
...
append loglevel=3 syslog waitusb=5 nodhcp noautologin showapps noutc tz=EST-10 cron
...
# I also altered the timeout option to make bootup quicker
timeout 30
Save and exit vi
I ran your example to repackage the iso exactly and it works just fine.
sudo mkisofs -l -J -R -no-emul-boot \
-V TC-custom \
-boot-load-size 4 -boot-info-table \
-b boot/isolinux/isolinux.bin \
-c boot/isolinux/boot.cat -quiet -r \
-o output.iso /tmp/cdroot/
copied output.iso to usb flash drive
$ cp output.iso /mnt/sdb1
$ sudo umount /mnt/sdb1
ejected the usb flash drive from the vm using virtualbox interface
Windows kindly detected and auto mounted the drive to its fs
copied output.iso to local fs
selected output.iso as a virtual cd for boot up in VirtualBox vm storage settings
booted vm and all boot codes are now integrated to the iso.
Thanks :)
[EDIT[: Fixed typo. Changed not to now. Rich
-
Ops,
line from my previous post reads
booted vm and all boot codes are not integrated to the iso.
It should of said
booted vm and all boot codes are now integrated to the iso.
-
copy Core-9.0.iso to usb flash drive
...
copied output.iso to local fs
To copy files between VMs to the host, I sometimes create an image in VHD format and treat it like a "SHARE disk".
1. create a VHD image with virtualbox
2. format the disk in the VM (I usually go for ext4 or fat32)
3. copy files and close the VM
4. mount the VHD image via windows disk management tool
5. assign letter to the partition
6. move the files elsewhere
I use "Ext2Fsd" to assign the volume letter if the partition contains ext4 file system.
booted vm and all boot codes are now integrated to the iso.
Good, for a moment I thought it didn't work. :)
-
Hi remus
Ops,
line from my previous post reads
booted vm and all boot codes are not integrated to the iso.
It should of said
booted vm and all boot codes are now integrated to the iso.
Fixed.
-
Hi remus
Ops,
line from my previous post reads
booted vm and all boot codes are not integrated to the iso.
It should of said
booted vm and all boot codes are now integrated to the iso.
Fixed.
Thanks Rich :)
Seems the ability to modify expired before I noticed my low quality keyboard input