[SOLVED] Pandora rather than Pyrrha to this rescue of a deluge....?


MarioPandio

Well-Known Member
Joined
Aug 28, 2010
Messages
1,376
Location
Half way up the stair
Evening folks....

Need some help with a phone SD card issue that only Pandora can get close to solving.

Need some Linux terminal commands knowledge from those with such force, to put it bluntly.

To waffle...

Had a crap samsung galaxy ace bought for me ages ago, that drove me mad (low phone internal memory problem), which meant....you had to partition the external mini SD card as Fat32 and Ext2 for the apps storage space and use a program called ´Link2SD´ to shift everything to the Ext2 partition to avoid the phone going nuts.

Anyway that solved things back then, along with a 32gb SD but... I recently got given a Samsung SII (old I know by todays standards) and thats great, except I stuck with a 3gb Ext2 partition for linking apps! ............Its full and the new phone is freaking!

Problem is :

Home PC is windows. No Linux dual boot at present, or Live Cd to hand.

No Internet at present, except via the phone. So I cant download linux, or a live Cd to the PC.

Windoze based Imaging programs, (even linux based ones) can copy the Ext2 partition but not allow me to resize the partition. Or merge, or anything, into unallocated space taken from the FAT32 partition. Which is weird imhho.

Windows cannot mount !he ext2 image, or real partition, on the ext2 section to copy its files either.

Pandora can....  :)   Yay and Yah!

However...

Despite spare space on a Fat32 card in the Pandora, to copy the files off of the Ex2 partition...

Permission is denied in simple cut and paste.

Therefore...

I´m aware from these forums historically, that that´s the obvious stated blatantly to my face.

What I need is (I believe?) therefore, the correct commands to permission wrap and tarball, an extractable and restore-able version of the current 2gb Ext2 partition, into a freshly made 8gb Ext2 space?

As no windows programs will it seems (or hear my screams!)....

Pandora can solve this.... I know for sure.

Prometheus would have helped me here back then and not stolen any Megamans thunder entirely. Miss her and her chapters. Was a good book in the making that.

Kind regards

MP

edited : To amend TITLE to SOLVED
 
Last edited by a moderator:
tar should save permissions automatically, so that should be the only step you need - or rather tar and untar.


Something along the lines of 'tar -cvf archive.tar /media/oldpartition' and, having changed directory to /media/newpartition, 'tar -xvf archive.tar' should do the work for you. I'm not 100% on what happens to hard and soft links, but if you're using those you should know how to check them.


Although tar is old, and Pandora has a working copy of cpio installed, so you should probably use that instead, but I have to admit, tar's always worked for me and I've not fully learned cpio yet.
 
Last edited by a moderator:
Levi,

many thanks I will try your advice as best I follow it. Its been awhile with any issues with my Pandora (faithful) and I´ve totally forgotten old aspects of linux commands I used to need with Pandora.

I take it the commands will tar and untar the partitions files and as you say, I´ll then pick up the pieces if it doesnt go super smooth.

Invaluable advice anyway and many thanks.

Cpio?

Sounds like R2D2 is up to something with projected princesses.

Revenge of the Nerds?
 
Heh, I've never thought about the name of cpio like that, but I will now!


Those tar commands should respectively generate an archive.tar file containing the contents of your partition, and unpack that file back on to your new partition. I'm leaving formatting the partition to create your new partition for you - tar is only concerned with the contents of the partitons.


Note the archive will be very big because I haven't set any compression options on those command lines - if that's a problem you could investigate those options, or compressing the archive after you've made it using tools like gzip or bzip2.
 
tar should save permissions automatically, so that should be the only step you need - or rather tar and untar.


Something along the lines of 'tar -cvf archive.tar /media/oldpartition' and, having changed directory to /media/newpartition, 'tar -xcf archive.tar' should do the work for you.
Wut?

the c option is to create a tarfile. It isnt used for extraction.  And, if I recall correctly, - is not needed for gnu tar.

So:


tar cf archive.tar /media/oldpartition
and:


cd /media/newpartition
tar xf path/to/archive.tar
would make sense

