User Tools

Site Tools


install_procedure

Current install path

In the following I describe the whole process of installing a Piratebox. It is base for separate the packages.

A Install dependencies

the following packages are only related to usb support and FS

  • kmod-usb2,
  • kmod-usb-storage,
  • kmod-fs-vfat,
  • kmod-nls-cp437,
  • kmod-nls-cp850,
  • kmod-nls-iso8859-1,
  • kmod-nls-iso8859-15,
  • kmod-fs-ext4,
  • block-mount,
  • kmod-loop,
  • losetup

B postinit

is called by opkg after the files are placed on router disc

  1. USB Wait
  2. Check / change root password (does not work correctly)
  3. Stop & Disable uhttpd (webinterface)
  4. Stop & Disable lucifixtime
  5. Stop & Disable luci_dhcp_migrate
  6. enable piratebox for startup
  7. invoke “init.d/piratebox setup”
    1. piratebox.common → pb_usbconfig
      1. Create mountpoint for usb stick
      2. create fstab entry
    2. piratebox.common → pb_netconfig
      1. always generate dynamic hostname (since 0.6)
      2. set hostname
      3. set hostname to /etc/hosts
      4. set static ip
      5. enable wifi & set ssid
      6. stop & disable dnsmasq !
    3. invoke “init.d/piratebox init”
      1. mount usb
      2. create swap ( create swapfile and setup)
      3. create ext_image and make fstab
      4. prepare /opt/piratebox
        1. download image
        2. extract
        3. make fstab entry
      5. ensure ext is mounted
      6. enhance opkg command -d piratebox — to ext_image
      7. link ext/usr to /usr/local (bin & lib)
    4. Invoke “init.d/piratebox update”
      1. ensure usb+ext is mounted
      2. disable local dns redirection ????
      3. remove opkg lock
      4. check wan connection
      5. install all needed packages
      6. set opkg lock again
      7. “link” bin to normal path
  8. Firewall restart
  9. Stop dnsmasq
  10. call “wifi”to refresh wifi stuff and enable it
  11. Start piratebox ( see section C)
  12. echo setup-variables

C First PirateBox start

entspricht /etc/init.d/piratebox start

  1. if fresh USB → pb_init & pb_update ( FIXME can't work correctly )
  2. Call piratebox.common → pb_start
    1. check everything is mounted
    2. refresh PATH & LD_LIB
    3. invoke /opt/piratebox/init.d/piratebox_router — 3.
  3. starting piratebox scripts
    1. expand PATH & PYTHON_LIB with piratebox stuff
    2. set variables for init-stuff
    3. load piratebox.conf
    4. check for file /opt/piratebox/conf/init_done exists (indicates if init is run),, it does not exists
    5. invoke hook pre_openwrt_init.sh (customization point)
    6. invoke install_piratebox.sh function “init_openwrt”
      1. load piratebox.common
      2. remove shipped original share folder
      3. link /mnt/usb/Piratebox to /opt/piratebox/share
      4. set correct permissions to chatfile
      5. check if www_alt exists and if yes do something
    7. invoke hook pre_init
    8. invoke install_piratebox.sh function “part2”
      1. create “upload folder”
      2. create /opt/piratebox/share/board folder
      3. create /opt/piratebox/share/tmp folder
      4. create /opt/piratebox/tmp folder
      5. copy empty forban link-file to www
      6. set correct permissions to share, www , cgi-bin folders and content
      7. copy index.html to opt/piratebox/share
      8. create links to board and uploadfolder in www

D Imageboard

  1. (openwrt only) Refresh opkg
  2. (openwrt only) install alot opkg packages + unzip
  3. (openwrt only) link perl stuff around
  4. copy activation link
  5. wget kareha.zip
  6. extract and copy kareha to board folder
  7. Fix permissions
  8. generate index.html
install_procedure.txt · Last modified: 2013/02/07 20:10 (external edit)