Skip to content

Linux/BSD Geek

Long Live the Penguin and Beastie

Archive

Category: How To

Picked up a used Samsung Galaxy Player 5.0 on Ebay for a good price. I want to root it to load DroidWall, etc.

You can find a great tool to do this with called SuperOneClick (it'll root a lot of different Android devices) at http://shortfuse.org/.

I've had so much problems with getting this to work.

The last round of challenges was that it kept stopping at "Shell rooting device...- Step #5". No explanation. Nothing. Just hangs.

Finally figured out the problem. There are two files in a directory called Exploits. If you extract these files with your AV running, they will get deleted! So...turn off your AV. Download. Extract. Run and you should be happy.

Lots of information here too - http://forum.xda-developers.com/showthread.php?t=803682

Playing with kpcli.

kpcli is a "KeePass Command Line Interface (CLI) / interactive shell. Use this program to access and manage your KeePass 1.x database from a Unix-like command line."

Want to see if I can get it working on FreeBSD 9.0.

Prerequisites

# portmaster devel/p5-Clone
# portmaster security/p5-Crypt-Rijndael
# portmaster textproc/p5-Sort-Naturally
# portmaster devel/p5-Term-ReadKey
# portmaster shells/p5-Term-ShellUI

# perl -MCPAN -e 'install File::KeePass'

$ ./kpcli-1.2.pl

KeePass CLI (kpcli-1.2) v1.2 is ready for operation.
Type 'help' for a description of available commands.
Type 'help ' for details on individual commands.
* Please install Term::ReadLine::Gnu for better functionality!

kpcli-1.2:/>

YIPPEE!! IT WORKS!

The kernel on Arch Linux has been updated to 3.2. Now I get nothing but errors when trying to install the kernel modules and the patch says it's already been applied.

Fix:

$ wget http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/11/vmware8linux32fix.tar.gz
$ tar xvzf vmware8linux32fix.tar.gz
# rm /usr/lib/vmware/modules/source/.patch
# ./patch-modules_3.1.0.sh
...
make: Leaving directory `/tmp/vmware-root/modules/vsock-only'
Built vsock module
Starting VMware services:
Virtual machine monitor done
Virtual machine communication interface done
VM communication interface socket family done
Blocking file system done
Virtual ethernet done
VMware Authentication Daemon done
Shared Memory Available done

All done, you can now run VMWare WorkStation.
Modules sources backup can be found in the '/usr/lib/vmware/modules/source-workstation8.0.1-2012-01-19-08:44:31-backup' directory

Saw that Ubuntu was going to be switching to Lightdm for a login manager. Thought I'd give it a try with Arch and Xmonad.

When I followed the instructions here it started but I wasn't given an xmonad option.

I start xmonad from in ~/.xinitrc

Create a file /usr/share/xsessions/xmonad.desktop

Put in the file:

[Desktop Entry]
Name=Xmonad
Comment=Tiling window manager
Exec=/usr/bin/xmonad
Type=XSession

Log out and you should see the option in there now.

Cleaning up my office at home and have some old PCs to get rid of. Usually I fire up DBAN live CD to wipe any hard disks before disposal. Unfortunately, one of my PCs refuses to run DBAN properly. Don't want to spend a bunch of time on this so I Googled and found this article.

Fire up a Knoppix Live CD, open a terminal and run the following:

# shred -n 5 -vz /dev/sda

-n 5: Overwrite 5 times instead of the default (25 times)
-v : Show progress
-z : Add a final overwrite with zeros to hide shredding

Thanks. Works great.

Playing with some software that needs to get out through a proxy.

$ git config --global http.proxy http://myproxy.domain.com:1234
$ git config --get http.proxy

http://myproxy.domain.com:1234

I see that Oracle has released Virtualbox 4.0. Let's give a try on Arch...

Prerequisites
Kernel headers

$ sudo pacman -S kernel26-headers
resolving dependencies...
looking for inter-conflicts...

Targets (1): kernel26-headers-2.6.36.2-1

Total Download Size: 4.01 MB
Total Installed Size: 38.27 MB

Proceed with installation? [Y/n] Y

$ sudo sh ./VirtualBox-4.0.0-69151-Linux_amd64.run
Password:
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation..........
VirtualBox Version 4.0.0 r69151 (2010-12-22T14:35:05Z) installer
Installing VirtualBox to /opt/VirtualBox
WARNING: /etc/modprobe.d/modprobe.conf line 4: ignoring bad line starting with 'snd_hda_intel'

VirtualBox has been installed successfully.

You will find useful information about using VirtualBox in the user manual
/opt/VirtualBox/UserManual.pdf
and in the user FAQ

http://www.virtualbox.org/wiki/User_FAQ

We hope that you enjoy using VirtualBox.

Wow. That seemed WAY too easy.

$ /opt/VirtualBox/VirtualBox

Just upgraded to VMWare Workstation 7.1.2 this morning and ran into nothing but problems. Here's the fixes.

This isn't anything I came up with on my own but found here:
linuxinsight.com article

Arch Linux VMWare Wiki page

# cd /usr/lib/vmware/modules/source/
# cp -a vmmon.tar vmmon-orig.tar
# tar xf vmmon.tar
# cd vmmon-only/linux/
# nano /root/vmmon.patch

Found the patch here

Paste the following into /root/vmmon.patch

diff --git a/vmmon-only/linux/iommu.c b/vmmon-only/linux/iommu.c
index a279a26..9de467b 100644
--- /usr/lib/vmware/modules/source/vmmon-only/linux/iommu.c
+++ /usr/lib/vmware/modules/source/vmmon-only/linux/iommu.c
@@ -153,7 +153,7 @@ IOMMU_SetupMMU(VMLinux *vmLinux, // IN: virtual machine descriptor
map_to = PPN_2_PA(mpn);
map_prot = IOMMU_READ | IOMMU_WRITE;
}
- if ((status = iommu_map_range(vmLinux->iommuDomain,
+ if ((status = iommu_map(vmLinux->iommuDomain,
PPN_2_PA(ppn),
map_to, PAGE_SIZE, map_prot))) {
printk(KERN_ERR "%s: IOMMU Mapping of PPN 0x%x -> MPN 0x%x "
@@ -400,7 +400,7 @@ IOMMU_VMCleanup(VMLinux *vmLinux) // IN: virtual machine descriptor

/* Relinquish the IOMMU domain used by this VM. */
for (ppn = 0; ppn < vmLinux->numPages; ppn++) {
- iommu_unmap_range(vmLinux->iommuDomain, PPN_2_PA(ppn), PAGE_SIZE);
+ iommu_unmap(vmLinux->iommuDomain, PPN_2_PA(ppn), PAGE_SIZE);
}
if (vmLinux->iommuDomain) {
iommu_domain_free(vmLinux->iommuDomain);

# patch -p0 < /root/vmmon.patch
# cd ../../
# tar cf vmmon.tar vmmon-only
# rm -rf vmmon-only

Now we need to do the same for vsock

Download the vsock patch from the linuxinsight posting to /root/vsock.patch

# cd /root
# wget http://www.linuxinsight.com/files/vsock.patch
# nano vsock.patch
# cd /usr/lib/vmware/modules/source/
# cp -a vsock.tar vsoc-orig.tar
# tar xf vsock.tar
# cd vsock-only/linux
# patch -p0 < /root/vsock.patch

patching file af_vsock.c
Hunk #1 succeeded at 3230 (offset 9 lines).
Hunk #2 succeeded at 3253 (offset 9 lines).
Hunk #3 succeeded at 3265 (offset 9 lines).
Hunk #4 succeeded at 3325 (offset 9 lines).
Hunk #5 succeeded at 3341 (offset 9 lines).
Hunk #6 succeeded at 3375 (offset 9 lines).
Hunk #7 succeeded at 3473 (offset 9 lines).
Hunk #8 succeeded at 4113 (offset 9 lines).
Hunk #9 succeeded at 4150 (offset 9 lines).
Hunk #10 succeeded at 4203 (offset 9 lines).
Hunk #11 succeeded at 4437 (offset 9 lines).
Hunk #12 succeeded at 4477 (offset 9 lines).
Hunk #13 succeeded at 4543 (offset 9 lines).

# cd ../..
# tar cf vsock.tar vsock-only
# rm -rf vsock-only
# vmware-modconfig --console --install-all

Just some notes on getting the latest development version of Wireshark running on Arch Linux. I'm going to install it with a prefix of /opt so it doesn't interfere with the current 'stable' release that is already installed via pacman.

Download the latest build

Extract it.

Prerequisites:
# pacman -S python-geoip

continue reading...

Figure I should make some notes on what I've done to get Arch running on my Thinkpad. I've made so many changes without any notes. Oops.

This is what I did to get my laptop to suspend when closing the lid. Found the instructions at http://wiki.archlinux.org/index.php/Lenovo_Thinkpad_X300#Suspend_.2F_Hibernate

# pacman -S uswsusp

Test suspending:
# /usr/sbin/s2ram -f

Then install acpid

# pacman -S acpid

Add it to /etc/rc.conf DAEMONS section before hal.

# nano /etc/acpi/handler.sh

Note: In above link it says to edit default.sh. That file doesn't exist. It's now handler.sh

Change the 'button/lid' section like this:

button/lid)
#echo "LID switched!">/dev/tty5
;;

to

button/lid)
/usr/sbin/s2ram -f
echo "LID switched!">/dev/tty5
;;