Active Topics

 


Reply
Thread Tools
sebastian.linux's Avatar
Posts: 91 | Thanked: 2 times | Joined on Jan 2007 @ Spain
#31
Originally Posted by insert_nick View Post
So with your instructions I've created a VFAT partition of almost 480MB
which I can see from terminal as /media/mmc1, and the remaining part
(~1.5GB) is an ext2 partition which contains al the stuff required for
Nokia 770 to work, which I can see from terminal as /media/mmc2. At least,
this is what I think, tell me if I am misunderstanding something.
That's perfect. So that you've got 1.5GB to install applications. You may practically install anything you like (even there's empty space for that stuff you don't like).

Changing the number 15000 in the partition size for a 30000 would have partitioned the card more equitatively. Since 15000cylinders x 32KBytes/cylinder = 480MBytes, and 30000cylinders x 32KBytes/cylinder = 960MBytes. This will be the size of your VFAT partition. That's only useful for USB compatibility with your PC. For example to copy media files (films, or music albums) from the PC to the Tablet (or viceversa).

By the way, when booting, I choose to boot from the ext2 partition (the
so-called "MMC card, partition 2, ext2"), which is also the default
choice. After the system boot, I launch the osso-xterminal on the 770, and
type:

$ cd /media/
$ ls mmc1/
$ ls mmc2/

Neither mmc1 or mmc2 contain anything, they appear empty; this is normal
for the first one, mmc1, which is effectively empty, as I have not put
anything in it after the tutorial: if I put some files into the VFAT
partition of the MMC, I'm pretty sure I'll see them with the ls command
into the /media/mmc1 dir, can you confirm that? (I don't want to try if
I'm not sure it will not break things, as now my system is on the MMC so
some more care is necessary...)
That's perfectly correct.

The problem (and real question) is: why cannot I see anything into the
mmc2 directory? I thought it should contain all the 770 filesystem, /user,
/opt, /etc, and all the stuff, the installed packages... everything! So
where is it? How can I see what's on the ext2 partition of the MMC? Is it
normal that I see that as empty, or not? What would happen if I try to put
some files in /media/mmc2, e.g. with the Midnight Commander utility (I'm
not going to dare anyway), would I break things?
The answer to this is very easy. Everything's perfectly mounted on your device. Because you've been able to launch the entire system from the mmc card.

As your mmc2 ext2 partition card is now the NEW SYSTEM, it is mounted as the root file system directly ON /.

This means that if you want to know where your stuff is, you must do:
$ cd /
$ ls
bin home mnt srv
boot initrd opt sys
dev lib proc tmp
...

Of course that /media/mmc2/ is empty, since we haven't mounted anything on that directory. You must distinguish between real physical block devices, and mounting points (or directories).

/media/mmc2 is not a block device but a directory. This directory is the desired mounting point for the ext2 partition, that is for the real block device /dev/mmcblk0p2.

But now that you've already boot the system from the mmc2 (that is /dev/mmcblk0p2). It won't be mounted to /media/mmc2 (why should it be needed?). Since your mmc2 (that is the real block device /dev/mmcblk0p2) is now mounted as the rootfs on /.

1) How can I save a "snapshot" backup of the system? Is it somehow
possible to restore a "broken" system by booting the 770 from the internal
flash and rewriting a working snapshot from the backup to the ext2
partition of the MMC (e.g. via ssh), and then rebooting again from the
ext2 partition? (PS: For "snapshot" backup of the system I mean something
like this)
Of course it can be done. It'd be a good idea to put it in the Maemo Wiki.
I hope Fanoush helps us again in this thread.

Please Fanoush tell us what you think about this useful feature. I think that the GNUtar thing would be enough. But I need some extra help, since there's not enough space for the backup in my device. So that I need to send it to my PC via SSH. Could you please read the link and help us a bit?
https://help.ubuntu.com/community/BackupYourSystem/TAR


Salut
Sebas

Last edited by sebastian.linux; 2007-02-20 at 22:18.
 
