Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: Smasher on July 27, 2019, 05:39:08 PM

Title: An issue with booting SeaTools
Post by: Smasher on July 27, 2019, 05:39:08 PM
Hi everybody,

the name of the topic may confuse you but I think I am posting in the right forum. I am trying to diagnose my Seagate disk drive using SeaTools Bootable. Booting into it gave me a bare Linux console while a GUI was promised. That was my starting point for investigations, which lead me to learn about Tiny Core Linux. I figured out SeaTools Bootable is actually just a bootable Tiny Core Linux with some extensions. But something seems to be misconfigured...

Let's look together at their sysconfig.cfg (https://pastebin.com/xcGGzctD). The most interesting part is the following:

Code: [Select]
waitusb=5:LABEL=SEABOOT tce=LABEL=SEABOOT mydata=mydata_STB lst=onboot_STB_Xorg.lst
After reading FAQ (http://tinycorelinux.net/faq.html) I understood that the loader should wait for a USB-device labeled SEABOOT and it is defined to contain Tiny Core Extensions. I am not sure what parameter mydata does, but lst seems to define the list of extensions to install.

P.s. I am also hanging around on IRC if anyone wants to chat me

Anyway from what I can tell: mydata_STB doesn't get unpacked after boot and onboot_STB_Xorg.lst isn't installed. My pendrive is labeled correctly as SEABOOT, the folder structure looks correct to me as well (shortened):

Code: [Select]
/f
├── boot
│   └── syslinux
│       ├── syslinux.cfg
│       └── ...
└── tce
    ├── mydata_STB.tgz
    ├── onboot_STB_Xorg.lst
    └── optional
        ├── acl.tcz
        ├── acl.tcz.dep
        ├── acl.tcz.md5.txt
        ├── asian-fonts.tcz
        ├── aterm.tcz
        ├── aterm.tcz.md5.txt
        ├── ... 485 files here

And I still can't quite figure it out why it doesn't work. Maybe some of the experienced eyes on this forum can help me to get it running?

P.s.: I am also hanging around in IRC if anyone wants to chat me
Title: Re: An issue with booting SeaTools
Post by: Smasher on July 27, 2019, 06:47:19 PM
Figured that out, no need to clarify:

* New mydata= boot code to support alternate name for backup. Defaults to mydata.tgz.

From http://forum.tinycorelinux.net/index.php?topic=9290.0

Maybe that could be added to FAQ and [F2]: http://tinycorelinux.net/faq.html#bootcodes

Also, xexec= boot code seems to be supported but not documented anywhere
Title: Re: An issue with booting SeaTools
Post by: curaga on July 28, 2019, 02:34:18 AM
Maybe your usb stick is slow, taking longer than 5 seconds to register? The "noacpi" bootcode may also hinder.
Title: Re: An issue with booting SeaTools
Post by: Smasher on July 28, 2019, 06:25:32 AM
Yep, changing the delay from 5 to 15 changed things. Now the extensions get loaded during the boot, but when the loading is finished, my display turns black and I cannot do anything. Here is the list of extensions in onboot_STB_Xorg.lst

Code: [Select]
Xfbdev.tcz
Xorg-7.7.tcz
xf86-video-modesetting.tcz
xf86-input-synaptics.tcz
kmaps.tcz
libEGL.tcz
libepoxy.tcz
xfwm4.tcz
aterm.tcz
harfbuzz.tcz
imlib2-bin.tcz
pcre.tcz
sqlite3.tcz
wbar.tcz
seagate-font.tcz
asian-fonts.tcz
ncurses-terminfo.tcz
ncurses-utils.tcz
slocate.tcz
findutils.tcz
bash.tcz
nano.tcz
coreutils.tcz
util-linux.tcz
grep.tcz
pci-utils.tcz
expat2.tcz
openssl.tcz
pixman.tcz
mylocale.tcz
curl.tcz
SeaChest_noAuto.tcz
SeaTools212_noAuto.tcz

Might one of them cause such behavior?
Title: Re: An issue with booting SeaTools
Post by: Juanito on July 28, 2019, 07:02:57 AM
Enter “version” at a terminal prompt to see which version of tinycore you have.

You could load a different window manager (flwm) to see if that works?

Note also you should load Xfbdev or Xorg-7.7, but not both.
Title: Re: An issue with booting SeaTools
Post by: Smasher on July 28, 2019, 07:30:02 AM
The version is 8.2.1.

I removed Xfbdev.tcz from onboot_STB_Xorg.lst.

I tried to set desktop=jwm and desktop=flwm.

Nothing helped so far, the displays goes black. Feels like X is missing configurations or just misconfigured...

I noticed now, that if I add "pause" to kernel command line, the screen still goes black. And I think X gets loaded after that pause, so X is not the issue, I guess?
Title: Re: An issue with booting SeaTools
Post by: Juanito on July 28, 2019, 08:01:04 AM
You can use the “text” boot code to stop tinycore from trying to start X.

If you only load one window manager (I suggest you use flwm for troubleshooting), you don’t need the “desktop” boot code.

Once at the console prompt, execute the first line of ~/.xsession to troubleshoot.
Title: Re: An issue with booting SeaTools
Post by: Smasher on July 28, 2019, 08:20:12 AM
My bootcode list now looks like this:

Code: [Select]
initrd=/boot/64bit/modules_4817_64.gz,/boot/32bit/rootfs_4817_32.gz lang=en_US.UTF-8 kmap=qwerty/us noutc loglevel=2 noacpi noswap libata.allow_tpm=1 waitusb=15:LABEL=SEABOOT tce=LABEL=SEABOOT mydata=mydata_STB lst=onboot_STB_Xorg.lst vga=791 xexec="ST4L --exitPowerOff" showapps text
The screen goes black right after the last extension gets loaded. I don't enter the text mode. Looks like bootloader stops execution at this point.

My screen looks like this a second before going black: https://i.snag.gy/eD0Aln.jpg (sorry for that very bad focus)
Title: Re: An issue with booting SeaTools
Post by: Juanito on July 28, 2019, 09:47:07 AM
You can stop the extensions being loaded with the “base” boot code and stop the backup being restored with “norestore”.
Title: Re: An issue with booting SeaTools
Post by: Rich on July 28, 2019, 10:17:46 AM
Hi Juanito
He's running 64 bit TC 8 (kernel 4.8.17) with 32 bit extensions (Core64). I noticed this in his  onboot.lst  file:
Code: [Select]
xf86-video-modesetting.tczThe only place I can find this is in the TC 5 repository:
http://tinycorelinux.net/5.x/x86/tcz/xf86-video-modesetting.tcz.info
I wonder if this might be part of the problem?
Title: Re: An issue with booting SeaTools
Post by: Smasher on July 28, 2019, 01:02:35 PM
What I've found out after a long trial and error makes absolutely no sense to me :o but here it is, the following diff made it work:

Code: [Select]
diff --git a/tce/onboot_STB_Xorg.lst b/tce/onboot_STB_Xorg.lst
index 9c2c74e..ec87eeb 100644
--- a/tce/onboot_STB_Xorg.lst
+++ b/tce/onboot_STB_Xorg.lst
@@ -1,6 +1,5 @@
 Xfbdev.tcz
 Xorg-7.7.tcz
-xf86-video-modesetting.tcz
 xf86-input-synaptics.tcz
 kmaps.tcz
 libEGL.tcz
@@ -29,5 +28,4 @@ openssl.tcz
 pixman.tcz
 mylocale.tcz
 curl.tcz
-SeaChest_noAuto.tcz
 SeaTools212_noAuto.tcz

As soon as I add one of the extensions, either xf86-video-modesetting.tcz or SeaChest_noAuto.tcz, the boot process breaks. The first one contains usr\local\lib\xorg\modules\drivers\modesetting_drv.so and the second one 10 binaries with the path scheme usr\bin\SeaChest_* Then I tried something, what confused me even more. If I add SeaChest.tcz instead of SeaChest_noAuto.tcz to the boot list, it works! That extension, in addition to the binaries named above, has a file usr\local\tce.installed\SeaChest and some PNG images in usr\local\include\seachest\. In search of commonalities, I examined the dependencies of these extensions. Both of xf86-video-modesetting.tcz.dep and SeaChest_noAuto.tcz.dep include graphics-KERNEL.tcz and I think this is the key. I just still don't understand yet the reason behind it.

I made the extensions available for download here: https://filetransfer.io/data-package/sapqcvCm
Title: Re: An issue with booting SeaTools
Post by: Juanito on July 28, 2019, 01:10:50 PM
Once in the GUI, does /var/log/Xorg.0.log exist (this will show whether Xfbdev or Xorg-7.7 is being used)?
Title: Re: An issue with booting SeaTools
Post by: Rich on July 28, 2019, 01:16:31 PM
Hi Smasher
Try adding  graphics-KERNEL.tcz  as the first entry in your onboot.lst file in the non-working version and see if that fixes it.
Title: Re: An issue with booting SeaTools
Post by: Smasher on July 28, 2019, 02:30:38 PM
Hey Rich,

I tried adding graphics-KERNEL.tcz to tce/onboot.lst and to the top of tce/onboot_STB_Xorg.lst and it didn't help. I can tell even more: if I omit the problematic extensions (SeaChest_noAuto and xf86-video-modesetting) but add graphics-KERNEL.tcz to a list, it breaks as well.

I learned that if I wait a while after screen turning black I get access to a console. And from the log, I learned that X cannot start because of the lack of hardware rendering support and a missing library for software rendering. Here is the relevant part of Xorg.0.log

Code: [Select]
[    30.233] (II) AIGLX: Screen 0 is not DRI2 capable
[    30.233] (EE) AIGLX: reverting to software rendering
[    30.233] (EE) AIGLX error: dlopen of /usr/local/lib/dri/swrast_dri.so failed (/usr/local/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
[    30.233] (EE) GLX: could not load software renderer
[    30.233] (II) GLX: no usable GL providers found for screen 0
[    30.233] (II) modeset(G0): Damage tracking initialized
[    30.233] (EE)
[    30.233] (EE) Backtrace:
[    30.233] (EE) 0: /usr/local/lib/xorg/Xorg (xorg_backtrace+0x49) [0x80dd9e5]
[    30.233] (EE) 1: /usr/local/lib/xorg/Xorg (0x8048000+0x139d5e) [0x8181d5e]
[    30.233] (EE) 2: linux-gate.so.1 (__kernel_rt_sigreturn+0x0) [0xf77d1b80]
[    30.233] (EE) 3: /usr/local/lib/xorg/Xorg (RRScreenSetSizeRange+0x85) [0x810ff0b]
[    30.233] (EE) 4: /usr/local/lib/xorg/Xorg (xf86RandR12CreateScreenResources+0x2ac) [0x8175c78]
[    30.233] (EE) 5: /usr/local/lib/xorg/Xorg (0x8048000+0xfe1a2) [0x81461a2]
[    30.233] (EE) 6: /usr/local/lib/xorg/Xorg (0x8048000+0x1ff77) [0x8067f77]
[    30.233] (EE) 7: /lib/libc.so.6 (__libc_start_main+0x157) [0xf73a723f]
[    30.233] (EE) 8: /usr/local/lib/xorg/Xorg (0x8048000+0x2076c) [0x806876c]
[    30.233] (EE)
[    30.233] (EE) Segmentation fault at address 0x58

The whole log: https://pastebin.com/raw/fqHVYQdv

@Juanito: on a working version Xorg.0.log exists as well
Title: Re: An issue with booting SeaTools
Post by: Juanito on July 28, 2019, 03:17:04 PM
What graphics hardware do you have?

Near the beginning of the xorg log it will show which drivers it is trying to load - it sounds like yours is missing?
Title: Re: An issue with booting SeaTools
Post by: PDP-8 on July 28, 2019, 11:10:15 PM
Side note: I just downloaded it, and Seagate's installer exe created a TC 8.21 bootstick which works out of the box on my uefi-only Computesticks and NUCS.

I duly used it to check my Seagate drive in the NUC, and got the a-ok.  Felt very much at home in the TC gui environment.

Interesting in that it is using ReFIT which makes things pretty and some neato options.

Even though I am booting it from Intel gear, the Xorg.0.log shows it failing to load Intel modules, and falling back to xfbdev, creating xorg subsections and eventually finding/creating something it likes.  Lots going on.

But yeah, maybe there is some video hardware it doesn't get along with.  Of course the college-try of reformating the stick, checking the md5.txt file yadda yadda, might get rid of any low-hanging fruit issues...

But hat's off to Seagate for making TC part of their toolkit for end-users!

Title: Re: An issue with booting SeaTools
Post by: curaga on July 29, 2019, 02:16:22 AM
Your log shows that Xorg crashed. It's a bug somewhere, and not really much you can do about it.
Title: Re: An issue with booting SeaTools
Post by: Smasher on July 30, 2019, 05:18:19 AM
I think this is another timing issue though. It looks like Xorg gets started too soon. See what I mentioned before:

if I add "pause" to kernel command line, the screen still goes black. And I think X gets loaded after that pause, so X is not the issue, I guess?

In working version the boot process looks like this (I pick Tiny Core 64 8.2.1-4.8.17 (Xorg, Joe's Window Manager) to boot here):

Code: [Select]
Booting Core 8.2.1
Running Linux Kernel 4.8.17-tinycor64.
Checking boot options... Done.
Starting udev daemon for hotplug support... Done.
Waiting as requested... 4
Scanning hard disk partitions to create /etc/fstab
Setting Language to en_US.UTF-8 Done.
Ignoring swap partition(s) seek as requested.
Loading extensions... Done.
Updating certificates in /usr/local/etc/ssl/certs...
183 added, 0 removed; done.
 Done.
Setting keymap to querty/us Done.
Restoring backup files from /mnt/sdd1/tce/mydata_jwm_Xorg_RC.tgz /
Done.
Setting hostname to box Done.
:: VGA: NVIDIA GF104 [GeForce GTX 460] ...Done
Boot time configuration completed. Press <Enter> to continue.

I the broken version the screen changes right after Loading extensions..., before NVIDIA GF104 driver is loaded.
Title: Re: An issue with booting SeaTools
Post by: coreplayer2 on July 30, 2019, 09:32:35 AM
I think this is another timing issue though. It looks like Xorg gets started too soon. See what I mentioned before:

if I add "pause" to kernel command line, the screen still goes black. And I think X gets loaded after that pause, so X is not the issue, I guess?

In working version the boot process looks like this (I pick Tiny Core 64 8.2.1-4.8.17 (Xorg, Joe's Window Manager) to boot here):

Code: [Select]
Booting Core 8.2.1
Running Linux Kernel 4.8.17-tinycor64.
Checking boot options... Done.
Starting udev daemon for hotplug support... Done.
Waiting as requested... 4
Scanning hard disk partitions to create /etc/fstab
Setting Language to en_US.UTF-8 Done.
Ignoring swap partition(s) seek as requested.
Loading extensions... Done.
Updating certificates in /usr/local/etc/ssl/certs...
183 added, 0 removed; done.
 Done.
Setting keymap to querty/us Done.
Restoring backup files from /mnt/sdd1/tce/mydata_jwm_Xorg_RC.tgz /
Done.
Setting hostname to box Done.
:: VGA: NVIDIA GF104 [GeForce GTX 460] ...Done
Boot time configuration completed. Press <Enter> to continue.

I the broken version the screen changes right after Loading extensions..., before NVIDIA GF104 driver is loaded.
Hello Smasher
 
That's the first mention of Nvidia driver being loaded and is clearly the source of your problems

Install pci-utils.tcz
then run
Code: [Select]
lspci -v
to discover which video hardware is installed

There's too much information we don't know, so upload the lspci results please
There's one more possibility,  if a notebook then it's possible you have an Intel OnChip graphics and a dedicated Nvidia card.  Best to disable one of them in the BIOS before continuing.

If you have a GeForce GTX 460 graphics card you'll need
nvidia-390.116-4.19.10-tinycore64.tcz
Xorg-7.7

Which means updating the Kernel, Tinycore and all extensions to the latest TC-10 Core64 to get Nvidia support for Geforce GTX 400 series through GTX 1000 series dedicated video cards

Use the " norestore " bootcode to prevent interference from any personal files

Remove your current Xorg and all video related extensions then install Xfbdev instead using official package management utilities (tce-load -wi Xfbdev or tce-ab ) to ensure you download only extensions from the architecture in use.

add  Xfbdev.tcz to your onboot.lst
and add the bootcode " vga=791 " to your boot config file

Be sure to remove all the interference from addition video extensions (like modesetting etc. etc.)
I'm assuming a Core64 installation here, not a corepure64 install.


IMO the best hardware support comes from updating TC to the latest version.
Title: Re: An issue with booting SeaTools
Post by: kosnic on February 10, 2021, 09:06:02 PM
This is an old thread, but hopefully this post helps someone else.  I had a similar issue with Seatools.  It would not boot and kept getting hung up loading extensions.  To begin with I was getting a fdisk error about a device having more than 2^32 sectors.  I resolved this by disconnecting all of my other drives except for the one I was testing.  I tried a few suggestions from this thread without luck.  For the time being, I gave up and reconnected everything and booted to windows.  I did not have that drive connected prior to shutting down to boot from usb so once in windows I found that the drive wasn't showing up in file exp.  Checked device manager and seatools for windows and it showed the drive.  Looked at it with a partition manager and found that it was not partitioned.  After partitioning and rebooting, I was able to load Seatools without issue and with all drives connected. Still didn't solve my problem, but at least I got it to boot.