Tiny Core Base > TCB Q&A Forum

How do I detect what device syslinux booted from?

<< < (2/3) > >>

Rich:
Hi ost
Be more specific abut the environment. Are these bootable USB sticks, or are you using a boot
loader located somewhere else to select one of the sticks? Do the sticks have  /tce directories
on them? If you give some details you'll get a better answer.

ost:

--- Quote from: Rich on October 10, 2011, 08:07:40 AM ---Be more specific abut the environment. Are these bootable USB sticks, or are you using a boot
loader located somewhere else to select one of the sticks? Do the sticks have  /tce directories
on them? If you give some details you'll get a better answer.

--- End quote ---

Well, I didnt want to be specific because I wanted a general solution, not a specific.

Let me describe a case:
I have a bootstick with microcore and all the needed tce's built into the core archive, so the bootoptions will only contain tce=/

On this stick I also have a windows executable that I run on a pc. This executable saves some config files and I need to read these files from microcore when I boot the stick on a different pc.

Now, imagine a second stick in place that could be a accidential leftover stick in a second usb port that doesnt get boot priority. I want to make sure that I load the correct config file.

Also, I prefer a static syslinux.cfg (or other config file in case of another bootloader) to prevent issues when used on pc's with different hardware and/or BIOS settings.

If syslinux had some option to pass the drive or bus information, it would enable me to pick up the drive. Maybe some other bootloaders has this option?

gerald_clark:
tce=/ is a poor choice.
Use an actual tce directory on the stick.
Specify the UUID and you can be sure the correct drive will be mounted ( providing you loop mount extensions ).
You can determine the drive from the contents of /opt/.tce_dir.

ost:

--- Quote from: gerald_clark on October 11, 2011, 11:20:16 AM ---tce=/ is a poor choice.
Use an actual tce directory on the stick.

--- End quote ---
Well that depends on usage. For my use its the best choise. I want a clean and repeatable environment where I know what tce's are present at boot independant on other files on the stick. Adding the tce's to the corefiles works great.


--- Quote from: gerald_clark on October 11, 2011, 11:20:16 AM ---Specify the UUID and you can be sure the correct drive will be mounted ( providing you loop mount extensions ).
You can determine the drive from the contents of /opt/.tce_dir.

--- End quote ---
Specify where? In the syslinux.cfg? I guess that would somewhat work, but would require different syslinux.cfg on clones of the stick?

gerald_clark:
tc-install builds an extlinux boot config that uses UUIDs.
If you clone the stick, you also clone the UUID.
"onboot.lst" ensures that you know what tczs get loaded at boot, independant on other files on the stick.

You will have a much better experience working within the tc design than you will trying to fight it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version