Skip to content

Instantly share code, notes, and snippets.

@kbeflo kbeflo/
Last active Apr 8, 2019

What would you like to do?
Format usb flash drive and mount as sdcard for the WiFi Pineapple Nano
#2018 - Zylla - (
#Format usb flash drive as sdcard for the WiFi Pineapple Nano
#You can also manually partition your usb flash drive on your computer
[[ -f /tmp/usb_format.progress ]] && {
exit 0
touch /tmp/usb_format.progress
umount /sd
swapoff /dev/sdb2
sleep 2
cat /pineapple/modules/Advanced/formatSD/fdisk_options | fdisk /dev/sdb
sleep 2
umount /sd
mkfs.ext4 /dev/sdb1
sleep 2
mkfs.ext4 /dev/sdb2
mkswap /dev/sdb2
mount /dev/sdb1 /sd
swapon /dev/sdb2
rm /tmp/usb_format.progress
config global
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '0'
config mount
option target '/sd'
option device '/dev/sdb1'
option fstype 'auto'
option options 'rw,sync'
option enabled '1'
config swap
option device '/dev/sdb2'
option enabled '1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.