Tiny Core Base > TCB Q&A Forum

How do I detect what device syslinux booted from?

(1/3) > >>

ost:
Im using microlinux-4.0 and I wonder how I can interpret the system to find out what drive I booted from.
In worst case, there will be two identical usb sticks present. A challenge (non real) case would be two identical sticks with two identical ISO's on.
Depending on BIOS settings, the stick will usually get the name sda or sdb and I need to find out which with as little complications as possible.

Juanito:
It's maybe better to tell your machine which stick to boot from using label or uuid?

Rich:
Hi ost
If you are loading extensions from the stick you are booting from,  /opt/.tce_dir  will tell you.

gerald_clark:
A direct answer to the question:
There is no way to tell what device syslinux bootde from.
The boot loader copies the kernel and initrd into RAM and jumps to the entry point.
The kernel has no way to tell how that was done.

You can do things to give direction to your programs though.
You can add bootcodes  or use existing bootcodes that you can examine in /proc/cmdline.

ost:

--- Quote from: gerald_clark on October 07, 2011, 07:29:09 AM ---A direct answer to the question:
There is no way to tell what device syslinux bootde from.

--- End quote ---

Ok, so tinycore cant, but maybe there is a specific bootloader that can pass it to a /proc/cmdline comment or similar?

Navigation

[0] Message Index

[#] Next page

Go to full version