WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: EFI mulitboot grub2 boot code configuration, wont start X, only TCL text mode.  (Read 6382 times)

Offline jopema

  • Newbie
  • *
  • Posts: 9
Hej.
Im sorry for filling up TCL forum on my own with my posting, I certainly would appreciate company in asking stupid questions.
My strategy is to have a multiboot usb micro flash drive in my laptop which boots windows 10, generic tiny core Linux and any other dists. After failing with grub2-tcz extension in TCL I just copied a android-x86 install and filled in the meat from the TCL install.
I now have this drive booting windows 10 and android-x86 in UEFI bios boot mode without having to change to legacy etc.

Trouble is Im not able booting TCL into GUI (X), it only boots TCL core in textmode and when trying to startx at bash I get the message "failed in wait for x". As mentioned I copied all the TCL meat from a USB drive install from coreplus ver 8.2 and this boots perfect in legacy boot mode but as Iam a bit lazy I just want to choose from a menu which OS to run every time without messing with bios settings.

Here is one of the 15-20 samples of my grub.cfg :

menuentry 'TCL-FLWM' {
   search --file --no-floppy --set=root /boot/core.gz
   linux /boot/vmlinuz root=/dev/ram0 waitusb=20 loglevel=3 cde showapps desktop=flwm_topside
   initrd /boot/core.gz
}

All the 100+ extensions seems to load as they are rolling by on the boot screen in yellow text. I've seen several posts in this forum about the waitusb=5 and I have tried several waitusb time, in fact I have tried all 50+ possible incorrect versions of boot codes so the only one remaining to figure out now is the one working that I have not thought of yet so I kindly ask you to kick me in the correct direction. I have looked in the manpages for grub2 but apparentely not thouroughly enough as I have yet not realized what Im doing wrong. Some of the things I have tried is removing the root commands as they are from the android, vga=790, tce=/mnt/sdb1/ (verified in fstab), no desktop specified (=FLWM topside ?), no cde specified etc but now Im out of ideas and posting here...

One thing confusing me is that the boot.lst file in root of the TCL usb drive is completely empty, blank.

Time for coffee and some digging in the garden =0)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11588
Hi jopema
Your  cde  directory should be renamed to  tce  and the  cde  boot code should be removed. Then you should take an hour
read this excellent book on using Tinycore Linux:
http://tinycorelinux.net/corebook.pdf
Items of interest include using  waitusb  with  UUID,  using  tce=  with  UUID,  and using  blkid  to get the  UUID  of a drive.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Here is one of the 15-20 samples of my grub.cfg :

menuentry 'TCL-FLWM' {
   search --file --no-floppy --set=root /boot/core.gz
   linux /boot/vmlinuz root=/dev/ram0 waitusb=20 loglevel=3 cde showapps desktop=flwm_topside
   initrd /boot/core.gz
}
...

As most if not all modern UEFI PC's are 64bit you will most likely need to boot the corepure64.iso (Burned to a CD) then install grub2-multi.tcz and launch grub2 to install the Boot Loader in UEFI mode, see the info file for the correct commands
http://tinycorelinux.net/9.x/x86_64/tcz/grub2-multi.tcz.info

See also Grub2 for UEFI
http://forum.tinycorelinux.net/index.php/topic,19364.msg119228.html#msg119228

BTW more examples of grub.cfg boot entry is found in the grub2 x86 info file
http://tinycorelinux.net/9.x/x86/tcz/grub2-multi.tcz.info


Compare your grub.cfg to the this partial grub.cfg file from my system (grub2-multi legacy-bios and uefi x86_64) from corepure64 booting a 32bit tinycore)
Code: [Select]
insmod part_msdos
insmod fat
insmod ext2
loadfont unicode
insmod efi_gop
insmod efi_uga
insmod font
insmod gfxterm
set gfxmode=auto
set gfxterm_font=unicode
set gfxpayload=keep
terminal_output gfxterm

#Timeout for menu
set default=0
set timeout=5


menuentry "*** TC-9-x86 (Nvidia on USB)" {
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"/tc9-x86 opt=UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311" home=UUID="b313c2c4-fedf-4c44-bf42-6a6fca54b311" lst=onboot_x86_Nvidia.lst mydata=mydata_tc9x86.Nvidia
initrd /boot/rootfs.gz /boot/modules.gz
}

One of these USB thumb drives shown in attached screenshots is booting various TC versions from Legacy and UEFI modes (grub2), while the other is booting TC-9 in legacy mode using the tc-install-GUI extension
« Last Edit: October 08, 2018, 11:26:59 AM by coreplayer2 »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
If you boot by UEFI, the EFI framebuffer is running. That may conflict with Xvesa, the default X server. Try Xorg or Xfbdev.
The only barriers that can stop you are the ones you create yourself.