and to compress add "z" to the options of both

or to view progress add "v" to the options of both
 
Okay thanks for the much appreciated input and options guys. I´m going to risk what I can in a moment.

The partitioning anew etc is no problem, I was just surpised that I cant simply restore an image of the smaller partition into a newer bigger one with various tools. It just wont let me and simply offers to remake a smaller partition with no option to resize or merge it. Weird.

Anyhow I figured Pandora can at least read and tar it all. SO...

I guess I´m looking at

tar cfvz archive.tar /media/oldpartition

and

cd /media/newpartition
tar xfvz path/to/archive.tar

to get a compressed and verbose read out of its progress both ways?

I´ll check out file roller first as well. Turns out I have that already but I couldnt locate it amidst the myriad of wonder tools the Pandora can pack into two 128gb cards (as it calls itself Archive Manager in the menu and desktop not FileRoller doh!)

FBnil that Ext2fsd driver sounds VERY interesting. Thanks for tip. 

Lots of options now but thats Pandoraland.

I´m not afraid of commandline personally but like to know exactly what commands I´m giving, hence heading here for expert advice.

Cheers folks will let you know what happens.

Question in the meantime is... Will Prometheus return to sail with (Pyra) Pyrrha and her son Deucalion and repopulate the Pandora/Pyra fora in the near future with all things Megaman?

Only she has the foresight to know this but inquiring Pandorian minds want to know....
 
Well this is proving an awkward headache it seems.

1. Ext2fsd cant help on pc with dealing with the Ext2 that way.

2. Not enough space on the partition for the commandline options to even have thinking space to make the tar and it wont accept new paths as the output location either.

3. Made space and the terminal attempts fail to tar things up for various errors.

4. FileRoller is awkward to use on the Pandora display. Probably great via TV Out though.

5. Xarchiver fails to tar the files.

6. Squeeze does work! Yay! 

7. Wiped the partition and made new one on Windows.

8. Squeeze cant untar the tar.gz it made to the ext2 partition for permission errors.

9. Command line copied the archive to the partition but...

10. Terminal cannot untar a tar.gz file!

SO...

Is there a different command that will untar the tar.gz file into the new partition by any chance?

Its like pulling teeth :)
 
Whoops, yeah, deliberate mistake left in for the reader there. -xvf to untar a non-compressed archive, not -xcf (not sure if it's a linguistic thing or a keyboard thing, but I often mix up v and c in tar command lines).


The -v option just prints out the names of the files as it operates. Without -v it'll still work, but on a long job I like to see some activity personally.


In my experience, commands like 'tar cvf foo.tar barfiles' are a BSD thing, and I think all Linuxes need the 'cvf' stuff to be options, so need to have a hyphen before them - as in 'tar -cvf foo.tar barfiles'.


'foo.tar' is an argument to the -f option, so you might do better if you ensure the f is the last option on your optionlist, so the 'foo.tar' comes immediately after it.


Now, to your current travails, if you actually have a '.tar.gz' file that suggests it's been tarred then gzipped afterwards, rather than using tar's options to gzip the individual files as it goes. AIUI, you need to do the reverse then, ungzip it then untar it - though you should be able to do that on one command line, and not have to store the intermediate archive.tar, try:


gunzip archive.tar.gz|tar -xv


If, on the other hand it has used tar's gzip option while you created it, you'll need to apply that option as you untar it. Try:


tar -xvzf archive.tar.gz
 
Thanks for the pointers. 

I´m getting somewhere via other means at present but will return to this if it goes Pete Tong.

I´m well aware already that when I finally accomplish everything on the Pandora and am smug with myself that the files are all copied...I´ll pop it in my phone and it will all go mental anyway!

So like the weather today I´m a sucker for punishment when I could just say screw it and go out and chill with a stiff drink and chalk this one up to experience :)
 
Well thanks folks for all the help.

4hrs later and Yay the Phone is fixed.

Spank my ass and call me Sally but despite it being arduous getting there, Pandora to the rescue and it all worked out fine in the end.  Even the sun is now shining! 

Beer Garden it is then :)
 
Back
Top