Seems I don't have permission to edit the wiki. Here are the verified steps:
On your computer (not on the Pi):
- Download piCore-9.0.1
- Copy the image to the SD card (see instructions on the wiki)
- Expand the second partition, e.g. in Ubuntu:
$ sudo fdisk /dev/sdb
[sudo] password for rob:
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdb: 14.5 GiB, 15523119104 bytes, 30318592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0009bf4f
Device Boot Start End Sectors Size Id Type
/dev/sdb1 8192 77823 69632 34M c W95 FAT32 (LBA)
/dev/sdb2 77824 100351 22528 11M 83 Linux
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2):
First sector (2048-30318591, default 2048): 77824
Last sector, +sectors or +size{K,M,G,T,P} (77824-30318591, default 30318591):
Created a new partition 2 of type 'Linux' and of size 14.4 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Synching disks.
- Note that 77824 is the important figure above - it's the start sector of the second partition and must be entered when recreating the partition. Default values are ok for other inputs.
- Resize the filesystem to fit the newly-expanded partition, e.g. in Ubuntu:
$ sudo resize2fs /dev/sdb2
resize2fs 1.42.13 (17-May-2015)
Please run 'e2fsck -f /dev/sdb2' first.
$ sudo e2fsck -f /dev/sdb2
e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb2: 55/2816 files (1.8% non-contiguous), 9660/11264 blocks
$ sudo resize2fs /dev/sdb2
resize2fs 1.42.13 (17-May-2015)
Resizing the filesystem on /dev/sdb2 to 15120384 (1k) blocks.
The filesystem on /dev/sdb2 is now 15120384 (1k) blocks long.
- Mount the second partition:
- e.g. on Ubuntu desktop by clicking its icon in the dock
- there should be a "tce" directory at the top level
- find its mount point and cd to "tce/optional" in a terminal
- Download the extra files required:
- (you may have to do this as root, depending on the mount permissions)
- for pkg in ca-certificates libiw libnl ncurses openssl readline wifi wireless-4.9.22-piCore wireless_tools wpa_supplicant firmware-rpi3-wireless; do for f in $pkg.tcz{,.dep,.md5.txt}; do wget
http://ftp.nluug.nl/os/Linux/distr/tinycorelinux/9.x/armv6/tcz/$f; done; done
- fix up file ownership and permissions:
- $ chown 1001:staff *.tcz*
- $ chmod 664 *.tcz*
- Unmount the SD card
- Transfer SD card to the Pi Zero W
On the Pi Zero W (attach a monitor and keyboard...):
- $ tce-load -i firmware-rpi3-wireless
- $ echo "firmware-rpi3-wireless.tcz" >> /mnt/mmcblk0p2/tce/onboot.lst
- $ sudo reboot
- time passes...
- $ tce-load -i wifi > /tmp/tce-load-wifi.log
- $ sed "s,:.*,," /tmp/tce-load-wifi.log >> /mnt/mmcblk0p2/tce/onboot.lst
- $ sudo wifi.sh
- select a wifi AP and enter password
- $ ifconfig
- should now list wlan0 with an IP address
- wifi.db has been created in the home dir, but this is a temporary location
- if you reboot at this point, you'll have to redo the wifi.sh step
- $ echo "sudo wifi.sh -a" >> /opt/bootlocal.sh
- $ filetool.sh -b
- to save bootlocal.sh and wifi.db into persistent storage
After this, after every reboot the Pi will connect to wifi automatically.
Rob.