WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: HOW2 remove BootStik ?  (Read 974 times)

Offline labeas

  • Sr. Member
  • ****
  • Posts: 255
HOW2 remove BootStik ?
« on: October 02, 2019, 06:19:22 PM »
To free-up its USBsocket.
AFAICS the pid-tree must not have a node common to the BootStik's
DirTree, if I want to remove the stik after booting.
BTW this quirky laptop, where I can't find what firmware the Wifi uses,
doesn't show the <native disk>. The plugged USBbootstik is shown as sda.
  Does that mean that the Win10 runs from RAM?
If so, TC must also be able to run with the Bootstik removed.
What's the underlying theory?

Offline mocore

  • Sr. Member
  • ****
  • Posts: 260
  • ~.~
Re: HOW2 remove BootStik ?
« Reply #1 on: October 03, 2019, 12:17:31 AM »
hi labeas
To free-up its USBsocket.
AFAICS the pid-tree must not have a node common to the BootStik's
DirTree, if I want to remove the stik after booting.

....
TC must also be able to run with the Bootstik removed.
What's the underlying theory?



After kernel and core.gz are loaded
you can remove usb or sd  ect

if you want to load any extensions
after removing the usb storage

then some other location is needed

many options exist :  cdrom , ram , internal hdd ( modules for FS need to be included in core; eg ntfs)   , network

What's the underlying theory?

perhaps see http://tinycorelinux.net/concepts.html

mount-mode
and
copy-mode

wrt loading extensions

or remastering core.iso in the wiki



Offline mocore

  • Sr. Member
  • ****
  • Posts: 260
  • ~.~
Re: HOW2 remove BootStik ?
« Reply #2 on: October 03, 2019, 12:21:26 AM »

  Does that mean that the Win10 runs from RAM?


this is probably a question better directed to

one of : msfn.org , reboot.pro , 911cd.net

   ::)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 7966
Re: HOW2 remove BootStik ?
« Reply #3 on: October 03, 2019, 05:48:25 AM »
Hi labeas
If you want to be able to remove the boot device you need everything loaded in RAM. Create a file called  copy2fs.flg  in
your  tce  directory:
Code: [Select]
touch /etc/sysconfig/tcedir/copy2fs.flgThis also means you can not have a persistent  /home  or  /opt  directory. Then, after you reboot, if you can unmount your boot
device, it is safe to remove.

Offline labeas

  • Sr. Member
  • ****
  • Posts: 255
Re: HOW2 remove BootStik ?
« Reply #4 on: October 15, 2019, 11:48:23 AM »
Is this THEORETICAL [vs. blind-monkey DoA, DoB...] view wrong?
BootStik can't be removed if any <proc> in the <PIDtree> is in
BootStik.
 [I'm moving away from TC64 - booting to GUI, for SIMPLICITY].
Also with the <UEFI grub booter>, 32bit core boots to:-
 $ df == .../mnt/sda1 [There's an abnormality, in that the
  <native WinDisk> is invisible & USBstik is sda1 - nomally sdb].
 $ sudo umount /mnt/sda1 == OK, since the WHOLE PIDtree is in
     RAM, and no <lsof> is in /mnt/sda1.

To extend the system, I must copy the various *.tcz and extra
scripts from sda1 to eg. RAM:/tmp, to use in RAM.
Then I can:
 $ sudo umount /mnt/sda1
-----------
Let's see how TC64 behaves?
== boots to:
 tc@box:~$ random: crng init done <- `quiet` NOT used
 $ df == .../mnt/sda1
 $ sudo umount /mnt/sda1 == OK; same as TC64.

So the *.tcz and scripts can be stored in bootStik, but must be
copied-to and run in RAM. to allow: umount <bootStik> ?
-----------
I vaguely remember: my TC64:V7.2 [now/here] boots to GUI.
So then can the AppsTool: save the required files & install
them automatically, at next boot?  What about: AFAIR `dvtm`
and possibly others, is not installed from a *.tcz.
 

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 12278
Re: HOW2 remove BootStik ?
« Reply #5 on: October 15, 2019, 10:33:37 PM »
You can set the copy2fs flag with the apps gui to copy extensions to ram at the next boot.

Offline labeas

  • Sr. Member
  • ****
  • Posts: 255
Re: HOW2 remove BootStik ?
« Reply #6 on: November 01, 2019, 08:32:47 AM »
>You can set the copy2fs flag with the apps gui
> to copy extensions to ram at the next boot.
-- This relates to my pending-post "TC-book unsatifactory".
Does this mean the <copy2fs> flag is set in the *USBstik*,
so that at the next boot: the allocated dir's *.tcz are
loaded/installed to /tmp/tcloop/.
But after that "loaded/installed" is completed, is the USBstik
auto umounted, and if not, can the user:`sudo umount /mnt/sdb1`
in my case. AFAIR I can't. So I did: lsof | grep sdb1
to see what's holding it. And ....
--- BTW the referal to sda1 in the rest of this thread, refers
to the newer problematic laptop. Its the THEORY that matters.

Offline jazzbiker

  • Sr. Member
  • ****
  • Posts: 285
Re: HOW2 remove BootStik ?
« Reply #7 on: November 01, 2019, 11:12:03 AM »
Hi, labeas!

When it was TC9.0, i do worked without USB stick (in some instances).
1. I have loaded all needed extensions, into tce/optional, of course, i think you understand what we are about
2. After batch of extensions do satisfy my needs, i touched "tce/copy2fs.flg" file on boot flash.
3. Then after the next boot, all extensions appeared to be located in memory (inside rrot filesystem, if i am not mistaken, inside "/tmp/tce").
4. Check, does everything goes right.
5. add "umount /dev/sdb2" string to your "/opt/bootlocal.sh", and don't forget to "filetool.sh -b".
6. During the next boot you got all extensions in memory inside root filesystem, your flash drive unmounted, you can remove it and work with all the staff inside memory.
7. Voila!

I believe TC10 will work the same way, good luck!