The following instructions were tested on VMware Player, standalone ESXi and clustered vSphere 6.0.
- Download Core 5.4
- Create a new VM with following characteristics:
- 64MB HDD (IDE0:0)
- 64MB RAM (in the end you will switch it to 48MB but you may need more for the installation process)
- Remove unnecessary peripherals such as floppy drive etc.
Once the boot process is completed, the first step is to install TinyCore on a hard drive. Run following commands to install binaries that you will need in later process:
$ tce-load -wi cfdisk.tcz grub-0.97-splash.tcz
$ sudo su
Check which drive is representing your IDE vmdk file. By default it should be /dev/sda or /dev/sda1 :
$ fdisk -l
Open cfdisk in order to create necessary persistent partitions :
$ cfdisk /dev/sda1 (sda stands for your VMDK file)
In cfdisk, create two partitions:
- 1 x 32MB bootable partition and
- 1 x Swap partition (code 82 for type of partition)
Note: After creating partitions do not forget about committing changes and setting the EXT partition as bootable!
rebuild the filesystem information:
Create an ext3 filesystem :
$ mkfs.ext3 /dev/sda1
(mount your newly created Linux partition and ISO file)
$ mount /mnt/sda1
$ mount /mnt/sr0
Create necessary folders where grub and boot files will be copied to:
$ mkdir -p /mnt/sda1/boot/grub
$ mkdir -p /mnt/sda1/tce
Copy boot and installation files :
$ cp -p /mnt/sr0/boot/* /mnt/sda1/boot/
$ touch /mnt/sda1/tce/mydata.tgz
$ cp -p /usr/lib/grub/i386-pc/* /mnt/sda1/boot/grub/
Create e a new grub menu list
$ vi /mnt/sda1/boot/grub/menu.lst
press “i” key to enter edit mode. then include the following information:
kernel /boot/vmlinuz quiet
type “:wq” to exit and save changes.
Open Grub setup:
In the grub prompt, type
$ root (hd0,0)
$ setup (hd0)
type umount /mnt/sr0, then eject /dev/sr0
Note: Make sure that ISO file is unmounted from your VM to avoid a boot from it during the restart.
After the reboot you should end up in a bash shell. Continue with the installation of openssh, nano, nginx and open-vm-tools.
Let’s start with openssh:
$ tce-load -iw openssh
$ cd /usr/local/etc/ssh
$ sudo cp ssh_config.example ssh_config and then sudo cp sshd_config.example sshd_config
$ sudo /usr/local/etc/init.d/openssh start
$ passwd (and change password for user tc)
$ sudo passwd (and change password for user root)
From now on you may continue the installation process via an ssh session but beware, this is not the end! Do not reboot your VM yet.
$ tce-load -iw nano
$ tce-load -iw nginx
Download open-vm-tools binary and dependencies from here.
Unpack them and upload them via scp (or winscp if you use Windows OS):
$ scp /<unpacked_packages>/* tc@<yVM_ip_address>:/tmp
Install packages in the following order:
tce-load -i openssl.tcz openssl-dev.tcz libdnet.tcz open-vm-tools-modules-3.8.13-tinycore.tcz libtirpc glib2 fuse open-vm-tools
Check if all aforementioned packages are present in /mnt/sda1/tce/optional/
If not, copy missing tcz’s :
sudo cp /tmp/name_of_the_package.tcz /mnt/sda1/tce/optional/
Now save all your work before performing a reboot:
$ sudo nano /opt/.filetool.lst
$ sudo nano/opt/bootlocal.sh
# put other system startup commands here
$ sudo nano /mnt/sda1/tce/onboot.lst
verify that open-vm-tools is up and running:
$ sudo /usr/local/etc/init.d/open-vm-tools start
Eventually, save all configuration with the following command:
$ sudo filetool.sh -b
You may now shut down your VM, change the amount of necessary RAM to 48MB and reboot it again.