WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: question about tce= bootcode  (Read 176 times)

Offline reg

  • Newbie
  • *
  • Posts: 14
question about tce= bootcode
« on: August 02, 2020, 04:35:08 PM »
Howdy!  I am playing with Linux on thin terms yet again.  These have very limited resources.  I thought I was going to be able to fit a build environment and all the other stuff I need on the very small built in SSD.  I have come to the conclusion that this is not going to work, though the finished product should fit in the SSD.  So, I decided to, at least for now, try to use the tce= bootcode to move where my optional stuff lives to a modest 4GB USB stick that I partitioned and created an ext4 file system on and labeled.  The thumb drive is can be mounted by hand and seems to be totally happy.

Looking on the net and at the into the core book makes this look pretty simple, but as they say, the devil is in the details.

Here is what the book says..

The bootcode supports both labels and UUIDs (universal
identifiers), which are a necessity with USB drives, as you can’t tell
beforehand how the USB stick might get named.
Examples:
• tce=sda1
• tce=sda1/mydir
• tce=LABEL=mydisk
• tce=LABEL=mydisk/mydir
• tce=UUID=fho4-3436t
• tce=UUID=fho4-3436t/mydir

So, it turns out my extlinux.conf file has a line in it already, apparently pointing to where things are now.  At least the system boots and acts as it should with this line:

APPEND quiet user=matthew nodhcp tce=UUID="44955ee8-fbdf-40c0-84ba-fcb852ab3f0d" tz=EST+5EDT,M3.2.0/2,M11.1.0/2

This tells me that the path on the USB stick should mirror the path on the internal SSD.  So I have the SSD mounted as /mnt/sda1 and the USB stick as /mnt/sdb1 and I just recursively copied the path /mnt/sda1/tce /mnt/sdb/ and replicated the tce/optional stuff.  I used blkid  to find the UUID of sdb1 and put that in my extlinux file as well as the label method detailed below. I have not tried the sd type syntax as it has been advised against in the book for USB devices.

Sadly this seems to fail.  It does not bring up the wireless, mount the disks etc,  It apparently can not find anything in optional.    I have also tried using the UUID and label along with a path which is insinuated at..

• tce=sda1/mydir
• tce=LABEL=mydisk/mydir
• tce=UUID=fho4-3436t/mydir

Though it is not totally clear if the examples are combinations of short labels and paths added onto them or long labels.

On the above example is mydisk/mydir a long label or is mydisk a label and /mydir tacked onto the end of it, pointing to where to find the optional files.

It seems in my case the system is not mounting the USB stick, which would explain why none of my experimentation has not been successful.

So, can any of you shed some light on what I am missing here?  Do I need to do something to mount the thumb drive first?

Thoughts?


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8132
Re: question about tce= bootcode
« Reply #1 on: August 02, 2020, 05:31:59 PM »
Hi reg
In this example:
Code: [Select]
tce=LABEL=mydisktce=       This tells  tc-config  that you want to specify where to find the  tce  directory.
LABEL=   This tells  tc-config  that you are specifying the drive by its label.
mydisk    This is the label you gave the disk when you formatted it.

Putting it all together tells  tc-config  to go to the root directory of the drive labeled  mydisk.  It expects to find the  tce  directory
in the root directory of that device.

So if you do this:
Code: [Select]
tce=LABEL=mydisk/mydirIt's just like the previous example, except  tc-config  expects to find the  tce  directory under the  mydir/  subdirectory.

... So I have the SSD mounted as /mnt/sda1 and the USB stick as /mnt/sdb1 and I just recursively copied the path /mnt/sda1/tce /mnt/sdb/ and replicated the tce/optional stuff.   ...
Run this:
Code: [Select]
blkid -s UUID /dev/sdb1You should get a long string of hex characters (i.e. 44955ee8-fbdf-40c0-84ba-fcb852ab3f0d)

Replace the quoted string in  tce=UUID="44955ee8-fbdf-40c0-84ba-fcb852ab3f0d"  with the value returned by  blkid.

Offline reg

  • Newbie
  • *
  • Posts: 14
Re: question about tce= bootcode
« Reply #2 on: August 02, 2020, 06:30:49 PM »
I think I have it, you need the other stray files including mydata.tgz.  I had thought there were other switches for moving them elsewhere.  As soon as I brought  mydata.tgz, provides.db, onboot.lst, rcksum-FTgiIB, and the optional directory over everything seems happy.  I should have looked more carefully as the book does in fact say The tce bootcode specifies where to locate and store the extensions AND backup.

Thank you so much as always for the fast reply!