Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: Ulysses_ on September 15, 2011, 08:28:40 AM
-
Can TC shutdown somehow be made instant? Using it as a live CD without any backup.
Even better, can TC be made to instantly go to the boot-up sequence, skipping the shutdown?
-
Hi Ulysses_
Can TC shutdown somehow be made instant if TC is used as a live CD without any backup?
Even better, can TC be made to instantly go to the boot-up sequence and skip the shutdown?
The shut down process probably includes flushing the write buffers to the disk and closing any
open files. So if you just downloaded a bunch of files using Firefox for example, and you decided
to perform one of the two actions quoted above, you stand a chance of corrupting or losing one
or more of those files. The basic message being, if you will be doing any I/O on a real drive then
these would be two really bad things to try.
-
But there is no hard drive, it is a live CD. How do I prevent files from being closed and bufffers from being flushed etc? Should I kill the VM from the host and that is the only way?
-
If the hardware solution (reset button) is not available, reboot -f or the sysrq-b key combo should be near instant.
-
Hi Ulysses
If you don't have any writable drives mounted you won't have a problem. You gave very little
information in your original post.
How do I prevent files from being closed and buffers from being flushed etc?
You don't want to prevent this. Flushing the buffers means to finish writing any data that is
temporarily stored in RAM to the drive. Files are supposed to be closed after your done reading
or writing them. These functions are performed transparently for you.
I don't know anything about VMs so can't comment on that.
-
Thanks, "reboot -f" works very well (files open are in ramdisks).
Just seen reboot also has an -n option that says "do not sync". What does this do?
-
Avoids syncing your disks. If the VM has no hd's, it's a fast operation.
-
Hi Ulysses_
Just seen reboot also has an -n option that says "do not sync". What does this do?
It skips flushing the buffers and closing any open files.
-
The question of what is the fasted way to force a reboot when not having to flush the buffers is something I've resolved for myself in the following ways:
"real" hardware (e.g. a notebook running on mains supply, this is to not needlessly wear down the battery by constant charge and discharge cycles): I just literately "pull the plug" (i.e. disconnection of the power supply for a fraction of a second is enough). The "v2.0" of this approach is an additional switch I've put into the mains cable that runs into the AC adaptor, as this switch can be placed into a more easy to reach position.
VirtualBox VMs: The (virtual) "Reset button" is the 'Host Key - R' keyboard short cut (with a default host key to be the right 'Ctrl' key).
QEMU VMs: Changing to the QEMU monitor (with the 'Ctrl-Alt-2' keyboard short cut), and then issuing a 'system_reset' command. Whilst that might not look like much of a savings compared to a 'sudo reboot -f', but as one can use the command completion feature of the QEMU monitor I just have to type "s y tab r tab" (i.e. five keystrokes), plus if I have to repeat this reset I can easily use the history function of the QEMU monitor (e.g. via the Up key).
-
Thanks. It was a command line implementation that was being looked for so it can go inside scripts. Final aim: to defeat trackers and other anonymity breakers by opening web page links in new VMs and automatically disposing of old VM's. And automatically switching user interface from VM to VM in an almost transparent manner using remote X or vnc derivatives.