Customizing the complete /opt/piratebox from desktop

Posted by Matthias 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Customizing the complete /opt/piratebox from desktop
August 19, 2014 07:56PM
Hi,
(sorry, for the inproper description and language)

sometimes it is easier to edit the file locally on a computer and later bring it down to the box. . especially when doing bigger modifications.
You can use the image.source file we have on piratebox for that...

Some notes:

1. MacOS doesn't have a useful option to mount those image files correctly, without danger of damaging something (Ext3 filesystem support)
2. It is important to have the same way for packaging and unfolding like the piratebox would do
3. The requirements you have is: working sudo environment
4. Have internet during the first download step

You can do the steps out of a Ubuntu-VM

I create a raw tool for this purpose this evening: [github.com] (because I haven't finished my example repository yet)


When you download this file
Language: PHP
wget https://raw.githubusercontent.com/PirateBox-Dev/openwrt-dev-environment/master/image_helper.sh chmod u+x image_helper.sh

The workflow for doing your modifications would be like written in the verbose output:

download - extract - mount - umount - package

You can do each step seperatly
./image_helper.sh download 
./image_helper.sh extract
./image_helper.sh mount 
, or summarize i.e. "umount package" together.
./image_helper.sh umount package
Mixing up the order doesn't work.

Each step gives you some output.. if you don't get any output => double check your commands.

Later, you can simply rerun
./image_helper.sh mount
to remount again.

The next trick to know, is that you have to edit the files as root (using guestmount is another option,not discussed here)
One option is to copy it to/prepare it on you(r) home-folder and copy it later with sudo to the right place. Consider using "midnight commander" (sudo mc)

When you are done with setting up your opt/piratebox foler and you run the
./image_helper.sh package
command, you get some scp instructions and commands you can run, when you are connected to the running piratebox.
(you can leave out the scp step, when your box is offline)

I hope this helps a few people.
Feel free to send pull request on github for this stuff.

@Moderator. feedl free to improve this post.. I just wrote my stuff down, that it can reused in certain circumstances.

Matthias


This is only my signature.



Edited 2 time(s). Last edit at 08/19/2014 07:58PM by Matthias.
So this has to be done before the initial install?
Re: Customizing the complete /opt/piratebox from desktop
April 16, 2019 01:46PM
Nope, anytime