User Tools

Site Tools


How to switch the filesystem to ext4

What do you need?

A Linux computer to create a backup of the files and format the usb stick.

The following howto assumes, that your usb stick is /dev/sdb

Create a backup of the usb stick on your computer

Put the USB Stick to your local computer and run the following commands

sudo mkdir /mnt/usbstick
sudo mkdir /tmp/usbstick

sudo mount /dev/sdb1 /mnt/usbstick
sudo  cp -rv /mnt/usbstick  /tmp/usbstick 

sudo  umount /mnt/usbstick

Format and refill the filesystem

sudo  mkfs.ext4 /dev/sdb1
sudo mount /dev/sdb1 /mnt/usbstick
sudo cp -rv /tmp/usbstick/* /mnt/usbstick
sudo umount /mnt/usbstick

Make the box use the filesystem

  • Set your ethernet interace to a static IP subnetmask
  • connect your computer via ethernet to the Box
  • put USB Stick back to the PirateBox
  • Power the PirateBox on
  • use telnet if you haven't setup a password (passwd), If you had setup a password ssh with root@
  • run
uci set fstab.ext1.fstype=auto
uci set fstab.ext1.options=rw,sync
uci commit

cp /rom/etc/fstab /etc/fstab
mount -o rw,sync /dev/sda1 /mnt/usb
/etc/init.d/ext start
/etc/init.d/piratebox  start
# we need to use the lighttpd user that it has the correct permissions set.
sed -i 's|DROOPY_USE_USER="no"|DROOPY_USE_USER="yes"|g' /opt/piratebox/conf/piratebox.conf
/opt/piratebox/bin/ /opt/piratebox/conf/piratebox.conf  part2
# Fix for recursive symlink, which will be fixed in 1.0.1
rm /mnt/usb/PirateBox/Shared/Shared 
# Fix permission on board
chown -R nobody:nogroup /mnt/usb/PirateBox/board

openwrt/ext_hack.txt · Last modified: 2014/06/12 18:15 by matthias