Tiny Core Base > TCB Talk

Trouble loading extensions on boot

(1/2) > >>

tinycorenoobie:
I am having trouble loading extensions and I'm not sure how to solve it.

I have made a bootable USB pendrive with the most recent Core on it, I put the one extension that I need in /tce/optional, I referenced it in the file /tce/onboot.lst and I added ' tce' at the end of the append lines in the /boot/isolinux/isolinux.cfg file.

I have two completely identical make and model laptops, when I boot the drive with one of them, I get a Tiny Core prompt with the extension loaded, when I boot it with the other one, I have a Tiny Core prompt but the extension hasn't loaded!

Any ideas what I might be doing wrong? How can I produce error logs to help diagnose the problem?

Many thanks, John.

coreplayer2:
Hello John

First recommendation is please take a look at the Core Book http://tinycorelinux.net/book.html where you'll find most answers
Also please look in the FAQ http://tinycorelinux.net/faq.html#pendrives referencing the section "Pendrives" to help resolve your issue

When using USB thumb drives it's strongly recommended to use the waitusb bootcode and to specify the path (partition) using UUID to the tce directory

Assuming an internet connection, at the command prompt load util-linux extension

--- Code: ---tce-load -wi util-linux.tcz
--- End code ---

Determine the identifier of your USB drive

--- Code: ---tc@box:~$ blkid
/dev/sda1: LABEL="SYSTEM" UUID="DE2F-EF34" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="bb9fe922-8e60-4124-a783-8a9fe7ffd786"
/dev/sda3: LABEL="OS" UUID="963C32313C320D2D" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="4ea8fcda-a776-4473-a0ec-8751506eb525"
/dev/sda4: UUID="2E4EEC924EEC53DD" TYPE="ntfs" PARTUUID="ebfd31ba-d92c-4b46-b6ac-6a363410503e"
/dev/sdb1: LABEL="BOOT" UUID="B854-8FE0" TYPE="vfat" PARTUUID="8ec4d514"
/dev/sdb2: LABEL="TC" UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311" TYPE="ext2" PARTUUID="8ec4d514-02"
...

--- End code ---

Or if you are sure of the identifier of your USB drive containing core installation, for example if your USB drive installation is sdb1 then :

--- Code: ---tc@box:~$ blkid -s UUID /dev/sdb1
/dev/sdb1: UUID="B854-8FE0"
--- End code ---

if your tce directory is separately located on an ext2 formatted partition, then

--- Code: ---tc@box:~$ blkid -s UUID /dev/sdb2
/dev/sdb3: UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311"
--- End code ---

(Obviously use the UUID as found in your system, not my examples..)

Then edit the boot config (extlinux.cfg ?) file adding:

--- Code: ---waitusb=5:UUID="B854-8FE0" tce=UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311"
--- End code ---

to the append line

Extlinux example:
--- Code: ---KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz loglevel=3 waitusb=5:UUID=B854-8FE0 tce=UUID=B854-8FE0

--- End code ---


Grub2 example:
--- Code: ---search --no-floppy --fs-uuid --set=root B854-8FE0
linux /boot/vmlinuz tz=GMT noswap loglevel=3 waitusb=5:UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311" tce=UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311" opt=UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311" home=UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311"
--- End code ---

good luck

tinycorenoobie:
That book is very helpful thank you!

I had thought it was probably something to do with waiting for the usb to mount.

I made the suggested changes but it still hasn't quite fixed my problem, probably because I'm doing something else I probably shouldn't be doing!

The extension was loaded but the script still failed. I changed the bootlocal.sh file to run another script on the USB drive, but it was unable to find the USB drive. Does the 5 seconds of waiting from the bootcode happen before or after bootlocal is run?

I looked at Chapter 19 - The boot process, and it says bootlocal is the entry point for items that don't need to wait. Presumably that is the wrong choice then, I need to run my script later in the boot process. Maybe at regular user login?

Is there a better way to do what I'm trying to do?
I just want it to boot off the USB, loading the extensions from the USB, and then automatically run a script on the USB drive. Preferably a solution that doesn't involve repackaging the core.gz, perhaps using the mydata.tar.gz functionality?

Many thanks again, John

coreplayer2:

--- Quote from: tinycorenoobie on October 05, 2018, 10:20:19 AM ---The extension was loaded but the script still failed. I changed the bootlocal.sh file to run another script on the USB drive, but it was unable to find the USB drive. Does the 5 seconds of waiting from the bootcode happen before or after bootlocal is run?
--- End quote ---
If the extension loaded then clearly the USB was found.


--- Quote ---Is there a better way to do what I'm trying to do?

--- End quote ---
a script/program is usually run from bootlocal.sh when the system boots only to a command prompt

Remember that bootlocal.sh runs in the background so you might need to allow for that..




Sent from my iPhone using Tapatalk

curaga:
You should put your script in the backup or in an extension. I wonder if you refer to it as /mnt/sdb1/myscript.sh - containing a device name - and that device name changes on different systems?

Navigation

[0] Message Index

[#] Next page

Go to full version