Offline jopema

  • Newbie
  • *
  • Posts: 9
The "corebook" only mention grub2 is available at page 20, no instructions how to install or configure so the links from coreplayer is appreciated.
Will read up on the xorg. The more I tinker with this the more I understand the guys at android-x86 made a nifty grub.cfg =0)

****************************'
set timeout=30

menuentry 'Android-x86 6.0-r3 Live' --class android-x86 {
   search --file --no-floppy --set=root /system.sfs
   linux /kernel root=/dev/ram0 quiet DATA=
   initrd /initrd.img
}

menuentry 'Android-x86 6.0-r3 DEBUG mode' --class android-x86 {
   search --file --no-floppy --set=root /system.sfs
   linux /kernel root=/dev/ram0 DATA= DEBUG=2
   initrd /initrd.img
}

menuentry 'Test-win-Android-x86 6.0-r3 Installation' --class android-x86 {
   search --file --no-floppy --set=root /system.sfs
   linux /kernel root=/dev/ram0 DEBUG= INSTALL=1
   initrd /initrd.img
}

menuentry 'Windows' {
   search --file --no-floppy --set=root /EFI/Microsoft/Boot/bootmgfw.efi
   chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
The "corebook" only mention grub2 is available at page 20, no instructions how to install or configure so the links from coreplayer is appreciated.
You're welcome..

But on Page 21 there's a typical config file..  It could be said that grub2 is mentioned on Page19, with regards to UEFI partitions as only Grub2 has been tested..  Just saying...

If you see mention anywhere of root "(hd0,0)" simply disregard as that's legacy stuff from old grub 0.9x (though it's still recognized in Grub2) UUID is supported and preferred
Notice the config format for grub2 has been dramatically modified.   More Grub2 info here:
https://www.gnu.org/software/grub/manual/grub/html_node/index.html


The most pertinent and up to date commands and config info is always available within an extension's "info" files.
The Core book is next, which provide an insight and understanding of TC concepts and How too's
The FAQ has great info also
Lastly the Wiki....   



« Last Edit: October 08, 2018, 04:21:41 PM by coreplayer2 »

Offline pema

  • Newbie
  • *
  • Posts: 48
Let me tell you a few words of confusion :

I hade this working, as Curaga mentioned its something with the xorg/xvesa. I took the android boot skeleton as mentioned above and threw in the TCL stuff, added the xorg-7.7 and xfbev manually to tce/optional and onboot.lst. Funny thing is xvesa had to be removed completely, just deleting the post in onboot.lst didnt work, had to remove the tcz. When all the libraries and everyhting is sorted it boots like a charm on a win10 uefi and I had my setup working as I wanted, same usb kicks up lubuntu, win10, android-x86 and TCL...for a while (my aim is to eliminate the lubuntu and use the tcl as a quick boot splashtop).

After 2 boots on the TCL it didnt work the third time, when checking files I can not find what is changed and I can not figure out what have happened so I will have to do it all over again from the android-x86 install as I just cant get the grub2 working in tcl. Of course I should have made backups. I got so confused I forgot my user here at this forum but for some reason remembered the password for my ten year old user that was still intact, strange I never remember linux commands but passwords.

It is apparentely time for a timeout for a couple of days.

Anyhow it is doable but right now Im not able telling you how, I will have to come back when I picked myself up again.

Offline pema

  • Newbie
  • *
  • Posts: 48
Hej.
Played around some and Im stuck on why loaded extensions in onboot.lst is not loaded at boot, I need your kind advices helping me forward. I have all required libraries in optional directory and I written Xorg-7.7.tcz at three positions in onboot.lst (I had the idea it might depend at which order modules loaded). At boot I can see Xorg-7.7.tcz listed as loaded extension but desktop fails to load, it stops at bash with message failed wait for x.
When executing tce-load -i xfbdev.tcz, openbox etc its telling these modules is loaded, only module loaded is Xorg-7.7.tcz which can be loaded manually. When running setup.shand then startx it still fails wait for x.
Why is xorg-7.7.tcz not loaded into system allthough its listed at boot as loaded module ? Im suspecting I may be misding libraries with xorg that is not listed as missing libraries at boot.
Is it possible finding error logs of boot procedure and how can I view these logs ?

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Hej.
Played around some and Im stuck on why loaded extensions in onboot.lst is not loaded at boot, I need your kind advices helping me forward.
The most common reason for this is when folks download extensions using wget instead of the official methods like APPS, tce-ab, or tce-load.

Quote

I have all required libraries in optional directory and I written Xorg-7.7.tcz at three positions in onboot.lst (I had the idea it might depend at which order modules loaded).
I understand what you mean, but to be clear; Only extensions (*.tcz archives) live in the optional directory, by that I mean extensions, their dependency extensions and supporting files like dep lists and md5 text files, nothing else. 

Also it’s pointless writing Xorg-7.7.tcz on 3 lines of onboot.lst
Try writing graphics-4.14.10-tinycore.tcz before Xorg-7.7.tcz

Quote
At boot I can see Xorg-7.7.tcz listed as loaded extension but desktop fails to load, it stops at bash with message failed wait for x.
great, an error message [emoji106]
Most likely a dependency is missing or loaded in the wrong order
Again, try loading graphics-4.14.10-tinycore.tcz before Xorg-7.7.tcz


Quote
When executing tce-load -i xfbdev.tcz, openbox etc its telling these modules is loaded, only module loaded is Xorg-7.7.tcz which can be loaded manually.
Welcome to TC and Linux.  Meanwhile, heads up here!  You can only run one X system at once, end of story!  Your onboot.lst can only contain one of these, either
Xorg-7.7.tcz, OR
Xvesa.tcz OR
Xfbdev.tcz

Note***. we can only install/load one of these above extensions per boot

Also!  When you say “executing tce-load -i xfbdev.tcz, openbox etc its telling these modules is loaded”
By openbox, do you mean the command line at the shell? (Which is ash not bash btw) Or do you already have a GUI desktop ?


Quote
When running setup.sh and then startx it still fails wait for x.
typically,
setup.sh  is run when using Xvesa  only
VGA= bootcode is used when running Xfbdev
And finally /etc/X11/xorg.conf file may be used to configure Xorg for your specific hardware


Quote
Why is xorg-7.7.tcz not loaded into system allthough its listed at boot as loaded module ? Im suspecting I may be misding libraries with xorg that is not listed as missing libraries at boot.
To check if an extension is installed
Code: [Select]
ls /usr/local/tce.installed
Or for example:
Code: [Select]
ls /usr/local/tce.installed | grep X
Xdialog
Xlibs
Xorg-7.7
Xorg-7.7-bin
Xorg-7.7-lib
Xorg-fonts
Xprogs
libX11
libXau
libXaw
libXcomposite
libXcursor
libXdamage
libXdmcp
libXext
libXfixes
libXfont
libXfont2
libXft
libXi
libXinerama
libXmu
libXpm
libXrandr
libXrender
libXres
libXss
libXt
libXtst
libXv
libXvmc
libXxf86dga
libXxf86vm
Note: if an extension is missing a required dependency extension as listed in the main extension "dep" file then the extension will fail to install

Quote
Is it possible finding error logs of boot procedure and how can I view these logs ?
When using Xorg-7.7 you’ll find logs at /var/log/Xorg.0.log


Sent from my iPhone using Tapatalk
« Last Edit: October 13, 2018, 08:33:12 AM by coreplayer2 »

aus9

  • Guest
@ pema
I hope you will forgive me in expanding on one point made by you and coreplayer2. 

pema writes
Quote
I written Xorg-7.7.tcz at three positions in onboot.lst (I had the idea it might depend at which order modules loaded).

coreplayer2 writes
Quote
Also it’s pointless writing Xorg-7.7.tcz on 3 lines of onboot.lst
Try writing graphics-4.14.10-tinycore.tcz before Xorg-7.7.tcz
pema, I can not see your onboot.lst can you post it please

and coreplayer2....forgive me....but I thought the order was important but was in reverse order?

let me give example
from Apps I have abcde.tcz downloaded and its dep file reads as
Quote
bash.tcz
cdparanoia.tcz
flac.tcz
cd-discid.tcz
wget.tcz

and if load it....the load order is
Code: [Select]
tc@box:~$ tce-load -i abcde
wget.tcz: OK
cd-discid.tcz: OK
libogg.tcz: OK
flac.tcz: OK
cdparanoia.tcz: OK
readline.tcz: OK
bash.tcz: OK
abcde.tcz: OK

So I am thinking
graphics-4.14.10-tinycore.tcz  should appear BELOW Xorg-7.7.tcz

Can I know your thoughts on this  please?
Have I got it wrong again?

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Here's the deal..
I believe it's good practice to install required modules along with any supporting (and compatible) files for your hardware into the file system before installing generic supporting files from say Xorg extensions.  Because files that are installed first are not overwritten by future installed extensions with files of same name.   With exception of using backup and restore feature of course which will overwrite existing files.