Installing TinyCore 8x Linux to the Hard Drive via Command Line

Most of this can be found here: http://distro.ibiblio.org/tinycorelinux/install_manual.html but I made this document for the following reasons:

1) Installation is incorrect (wrong files specified)
2) Installation instructions specific to VMware
3) using fdisk instead of installing and using cfdisk (smaller footprint)
4) Not running as root (Yes, I understand the security implications here are heavily mitigated)

On a side note I also found some parts confusing (like the explaining of the hd0 nomenclature in grub)

Prerequisites:
- VM with IDE disk (NOT SCSI)
- 1 CPU
- 256 MB of RAM
- 100MB of space

You can install with SCSI, but the process is labour intensive, for that reason, I find it easier to use an IDE disk (But we can load the SCSI driver later, so we can still use it as a helper for other VM purposes!)

1) Download the ISO from the following location: http://www.tinycorelinux.net/8.x/x86/release/Core-current.iso

2) Upload the ISO to the ESXi host

3) Associate the VM to the ISO we uploaded

4) Start the VM

5) Determine which drives your machine has access to (Will usually be /dev/sda)
# fdisk -l

6) Use fdisk to partition the drive (Those are the number one's (1) not letter L's (l) below)
# fdisk /dev/sda
# n
# p
# 1
# [enter]
# [enter]
# a
# 1
# w

7) reboot
# sudo reboot

8) Install the grub loader
# tce-load -wi grub-0.97-splash.tcz

9) Format the drive
# mkfs.ext3 /dev/sda1

10) Rebuild the fstab
# sudo rebuildfstab

11) Copy the files
# sudo mount /mnt/sda1

12) Make the directories
# sudo mkdir -p /mnt/sda1/boot/grub

13) Mount the filesystem
# mount /dev/sr0/

14) Copy the files
# sudo cp -p /mnt/sr0/boot/* /mnt/sda1/boot/

15) Make a directory for application extensions
# sudo mkdir -p /mnt/sda1/tce/optional

16) Touch the mydata.tgz file
# sudo touch /mnt/sda1/tce/mydata.tgz

17) Copy the grub files
# sudo cp -p /usr/lib/grub/i386-pc/* /mnt/sda1/boot/grub/

18) Create the grub loader config
# sudo vi /mnt/sda1/boot/grub/menu.lst

default 0
timeout 10
title tinycore
kernel /boot/vmlinuz tz=gmt quiet
initrd /boot/core.gz

18) Install GRUB using grub
# grub

root (hd0,0)

setup (hd0)
quit

19) Make whatever changes you want to make (like loading the SCSI driver, or loading an SSH server)

# tce-load -wi scsi-4.8.17-tinycore.tcz


# tce-load -wi openssh.tcz
# cd /usr/local/etc/ssh
# sudo cp sshd_config.example sshd_config
# sudo /usr/local/etc/init.d/openssh start
# sudo passwd tc
# vi /opt/.filetool.lst
 usr/local/etc/ssh
 etc/passwd
 etc/shadow
# vi /opt/bootlocal.sh
  /usr/local/etc/init.d/openssh start

20) Save the filesystem
# filetool.sh -b

21) Shut down the VM
# sudo poweroff

22) Remove the media from the system

Comments

Popular posts from this blog

Webex Support with Windows 7

Upgrading to the Marlin firmware on the Anycubic Mega S