Advanced Filesystem Hackery


Stuckie

Member
Joined
Apr 7, 2004
Messages
492
Age
35
Location
Tired, and sleeping in the basement...
Website
www.stuckieworld.net
Most of this has been superseded by the Extend Utils stuff, which means you don't have to do repartitioning on your card, as it stores the partitions as loopback files instead.

The majority of the Extend Utils information is in the Debian in an Extend Thread in Software Hacking: http://www.gp32x.de/board/index.php?/topic/54651-debian-in-an-extend/
However, probably the best place to start is the Wiki, as it's a bit more organised than a 15 page thread ;)
The Wiki documentation is here: http://pandorawiki.org/Extend_Utils

However, in direct response to your questions:
Great,but I have a problem during formating.

The swap partition cannot be recognized.

sudo mkswap /....... said no such ........

What is the problem?
You haven't given much to work on here!
What was the command you were typing?
Have you partitioned the card via cfdisk properly, and saved the partition table?
Sometimes you have to reset before it'll pick up the new table.
I can't really help here much as I'm not sure what you're doing...

Second questions,
Is the command'
sudo opkg install software' enough to download all the dependencies?

And where can I find the installed software other than using in terminal?


Thx again

Yea, opkg will pull down the dependencies for things in the Angstrom repository.
If you're lucky, you'll get a menu item for whatever you install, but for the most part, terminal is all you get!


I'd recommend the Extend Utils stuff over this, to be honest.. as you've more control over what's going on; unless you're using FAT32 and require 4GB or greater "partitions" ( though the latest Extend Utils has a way around this by daisy-chaining the Overlays. )
In terms of using Extend Utils, you'll basically be wanting a "Root Overlay", since that's what this thread essentially described, just in using the entirety of an SD card!
 
Last edited by a moderator:

jiuzhege

Still Fresh
Joined
Oct 1, 2009
Messages
41
I find out that the user permission is really annoying even I edited the sudoer w/ no password.


