View Single Post
Posts: 502 | Thanked: 366 times | Joined on Jun 2010 @ /dev/null
#4
You cannot simply use the wireless pentesting tools from NeoPwn v2 with just a stock kernel and stock wireless driver. NeoPwn v2 comes with a *cough* custom *cough* kernel with the *cough* proprietary *cough* wireless kernel modules.

However with power kernel (at least version 46 if I'm not mistaken) and lxp's bleeding edge wireless drivers you can achieve the same effect without having to use NeoPwn v2's kernel and its own drivers.

Thus its not possible to run a different kernel inside a chroot environment unless maybe you use something like kexec. NeoPwn v2 if I'm not mistaken was supposed to be installed on top of the N900's internal rootfs structure (or at least onto microSD{HC} card) though if one does that they lose all the functionality of what N900 is meant to be.

I thought there was a thread that describes how to create a container for chroot image. I guess not.

To create a container you will need to determine how much space you want to allocate to the chrooted distribution. 1GB generally is somewhat the minimum if you want GUI and what not and there's really no maximum (if you convert your eMMC or microSD{HC} card to a native linux filesystem) space you want to allocate (though up to whatever the stated free capacity is noted for the medium you choose of course).

The next step is to get familiar with dd tool if you want a custom sized `container' for the chosen distro. If you want a simpler way and allocate 4GB `container' for the chosen distro and that your storage medium (eMMC) is on FAT32 then the command is this (as root):
Code:
dd if=/dev/zero of=/home/user/MyDocs/test.img
Ideally it is a good idea to choose a suitable filename instead of test.img and you should apply the same naming convention as what qole did which was to also append the filesystem that resides on the `container'.

The next step is to choose the filesystem for the chosen distro. Most people would tend to choose what is normally recommended upon installing a beginner-friendly distro. The filesystem for that would be ext3, I would also tend to choose ext3 as its easy to deal with and the filesystem support is already part of maemo's kernel). To check what filesystem your device support you need to do this:
Code:
cat /proc/filesystems| grep -v nodev| awk '{ print $1 }'
Again it is advisable to not experiment with filesystems you are not familiar with. To create a ext3 filesystem within the container you will need to do this (as root):
Code:
mkfs.ext3 /home/user/MyDocs/test.img.ext3
Notice how I have renamed my test.img to test.img.ext3, if you have not changed your filename from the beginning, you'll need to adapt the filename accordingly. Likewise for those who wants to use fancy filesystems (even though you really don't have much other choices to choose from anyway).

Upon executing mkfs.ext3 you will get a warning that you are not writing to a partition (or a block device) but to a file, and asks do you want to continue. At this point you will need to say yes.

Once the `container' has been created and there is a filesystem within the `container'. You now created a `container' that can be used to put whatever distro of your choice.

To use that `container' you will need to first mount it. You will need to create a directory for a place to have the contents of the `container' exposed. The directory for the `container' that is to be mounted on could be placed anywhere however we will stick with /home/user/MyDocs as that is the easiest way to access it all:
Code:
mkdir /home/user/MyDocs/test
Now we will mount the `container' into that directory. Note that you must tell mount that it has to do it via loop because mount usually does not treat normal files as a raw block. So do this (as root):
Code:
mount /home/user/MyDocs/test.img.ext3 /home/user/MyDocs/test -o loop
.

After running that command you should now be able to dump the contents of the distro you choose to install. For now we will do NeoPwn v2 chroot.

The first thing you will need to do is to extract the contents of w00t.tar.gz into the `container'. For simplicity sake, the w00t.tar.gz is placed in /home/user/MyDocs:
Code:
tar -zxvf /home/user/MyDocs/w00t.tar.gz -C /home/user/MyDocs/test
Once the contents has been extracted you now have NeoPwn v2 chroot. I suggest you should first close the chroot:
Code:
umount /home/user/MyDocs/test
if you have easy debian installed you can simply rename that easy debian chroot filename into some other filename (for the time being), and rename you NeoPwn v2 chroot into the filename for that debian chroot.

Of course not many features that debian chroot provided would be covered by NeoPwn v2 image.

Running NeoPwn v2 or any other distro inside chroot environment requires a program that appears within qole's easy debian which handles mouse/keyboard grabbing.

Also I could probably upload a premade 4GB NeoPwn v2 if there's enough interest (I'm with a service provider that only offers me 7GB a month, any excess amounts will be charged at AUD$0.10 to my bill at the end of the month. So you can see that I'm not willing unless there is actually enough interest).

I have not covered how to create shortcuts and what not for NeoPwn v2 though I may cover such topics if and once I have experimented with it on mine.
__________________

Last edited by tuxsavvy; 2011-11-19 at 08:25. Reason: When mounting files, you must specify loop. I completely forgot about this point.
 

The Following 2 Users Say Thank You to tuxsavvy For This Useful Post: