WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: DUAL BOOT FOLDER STRUCTURE?  (Read 2936 times)

Offline grandma

  • Full Member
  • ***
  • Posts: 213
  • Never forget Grandma Loves You & made that candy4U
    • Back when a 10MB HD was $500 bucks
DUAL BOOT FOLDER STRUCTURE?
« on: June 27, 2021, 02:32:04 AM »
DUAL BOOT FOLDER STRUCTURE?

On a single partition I have a tce folder under root; i.e. /mnt/sdb2/tce

A grldr and menu.lst are on /mnt/sdb1 using the find option with a tce=UUID=xxxx-xxxx in the append section to ensure it goes to the sdb2 drive which works well.

Beneath the tce folder I have a folder for

old3x - with bzImage and tinycore.gz

new8x - with vmlinuz and core.gz

Also under /mnt/sdb2/tce I have an optional folder named opt3x with tczs for 3x and one named opt8x for the tcz for 8x

Is there a way to use the append option so TC knows which optional folder to use?

Currently I have to swap one or the other with a mv command to /mnt/sdb2/tce/optional

Since that may not have been done ahead of time and the opt8x folder might be sitting there while the opt3x folder might be renamed to optional, if I reboot and select 8x things splatter.

To solve this (a rough hack) I have inserted a tcz file in onboot.lst referencing a file in every optional folder that loads, checks if 3x is the current version and if not it checks if /mnt/sdb2/tce/opt3x exists and if not, then it ASSUMES the optional folder is the 3x tczs and renames that to opt3x, then takes the opt8x folder, renames it to optional, then reboots.

This happens fast - very - before other extensions load - but it's still clunky to have to reboot twice.

Anyone have a more elegant suggestion?
~ Luv Grandma
"When children of all nations
play in the sandbox together
all morning-all day-all week, and
one fine sunny day; all year long ...
... then war will become an ancient memory
and Grandma can knit that sweater
you'll hold near to your heart
until long after you're my age.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11179
Re: DUAL BOOT FOLDER STRUCTURE?
« Reply #1 on: June 27, 2021, 08:23:41 AM »
Hi grandma
Did you try the answer I provided here:
http://forum.tinycorelinux.net/index.php/topic,25099.msg159922.html#msg159922

That answer will definitely work for TC8.
I think it should work for TC3, but the scripts are a lot different so it's hard to tell.

If it doesn't work for TC3, what you can do is:
Leave all the TC3 stuff in  /mnt/sdb2/tce (default directory when another path is not specified).
Leave all the TC8 stuff in  /mnt/sdb2/new8x (new8x is the  tce  directory).
For TC3 use:
Code: [Select]
find --set-root /tce/bzImage
kernel /tce/bzImage tce=UUID="B4BE-097E" quiet waitusb=10 norestore xvesa=1024x768x32
initrd /tce/tinycore.gz
For TC8 use:
Code: [Select]
find --set-root /new8x/vmlinux
kernel /new8x/vmlinux tce=UUID="B4BE-097E"/new8x quiet waitusb=10 norestore xvesa=1024x768x32
initrd /new8x/core.gz

Offline grandma

  • Full Member
  • ***
  • Posts: 213
  • Never forget Grandma Loves You & made that candy4U
    • Back when a 10MB HD was $500 bucks
SOLVED (by Rich) Re: DUAL BOOT FOLDER STRUCTURE?
« Reply #2 on: June 28, 2021, 11:22:57 AM »
SOLVED (by Rich)  - Grandma owes you a beer buddy

I used your second option like this:

# timeout=30
# default=0
 
# title DAMN FAST LINUX 8X UPGRADE OFFICE
# find --set-root /tce8x/vmlinuz
# kernel /tce8x/vmlinuz tce=UUID="1CCC-6F5A"/tce8x quiet waitusb=10 norestore xvesa=1024x768x32
# initrd /tce8x/core.gz
 
# title DAMN FAST LINUX 3X OFFICE
# find --set-root /tce/bzImage
# kernel /tce/bzImage tce=UUID=1CCC-6F5A quiet waitusb=10 norestore xvesa=1024x768x32
# initrd /tce/tinycore.gz
 
# title DAMN FAST LINUX 3X SAFE MODE
# find --set-root /tce/ver3x/bzImage
# kernel /tce/ver3x/bzImage quiet waitusb=10 norestore xvesa=1024x768x32
# initrd /tce/ver3x/tinycore.gz

The key is the:

# tce=UUID="1CCC-6F5A"/tce8x

specifically adding QUOTES to the UUID= surrounding the device blkid and adding the path to the alternative TCE folder where vmlinuz and core.gz reside and a normal optional folder exist.

I did NOT try your first suggestion of packing it all into one /tce folder since that would require FLIPPING onboot.lst for each boot and I like isolating the kernel/boot file versions anyway.

Smooth. Thank you.

Now I have to go through a bunch of my scripts to tell them to expect a new guest at the table based on the kernel version:

# /tce8x instead of always /tce

EZ enuf.

This also makes it very easy to allow users to have 8,9,10,11,12 etc. as

# /tce8x
# /tce9x
# /tce10x
# /tce11x
# /tce12x
etc.

I may also test
# /tce4x
# /tce5x
# /tce6x
# /tce7x

...to see if

# tce=UUID="1CCC-6F5A"/tce??x

works, but since Firefox plays a key role in the "look and feel" of this system and the Firefox-ESR (Mozilla's fickle nature) prior to 8x was a disaster I am only inclined to go from 8x forward. On that note, given Firefox has continued to "degrade" their browser with more and more NAG screens I am not really inclined to go much further than 8x, perhaps 9x as Juanito suggested due to some GNUMERIC and FILEZILLA issues in 8x which were "cured" in 9x.

I did see your post on fixing the Firefox PROFILE to NEVER UPDATE, but other problems have come up in configuring it after Firefox 68 via user.js - another subject.

Basically, if I can:

a) keep Firefox from nagging the crap out of people
b) control the home page via user.js
c) control other aspects - like never save passwords, autoplay music and videos, allow popups unless a User wants them disabled.

...then Firefox works well. When I can't control these or a User can't get into about:config or the Firefox setup it becomes a Mozilla "bug"; desireable features someone at Mozilla should have remembered and seem to have forgotten.

As for YOUR fix it solves a long standing issue that forced me to do a lot of SWAP FOLDERS/REBOOT etc. when a version was detected and onboot.lst was incorrect, or optional was for a different version etc. and now with isolated /tce folders everyone gets their own apartment, their own galley and bunk and my onboot overhead and rather funky "hacks" went way way down.

Thank you very very very much.

« Last Edit: June 28, 2021, 11:24:52 AM by grandma »
~ Luv Grandma
"When children of all nations
play in the sandbox together
all morning-all day-all week, and
one fine sunny day; all year long ...
... then war will become an ancient memory
and Grandma can knit that sweater
you'll hold near to your heart
until long after you're my age.

Offline mocore

  • Hero Member
  • *****
  • Posts: 506
  • ~.~
Re: DUAL BOOT FOLDER STRUCTURE?
« Reply #3 on: March 01, 2022, 11:29:57 AM »
DUAL BOOT FOLDER STRUCTURE?
...
Anyone have a more elegant suggestion?

just ftr the example in this post might be considered "more elegant"
http://forum.tinycorelinux.net/index.php/topic,22546.msg141259.html#msg141259

at least it attempts to mirror the familar folder structure of tinycorelinux.net localy