Extend Utils


Esn said:
I edited the Wiki tutorial to add a reminder that the new sudo password for Debian is "pandora". An important thing to mention!

I've installed a few packages, and each time though they installed okay, I've gotten some message or two like this:
Code:
Can not write log, openpty() failed (/dev/pts not mounted?)
Is that fine?

Also how come in Debian the command is "sudo apt-get install xxx", while in Angstrom it's "sudo install xxx"? Or can the latter be used in Debian as well?

Edit: well, that was quick. Some programs are asking me for pygtk-2.0, so I think I need the python-gtk2-dev package which needs over 154mb. It looks like I already will need to move over the contents to a bigger 1gb file. :)

Yea the /dev/pts thing is just complaining about getting to a log file.. I didn't mount /dev in to the system. I might do that for the next release.
I was toying with the idea of doing it originally as a 1gig extend, but I only have 2gig cards mostly, so testing things like that is a bit of a bugger!

Also, Debian's package manager is aptitude, and apt-get is generally a helper program. So I'm afraid that's the only syntax you have.
I might wire up the X11 bits and pieces, and then you can use Synaptic as a GUI interface, but then that's starting to get close to a full OS Extend again; which I didn't want.. I just wanted something nice and relatively small to get started with, and then let others move to bigger extends depending on their requirements.

If you have any issues with moving to another extend, let me know and I'll throw together a quick guide :)
Actually, I might add that functionality to Extend Utils itself as it's fairly straight forward, though when I attempted it on the Pandora last time it.. kinda.. wasn't happy :D
 
Last edited by a moderator:
Thanks for all your work on this, Stuckie. This seems to be exactly what I need to compile groove, as the Debian repos seem to have all the dependancies I need.

The problem I am having is that I can't seem to expand the size of the dev extend. Here's what I've been doing:

1. Download 1GB empty extend and dev extend.
2. Using extend utils, create new premount with 1 read/write extend (the empty extend)
3. Use extend utils to run the premount.
4. Use dev utils to mount dev extend.
5. navigate to tmp, open a terminal, and enter:

