PDA

View Full Version : toram not booting



dinosoep
02-12-2011, 03:12 PM
as a user coming from puppy linux I try to copy some of it's behavior.
I would love to be able to load the whole system in ram but save changes to my usb every so often.
the toram option at least does the first part, I don't know what happens with changes (do they get written to knoppix_data.img?)
two problems ocured when using the toram cheatcode:

it was pretty slow but I guess it's because the filesystem uncompressed is very big

it stops in the middle of the boot sequence. what pops up on my screen is first "copying ... to ram" and then "using knoppix_data.img" but after that there is no single message whatsoever and it just stops booting up.

klaus2008
02-12-2011, 05:47 PM
Could you please tell us more about the system you are using? What version of Knoppix do you use? How much RAM does the system have? How large is the persistent store (knoppix-data.img)?

When I tried the toram boot option with an older version of Knoppix, I think it was Knoppix V6.2.1 CD, the big KNOPPIX file and the persistent image file were copied to RAM. Even if your system has 4 GB RAM installed Knoppix limits the memory used to 3 GB. Since the persistent store is copied to RAM, you may savely remove your boot drive. Thus there is no option to save any changes in the original persistent image.

dinosoep
02-12-2011, 07:09 PM
I use 6.4.3, knoppix-data.img is 2 gig
this laptop has 2 gigs of ram but only 300 mb is in use on knoppix-data.img

is there any way to copy the behavior of puppy (only writing to usb once in a while?)

Forester
02-14-2011, 08:58 PM
is there any way to copy the behavior of puppy (only writing to usb once in a while?)

Do you know the sync command ? Have a read of http://linux.die.net/man/8/sync. This will force all pending writes to be written to disks (which in your set up means to the knoppix_data.img file on the USB).

Although you can force an update of the USB once in a while you can't stop Knoppix doing it when it thinks it is a good idea. It is something to do with the disk caching. Puppy Linux is very extreme in this regard. There probably is some control (sysctl probably) you could try but I wouldn't know which one and I'm not competent to advise.

I agree with klaus2008 that toram is intended for folks who want/need to remove the boot medium so you can't use it and knoppix_data.img at the same time.

Puppy and Knoppix have different design goals and have taken different implementation routes as a consequence. The degree to which you can use one to emulate the other is probably limited. Otherwise the distributions would be called Knuppy and Poppix.

dinosoep
02-15-2011, 04:06 PM
ok, but won't my usb stick wear of extremely fast? if knoppix keeps writing to it, the write cycles would run out prety fast?

kl522
02-16-2011, 09:22 AM
ok, but won't my usb stick wear of extremely fast? if knoppix keeps writing to it, the write cycles would run out prety fast?

I am not a Puppy user and so I am not competent enough to comment on Puppy's persistency scheme. But from technical point of view, either you write to the device every so often, or you delay all the writes until such point deemed suitable ( such as shutdown ). But if the amount of data to be written is big, then the delayed write scheme is not acceptable. Would you accept such scheme where you have to wait 10 minutes or more to shutdown a system ? So the conclusion is that if Puppy uses delayed scheme, then the persistent data MUST be very small to be acceptable.

Knoppix persistent data could be small but could be very huge as well. Therefore I don't think it will be acceptable to use a delayed scheme. Until knoppix could be re-written to have extremely small persistent data, there will be very little can be done about this. If you really worry about flash becomes bad, you would have to back up then.

Forester
02-17-2011, 12:05 AM
but won't my usb stick wear of extremely fast?

Define fast. See http://en.wikipedia.org/wiki/Wear_levelling.

Look on the bright side ... 10 000 write cycles is hugely better than what you get with r/w CD or DVD or got with floppy/diskettes. USB sticks are faster, smaller, more robust, have bigger storage capacities and look cool on a chain around your neck. Bang for bucks they are the best thing since bubble memory. What's not to like ?

Look on the bright side ... USB stick wear out. So do socks. If I buy a USB stick and you buy a number of pairs of socks for the same money, I bet my USB stick will last longer than your socks. So budget to buy a new USB stick every year or so.

Look on the bright side ... I could drive up to my local PC supastore and buy a USB stick tomorrow. If I figure out the cost of the transport and estimate a money figure for my time, the USB sticks on sale on Ebay don't look all that expensive any more.

Is there anything I can do to prolong the life of my USB stick ? Well, from the Wiki article, I deduce that blocks in files that never change don't get their fair share of wear. I could do some things to ensure the deck of blocks get reshuffled. A kind of poor-man dynamic wear levelling.

I back up my USB stick every day. Occasionally, I could delete all files on the USB stick and restore from my backup - most recently changed file first, least recently changed file last. When I remaster, I could rename the old KNOPPIX file, copy on the remastered KNOPPIX file and later delete the old one. I could also occasionally fill up my knoppix-data.img file temporarily to ensure that unused space in that get reshuffled.

You may by now be thinking "I can't be bothered with all that: USB sticks aren't all that expensive".

My point exactly.

Buenas noches y dormir bien de mi amigo