Editing Easy Debian

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.

Warning: This page is 46 kilobytes long; some browsers may have problems editing pages approaching or longer than 32kb. Please consider breaking the page into smaller sections.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 10: Line 10:
== Install instructions ==
== Install instructions ==
-
* Install the [http://maemo.org/packages/view/easy-deb-chroot/ easy-deb-chroot package]. It can be found in the [[Extras]] repository. There may be a newer version in the [[Extras-devel]] repository. (Enabling Extras-devel is a dangerous area and you should disable it as soon as you are done installing Easy Debian, but Easy Debian is rather safe and it is optified). Once installed several new shortcut icons will be available on the applications menu.
+
* You need to install the [http://maemo.org/packages/view/easy-deb-chroot/ easy-deb-chroot package]. It can be found in the [[Extras]] repository. There may be a newer version in the [[Extras-devel]] repository. (Enabling Extras-devel is a dangerous area and you should disable it as soon as you are done installing Easy Debian, but Easy Debian is rather safe and it is optified.)
-
 
+
* Once installed several new shortcut icons will be available on the applications menu. You will need to first run the one called "Debian Image Installer". A terminal program will open and ask you where to place the image file (after decompression it will be a 2 GB file), either on the [[Nokia N900|N900's]] built in storage (under MyDocs), or on an external MicroSD card (if available). That will start the download of the compressed image (about 300 MB) and eventual extraction of the image file. It may take more than 15 minutes to download if you have fast Internet connection, and another 30 minutes  or more to extract it on your tablet. Make sure that there are no other processes running and that the extraction is not interrupted.
-
* Go to application menu and run the application called "Debian Image Installer". A terminal program will open and guide you through several steps of pre-configuration:
+
-
** '''First screen''' will give you '''a warning''' which you should acknowledge by clicking OK.
+
-
** '''Second screen''' will ask you to '''Choose an image to download''' and give you 3 image options. For the sake of this tutorial, I choose the first option, '''image v3e'''.
+
-
** '''Third screen''' will ask you to '''Choose Memory Card''' where to place the image file to either MyDocs (which in our case, is the internal memory of the phone) or MicroSD (assuming you have a microSD installed in your phone) (after decompression it will be a 2 GB file), either on the [[Nokia N900|N900's]] built in storage (under MyDocs), or on an external MicroSD card (if available). That will start the download of the compressed image (about 300 MB) and eventual extraction of the image file. It may take more than 15 minutes to download if you have fast Internet connection, and another 30 minutes  or more to extract it on your tablet. Make sure that there are no other processes running and that the extraction is not interrupted.
+
** You can check for a successful download and extraction by typing<pre>ls -l /home/user/MyDocs/debian*</pre> in [[terminal|XTerminal]]. The compressed image name has the ending .img.ext2.lzma; when decompressed the file name ends in .img.ext2 and it should have a file size of exactly 2147483648 bytes.
** You can check for a successful download and extraction by typing<pre>ls -l /home/user/MyDocs/debian*</pre> in [[terminal|XTerminal]]. The compressed image name has the ending .img.ext2.lzma; when decompressed the file name ends in .img.ext2 and it should have a file size of exactly 2147483648 bytes.
* This step is an alternate way to do the previous step: You can manually download the image file from [http://qole.org/files//debian-m5-v3e.img.ext2.lzma here]. Afterward you will have to copy it into <code>/home/user/MyDocs/</code> or into <code>/media/mmc1/</code> depending on whether you want it installed on the internal storage or on a removable storage.  Then, when you run "Debian Image Installer" it will detect that you already have the file and proceed to extract it and set it up for you. For detection of your already placed debian* file stated above, the Debian Image Installer still need to connect to the internet for file checking purpose. If you have a faster computer with [http://www.7-zip.org/ programs] to unpack [[:wikipedia:Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm|lzma]]-compressed files, you may also skip the Debian Image Installer by copying the uncompressed file by USB to the <code>/home/user/MyDocs/</code> folder.
* This step is an alternate way to do the previous step: You can manually download the image file from [http://qole.org/files//debian-m5-v3e.img.ext2.lzma here]. Afterward you will have to copy it into <code>/home/user/MyDocs/</code> or into <code>/media/mmc1/</code> depending on whether you want it installed on the internal storage or on a removable storage.  Then, when you run "Debian Image Installer" it will detect that you already have the file and proceed to extract it and set it up for you. For detection of your already placed debian* file stated above, the Debian Image Installer still need to connect to the internet for file checking purpose. If you have a faster computer with [http://www.7-zip.org/ programs] to unpack [[:wikipedia:Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm|lzma]]-compressed files, you may also skip the Debian Image Installer by copying the uncompressed file by USB to the <code>/home/user/MyDocs/</code> folder.
Line 29: Line 25:
; Close Debian : for unmounting the Debian image and shutting down all running Debian processes
; Close Debian : for unmounting the Debian image and shutting down all running Debian processes
-
; Deb Img Install : for the initial download and extraction of the Debian image. For installing a new version of the Debian image from [http://qole.org/files http://qole.org/files], delete the old image (or move/rename it appropriately) and rerun Deb Img Install.
+
; Deb Img Install : for the initial download and extraction of the Debian image. For installing a new version of the Debian image from http:qole.org/files, delete the old image (or move/rename it appropriately) and rerun Deb Img Install.
; Debian chroot : this runs "sudo debian" in XTerminal, which gives root access to the Debian image. This can be used for modifying the Debian image and installing further applications from the command line. The root file system of Maemo is not visible from within Debian chroot, except /home and /home/user/MyDocs, so you cannot ruin the Maemo firmware from here.
; Debian chroot : this runs "sudo debian" in XTerminal, which gives root access to the Debian image. This can be used for modifying the Debian image and installing further applications from the command line. The root file system of Maemo is not visible from within Debian chroot, except /home and /home/user/MyDocs, so you cannot ruin the Maemo firmware from here.
Line 391: Line 387:
  deb http://ftp.debian.org/debian squeeze main contrib non-free
  deb http://ftp.debian.org/debian squeeze main contrib non-free
-
  #deb http://www.debian-multimedia.org squeeze main
+
  deb http://www.debian-multimedia.org squeeze main
-
 
+
-
[EDIT: By july 2013, the debian-multimedia.org domain was not anymore owned by the third-party supporters who owned it before! For security reasons it is not recommended to use it. Nevertheless, the official repository has improved its support over several mulimedia formats making third-party repositories unncecessary]
+
Easy Debian has only a limited amount of disk space, so we'll temporarily create a new place to store the downloaded new packages in MyDocs:
Easy Debian has only a limited amount of disk space, so we'll temporarily create a new place to store the downloaded new packages in MyDocs:
Line 555: Line 549:
This will get your browser installed, but it will then complain (if started from command line) about the lack of libesd0 and libcurl3. You can install both of these, also from squeeze sources, upon which it will start without complaining. Also, if you've been testing it as root, then you'll want to "chown -R user /home/user/.cache/chromium" and "chown -R user /home/user/.config/chromium" for it to work properly as "user".
This will get your browser installed, but it will then complain (if started from command line) about the lack of libesd0 and libcurl3. You can install both of these, also from squeeze sources, upon which it will start without complaining. Also, if you've been testing it as root, then you'll want to "chown -R user /home/user/.cache/chromium" and "chown -R user /home/user/.config/chromium" for it to work properly as "user".
-
 
-
== Optimising your EasyDebian images ==
 
-
 
-
=== Grow your image file to 4GB ===
 
-
 
-
Debian Wheezy takes up more space than Squeeze. If you want to enlarge your image file, the maximum file size that you can support on a FAT32 partition is 4GB minus one byte, or 4,294,967,295 bytes. Beyond that, you'll have to use a dedicated partition.
 
-
 
-
So, without harming portability, we can increase our image file by 1GB (almost) and then grow the file system to fit it. To increase the image size, first, concatenate 1GB of zeroes onto the end of the file:
 
-
<pre>dd if=/dev/zero bs=1M count=1024 >> /path/to/image.ext3</pre>
 
-
 
-
Note that the ">>" is critical here, meaning append the zeroes to the end of the file; accidentally use ">" and you'll overwrite the image. The command will "fail" with an error when you hit 4GB on a FAT32 filesystem, but, don't worry, that's because we hit the maximum file size before we ran out of zeroes. Our image file will still be the desired maximum possible size. Now, we need to unmount and remount the image, in order for the loop mount to pick up the larger "device" that we just created. This is as simple as running the Close Debian script, then restarting Easy Debian via Deb Chroot (or sudo debian).
 
-
 
-
Finally, we grow our ext3 file system to match. From within the chroot, issue a
 
-
<pre>resize2fs /dev/loop0</pre>
 
-
and your filesystem will be extended to 4GB.
 
-
 
-
=== Convert your image file to ext3, ext4, xfs, etc. ===
 
-
 
-
You might wish to use a newer file system for improved data integrity, efficiency or CPU performance; this is supported with recent versions of kernel-power and CSSU and can reduce CPU overhead.
 
-
 
-
==== ext2 to ext3 ====
 
-
 
-
This is fairly easy; from within the chroot, issue:
 
-
 
-
<pre>tune2fs -j /dev/loop0</pre>
 
-
 
-
assuming your first partition that is mounted on "/" is called loop0. It may be called dm-0, or anything else. To be sure, check it out. Issue:
 
-
 
-
<pre>df -k</pre>
 
-
 
-
and you should get an output like this:
 
-
 
-
<pre>
 
-
Filesystem      1K-blocks    Used  Available Use% Mounted on
 
-
/dev/loop0        2064208  1733036    331172  84% /
 
-
/dev/mmcblk0p2    2064208    796220  1163132  41% /home
 
-
/dev/mmcblk0p1  28312128  2252928  26059200  8% /home/user/MyDocs
 
-
</pre>
 
-
 
-
'''Example:'''
 
-
If the first partition mounted on "/" is called /dev/dm-0 instead of /dev/loop0, then the command should be:
 
-
 
-
<pre>tune2fs -j /dev/dm-0</pre>
 
-
 
-
'''end of Example'''
 
-
 
-
This command will add a journal to your ext2 filesystem. It will appear that it waits for your input since it will throw you a colon "'''Creating journal inode:'''". Do not type anything and wait approx. one minute to finish by itself. Close down Easy Debian (it is advisable to close it through it's specific icon named "Close Debian" which will properly close Debian and unmont everything).
 
-
 
-
Then, from Maemo's X Terminal as root, rename your image file from <image-name>.ext2 to <image-name>.ext3.
 
-
After that, edit /home/user/.chroot file by issuing:
 
-
 
-
<pre>nano /home/user/.chroot</pre>
 
-
 
-
and change ext2 into ext3 on those 2 unhashed fields:
 
-
 
-
<pre>
 
-
# Some examples:
 
-
IMGFILE=/home/user/MyDocs/debian-m5-v3e.img.ext2
 
-
#IMGFILE=/media/mmc1/debian-squeeze-m5.img.ext2
 
-
#IMGFILE=/dev/mmcblk1p2
 
-
#IMGFILE=/dev/mmcblk0p4
 
-
# Filesystem used; must always be set when using a partition.
 
-
# Default: from extension of IMGFILE, or ext2.
 
-
IMGFS=ext2
 
-
</pre>
 
-
 
-
Restart Easy Debian, and away you go. Take note that adding a journal adds overhead and may not improve performance; understand the implications before you proceed.
 
-
 
-
==== ext3 to ext4 (or anything else) ====
 
-
 
-
A word of warning. The version of e2fsprogs in Maemo is ancient, and xfs-tools seems to be non-existent, so if you use ext4 or xfs, you will lose the ability to fsck the image on the device itself. This is fine if you have (and are happy to use) a Linux PC; if not then you may want to stick to ext2/ext3.
 
-
 
-
Migrating from ext3 to ext4 has no impact on existing files that were written under ext3, only on newly written files. Therefore, to achieve the expected benefit from a migration to ext4, you'll need to create a fresh image of the desired size, format it and copy the contents of your old image onto your new one. You'll probably want to do this over USB from a Linux PC rather than from the device itself, both for speed reasons and (probably) for newer versions of the applicable filesystem tools.
 
-
 
-
First, create a file of the desired size, either with dd or by simply making a copy of the image file that you intend to clone.
 
-
 
-
<pre>cp <image-name>.img.ext3 <image-name>.img.ext4</pre>
 
-
 
-
Now format the new image file with the desired file system. We'll use ext4 here, but this should work for any filesystem that is supported by kernel-power.
 
-
 
-
<pre>mkfs.ext4 /path/to/mounted/n900/<image-name>.img.ext4</pre>
 
-
 
-
You might want to consider the "-T small" option to mkfs, which will yield a smaller block size (1KB) and more inodes, otherwise you'll be limited to 262,144 files in 1,048,575 blocks, also, at your option "-m 0" to set the reserved blocks count to zero (do not keep 5% back for the superuser). Once that's done, we need to mount both images, and clone the old one to the new one:
 
-
<pre>
 
-
mkdir /mnt/old
 
-
mkdir /mnt/new
 
-
mount -t ext3 -o loop /path/to/mounted/n900/<image-name>.img.ext3 /mnt/old
 
-
mount -t ext4 -o loop /path/to/mounted/n900/<image-name>.img.ext4 /mnt/new
 
-
cp -a /mnt/old/* /mnt/new/
 
-
umount /mnt/new
 
-
umount /mnt/old
 
-
</pre>
 
-
 
-
It does no harm at this point to run a filesystem check on the newly created image. You'll also need to make sure that the image is either configured in .chroot or is the first such image in the directory in order for the Easy Debian chroot scripts to pick it up.
 
-
 
-
== Directory based chroot ==
 
-
 
-
First copy the filesystem to your homefs. Then edit your ~/.chroot, so that it contains
 
-
 
-
    IMGFILE=none
 
-
    CHROOT=/path/to/chroot
 
-
 
-
TODO: Do some magic with closechroot
 
== Donations ==
== Donations ==

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)