I have another problem now. :(

Things go well with the filesystem. I even installed a bittorrent software.

But..... my sd card in the left slot becomes read-only even after I rejected or restarted the system.

sudo chmod 777 /media/card is also useless....

what can I do ....thx a lot lot
 

Stuckie

Member
Joined
Apr 7, 2004
Messages
492
Age
35
Location
Tired, and sleeping in the basement...
Website
www.stuckieworld.net
That sounds like the card has become corrupt.. try checking the output of "dmesg | tail" and seeing if there's any further clues.
I also don't quite understand what you mean about user permissions.. what are you trying to do that gives you issues?
And are you using the Extend Utils stuff or are you continuing with the ext2 formatted card?
 

jiuzhege

Still Fresh
Joined
Oct 1, 2009
Messages
41
Stuckie said:
That sounds like the card has become corrupt.. try checking the output of "dmesg | tail" and seeing if there's any further clues.
I also don't quite understand what you mean about user permissions.. what are you trying to do that gives you issues?
And are you using the Extend Utils stuff or are you continuing with the ext2 formatted card?


ext2 card,, I just formatted the 2GB SD to only one partition.
It seems ok after I check and repair the sd card under windows.

The user permission is that I put all the binding command into 1.sh and put it under 3 folder. /home/name /media/sd1 /media/sd2/home/name(which is ext2)
If I execute the 1.sh in the first two folder, it doesn't work. Only if I execute the 1.sh under the ext2(is this the reason?).

How to execute the .sh in the start? THX
 
Last edited by a moderator:

Stuckie

Member
Joined
Apr 7, 2004
Messages
492
Age
35
Location
Tired, and sleeping in the basement...
Website
www.stuckieworld.net
I'm not wholly sure getting Windows to look at an ext2 formatted card is wise, but if it worked, good stuff :)

Your user permissions could be differing file systems.
/home/name I assume is on the NAND.. it should work fine there. I assume you've already done "chmod +x 1.sh" to set it executable, if you're running it just as "./1.sh"
/media/sd1 would be your other card, I guess.. if this is FAT32, the file system itself doesn't have the proper permission setup to do it, and I think you generally need to run scripts like "/bin/sh 1.sh" .. though someone will correct me if otherwise :)
/media/sd2 being your ext2 formatted card will have the permissions setup properly to allow things like this.

Worst case, you should be able to run it via "/bin/bash 1.sh" or "/bin/sh 1.sh" regardless of where it is.
 

jiuzhege

Still Fresh
Joined
Oct 1, 2009
Messages
41
Stuckie said:
I'm not wholly sure getting Windows to look at an ext2 formatted card is wise, but if it worked, good stuff :)

Your user permissions could be differing file systems.
/home/name I assume is on the NAND.. it should work fine there. I assume you've already done "chmod +x 1.sh" to set it executable, if you're running it just as "./1.sh"
/media/sd1 would be your other card, I guess.. if this is FAT32, the file system itself doesn't have the proper permission setup to do it, and I think you generally need to run scripts like "/bin/sh 1.sh" .. though someone will correct me if otherwise :)
/media/sd2 being your ext2 formatted card will have the permissions setup properly to allow things like this.

Worst case, you should be able to run it via "/bin/bash 1.sh" or "/bin/sh 1.sh" regardless of where it is.


sorry .I didn't express clearly

left is fat32 right one is ext2 which is good... left one is corrupt..

How to execute the 1.sh automaticly everytime when the system is login?
thx for the help
 
Last edited by a moderator:

Stuckie

Member
Joined
Apr 7, 2004
Messages
492
Age
35
Location
Tired, and sleeping in the basement...
Website
www.stuckieworld.net
Well, you could stick your script call in either ~/.bashrc or ~/.profile and it should get triggered on your user login.

If you do actually want it on system start however, you could possibly get away with writing a quick init script, but I'd advise against that if you're not sure what you're doing...
 

jiuzhege

Still Fresh
Joined
Oct 1, 2009
Messages
41
I tried several times but failed again and again.

After I made 2 partitions without formatting p1
screen100822-163732.png


reinsert the sd.. only see one partiton
screen100822-163757.png


screen100822-163812.png



If I formatted p1, there will be no partition information in cfdisk...

the rest 2 are the same,..

what will be the problem?
 

Stuckie

Member
Joined
Apr 7, 2004
Messages
492
Age
35
Location
Tired, and sleeping in the basement...
Website
www.stuckieworld.net
You've launched cfdisk on a partition rather than the card itself ( surprised that worked, actually... )

Your device is /dev/mmcblk0
The partitions off of that are /dev/mmcblk0p* .. where * is the partition number.

Apologies for the brief reply.. bit knackered just now.

[edit]
Also, swap partitions do not get auto mounted.
So, you wouldn't see it appear in the mount list.
You'll need to format it via: sudo mkswap /dev/mmcblk0p2 ( which would be the second partition on the first card. )
Then mount it manually via: sudo swapon /dev/mmcblk0p2
[/edit]
 

jiuzhege

Still Fresh
Joined
Oct 1, 2009
Messages
41
did it ... replace the old 2GB with new 16GB....15gb and 1gb swap,,,


Really troublesome... When I was ready to copy the 2gb to 15 gb....the command in GUI becomes gray.. I have to use command line..


What to do if you found that you can not write anything to the SD card? only to use command line? thx......

And I search ..search...search....cp -R -f ...rm -f .......

Finally ..I did....... Also...I add sudo mkswap /dev/mmcblk1p2 and swapon /dev/mmcblk1p2 into the SH file.
I can return the 2GB to my palm650....

BTW...how to rename a device? I can't find it..thx
 

Stuckie

Member
Joined
Apr 7, 2004
Messages
492
Age
35
Location
Tired, and sleeping in the basement...
Website
www.stuckieworld.net
N_2 said:
What to do if you found that you can not write anything to the SD card? only to use command line? thx......

That sortof sounds like your user didnt have permission to write there.. I imagine that the command you used, was probably something like "sudo cp -R /card1 /card2"
I'd have thought that the automount whatsit would have mounted it with user permissions.. probably want to check that.
At any rate, to give your user write access to your files again, something like "sudo chown -R yourusername /where/your/card/is/mounted" will sort them, at least.

N_2 said:
BTW...how to rename a device? I can't find it..thx

What do you mean, rename a device?

If you mean renaming the /dev/mmcblk1p2 part, you can't. That's a device node. Generally what happens is that the automounter looks at the filesystem name, and creates a folder of that name in /media instead. So if you had a FAT32 SD card that you'd set the label to "Bert", for want of a better name, it'd show up as /media/Bert. This is a mount point, however, not a device node, which would still be something like /dev/mmcblk1p1, it's just mounted to /media/Bert.

I think cfdisk allows you to set the label, I can't remember... assuming that's what you're after.
 
Last edited by a moderator:

jiuzhege

Still Fresh
Joined
Oct 1, 2009
Messages
41
yes..I want to change the LABEL of the ext2... the SD with FAT32 was set to 'Pandora' using win7 already...

I have tried cfdisk but didn't find that..... there is no e2label or mlabel in pandora...
 

Stuckie

Member
Joined
Apr 7, 2004
Messages
492
Age
35
Location
Tired, and sleeping in the basement...
Website
www.stuckieworld.net
**Blows dust off thread**

Right, Extend Utils will be getting an update soon as I've discovered a particularly clever method of automatically extending the NAND to the overlays on boot.
This would absolutely, definitely, make it highly unwise to remove your SD card while in use.. but means you don't need to faff about much with Extend Utils after the system is booted, and it won't overlay if it doesn't detect your card.
You'd also be able to faff about with the system init scripts without stuffing things up, as the changes would be in the overlay rather than on NAND so it'd just be a case of rebooting without the Overlay card, and you're back to stock Angstrom.

I've a few other things to add and tidy up, then I'll work on a decent UI for it and make it a bit more user friendly.
Perhaps then I won't be too paranoid to push it onto one of the file archives for public consumption - specially as it seems to be getting good use throughout the place without any casualties ( or at least, none that I've heard of. )
 
Top