maxilogan's Avatar
Posts: 701 | Thanked: 21 times | Joined on Feb 2006 @ Italy
#32
ok, so... I managed to work around the problem of the package auth by giving the command 'apt-get -d -y --force-yes install tar' (giving apt-get -d -y install tar' resulted in a 'E: There are problems and -y was used without --force-yes' error). now when giving the command 'dpkg -x tar*.deb /tar-temp/' I get 'dpkg-deb: failed to read archive `tar*.deb': No such file or directory'

under /var/cache/apt/archive/ I have just a file named 'lock' and an empty directory named 'partial'...

I should say that since procedure wasn't working, I turned off the tablet at the tar installation. I re-mounted all the directories and all went fine. Do I have to execute again initfs_flash?

any advice?
__________________
--
Does life seem worthwhile to you?
 
sebastian.linux's Avatar
Posts: 91 | Thanked: 2 times | Joined on Jan 2007 @ Spain
#33
Originally Posted by maxilogan View Post
ok, so... I managed to work around the problem of the package auth by giving the command 'apt-get -d -y --force-yes install tar' (giving apt-get -d -y install tar' resulted in a 'E: There are problems and -y was used without --force-yes' error). now when giving the command 'dpkg -x tar*.deb /tar-temp/' I get 'dpkg-deb: failed to read archive `tar*.deb': No such file or directory'
Ok maxilogan. Type the following and post the result:
# cd /var/cache/apt/archives/
# ls
 
Posts: 108 | Thanked: 3 times | Joined on Feb 2007
#34
I went on with all the steps But i cant boot from the ext2 partition ??

Please see the the xterm for out put ??

In my n800 i have a 1G internal card

~ $ cd /media
/media $ ls
mmc1 mmc2
/media $ cd mmc2
/media/mmc2 $ ls
/media/mmc2 $ cd /
/ $ ls
bin floppy media root tar-temp
boot home mnt sbin tmp
dev initrd opt srv usr
etc lib proc sys var
/ $ cd /var/cache/apt/archives/
/var/cache/apt/archives $ ls
lock partial
i'm i doing something wrong ??

Thanks everyone

Last edited by screener; 2007-02-17 at 20:54.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#35
Originally Posted by sebastian.linux View Post
I tried but wasn't able, so that I decided to stick to ext2. Ext3 is supposed to work as well, but maybe the e2fsprogs package is not updated to ext3? Don't know for sure. I prefered to put only what was completely verified. Nevertheless, if somebody is able to mount it on ext3, then we could add ext3 as an alternative to choose.
Im running ext3 on my n770 for quite some time. You either need to make filesystem ext3 via mkfs.ext3 (or mke2fs -j) when formatting or later unmount ext2 (i.e boot from flash) and switch ext2 to ext3 via 'tune2 -j /dev/mmcblk0p2'. Then you can use ext3 filesystem and ext3 module as in example bootmenu conf (with mbcache and jbd modules).

Also when creating the filestem (ext2 or ext3) there are additional options which you may or may not find as a good idea.
http://www.die.net/doc/linux/man/man8/mke2fs.8.html
I find -m 0 useful (5% is too much for root). Some things can be tuned via tune2fs too: -i 0 -c 0 disables forced filesystem check, -r 0 changes number of reserved blocks for root.
http://linux.about.com/library/cmd/blcmdl8_tune2fs.htm
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#36
Originally Posted by insert_nick View Post
1) How can I save a "snapshot" backup of the system? Is it somehow
possible to restore a "broken" system by booting the 770 from the internal
flash and rewriting a working snapshot from the backup to the ext2
partition of the MMC (e.g. via ssh), and then rebooting again from the
ext2 partition? (PS: For "snapshot" backup of the system I mean something
like this)
Yes, you can snapshot system via GNU tar in similar way like you clone the system on the beginning - boot from flash, mount ext2 partition to /opt and then
Code:
/path/to/gnu/tar -zcvf /media/mmc1/snapshot.tar.gz -C /opt .
Dot on the end is imortant :-)

or you can run it over ssh, something like this should work

Code:
$ ssh >snapshot.tar.gz root@n770 /path/to/gnu/tar -zcvf - -C /opt .
But test the backup on pc via
Code:
tar ztvf snapshot.tar.gz
Originally Posted by insert_nick View Post
2) Am I wrong, or it should be written with bold characters in the
tutorial, that it is forbidden to take the MMC off from the device while
it is on and working? (or even charging?)
Yes, it should not be removed. This is slight disadvantage on n770. On n800 you have also external slot so you can remove at least one card.
 
sebastian.linux's Avatar
Posts: 91 | Thanked: 2 times | Joined on Jan 2007 @ Spain
#37
Originally Posted by fanoush View Post
Yes, you can snapshot system via GNU tar in similar way like you clone the system on the beginning - boot from flash, mount ext2 partition to /opt and then
Code:
/path/to/gnu/tar -zcvf /media/mmc1/snapshot.tar.gz -C /opt .
Hi Fanoush. Thanks for your help. But just a question: is it really necessary to remount the ext2 partition from flash? (I won't be able, because I won't have enough space). I mean, given that booting from mmc the file system is ext2 (and not journalized) would it be possible to do the TAR thing even with the very running system?

or you can run it over ssh, something like this should work
Code:
$ ssh >snapshot.tar.gz root@n770 /path/to/gnu/tar -zcvf - -C /opt .
That's what I'll probably use, but don't fully understand the code. Please consider that I'm not going to be able to locally mount the mmc. Should I definitely mount it via FUSE or something like that? How could I do that?

Thank you.
Sebas.
 
sebastian.linux's Avatar
Posts: 91 | Thanked: 2 times | Joined on Jan 2007 @ Spain
#38
Originally Posted by screener View Post
I went on with all the steps But i cant boot from the ext2 partition ??

Please see the the xterm for out put ??

In my n800 i have a 1G internal card

i'm i doing something wrong ??

Thanks everyone
Let's see. You say you went on with all the steps. As I understand, you've now boot from the flash, right? Did you installed the new dual-boot initfs? Did you copy the entire system to the mmc? Did you partition the card? May you report the fully accomplished steps?
 
sebastian.linux's Avatar
Posts: 91 | Thanked: 2 times | Joined on Jan 2007 @ Spain
#39
About the mounting and unmounting of /opt and /floppy:

These two directories are only mounting points used for the copying. They could have been named anything else. You first create them in case they do not exist:
# mkdir /opt/
# mkdir /floppy/

Then you mount there first your empty ext2 mmc card:
# mount /dev/mmcblk0p2 /opt

Then you mount the original system you want to copy:
# mount -t jffs2 /dev/mtdblock4 /floppy -o rw,rpsize=1024,rpuid=0,rpuid=30000

See that /dev/mtdblock4 is the flash memory device. As this device is formatted as jffs2 we add this option. We mount it on the empty directory /floppy. This way, at /floppy we'll find a full copy of our original system, ready to copy.

Then we copy it from /floppy to /opt with the GNUtar thing (that maybe a problem for maxilogan, still working on it)

After that, we want to reboot the system. But first we'd like to unmount the devices, in order to make a clean reboot. That's the meaning of:
# umount /opt
# umount /floppy

Please feel free to ask again if it remains unclear.

Sebas.
 
sebastian.linux's Avatar
Posts: 91 | Thanked: 2 times | Joined on Jan 2007 @ Spain
#40
Originally Posted by maxilogan View Post
ok, so... I managed to work around the problem of the package auth by giving the command 'apt-get -d -y --force-yes install tar' (giving apt-get -d -y install tar' resulted in a 'E: There are problems and -y was used without --force-yes' error). now when giving the command 'dpkg -x tar*.deb /tar-temp/' I get 'dpkg-deb: failed to read archive `tar*.deb': No such file or directory'

under /var/cache/apt/archives/ I have just a file named 'lock' and an empty directory named 'partial'...

I should say that since procedure wasn't working, I turned off the tablet at the tar installation. I re-mounted all the directories and all went fine. Do I have to execute again initfs_flash?

any advice?
I suppose that the tar package is not stored in your apt archive. Let's try it again. I don't understand why you cannot select 'y' and press enter when you're prompted for that when apt-getting the package. But the -d -y option should work. As I told you privately, I may SSH your device to see what happens. Please try it again, and before running GNUtar, tell me what you find at /var/cache/apt/archives/

I suppose you don't need to run the initfs_flash again.
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:34.