Code:
cp -a debianextend/* 1GB.extend/

after that a bunch of "permision denied" and "no such file exists" type errors come up and the system crashes. I've tried running with sudo, -f, and such but that only gets rid of the permissions errrors.

Any suggestions?
 
I'm also not sure how to copy to a bigger extend, though my process was a bit different from edgex004's:

1. Run Extend Utils
2. Select "New Extend/Overlay/Swap"
3. Select "New Extend File"
4. Select 1GB, name it "1gbdebian", save to /media/mySDcard/pandora/appdata/DebianDevExtend
5. From Thunar, right-click on that folder, select "Open Terminal Here", type in dir to make sure I'm in the right place, then the cp command (-a debian.lennydev.20110626.extend/* 1gbdebian.extend/).
I get the following:
Code:
esn-openpandora:/media/mmcblk0p1/pandora/appdata/DebianDevExtend$ dir
1gbdebian.extend  debian.lennydev.20110626.extend
esn-openpandora:/media/mmcblk0p1/pandora/appdata/DebianDevExtend$ cp -a debian.lennydev.20110626.extend/* 1gbdebian.extend/
cp: accessing `1gbdebian.extend/': Not a directory
Well, at least my system doesn't crash. :) I would welcome some instructions, though.

EDIT: Ah, right, nevermind, I guess edgex004's is the right one. But with "sudo" before "cp". I thought somehow one could copy what's inside the extends even if they're not mounted.
 
Stuckie said:
Argh, I forgot to mention that you really should be sudo to copy the files across, as your user won't "own" the vast majority of the files.
Ok, I tried it with sudo and I got the same result as edgex004. Tons of error messages followed by a system crash.

Steps from the beginning:

1. Run Extend Utils
2. Select "New Extend/Overlay/Swap"
3. Select "New Extend File"
4. Select 1GB, name it "1gbdebian", save to /media/mySDcard/pandora/appdata/extendutils
5. Select "New-Premount"
6. Select "New Extend Mount Script"
7. Select "Dev Extend"
8. Select 0 Read-Only Extends
9. Select 1 Read-Write Extends
10. Select 0 Read-Write Overlays
11. name it "1gbdebian", save to /media/mySDcard/pandora/appdata/extendutils
12. Select "Mount Existing Premount"
13. Select 1gbdebian.premount
14. Enter in sudo password.
15. Run Debian Dev Extend
16. Choose debian.lennydev.20110626.extend
17. Open Thunar, navigate to the /tmp folder, right-click, open Terminal
18. Type "dir" (or "ls") to list directories, verify that both extends are in there. They are.
19. Type "sudo cp -a debian.lennydev.20110626.extend/* 1gbdebian.extend/"
20. Get error messages and system crash.
 
Last edited by a moderator:
You can't mount the extends that way to copy them, as we'll have mounted /proc and /home, which'll confuse the system...

You'll have to do something like this:
Code:
cd /tmp
mkdir extendA extendB
sudo mount -o loop /path/to/extendA extendA
sudo mount -o loop /path/to/extendB extendB
sudo cp -a ./extendA/* ./extendB
sudo umount extendB
sudo umount extendA
rmdir extendA
rmdir extendB

I might be able to whip up a quick Zenity-based thing tonight, and maybe update Extend Utils while I'm at it.. however it's a bit pushing for time just now :(

-edit-
Ok, running late again, but try this:
Code:
zenity --info --text="Please select the old extend file."
extendFileA=$(zenity --file-selection --file-filter=*.extend);
if [ -f $extendFileA ]
then
        zenity --info --text="Please select the new extend file."
        extendFileB=$(zenity --file-selection --file-filter=*.extend);
		if [ -f $extendFileB ]
		then
			gksudo "mkdir /tmp/extendA"
			gksudo "mkdir /tmp/extendB"
			gksudo "mount -o loop $extendFileA /tmp/extendA"
			gksudo "mount -o loop $extendFileB /tmp/extendB"
			sudo cp -a /tmp/extendA/* /tmp/extendB | zenity --progress --pulsate --text="Please Wait.\nCopying..."
			gksudo "umount /tmp/extendA"
			gksudo "umount /tmp/extendB"
			gksudo "rm -rf /tmp/extendA"
			gksudo "rm -rf /tmp/extendB"
			zenity --info --text="All done, you can delete your old extend now if you want."
		fi
fi

Stick that in a file called extendCopy.sh.
chmod +x extendCopy.sh
./extendCopy.sh
And follow the prompts...

The sudo in amongst the gksudos is a bit iffy, but gksudo didn't seem to like using cp for some reason.. so.. hopefully it works!
 
Well, extendcopy.sh didn't seem to work properly... nothing crashed, but it didn't copy the files.

I also tried it with that sequence of terminal commands. Everything was fine until I did the sudo cp command. Then I got a number of error messages, not a variety of them like before but the same one repeated over and over, something about NFS (sorry, should have written it down). The end result was the same, though - my Pandora got slower and slower, and eventually crashed. Also when I rebooted, I found that my start menu had disappeared.
 
That's rather mad.. I admit to not testing it on the Pandora, but I did run it on my PC without issues!
I have a feeling it ran out of memory when copying files and wasnt flushing the buffer as often as it should have... but killing your menu is definitely a unique issue!
-edit-
To get that back, by the way... just right click on the panel and add the XFCE menu... I've killed mine often enough by accident ;)
-/edit-

No idea about the NFS stuff.. that doesnt make much sense, either.
 
Yeah... I seem to have screwed up some other things as well, so I'm just going to go ahead and reflash now. :ph34r: Well, serves me right for typing sudo commands without any protection such as OS extend or booting from SD.

I hope edgex004 has better luck, then maybe I can follow his lead. ;)

Um, also, if somebody does manage to do this successfully, if you could zip up the resulting file and upload it somewhere, probably some people would be grateful.

EDIT: Hm... I opened the SD card in windows and tried to copy the 1gb.overlay file. And I got a pop-up saying "Cannot copy 1gb: The file or directory is corrupted and unreadable". I wonder if this is due to something I did, or due to the SD card, or what... maybe I should also format the SD card and start fresh, just in case. (I HAD run it through the Panasonic SD formatter before I started using it, but that was months ago)

EDIT2: Apparently some files on the SD card have become cross-linked.
 
I did mange to expand the debian extend to 1gb..
However I used my Desktop to do it.
 
Stuckie said:
Here we go, a 1gb version: http://stuckiegamez.co.uk/apps/pandora/ExtendUtils/debian.lennydev.20110629.1gb.zip

Hooray for remote access to servers!

Thank you thank you! I was about to try it on a desktop, but now there's no need. I'll let you know how it works after I go home and grab my pandora. Luckily a restart or two seemed to clear up any of the muck I caused so I don't think I'll need a reflash.
 
Last edited by a moderator:
Ok, after reflashing my OS and reformatting my SD card (which seemed to have picked up lots of I/O errors and cross-linked files), everything seems to be working as it should now. :)

I have a question now. I'm still trying to follow the basic outlines of mcobit's tutorial.

Now type make and wait until your game is built for you.

When this finished without errors, we can create the installation dir:

sudo mkdir /mnt/utmp/abe
sudo chmod -R 777 /mnt/utmp/abe

Now we install the game:

make install
When I try sudo mkdir, it tells me "cannot create directory... no such file or directory". I can't do it from within Debian, only from within Angstrom, so I guess /mnt/utmp is not accessible from Debian. So... what do I do?
 
That is indeed very obvious. I thought it would just automatically create intermediate folders if they didn't exist, so I didn't realize that I needed to add -p.

I came upon a bunch of GDK display errors when trying to get my program to run, but that's unrelated to this, so I'll start another thread about that later today. Thanks again for the help!
 
Yes, completely safe as Lenny is a Debian release and they don't tend to fidget with it much save for security fixes.
Even then, it's "oldstable" at the moment, so it's only receiving critical security fixes and community backports at the moment ( if I remember how Debian works, correctly )
 
Whenever I run any program while in the Lenny extend, I get the message "Gtk-WARNING **: cannot open display: :0.0", or a similar one. It has been true for Solfege, eatuner and gnusound, so far. Solfege and eatuner were installed with the method from mcobit's tutorial in /mnt/utmp/program, while gnusound I just installed with "sudo apt-get install gnusound".

Freamon in this topic thinks that it's running programs from within the extend that's doing it.

Is there a fix?
 
Last edited by a moderator:
There is, but if I do it, you won't be able to unmount the dev extend cleanly as it involves linking up some folders from Angstrom to Debian which are usually in constant use.

Technically, you might be able to get away with it by going through Extend Utils and choosing an OS Extend style mount... however, I haven't tried this, and I'm not sure if it would work so it's on your own head! And again, you will not be able to cleanly unmount it.

You also might be able to get away with just doing the xhost forwarding though, so try: xhost local:localhost in an Angstrom terminal. This will still allow you to cleanly unmount the Extend once you're finished.

[edit]
I probably should explain what the error is...

The error is your program being unable to reach the X Server, which is running in Angstrom rather than Debian.
The Debian system doesn't know where it is, so it can't talk to it, hence the error.
Generally, all that needs bound up is some bits of /var so that the message systems can communicate.
If you ran it from Angstrom, you shouldn't have an issue - apart from maybe library paths being a bit odd, so you may have to do LD_LIBRARY_PATH=/tmp/debextend/usr/lib /path/to/my/application to run it.
 
Thanks... will try those out and see if it works.
In other news, I got an interesting message when I tried to run the pnd_make.sh script:
Code:
esn-openpandora:~/eatuner-pnd$ ./pnd_make.sh -d eatuner -p eatuner.pnd -x PXML.xml -i icon.png -c
FOLDER set to eatuner
PNDNAME set to eatuner.pnd
PXML set to PXML.xml
ICON set to icon.png
-c set, will create compressed squasfs image instead of iso --
./pnd_make.sh: line 44: mksquashfs: command not found
your squashfs version is older then version 4, pleas upgrade to 4.0 or later
 
Back
Top