Setting up TinyCore Linux on Raspberry Pi
Basic initial setup of TinyCore
Default pass is “piCore”
Once the SSH keys generated, run the filetool to backup the keys.
Expand the install partition
The second partition, mmcblk0p2 is a Linux ext4 partion which contains preinstalled extensions, openssh and mc (Midnight Commander) and configuration files. It is a small partion with no free space, you must expand its size to have enough room for additional extensions, updates and backups. It can be done on the running system locally or remote via SSH following these steps:
Start fdisk partitioning tool as root:
sudo fdisk -u /dev/mmcblk0
Now list partitions with ‘p’ command and write down the starting and ending sectors of the second partition.
Delete second partition with ’d’ than recreate it with ‘n’ command. Make it as a ‘primary partition’ and not ‘extended’.
Use the same starting sector as deleted had and provide end sectore or size greater than deleted had having enough free space for Mounted Mode. When finished, exit fdisk with ‘w’ command. Now partition size increased but file system size is not yet changed.
Reboot piCore. It is necessary to make Kernel aware of changes.
After reboot expand file system to the new partition boundaries with typing the following command as root:
Now you are ready to use the bigger partition.
Install basic compilation tools for compiling programs
tce-load -wi coreutils.tcz tce-load -wi compiletc.tcz
Adjust the Timezone
Add to .profile in the user home directory, the below, where XXX is the code from Time Zone Table
Adjust the hostname for DNS login, proper name on Router, etc
$ sudo vi /opt/bootsync.sh
Within here, change ‘box’ to your desired name on the line “/usr/bin/sethostname box”
Mount Drives at boot
add to this file your mount path. For example “mount /dev/sda1 /mnt/sda1”.
sudo nano /opt/bootlocal.sh
tce-load -wi samba4
create smb.conf in:
Below is a basic config!
[global] workgroup = WORKGROUP netbios name = your_desired_name_here security = user [tc] comment = Data path = /home/tc read only = no guest ok = no
Create login/pass for Samaba share if guest login not allowed:
$sudo su #smbpasswd -a username_here
Open filetool.lst and add the samba etc and var files to ensure persistent.
sudo vi /opt/.filetool.lst
Add: usr/local/etc/samba (the config file)
Add: usr/local/var/lib/samba (password data from above)
Also we will want samba4 to start on boot, so add it to bootlocal.sh
sudo vi /opt/bootlocal.sh
Add: sudo /usr/local/etc/init.d/samba4 startcomments powered by Disqus