WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: a query re tc on a usb stick  (Read 2316 times)

Offline huffpuff

  • Jr. Member
  • **
  • Posts: 55
a query re tc on a usb stick
« on: November 02, 2010, 03:55:07 AM »
I currently boot a diskless computer via external devices and have increasingly adopted TC as the preferred system for a usb stick. I boot the MC or TC iso via Grub 2's loopback option and include the tce= and restore= kernel codes to the kernel line of grub.cfg. The OS stuff resides on a small second ext3 partiton whilst the first much larger partition is a fat32 partition for data storage. This also means that when plugged into a windows machine only the fat32 partition is visible and so behaves like a normal usb storage device.

This works well and as expected TC seems to run completely in ram. However I am still seeing activity on the stick during surfing of the internet suggesting that both chromium and firefox are writing or reading from the cache stored on the stick. Reading from the stick of course is not an issue as sticks can be read from almost ad infinitum - the problem is write to's and their impact on the longevity of the usb stick.

One solution might be to disable the browser caching altogether but this is not ideal. For me the ideal solution is to write all changes once to the stick at the end of a particular session.

Any suggestions would be gratefully received!

Thanks btw for this very small flexible distro and I hope the project/team can keep up the good work (especially in these difficult times).

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: a query re tc on a usb stick
« Reply #1 on: November 02, 2010, 06:37:07 AM »
If there are no other bootcodes, such as home=, then the activity is only reading the extensions.
Browser cache is in your home dir, which is in ram without that boot code.

If you'd like to have the extensions loaded into ram, and so the usb stick removable after boot, enable copy2fs.

PS: If you already have an ext3 partition, why go to the trouble of booting via an iso?
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: a query re tc on a usb stick
« Reply #2 on: November 02, 2010, 09:20:09 AM »
Not that I would be a specialist about this, but I have read that it is recommended to avoid journaled file systems like ext3 (or e.g. also reiserfs, NTFS) on USB sticks to reduce writes.
You might consider using ext2 instead.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline huffpuff

  • Jr. Member
  • **
  • Posts: 55
Re: a query re tc on a usb stick
« Reply #3 on: November 02, 2010, 01:19:17 PM »
@Curaga

Yes I thought the home dir ought to be in ram - so probably not a worry although I'll tinker with your copy2fs idea. Thnx.


The tc iso is in an iso folder with parted magic and I find it easy to update a new PM iso  with only a minor tweak in grub [a new PM comes out almost monthly!]. Certainly it's less trouble than extracting the files from the iso and then adding a whole new type of grub entry. Updates becomes a breezy cut and paste job - where's the trouble in that?

@tinypoodle

Yes the journalling maintains a log of all data written to the stick for recovery purposes which could obviously add to the write to cycles in general. But with the set up I have this is much less of an issue as the write tos are pretty minimal. You are probably right about ext2 - I have acquired an irrational sense that somehow ext3 is 'better' and going back to ext2 is somehow 'retrogressive'. Not evidence-based of course.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: a query re tc on a usb stick
« Reply #4 on: November 02, 2010, 01:29:49 PM »
The extracted files are also available in the distribution_files subfolder, and since the kernel doesn't usually change in a major version, it's still a one-file download. Just a smaller one than the iso, and since it's named the same, it's a drop-in update like you have with the iso.

It comes down to an unnecessary layer adding complexity and boot time, both which I tend to avoid as a personal opinion :)
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline huffpuff

  • Jr. Member
  • **
  • Posts: 55
Re: a query re tc on a usb stick
« Reply #6 on: November 03, 2010, 01:48:34 AM »
@tinypoodle & @curaga

Well thanks chaps for all the advice (solicited or otherwise).

Curaga: My boot folder was getting very messy before using isos - parted magic, slitaz, and tinyc all use bzimage for example. For me [booting isos from a separate folder] turned out to be the simplest solution and not as you suggest troublesome at all - quite the opposite in fact. The boot time however is a valid point but with such small isos it remains really just a minor issue. I had a much worse experience with the copy2fs flag which did seriously slow up my boot process. As I could still see activity on the stick it also offered little in the way of gain so I've reverted back. But thanks all the same - I appreciate the time and effort you fellows put in on this stuff pro bono as it were.

tinypoodle: Your pointer to file conversion did get me to pondering though. There is a tendency to think always that newer is better in geek world; I am guilty of that here I think. The ext3 is just ext2 but with a journal and you could even mount ext3 as ext2 and the only real difference would be that the 'logging' file would then not be used. In my setup I don't think I gain much at all from the journalled file system since the risk of data corruption is minimal or even irrelevant. I'll re-jig the partitions, backup, and restore. Thnx.

Again many thanks for the helpful input and keep up the good work!