WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Trouble loading extensions on boot  (Read 5483 times)

Offline tinycorenoobie

  • Newbie
  • *
  • Posts: 2
Trouble loading extensions on boot
« on: October 05, 2018, 05:44:09 AM »
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.


Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Trouble loading extensions on boot
« Reply #1 on: October 05, 2018, 08:00:54 AM »
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: [Select]
tce-load -wi util-linux.tcz
Determine the identifier of your USB drive
Code: [Select]
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"
...

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: [Select]
tc@box:~$ blkid -s UUID /dev/sdb1
/dev/sdb1: UUID="B854-8FE0"

if your tce directory is separately located on an ext2 formatted partition, then
Code: [Select]
tc@box:~$ blkid -s UUID /dev/sdb2
/dev/sdb3: UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311"

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

Then edit the boot config (extlinux.cfg ?) file adding:
Code: [Select]
waitusb=5:UUID="B854-8FE0" tce=UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311"
to the append line

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


Grub2 example:
Code: [Select]
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"

good luck
« Last Edit: October 05, 2018, 08:14:40 AM by coreplayer2 »

Offline tinycorenoobie

  • Newbie
  • *
  • Posts: 2
Re: Trouble loading extensions on boot
« Reply #2 on: October 05, 2018, 01:20:19 PM »
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
« Last Edit: October 05, 2018, 01:22:14 PM by tinycorenoobie »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Trouble loading extensions on boot
« Reply #3 on: October 05, 2018, 02:36:10 PM »
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?
If the extension loaded then clearly the USB was found.

Quote
Is there a better way to do what I'm trying to do?
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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Trouble loading extensions on boot
« Reply #4 on: October 06, 2018, 05:13:53 AM »
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?
The only barriers that can stop you are the ones you create yourself.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11628
Re: Trouble loading extensions on boot
« Reply #5 on: October 06, 2018, 09:45:55 AM »
Hi tinycorenoobie
... 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.
It sounds like you're trying to use the ISO as a runnable system. I recommend you do the following:
1. Boot your pendrive in the laptop that had the GUI come up.
2. Click on the  Apps  icon and install the  tc-install.tcz  extension.
3. Plug in a second pendrive and use  tc-install  to do a proper installation to that pendrive.
4. Reboot with only the second pendrive plugged in.
5, Use the  Apps  utility to install any other extensions you want. It sounds like you did this manually in the other pendrive.