We have 184 guests online

Fanatics Login

Content Feeds

  • Team Blog RSS Feed Team Blog RSS Feed AndroidFanatic - Team Blog RSS Feed
  • Android App Reviews Android App Reviews Applications, unofficial repository, discussion and news from the world of the Android Mobile OS. Join the chat and have your say, ask questions, and buy phones and accessories.
Resize your 'debian.img' at will. (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Resize your 'debian.img' at will.
#1610
dangermouse (Admin)
Admin
Posts: 92
graphgraph
User Offline Click here to see the profile of this user
Resize your 'debian.img' at will. 1 Year, 6 Months ago Karma: 9  

NOTE: this post is aimed at those who installed Debian linux onto their device and refers to the 'debian.img' therein. Instructions pertaining to that are available here:

http://www.androidfanatic.com/cms/component/fireboard/?func=view&id=251&catid=9


To resize your Debian IMG file - instructions are for people with linux computers or laptops:

Copy the 'debian.img' image file from your Phone's SD card (in sdcard/debian) to your linux desktop.

Open a terminal on your linux computer and 'su' so you are root.

change directory to the desktop in unbuntu's case it's here, we do this so we can see whats going on easily:

cd /home/user/Desktop


create an empty image file: (the 3500999999 refers to the size - this one is 3.5 GB, basically take the first 4 digits and thats how many megabytes the image will be)

dd if=/dev/zero of=debian2.img seek=3500999999 bs=1 count=1

Your new image file is called debian2.img

Now do (you are still on your desktop linux machine here):

mke2fs -F debian2.img

Mount the 2 images (the old one and new empty one)

mkdir debian
mkdir debian2
mount -o loop debian.img debian
mount -o loop debian2.img debian2


Copy the contents of the old image into the new:

cd /home/user/Desktop/debian/

cp -R -f * /home/user/Desktop/debian2


Unmount 'em

umount debian
umount debian2

(sometimes this doesn't work - so simply reboot)

Once that's done

Back to your linux computer desktop:

As root (su):

Delete the 2 folders debian and debian2

rm -r -f debian
rm -r -f debian2


delete your old image:

rm debian.img


rename the new image:

mv debian2.img debian.img

change permissions:

chmod a+x debian.img
chmod 777 debian.img


Then copy the newly created image into your phones /sdcard/debian folder (overwrite the original).

Finally on your phone boot debian shell as normal and at the localhost$ prompt do:

cd /var/lib/dpkg/updates

rm -r -f *


then

dpkg --configure -a (may take a few minutes, ignore the errors)

This gives you a 3.5GB image instead of the 720mb original image.

Much more room to play.





 
Report to moderator   Logged Logged  
 
Last Edit: 2009/02/22 21:57 By dangermouse.
  The administrator has disabled public write access.
#1618
everynothing (User)
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
Re:Resize your 'debian.img' at will. 1 Year, 6 Months ago Karma: 0  
Thanks! I definitely needed more than 750MB of space.



 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1663
cardyology (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Resize your 'debian.img' at will. 1 Year, 6 Months ago Karma: 0  
ANy way to do this under osx?

I've tried & got as far as copying the two images to my desktop.

Cant mount them, Im a bit of a noob but i think its cos they're ext3?
Anyway to resize them in osx?



 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1664
everynothing (User)
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
Re:Resize your 'debian.img' at will. 1 Year, 6 Months ago Karma: 0  
Sorry if this isn't a real answer but it could be handy to install virtualbox with a linux distro and/or xp.



 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1684
cardyology (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Resize your 'debian.img' at will. 1 Year, 6 Months ago Karma: 0  
Just trying it under xbuntu running off a USB stick.

I'll post my results.



 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1693
dangermouse (Admin)
Admin
Posts: 92
graphgraph
User Offline Click here to see the profile of this user
Re:Resize your 'debian.img' at will. 1 Year, 6 Months ago Karma: 9  
cardyology wrote:
QUOTE:
ANy way to do this under osx??


'Everynothings' answer is a good one, use parallels, or innotek's virtual box to create a virtual machine and install ubuntu or something.

OR, you could install ubuntu 8.10 directly (natively) on your Mac, I know the Macbook range allow it, as I ran a Macbook with no OSX on it at all, just linux for 2 years. But a month ago I moved over to a Vaio Laptop - Vista came straight off, Ubuntu straight on. No problems.

As an aside, OSX is based on BSD Linux, so there is compatibility to some degree at least.

Any other suggestions to help Cardyology from our growing community?



 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop