Mailing List Archive

Troubles with chrooted Debian
My dear Maemo friends,

On my N900, I use the Debian chrooted system but I very often run into troubles with it.

To read quickly, go after the words in italics ;-)

I just need to compile the Lazarus Free Pascal IDE for my device and/or to develop applications with it.
Sometimes it happened when I had Debian in an image file that my N900 suddenly crashed and switched off during the installation of some packages into Debian. So I ran fsck, expecting some damage to the filesystem in that image file. But the corruption appeared so heavy that it was basically unrepairable.
This happenened very frequently so I started to keep a backup of the standard 2GiB image. Still, the loss of work was very annoying… it’s a bit time consuming to backup 2GiB of data after each single step, don’t you think so?
OK, I thought it was better to use a physical device, an MMC SD card. So I’ve formatted an 8GB card to ext3 and copied all the contents of the Debian image onto it using rsync.
I’ve then modified the /home/user/.chroot configuration script accordingly.
All has worked fine except that during installation of the compiled Lazarus (make install) a copy command has frozen for all the night. That was strange, so I pressed Ctrl+C with no effect. I tried to Close Debian. It has also hung. So I’ve turned my device off.
OK, the first run of fsck on /dev/mmcblk1p1 has just recovered the ext3 filesystem journal.
I’ve been curious then if there were some errors left there, so I’ve run fsck -f /dev/mmcblk1p1. Ouch! A destruction of the fs again!

The side question:
Is it a good idea to check an ext3 filesystem right after a journal recovery? Or should I first mount it? I’m apparently lacking an essential knowledge here.

The main question:
Is it possible to avoid severe filesystem damage during just normal but io-intensive operations on the Debian for armel on the N900?

Thank you in advance for just any hint!

Pavel Řezníček
Re: Troubles with chrooted Debian [ In reply to ]
Am 02.01.2012 12:01, schrieb Pavel Řezníček:
> My dear Maemo friends,
>
> On my N900, I use the /Debian chrooted system/ but I /very often run
> into troubles/ with it.
>
> To read quickly, go after the words /in italics/ ;-)
>
> I just need to compile the /Lazarus Free Pascal IDE/ for my device
> and/or to /develop applications with it./
> Sometimes it happened when I had Debian in an image file that /my N900
> suddenly crashed and switched off/ during the installation of some
> packages into Debian. So I ran fsck, expecting some damage to the
> filesystem in that image file. But the corruption appeared so heavy that
> it was /basically unrepairable./
> This happenened /very frequently/ so I started to keep a backup of the
> standard 2GiB image. Still, the loss of work was /very annoying…/ it’s a
> bit time consuming to backup 2GiB of data after each single step, don’t
> you think so?
> OK, I thought it was better to use a physical device, an MMC SD card. So
> /I’ve formatted an 8GB card to ext3/ and /copied/ all the contents of
> the Debian image onto it using rsync.
> I’ve then modified the /home/user/.chroot configuration script accordingly.
> All has worked fine except that during installation of the compiled
> Lazarus (make install) /a copy command has frozen for all the night./
> That was strange, so I pressed /Ctrl+C with no effect./ I tried to
> /Close Debian./ /It has also hung./ So I’ve turned my device off.
> OK, the first run of fsck on /dev/mmcblk1p1 has just /recovered the ext3
> filesystem journal./
> I’ve been curious then if there were some errors left there, so I’ve run
> /fsck -f /dev/mmcblk1p1. Ouch! A destruction of the fs again!/
>
> *The side question:*
> /Is it a good idea to check an ext3 filesystem right after a journal
> recovery? Or should I first mount it?/ I’m apparently lacking an
> essential knowledge here.

I think fsck before mounting is never a bad idea. When the fs is damaged
the mount can make things even worse.

> *The main question:*
> /Is it possible to avoid severe filesystem damage/ during just normal
> but io-intensive operations /on the Debian for armel on the N900?/
>

I am using my debian on an ext2-Partition for over a year now on two
three different cards- never had any problems like you.
I also use another ext3-Partition on the same card for data, the same
here: no problems.

Have you ever considered your sd-card may be broken or simply not
suitable for the n900?
Do you have the possibility to try another one?
I using a Patriot 32Gb Class 10 now, before it was a Transcend 16 GB
Class 6.

CU Michael
--
BOMBING for peace is like FUCKING for virginity.
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Troubles with chrooted Debian [ In reply to ]
2012/1/2 Michael Rösch <maemo@dobiwe.de>

> Am 02.01.2012 12:01, schrieb Pavel Řezníček:
> > My dear Maemo friends,
> >
> > On my N900, I use the /Debian chrooted system/ but I /very often run
> > into troubles/ with it.
> >
> > To read quickly, go after the words /in italics/ ;-)
> >
> > I just need to compile the /Lazarus Free Pascal IDE/ for my device
> > and/or to /develop applications with it./
> > Sometimes it happened when I had Debian in an image file that /my N900
> > suddenly crashed and switched off/ during the installation of some
> > packages into Debian. So I ran fsck, expecting some damage to the
> > filesystem in that image file. But the corruption appeared so heavy that
> > it was /basically unrepairable./
> > This happenened /very frequently/ so I started to keep a backup of the
> > standard 2GiB image. Still, the loss of work was /very annoying…/ it’s a
> > bit time consuming to backup 2GiB of data after each single step, don’t
> > you think so?
> > OK, I thought it was better to use a physical device, an MMC SD card. So
> > /I’ve formatted an 8GB card to ext3/ and /copied/ all the contents of
> > the Debian image onto it using rsync.
> > I’ve then modified the /home/user/.chroot configuration script
> accordingly.
> > All has worked fine except that during installation of the compiled
> > Lazarus (make install) /a copy command has frozen for all the night./
> > That was strange, so I pressed /Ctrl+C with no effect./ I tried to
> > /Close Debian./ /It has also hung./ So I’ve turned my device off.
> > OK, the first run of fsck on /dev/mmcblk1p1 has just /recovered the ext3
> > filesystem journal./
> > I’ve been curious then if there were some errors left there, so I’ve run
> > /fsck -f /dev/mmcblk1p1. Ouch! A destruction of the fs again!/
> >
> > *The side question:*
> > /Is it a good idea to check an ext3 filesystem right after a journal
> > recovery? Or should I first mount it?/ I’m apparently lacking an
> > essential knowledge here.
>
> I think fsck before mounting is never a bad idea. When the fs is damaged
> the mount can make things even worse.
>
> > *The main question:*
> > /Is it possible to avoid severe filesystem damage/ during just normal
> > but io-intensive operations /on the Debian for armel on the N900?/
> >
>
> I am using my debian on an ext2-Partition for over a year now on two
> three different cards- never had any problems like you.
> I also use another ext3-Partition on the same card for data, the same
> here: no problems.
>
> Have you ever considered your sd-card may be broken or simply not
> suitable for the n900?
> Do you have the possibility to try another one?
> I using a Patriot 32Gb Class 10 now, before it was a Transcend 16 GB
> Class 6.
>
> CU Michael
> --
> BOMBING for peace is like FUCKING for virginity.
> _______________________________________________
> maemo-users mailing list
> maemo-users@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-users
>

Dear Michael,

thank you for your kind response!

I'm glad to know that running fsck before mounting is never a bad idea [?]

OK, *the SD-card may really be broken,* that's right. I have to go for one
and buy it (or via an e-shop) as soon as I have the time. Or, I may *test
this old one for bad blocks.*
*
*
But *what was then wrong with my Debian when run from an image file* on the
internal memory storage (/home/user/MyDocs/debian-m5-v3e.img.ext2)?

As I mentioned before, during the installation process of some more
packages, my N900 just went off regularly. Did you any time try to *upgrade
your whole Debian system* ("sudo apt-get update; sudo apt-get upgrade"
without specifying a package)? This is what I actually tried a couple of
times but always ended up in a switch-off in random stages of the package
installation, resulting in a severe filesystem damage inside the Debian
image file…

The case with the installation of the Lazarus IDE on the SD-card and on an
ext3 formatted partition might be related but also unrelated.

So the next step is to check the card for physically bad blocks. I'll give
it a try and report the results [?]
--
Pavel Řezníček
software developer and computer network administrator
vývojář a správce počítačových sítí
Re: Troubles with chrooted Debian [ In reply to ]
Am 03.01.2012 01:19, schrieb Pavel Řezníček:

> Dear Michael,
>
> thank you for your kind response!
>
> I'm glad to know that running fsck before mounting is never a bad idea
>
> OK, /the SD-card may really be broken,/ that's right. I have to go for
> one and buy it (or via an e-shop) as soon as I have the time. Or, I may
> /test this old one for bad blocks./
> /
> /
> But /what was then wrong with my Debian when run from an image file/ on
> the internal memory storage (/home/user/MyDocs/debian-m5-v3e.img.ext2)?

That's a good point- frankly I don't know- maybe the explaination bellow
also fits for this...

> As I mentioned before, during the installation process of some more
> packages, my N900 just went off regularly. Did you any time try to
> /upgrade your whole Debian system/ ("sudo apt-get update; sudo apt-get
> upgrade" without specifying a package)? This is what I actually tried a
> couple of times but always ended up in a switch-off in random stages of
> the package installation, resulting in a severe filesystem damage inside
> the Debian image file…

Ah now it is ringing: this sound like this:

"Then we'll do the dist-upgrade. Unfortunately Maemo has a very snappish
watchdog that reboots your phone if it thinks it hangs due to a runaway
process. This is almost certainly triggered when doing mayor package
installations with normal process priority. So we'll do the dist-upgrade
wit the lowest priority using the nice command:

nice -n 19 sudo apt-get update
nice -n 19 sudo apt-get dist-upgrade"

I never had this problem but maybe that is yours?

> The case with the installation of the Lazarus IDE on the SD-card and on
> an ext3 formatted partition might be related but also unrelated.
>
> So the next step is to check the card for physically bad blocks. I'll
> give it a try and report the results




--
Die SED hat stets sämtliche gesellschaftlichen Umwälzungen und
Reformen geführt. So wird und soll es auch diesmal sein.
(Egon Krenz am 18.10.1989)
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Troubles with chrooted Debian [ In reply to ]
Dne 4.1.2012 14:19, Michael Rösch napsal(a):
> Am 03.01.2012 01:19, schrieb Pavel Řezníček:
>
>> Dear Michael,
>>
>> thank you for your kind response!
>>
>> I'm glad to know that running fsck before mounting is never a bad idea
>>
>> OK, /the SD-card may really be broken,/ that's right. I have to go for
>> one and buy it (or via an e-shop) as soon as I have the time. Or, I may
>> /test this old one for bad blocks./
>> /
>> /
>> But /what was then wrong with my Debian when run from an image file/ on
>> the internal memory storage (/home/user/MyDocs/debian-m5-v3e.img.ext2)?
> That's a good point- frankly I don't know- maybe the explaination bellow
> also fits for this...
>
>> As I mentioned before, during the installation process of some more
>> packages, my N900 just went off regularly. Did you any time try to
>> /upgrade your whole Debian system/ ("sudo apt-get update; sudo apt-get
>> upgrade" without specifying a package)? This is what I actually tried a
>> couple of times but always ended up in a switch-off in random stages of
>> the package installation, resulting in a severe filesystem damage inside
>> the Debian image file…
> Ah now it is ringing: this sound like this:
>
> "Then we'll do the dist-upgrade. Unfortunately Maemo has a very snappish
> watchdog that reboots your phone if it thinks it hangs due to a runaway
> process. This is almost certainly triggered when doing mayor package
> installations with normal process priority. So we'll do the dist-upgrade
> wit the lowest priority using the nice command:
>
> nice -n 19 sudo apt-get update
> nice -n 19 sudo apt-get dist-upgrade"
>
> I never had this problem but maybe that is yours?
>
WOW!! This sounds very much like a solution! Thank you for this tip!
Will try ASAP!
>> The case with the installation of the Lazarus IDE on the SD-card and on
>> an ext3 formatted partition might be related but also unrelated.
I’m now pretty sure it /is related./
>> So the next step is to check the card for physically bad blocks. I'll
>> give it a try and report the results
I still didn’t have the time and the rememberance to check the memory
card’s partition for physically bad blocks. It’s still on the to do list
;-)

Pavel

--
function Podpis(): String;
begin
Jméno('Pavel Řezníček');
Bydliště('Borová 18', '312 00', 'Plzeň');
Pracoviště('Korandův sbor', 'Anglické nábřeží 13', '301 00', 'Plzeň');
Result := 'vývojář a správce sítě';
end;
Re: Troubles with chrooted Debian [ In reply to ]
Dne 4.1.2012 22:34, Paul Hartman napsal(a):
> On Mon, Jan 2, 2012 at 6:19 PM, Pavel Řezníček<cigydd@gmail.com> wrote:
>> OK, the SD-card may really be broken, that's right. I have to go for one and buy it (or via an e-shop) as soon as I have the time. Or, I may test this old one for bad blocks.
> Check your dmesg on N900, if you see some errors like this:
>
> [33713.501464] mmcblk1: error -110 sending read/write command,
> response 0x900, card status 0xe00
> [33713.501495] mmcblk1: error -110 transferring data, sector 27271168,
> nr 8, card status 0xc00
> [33713.570129] end_request: I/O error, dev mmcblk1, sector 27271169
> [33713.570159] Buffer I/O error on device mmcblk1p4, logical block 0
> [33713.570159] lost page write due to I/O error on mmcblk1p4
> [33754.895355] mmcblk1: error -110 transferring data, sector 30941184,
> nr 16, card status 0xc00
> [33754.895690] end_request: I/O error, dev mmcblk1, sector 30941185
> [33754.895721] Buffer I/O error on device mmcblk1p4, logical block 458752
> [33754.895751] lost page write due to I/O error on mmcblk1p4
> [33754.895812] end_request: I/O error, dev mmcblk1, sector 30941192
> [33754.895843] Buffer I/O error on device mmcblk1p4, logical block 458753
> [33754.895843] lost page write due to I/O error on mmcblk1p4
> [33755.504272] mmcblk1: error -110 transferring data, sector 31203328,
> nr 16, card status 0xc00
>
> means your card is incompatible with N900's MMC driver and you are
> most likely suffering data corruption. In my experience, class 6 and
> higher do not work properly in N900. Notice that other phones built on
> similar hardware have the same problem.
>
> But, good news, I made a fix to allow these cards to function without
> corruption. To apply this fix in your own kernel sources, edit
> drivers/mmc/host/omap_hsmmc.c replace the set_data_timeout function
> with this one:
>
> static void set_data_timeout(struct omap_hsmmc_host *host,
> unsigned int timeout_ns,
> unsigned int timeout_clks)
> {
> uint32_t reg;
>
> reg = OMAP_HSMMC_READ(host->base, SYSCTL);
>
> reg&= ~DTO_MASK;
> reg |= DTO<< DTO_SHIFT;
> OMAP_HSMMC_WRITE(host->base, SYSCTL, reg);
> }
>
> The fix was included in latest power kernel 49, and in fact they
> included my fix in CyanogenMod since they have some Android phones
> based on same hardware as N900 such as Motorola Milestone, and they
> suffer the same SD card incompatibilities as N900. :)
>
> If you use the stock Nokia kernel and don't want to compile your own,
> let me know and I can provide a prebuilt module that you can replace
> on your phone. (at your own risk... if you do it wrong, you will
> probably create infinite reboot loop and have to flash. You have been
> warned! It works for me.)
>
> However, most of these fast cards have terrible small read/write I/O
> performance. They are great if you want to use it in a camera for
> saving single large file or video recording, but bad a computer
> filesystem.
>
> Sandisk is the king of fast small I/O. My class 2 sandisk 16GB card is
> about 10 times faster than class 10 A-Data card for small I/O. And of
> course the Sandisk work with no errors or corruption on unmodified
> N900, which is important. Plus, since Sandisk has a lower class
> rating, they are actually cheaper. :) I recently bought 32GB Sandisk
> class 4 for $30 USD from Amazon. Some of class 10 cards are $100.
>
> My personal collection of good and bad microSD cards on N900:
>
> Good (works on unmodded N900):
> Nokia 1GB that came with N900
> Sandisk 16GB class 2
> Sandisk 32GB class 4
>
> Bad (corruption on unmodded N900):
> Transcend 8GB class 6
> A-Data 16GB class 10
> A-Data 32GB class 6
> Lexar 32GB class 10
>
> Also be careful that many fake Sandisk and Kingston cards out there. I
> only buy mine from Amazon, sold by Amazon. Too many from other sellers
> and ebay, chinese sites, etc. are counterfeit. Lots of reports of
> "this card works" in talk.maemo.org and other forums, but just because
> the card is recognized and you can use it doesn't mean it works
> properly or is good performance... many people suffer random
> corruption or SD card goes read-only one day and they don't know this
> is the cause.
>
> Hope that helps!
> Paul

Dear Paul!

Your answer was so thorough and exhaustive that I can’t imagine a better
one! Thank you very much for your time that you just invested in me and
my N900 experience!

My current one and only card is TDK 8GB Life on Record, class unknown
for now.

I’m not sure if I can buy one from Amazon directly because I’m neither
an US nor UK resident.
Still thanks for your recommendation, it’s very valuable for me.

Compiling a kernel is a task which I’m a newbie in. I’ve played with it
on two PCs running Mandriva but I don’t want to delve into it on my N900
‘cause it was pretty annoying for me to set everything up again after a
recent kernel upgrade (huh, didn’t know that the Nokia Suite is so
stupid that it doesn’t conserve any settings in /home/user but just only
the data in /home/user/MyDocs…). OK, I know now I could backup my
personal settings pretty easily using rsync/grsync but don’t have the
courage (and time) to play with the kernel at this moment… Maybe later.

I’d though appreciate if you send me the precompiled kernel module
(along with some instructions or web resources how to install it).

Is it possible to wait until the new power kernel (49) is released and
then install it in a standard manner from the repositories? Or is it
already available to install?

Thank you again for your guidance.

Pavel

--
function Podpis(): String;
begin
Jméno('Pavel Řezníček');
Bydliště('Borová 18', '312 00', 'Plzeň');
Pracoviště('Korandův sbor', 'Anglické nábřeží 13', '301 00', 'Plzeň');
Result := 'vývojář a správce sítě';
end;
Re: Troubles with chrooted Debian [ In reply to ]
----- Původní zpráva -----
> On 1/4/2012 4:32 PM, Pavel Řezníček wrote:
> > My current one and only card is TDK 8GB Life on Record, class unknown
> > for now.
> >
> > I’m not sure if I can buy one from Amazon directly because I’m neither
> > an US nor UK resident.
> > Still thanks for your recommendation, it’s very valuable for me.
>
> Replace Amazon with "trusted store" in your country who does not sell
> counterfeit products. (So, do not buy SD card from eBay, DealExtreme,
> etc.)

I’ve just purchased a SanDisk 16GB class 6 Micro SD card from Alza.cz, wich is one of the most reliable stores here in Czechia. It was really cheap. They offer two better class cards of this size (a little bit more expensive) but no bigger sizes. I hope I’ve chosen a good piece.

> > I’d though appreciate if you send me the precompiled kernel module
> > (along with some instructions or web resources how to install it).
>
> It is attached inside a ZIP file. This module is only for use with stock
> kernel, not power kernel!

(Note for the Maemo Users List: This was a private e-mail message so the zip file hasn’t been sent to the list).

> First, open xterm and gain root access. Unzip the attached file. You
> will get omap_hsmmc.ko
>
> Make a backup of the old module:
> mv /lib/modules/2.6.28-omap1/omap_hsmmc.ko
> /lib/modules/2.6.28-omap1/omap_hsmmc.ko.backup
>
> copy the new module into /lib/modules/2.6.28-omap1/
>
> Reboot and hopefully everything works. Be careful! if you made a mistake
> and didn't put the file in the right place, your N900 won't boot
> anymore! I suggest making a backup first just to be safe, in case you
> need to reflash.
>
> If your card was affected by this bug, hopefully using this module will
> now allow your card to work with no more corruption (after reformat).
>

I’ve just finished the installation of your precompiled module. Everything has gone well. Thank you in advance!

> > Is it possible to wait until the new power kernel (49) is released and
> > then install it in a standard manner from the repositories? Or is it
> > already available to install?
>
> It's already available, but is in extras-devel repository. If you're not
> comfortable using that, you can just use this attached module for use
> with the standard kernel instead.
>
> See http://talk.maemo.org/showthread.php?t=71879 for more info about
> power kernel. Lots of talk is about overclocking, but there are extra
> modules for things like IPv6 even if you don't overclock, it still has
> some fixes and advantages.
>
> > Thank you again for your guidance.
>
> You are welcome, I hope it will solve your problem!
>
> Thanks,
> Paul

<Příloha>  sdfix.zip

I’ve checked the card for bad blocks but fsck.ext3 hasn’t said if there are any. It has just said that it was updating the badblocks inode. Maybe there just aren’t any. It seems that no new filesystem corruption is being introduced when using your precompiled kernel module. I’ll report after further testing.

Pavel
Re: Troubles with chrooted Debian [ In reply to ]
Dne 5.1.2012 01:41, Paul Hartman napsal(a):
> On 1/4/2012 4:32 PM, Pavel Řezníček wrote:
>> My current one and only card is TDK 8GB Life on Record, class unknown
>> for now.
>>
>> I’m not sure if I can buy one from Amazon directly because I’m neither
>> an US nor UK resident.
>> Still thanks for your recommendation, it’s very valuable for me.
> Replace Amazon with "trusted store" in your country who does not sell
> counterfeit products. (So, do not buy SD card from eBay, DealExtreme, etc.)
I’ve just purchased a SanDisk 16GB Micro SD card but it’s not class 6 as
stated before but class 4, actually. I expect it to arrive on Monday
January 9th, it means tomorrow.
>> I’d though appreciate if you send me the precompiled kernel module
>> (along with some instructions or web resources how to install it).
> It is attached inside a ZIP file. This module is only for use with stock
> kernel, not power kernel!
>
> …
>
> If your card was affected by this bug, hopefully using this module will
> now allow your card to work with no more corruption (after reformat).

Dear Paul, I tried your module. Everything went OK! … until I tried to
rsync everything from the card to an image file stored in ~/MyDocs. I
tried it twice and in both cases an unwanted reboot and filesystem
corruption occured, inspite that I ran rsync with the nice -n 19 prefix.
I called rsync from a bash script with "sudo nice -n 19 <that_script>"
actually. I suppose that every child process inherits the niceness of
<that_script>.

But I also tried to perform a sudo apt-get update; sudo apt-get
dist-upgrade before. That worked pretty good except that some corruption
was already present on the filesystem (after an fsck repair) that didn’t
allow the upgrade to finish. Next time I’ll try on a fresh Debian partition.

So it appears that:
– the dist-upgrade seems to work :-) thank to the fixed kernel module
from you, Paul;
– as the image file became involved (during an rsync backup process),
the reboot and corruption occured twice already :-( ; the image file and
the partition on the microSD card both became corrupt;
– maybe I should

1. forget about the image file for now,
2. concentrate myself on work with the microSD card partition,
3. use the image file as a read-only rescue backup solution and
4. back the system on the card up to another place than to the
mounted image file on my device, i. e. to my PC, or use dd instead
of rsync.

Anyway, other ideas to figure out what’s going on here? Why is my N900
rebooting unexpectedly even when I am very nice to it?

Thank you, Paul and Michael, for your suggestions! I hope we’ll finally
find the way out of this weird story ;-)

Pavel

--
function Podpis(): String;
begin
Jméno('Pavel Řezníček');
Bydliště('Borová 18', '312 00', 'Plzeň');
Pracoviště('Korandův sbor', 'Anglické nábřeží 13', '301 00', 'Plzeň');
Result := 'vývojář a správce sítě';
end;
Re: Troubles with chrooted Debian [ In reply to ]
Dne 5.1.2012 01:41, Paul Hartman napsal(a):
> On 1/4/2012 4:32 PM, Pavel Řezníček wrote:
>> I’d though appreciate if you send me the precompiled kernel module
>> (along with some instructions or web resources how to install it).
> It is attached inside a ZIP file. This module is only for use with stock
> kernel, not power kernel!
>
> …
>
> If your card was affected by this bug, hopefully using this module will
> now allow your card to work with no more corruption (after reformat).
Great! Now, after the installation of your fixed kernel module, I run
Easy Debian without bigger problems! Thank you so much for your help,
/it really works!/
Even when the N900 gets switched off or reboots accidentally while Easy
Debian’s filesystem on the card is mounted, the damage to it is always
so small that it’s fairly repairable, almost with no harm to the data.
Even my TDK card behaves nicely.
I have the Lazarus IDE compiled and working now :-) I’ve started to port
my older commercial project to Maemo recently :-)
For those interested: It’s called MiniMU and should serve as a task
tracking and management on-line binary database client for lift
servicemen (and eventually grow into a multi-purpose database
application). I have developed it for my former employer and nowadays I
continue on the same project on my own, expecting him to buy the new
part of the work.

But What I noticed during my experiments is that the loop mount support
is somehow bad. When Easy Debian was mounted from an image file, as I
started an I/O-intensive or CPU-intensive task such as copying the
contents of the image to the card, my device almost always ended up in a
shutdown or reboot and huge filesystem corruption inside the image file.
Yes, even if I ran /rsync/ with the highest nice level. This is
something for the power kernel developers to consider and think about.
(But keep in mind I work with the stock kernel.)

>> Thank you again for your guidance.
> You are welcome, I hope it will solve your problem!
>
> Thanks,
> Paul
Yes, it really solved my problem! Thank God for such experienced and
helpful people like you.

Pavel

--
function Podpis(): String;
begin
Jméno('Pavel Řezníček');
Bydliště('Borová 18', '312 00', 'Plzeň');
Pracoviště('Korandův sbor', 'Anglické nábřeží 13', '301 00', 'Plzeň');
Result := 'vývojář a správce sítě';
end;
Re: Troubles with chrooted Debian [ In reply to ]
Hi,

On 01/15/2012 05:26 AM, ext Pavel Řezníček wrote:
> But What I noticed during my experiments is that the loop mount support
> is somehow bad. When Easy Debian was mounted from an image file,
> as I started an I/O-intensive or CPU-intensive task such as copying the
> contents of the image to the card,

Loop images aren't a good idea for several reasons.

* Using them can take a lot more (kernel) memory than
just chrooting to a directory with debian stuff

If device runs completely out of memory without it being
cause by user-space processes that could be killed, or
it requiring also SW watchdog protected things (like X server
to be killed), device will be rebooted.


> my device almost always ended up in a shutdown or reboot and huge
> filesystem corruption inside the image file.

* That's fairly obvious. Journaling file system guarantee only
consistency of the file system metadata, not file contents,
and you're having two such things on top of each other.

Therefore meta data of the file system within the loop image
isn't protected and gets corrupted if you've been doing file
system modifications inside the loop image just before reboot.

For such modification not to be corrupted on reboot, they would
need to have been first synched to the image itself by the FS
used inside the image, then synched to the real media by the file
system on where the loop image itself resides.


> Yes, even if I ran /rsync/ with the highest nice level. This is
> something for the power kernel developers to consider and think about.
> (But keep in mind I work with the stock kernel.)


- Eero
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Troubles with chrooted Debian [ In reply to ]
Hello Eero,

thank you for your response!
So it seems that the default way Easy Debian is installed isn't the best one chosen, at least not the most reliable.
It’s wonderful how complex problematics lie under the “simple” file image mounting and writing to it.
Thanks for the detailed clarification.
It’s really very probable that I used to run into entire memory consumptions and such critical situations.
So maybe it isn't anybody’s fault or responsibility, especially not the kernel developers’. A safe solution for such an intensive image file usage might be pretty complex.

Have a nice winter day. Regards for everybody on the mailing list.

Pavel