Tiny Core Linux

Tiny Core Base => Corepure64 => Topic started by: jimmyjohn on June 29, 2019, 03:11:09 PM

Title: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: jimmyjohn on June 29, 2019, 03:11:09 PM
Every time I try to boot up, I get sent into a Grub 2 shell and am unable to move forward.  I am using Corepure 64 10.1 and am booting from a USB drive partitioned in GPT format.  I am using Rufus to burn the ISO to the drive, but have also tried with etcher.  I have tried manually booting with grub commands 'linux' and 'initrd', but even then I get an 'unknown filesystem' error.  I don't have the option to boot in legacy mode.

I am really excited to use Tiny Core Linux, but this stumbling block is quite annoying.  Does anyone know what might be going on and how to fix it?
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on June 29, 2019, 03:34:00 PM
Hello

The path to kernel and initrd is incorrect

Perhaps there’s no grub.cfg file ?


Sent from my iPhone using Tapatalk
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: jimmyjohn on June 29, 2019, 03:44:31 PM
Well, there is a grub cfg file.  In fact, just now, I pulled the bootx64.efi from a different linux ditro (puppy linux), then i moved the grub.cfg file to the root directory on the usb drive and doing that has gotten it working.  However, despite the fact that it is working, that leads me to question if perhaps the most recent iso has a faulty bootx64.efi file.  Has anyone else tested it and found it to be fully functional?
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on June 29, 2019, 05:13:36 PM
JimmyJohn

Glad you figured it out
Next time try installing manually without use of third party installers, like Rufus etc etc (Although YUMI EFI reportedly understands tinycore requirement).  Again, installing manually is quite easy if you check off the following list items & notes below

Note 1: grub.cfg file contains at a minimum:
[/list]
Code: [Select]
loadfont unicode
insmod all_video
set gfxmode=auto
set gfxpayload=keep
set gfxterm_font=unicode
terminal_output gfxterm

search --no-floppy --fs-uuid --set=root "964B-11FB"

menuentry "Corepure64" {
linux /linux/vmlinuz64 loglevel=3 vga=871 waitusb=5
initrd /linux/corepure64.gz
}


Note 2: EFI Boot partition UUID code for grub.cfg --set=root "964B-11FB" command can be found at the linux terminal
Code: [Select]
tc@box:~$ blkid -s UUID /dev/sdc1
/dev/sdc1: UUID="964B-11FB"
If unable you can temporarily comment that line out
Code: [Select]
# search --no-floppy --fs-uuid --set=root "964B-11FB"
Note 3: See this link for more
http://forum.tinycorelinux.net/index.php/topic,19364.msg119228.html#msg119228

Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on June 29, 2019, 05:34:45 PM
I pulled the bootx64.efi from a different linux ditro (puppy linux), then i moved the grub.cfg file to the root directory on the usb drive and doing that has gotten it working.  However, despite the fact that it is working, that leads me to question if perhaps the most recent iso has a faulty bootx64.efi file.  Has anyone else tested it and found it to be fully functional?
We always create a bootx64.efi boot loader for each scenario
Code: [Select]
sudo grub-install --target=x86_64-efi --boot-directory=/mnt/sdb1/EFI/BOOT --efi-directory=/mnt/sdb1 --removable
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: jimmyjohn on June 29, 2019, 05:47:20 PM
JimmyJohn

Glad you figured it out
Next time try installing manually without use of third party installers, like Rufus etc etc (Although YUMI EFI reportedly understands tinycore requirement).  Again, installing manually is quite easy if you check off the following list items & notes below

    We're making many assumptions here;
    • that you've Created a GPT Partition Table
    • that you've Created at least one 100 to 200MB FAT32 Partition for boot manager, tinycore and Linux Kernel
    • that Grub2 is installed from a 64bit operating system, with the following directory paths
    •         sd(x)1/EFI/BOOT
    •         sd(x)1/EFI/BOOT/GRUB
    • Created grub config file
    •         sd(x)1/EFI/BOOT/GRUBgrub.cfg
    • X - Optional 2nd larger partition formatted with ext2 file system for " tce " (for persistent TCE, Home and OPT directories if required)
    • X - that you've copied the ISO/CDE directory and all it's contents to
    •         sd(x)2/tce
    • that you've copied the kernel and initrd (eg: corepure64.gz) to
    •         sd(x)2/linux/   (or as specified in the grub.cfg file)


Note 1: grub.cfg file contains at a minimum . . .

Thanks for the feedback and the checklist!  I can confirm that, other than those marked with an x, every condition above was met.  Also, after the first attempt failed using Etcher, I did a manual install with the same results before attempting using Rufus.

I am going to keep fiddling to see what all I can do.

On another note, is it possible to boot the standard 32bit tiny core via UEFI?[/list]
Title: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on June 29, 2019, 06:02:26 PM
On another note, is it possible to boot the standard 32bit tiny core via UEFI?[/list]

Absolutely you can.   

Know this; except in extremely rare cases, (eg antique 32bit MacBooks) you must install grub2 to your USB or HDD from a 64bit grub2 version

Your grub.cfg file can specify any number of Tinycore flavors

Good luck


Sent from my iPhone using Tapatalk
Title: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on June 29, 2019, 06:29:17 PM
  • that you've copied the kernel and initrd (eg: corepure64.gz) to
  •         sd(x)1/linux/   (or as specified in the grub.cfg file)
Ooops I made a typo

Partition number for core & linux files should be sd(x)1
While that’s obviously not exact, the ESP is typically the first partition.  It’s important that  drive number and path should be reflected in grub.cfg file

Sent from my iPhone using Tapatalk
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on June 30, 2019, 12:13:53 AM
Bummer - that simple trick of moving grub.cfg to the root of the drive did not work for both of my boxes.  Performed this operation in Linux, and not on windows, which surprise - didn't work either. 

(And yes, the notepad editor in an up to date win 10 box will properly read/write in the unix format.)

Somewhat frustrating because as we know, the ISO is not usable out of the box for those unix users thinking an isohybrid is going to work with "dd".  The only thing that results in is a virtual iso9660 cd format on a usb stick. :)

Some notes comparing the current iso to the minimal listing above:

Does it matter if the GRUB directory is NOT capitalized, but lower case in the iso?

The iso is also missing these elements:
insmod all_video
insmod efi.gop  <--- from earlier research on a good manual install

Search path:  Entirely missing from iso.
But I guess I understand as that has to be customized by the end user for each machine setup they intend to put it on.

Example: both of my uefi only boxes boot from mmcblk devices.  However, to boot from a usb stick, they are represented as /dev/sda, so the generic release to the repos is for /dev/sdb, assuming there is already an sda device onboard?

Welcome to UUID's.  Problem is catch 22 for those not already running a linux distro to get the blkid -s UUID tool.  :)

Not complaining, just trying to wrap my head around what might be an easter-egg hunt caused by uefi-only hardware.

Note: To be accurate, RUFUS is not a 3rd-party bootloader.  It does NOT modify or add anything additional beyond what the original iso creator released.  It's sole purpose is to burn the supplied iso.  Your only major choices are to burn in either mbr or gpt format.  gpt for us uefi-folk naturally.  Then, the only other choice is either iso or dd mode.  DD mode with tc results in a cd-on-a-stick, which we know won't boot a uefi-only mode machine, so iso mode is the one, and is seen properly in Gparted for example.

Yet it is still up to the user to modify his grub search path.  Thus the fail with Rufus.  It is not designed to "know" about a distro - if the necessary info isn't there, Rufus won't magically supply it.

YUMI-UEFI - this IS different.  It uses it's own bootloader to burn TinyCore initially, and then get it's necessary grub.cfg from the TinyCore iso itself.  This method does result in a "hands off" kind of user-built stick without having to know UUID's etc - provided that the user knows that the usual TC directories are now in slightly different places.  Of course you can do UUID's later if you want - but the point is, you WILL boot initially.

Just didn't want to start a finger-pointing war - TC rocks, but these burners and alternate bootloaders aren't stupid either.
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: jimmyjohn on July 05, 2019, 11:53:44 PM
For anyone else experiencing this issue, the only method I have found to work around the issue I posted, was to use a different EFI file.  I have included a link to the EFI file(s) I was able to get to work.  You need to do two things:

1)  Move the contents of the grub folder ( /efi/boot/grub) into the root directory.  This would be the fonts folder and grub.cfg

2) Replace the entire EFI folder with the one attached to this post.

Anyway, I tried a few different things and that is the only thing I could get to make it work.

Link:  http://s000.tinyupload.com/index.php?file_id=07415292769309112095
 (http://s000.tinyupload.com/index.php?file_id=07415292769309112095)
Good luck!
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 24, 2019, 01:04:17 AM
Jimmyjohn - That's a pretty neat hack.  I just tried it on my uefi-only Computestick and works like your Kangaroo. :)  Downloaded that EFI as a test, so thanks for that.

The really interesting thing is that after grub 2.03 menu comes up, finds the grub.cfg file you moved, TCpure64 boots up in full native resolution!

Normally I'd have to load kernel-<graphics> to get that to happen, but this now happens by default.  If I wanted lower, I'd just adjust my grub.cfg file.

I poured over the Rufus faq about just ending up in the grub commandline:

https://github.com/pbatard/rufus/wiki/FAQ#Using_an_UEFI_bootable_ISO_based_on_grub_all_I_get_is_the_grub_prompt

where a number of issues that may not be pertinent to TC, but an issue with others like Manjaro not using a fat-32 module, or Ubuntu not using a part-gpt module when running grub-mkimage etc etc.

Keeping track of all these variables is what makes my head spin - despite the EXCELLENT info provided by our heavyweight TC devs.  Heh, that's why I shamefully admit I'm a slacker and an image, rather than an iso, is in my wheelhouse these days. :)
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 24, 2019, 02:02:17 AM
Jimmy - you know what?  This is a much cleaner simpler hack than using YUMI-UEFI.

Since it comes up in full native resolution for me, I verified that I can turn the resolution down if I want by merely adding the standard

Code: [Select]
set gfxpayload=1024x768
at the end of my grub.cfg.

Not official, but since I use Rufus for duties other than iso / img burning, this is a nifty hack to keep in my back pocket.  Thanks!
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on July 24, 2019, 07:45:52 AM
Jimmy - you know what?  This is a much cleaner simpler hack than using YUMI-UEFI.

Since it comes up in full native resolution for me, I verified that I can turn the resolution down if I want by merely adding the standard

Code: [Select]
set gfxpayload=1024x768
at the end of my grub.cfg.

Not official, but since I use Rufus for duties other than iso / img burning, this is a nifty hack to keep in my back pocket.  Thanks!

Hello
I'm wondering why this is called a hack?  I mean gfxpayload is an available grub2 option..

From my standard grub.cfg
Code: [Select]
insmod font
insmod gfxterm
loadfont unicode
set gfxterm_font=unicode
terminal_output gfxterm
set gfxmode=auto
set gfxpayload=auto


Code: [Select]
set gfxmode=autoWill select a platform default suitable for the terminal or you can specify width x height  (supported via VESA BIOS Extensions)

Code: [Select]
videoinfothis command at the grub terminal will list supported modes

Code: [Select]
set gfxmode=1920x1080x24
set gfxpayload=keep
to pass the same screen resolution used at the terminal to the kernel

Or you can try
Code: [Select]
set gfxpayload=auto
Just saying that you have control over these variables
good luck
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 24, 2019, 12:12:32 PM
setting gfxpayload was just an operational test from replacing the EFI components as distributed in the tcpure64 iso and subsequent burn.  And I suppose too is moving and being able to find the grub.cfg file just an operational test.

The "hack" is replacing the EFI directory from another distro, and having that boot the standard iso without dropping to the grub prompt.  Performing an ls using grub, we find that no filesystems are recognized on any of the available partitions.

Inside the alternate EFI, we find two files:

bootx64.efi
bootia32.efi

These seem to be the key.  I note that tcpure64 iso omits the bootia32.efi.  Even though we are uefi-only 64 bit, does bootia32.efi need to be present to use a fat32 filesystem?

I'm not experienced enough to know if bootia32.efi is necessary, so I'll probably delete it and see by experimentation.

The other question is there some major difference in bootx64.efi between TC and the distro that this replacement came from?

I'm just doing layman type of investigations.  The other stuff such as finding grub.cfg and set gfxpayload are sideline operational issues.

I think part of the problem is those of us using uefi-only hardware discovering corner cases for TC64, as opposed to those using uefi hardware that has csm options available - even if those csm options are disabled.
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 24, 2019, 12:38:13 PM
Aha!  could this be an indication of devices using 32-bit uefi, rather than 64 bit?

Most of these smaller consumer level devices from 2015 onwards like Computesticks, Kangaroos and so forth come standard with 32-bit Windows 10.  Yet in their bios setups, one can change that to the 64-bit Linux / Ubuntu choices.

But does that mean the devices are still using a 32-bit uefi?

Is that why the replacement EFI from another distro boots up fine (once it finds grub.cfg, or you manually modify the grub).

Dunno' - the variables are making my head spin. :)

Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on July 24, 2019, 03:57:00 PM
The "hack" is replacing the EFI directory from another distro, and having that boot the standard iso without dropping to the grub prompt.  Performing an ls using grub, we find that no filesystems are recognized on any of the available partitions.

Inside the alternate EFI, we find two files:

bootx64.efi
bootia32.efi

These seem to be the key.  I note that tcpure64 iso omits the bootia32.efi.  Even though we are uefi-only 64 bit, does bootia32.efi need to be present to use a fat32 filesystem?
No the 32 bit EFI  is not required for modern 64 bit hardware.  it’s there only to support what is now considered early EFI hardware.      Having said that, there are still some rare chip manufacturers supplying 32 bit CPU’s for special use scenario’s.  A point I often forget.

If you don’t know what kind of hardware you’re using then most likely it’s CPU is 64bit and is why we recommend booting the corepure64.iso  to install grub2 from.  Grub2 should match the hardware, thereafter you can boot either x86 or x86_64 OS architecture. 
AFAIK Here’s what is important,  you can’t boot a 64bit OS from a 32bit grub2 install even if installed on 64bit hardware.


Quote
I'm just doing layman type of investigations.  The other stuff such as finding grub.cfg and set gfxpayload are sideline operational issues.
Cool. Maybe I misread


Sent from my iPhone using Tapatalk
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 25, 2019, 01:08:53 AM
Removed bootia32.efi since it was unnecessary.

I tried a different bootx64.efi from Porteus, but that only landed me in a black screen.  So for now, I guess this puppy version works.

What do they say? "whatever floats your boot" :)
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: Rich on July 25, 2019, 05:14:56 AM
Hi PDP-8
What do they say? "whatever floats your boot" :)
OK, that's 10 minutes in the punalty box for you.
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on July 25, 2019, 09:22:30 AM
Every time I try to boot up, I get sent into a Grub 2 shell and am unable to move forward.  I am using Corepure 64 10.1 and am booting from a USB drive partitioned in GPT format.  I am using Rufus to burn the ISO to the drive, but have also tried with etcher.  I have tried manually booting with grub commands 'linux' and 'initrd', but even then I get an 'unknown filesystem' error.  I don't have the option to boot in legacy mode.

I am really excited to use Tiny Core Linux, but this stumbling block is quite annoying.  Does anyone know what might be going on and how to fix it?
I returned to the OP's first post and regret not asking this,  when at the grub shell enter this command and post the output please
Code: [Select]
grub> echo ${cmdpath}
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 25, 2019, 12:34:11 PM
Bummer:  grub 2.02~beta2

Code: [Select]
grub > echo ${cmdpath}
error: can't find command `echo`

Hitting tab for autocomplete gave me some others that might help..

But you pointed me as to where we're going looking at variables.  So like in a real shell, I just typed

Code: [Select]
grub> set

cmdpath=(hd0,gpt1)/EFI/BOOT
.
.
. other variables .....
.
.
prefix=(hd0)/EFI/BOOT/grub
root=hd0
..

Awesome.  Actually very helpful for further study.  Wonder if prefix needs a gpt1 too..

Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 25, 2019, 12:52:18 PM
Ok, can't wait - probably getting waaay too far ahead here.

So I tried to "ls" those paths from grub>

And they all ended up with
error: "unknown filesystem"

Code: [Select]
ls hd0,gpt1
ls hd0
.
.
ls hd0,gpt1/EFI/BOOT
ls hd0/EFI/BOOT/grub
.
l
ls /hd0,gpt1/EFI/BOOT
ls /hd0/EFI/BOOT

Seems like all my attempts to ls results in unknown filesystem.
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 25, 2019, 01:03:58 PM
Re: the pun

Corny, but I couldn't help myself.

I imagined that one of my idols, Brian Kernighan, would say it this way, whom Doug McIlroy claimed was an "expositor par excellence"..

Heh, us old guys. :)
Title: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on July 25, 2019, 05:37:27 PM
The other question is there some major difference in bootx64.efi between TC and the distro that this replacement came from?
Indeed there is and it’s by design.   You see each bootx64.efi boot loader is created by grub-mkimage  which is executed by grub-install with the the personalized parameters provided.  These parameters usually include the path to its configuration file (grub.cfg) known as the prefix and modules required to read file systems etc etc

You may also create an boot image file with all the modules included so that the grub modules folder is not required, but that’s another story




Quote
Seems like all my attempts to ls results in unknown filesystem.
Ok,  ls can’t read the file system if root has not been set..


Sent from my iPhone using Tapatalk
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 26, 2019, 01:29:10 AM
Quote
Ok,  ls can’t read the file system if root has not been set..

Well, it is already set as hd0 being baked in when using grub>set to view the variables as delivered from the iso.

So, with root=hd0 already set as the baked in value from the iso, I tried to ls it:

Code: [Select]
ls (hd0)
Device hd0: No known filesystem detected - sector size 512B - Total size 152320000KiB

Hmm.  Ok, looks to be the entire size of my drive.

So lets step through all eleven of the possible HDx options as shown by grub>ls

Code: [Select]
set root=(hd0,gpt1)
ls (hd0,gpt1)

Partitions hd0,gpt1: No known filesystem detected - Partition start at 1024KiB - Total Size 15230959.5KiB

Seems like grub duly recognizes the partitions, but stubbornly refuses to recognize the filesystems.  I tried changing the root, and the ls'ing all of the other 11 HDx options that grub found, but the all report no known fileystem.  Partition sizes DO have different values!

So if it can't recognize the partitions with an ls, there is no point trying to start the kernel or initrd right?

I'll study up, but man this is sooo frustrating.  I appreciate the help.
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 26, 2019, 02:27:37 AM
Not sure if this helps or if this is noise ...

So I forced the grub commandline from the working puppy bootx64.efi to take a peek with the set command:  Some interesting values

cmdpath=(hd0)/EFI/BOOT
prefix=(memdisk)/boot/grub
root=hd0,gpt1

MEMDISK?

Code: [Select]
ls (memdisk)
Filesystem type tarfs
Sector Size 512B Total Size 3070KiB

ls (memdisk)/
boot/ euro.pf2

ls (memdisk)/boot/grub
locale/ x86_64-efi/ grub.cfg

And I can ls any of the HDx partitions, and their filesystem is recognized and can browse through the systems, *EXCEPT* for hd0.  Yet this system boots.

Fascinating.  Sure beats the typical shade-tree recommendations out there to just put my computer in the fridge, change my boot order, delete my windows partition, run grub2 magic fixer/cleaner distro..... :)
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 26, 2019, 03:20:39 AM
Sorry guys - I'm on a roll now ... :)

Wow - major differences between Grub 2.02~beta 2 and grub 2.03 as far as available commands go.

doing an lsmod between the two - wow.

Just breaking some *!3#? here - an lsmod with our original grub shows support for part_Amiga and part_Acorn filesystems.  We can drop those right?  :) :)
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on July 26, 2019, 07:48:26 AM
MEMDISK is because you’re using the forbidden puppy Distribution’s “Standalone” bootx64.efi version

The standalone version contains all the modules it’s creator deemed fit to include

I’m not sure why you’re surprised?





Sent from my iPhone using Tapatalk
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 26, 2019, 12:55:44 PM
Um - ok.  I think. :)

Which makes me wonder if we have our own catch-22 with the tcpure64 iso ...

To get the filesystem support we need, we have to add insmod modules into the grub.cfg file as an end user.

But to read that file, some sort of filesystem support needs to be baked into the bootx64.efi file in the first place?

More detail:
dd'ing the distribution doesn't boot - in fact, the bios doesn't even recognize the device, so only an iso burn makes it appear in the bios.

I'll keep searching for the smoking gun, but I feel like I'm not learning anything. :)
Title: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on July 26, 2019, 01:23:17 PM
I think there’s some confusion here..

In the standalone bootx64.efi version you’re using you can’t ls into the memdisk which is where all included modules and the grub.cfg file is located
I’m not familiar with any means to access the grub config file in a standalone bootx64.efi file.

Our bootx64.efi file is not a standalone type which doesn’t have a memdisk.   But the full partition path needs setting to use ls

Also the command to access a drive contents is
Code: [Select]
grub> ls /
Or if other than root
Code: [Select]
grub> ls (hd2,gpt1)/

Sent from my iPhone using Tapatalk
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on July 26, 2019, 02:16:28 PM
To manually boot the kernel

Code: [Select]
grub> ls /
boot EFI
grub> linux /boot/vmlinuz64 quiet
grub> initrd /boot/corepure64.gz
grub> boot

Or

Code: [Select]
grub> linux (hd0,msdos1)/boot/vmlinuz64 quiet
grub> initrd (hd0,msdos1)/boot/corepure64.gz
grub> boot


If you need to add file system support then build your own boot loader

Code: [Select]
grub-mkimage -o bootx64.efi -p /EFI/BOOT -O x86_64-efi  (ext2 part_gpt +list of all additional modules)

cp /EFI/boot/grub/x86_64-efi/core.efi /EFI/BOOT/grubx64.efi
(something like that anyhow..)
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 27, 2019, 12:24:59 AM
Thanks again for the help coreplayer2 - really, this will come in handy when creating your own grub bootloader.

Unfortunately, all attempts to boot with directives above result in "Unknown Filesystem".

Interestingly, when attempting

boot EFI

It says you have to load the kernel first.  But then when you try to do so, it errors up with unknown-filesystem.

This is interesting stuff, but for now I'll go out on a limb and say that *on certain machines*, like my Computesticks or Kangaroos, just build your own bootloader, or rely upon other bootloaders and shoe-horn it in.

Heh, TC is made nicely to do that in the first place, so I'm not sweating it.

I'm taking a break from it for now, but certainly you've schooled me quite a bit, which will come in handy later.
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 27, 2019, 02:47:13 AM
Ok, enough break.  Time for a thought-experiment:

(and shouldn't have X-Files playing in the background) :)

Is it possible that when the iso image was made for TinyCorePure64, that the grub-mkimage simply did not contain filesystem support for fat32?

Aha - most burners from windows burn fat32 only.  But the emphasis we see here is to NOT use fat32, but a real linux fs like ext2 for sticks.  DD is unusable on my machines since they won't show up in the bios as a bootable device, so the image is burned iso9660.

Yeah, sure, grub will *launch* itself from fat32, but that also needs to be specified when doing the grub-mkimage procedure.

Tinfoil hat time:
If in fact fat32 was not used during the grub-mkimage, despite loading the modules, is this an oversight, or just a way to dissuade us from using fat32 filesystems on our sticks?  Or nudge us to burn our own doing so? 

"Scully, I'm telling you something's going on here when grub crashes"
"Oh Mulder, you need to get out more often"
"Scully - something's a foot, the man is trying to make fat32 go away!"
Suddenly the smell of stale cigarette-smoke appears as the smoking man draws back the curtains.....

Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 27, 2019, 03:35:20 AM
Want to be "fat-free" with uefi boot?  Simply don't use fat32 at all.

Despite warnings about "mandating" the use of fat32 for uefi-boot, all it really says that if you are to call yourself "uefi compatible", you should demonstrate that you can do so with fat32.  Not that you *HAVE* to.

For instance, I just burned TinyCorePure64 iso with gpt mode, but this time chose NTFS as the filesystem.  To get the ntfs filesystem support, I had to hack in the efi file from Puppy, and move the original grub.cfg as talked about earlier.

Guess what ?  It boots all the way to the commandline.  It tries to load the extensions and leaves me in the ash prompt.

I can fix it, but I'm not going to spend my time using NTFS as a boot filesystem with TC.

Just a proof for those making their own bootloaders, and if you want to be fat-free or whatever, you can use ext2 or whatever you like.  Laugh at the online references about "mandating" fat32 for uefi.
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on July 27, 2019, 12:48:26 PM



Sent from my iPhone using Tapatalk
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 27, 2019, 01:48:14 PM
Yeah, I'll take a break from being OT and long winded.

I just find it interesting that using fat32 for the uefi partition is not actually mandatory - one can use any filesystem they want as long as it is driven properly.  But this seems to have been repeated so often that it is taken for truth.

Wait - what?  My entire stick can be ext2, or xfs or whatever I like - including the efi partition?  Truth.


Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on July 27, 2019, 06:46:38 PM
I just find it interesting that using fat32 for the uefi partition is not actually mandatory - one can use any filesystem they want as long as it is driven properly.  But this seems to have been repeated so often that it is taken for truth.

Wait - what?  My entire stick can be ext2, or xfs or whatever I like - including the efi partition?  Truth.
Not exactly true,  firmware capacity has traditionally been limited.  Therefore manufacturers will likely provide support only for intended Operating Systems.

For compatibility FAT support on all machines is provided for sure, NTFS is often provided to support Windows installs on drives without an ESP.   

Apple products support FAT and AppleFS on recent mac’s

I could be wrong here but even with recent increases of bios/firmware memory only pc’s destined for linux or sold without an OS might  provide support for ext

Maybe one day, Right?


Sent from my iPhone using Tapatalk
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: nick65go on July 28, 2019, 04:45:23 AM
grub-mkimage is the key central for grub to build all other stuffs when needed.
For example, grub-[install,mkstandalone,mkrescue] all refer to the use of grub-mkimage, so once grub-mkimage is understood, everything looks easy to do.
grub-mkimage has 2 ways to "attach" a config file to its image :
    option -c,--config=File (embed FILE as an early config)
    option -m,--memdisk=file (embed FILE as a memdisk containing eventually config file)

Example of an embedded configuration for a UEFI boot from "ISO-type" inside:
Code: [Select]
set pager=1
root=(cd)
configfile (cd)/boot/grub/grub.cfg
The memdisk is a virtual disk device viewed by grub, having a tarfs filesystem; the various modules sitting there are "ready for use", meaning they can be loaded by insmod directly. But they are not directly call-abled as "preloaded modules" as those in the options --modules="blah blah...:" (the last ones are similar to drivers loaded in initramfs in Linux OS)
sample Optional miniHDD GrubBIOS
Code: [Select]
grub-mkimage.exe -v -o grubBIOS-core.img --format=i386-pc --prefix="(hd0,msdos1)/boot/grub" biosdisk iso9660 part_msdos fator the equivalent for UEFI64:
Code: [Select]
grub-mkimage.exe -v -o grub_x64.efi --format=x86_64-efi --prefix="(hd0,gpt1)/boot/grub" part_gpt fat EDIT: FYI, my UEFI-HDD bootloader [1grubx64-gpt.efi] has 118 KB (121,344 bytes)  ;)

 EDIT2: my BIOS boot (for Virtual machine) with almost all modules included (grub202-i386-cdrom.core) has 376 KB (385,024 bytes).
These are to prove that we DO NOT necesary need the folders i386-pc, neither the x86_64-efi; we need just the main bootloader and eventualy a configuration file (grub.cfg), and even the configutarion file can have an arbitrary name, because we will ask for it using grub-directive "configfile bla-bla-file".
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 28, 2019, 03:23:07 PM
Ah, interesting!

Leaning forward from my rocking chair and shaking my fists, I'll go OT for a sec and stop. :)

This is all great stuff - but I think loses many, even the TC diehards, if the uefi-only stuff doesn't boot straight away and you have to mess around with custom grubs.

Two analogies - in the old days, one just popped their DSL cd into the machine, booted and went to town for the most part.

Prior to that, one used kermit to download binaries, and used an ms-dos utility, RAWRITE.EXE to create boot/root/userland floppies.

But they didn't have to get their dos C-compiler out, and create rawrite.exe on their own.

Ok, bad analogy perhaps, so I'll duck out for awhile...
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: labeas on July 29, 2019, 04:40:38 PM
The forum statistics confirm the wave of <anti-M$-lockout> needs.
My recent attempt, based on the 2015 article:
 "Howto make a legacy bios/uefi dual boot usb stick with grub2"
worked for the TC64 grub-entry, but not for the <core32bit>.

While searching for the Wifi hardware/firmware I destroyed one
partition, and before reinstalling, I need to install Ver10.x
on this laptop, currently runing Ver7.2.
This: in order to better fetch the Ver10.x files for the.
<uefi laptop>.

I can't remember how I initially installed Ver7.2 TC64 ?

The online "Installation" instructions are confusing !!.

> "The guide assumes you've either booted the CorePlus CD, or have
> installed the tc-install extension (tc-install.tcz)"

No! No CD hardware available.
How can tc-install.tcz be used *BEFORE* TC is installed & running ?!

It was quiet a problem to get Wifi working on the TC64:Ver7.2.
If I have the URLs:
 then ver7.2 can fetch the required files for installing Ver10.1.

Perhaps I used YUMI...rufus...to install vers7.2 ?

Please advise howto:
1. install current TC64.
2. are instructions of <2015 article> still valid?

PS..
I appreciate the <tabulated, instead of chatty-format: instruction-list>
 given earlier in this thread.
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on July 29, 2019, 09:17:55 PM
labeas - I really think you are a candidate for using YUMI-UEFI multiboot for your project.  There is the original YUMI, and the more recent YUMI-UEFI.  I would choose the newer version for your Aptio.

You've already paid your Microsoft-tax, perhaps many times over your lifetime like all of us purchasing computers with dos or windows pre-installed.  What better way to get back some of your investment by using a GPL'ed windows tool to get your troublesome setup going.

I've gone into depth about it here:

http://forum.tinycorelinux.net/index.php/topic,23010.msg143982.html#msg143982

But if you want the checklist approach, here it is.

1) Download the Tinycore iso(s) you want to boot from the Windows box.
2) Use YUMI-UEFI to burn the iso(s) to your usb stick.
3) Copy and paste the cde directory to the root directory of your usb stick.
4) Rename this cde directory in the root, to tce.
5) Find the grub.cfg file in the TinyCorepure64 directory.  Don't mess with other grub files earlier in the path, as they pertain to YUMI itself.

It can be found here:
/mnt/sdaX/multiboot/TinyCorePure64-10.1/EFI/BOOT/grub/grub.cfg

6) Change the reference in the TC and TCW subsections from "cde" to
tce=LABEL=MULTIBOOT

This should serve as a guideline if you want to run the 32 bit version, although I have not done so.

Note that I don't use the multiboot feature.  But if you do, you may not want to share a tce directory.  In the case you are multibooting say 64 bit and 32 bit, you might want to have tce64 and tce32 directories in the root.  Change your grub.cfg to point to those accordingly.

Of course, the stick is fat32.  NOT exFAT, but fat32.  Maybe you are ok with that.  If not, then you'll have to dig harder with a manual install.

Maybe this will relieve some of the problems.  And don't forget - back in 1992, I had already purchased MS-DOS many times over retail, and used RAWRITE.EXE inside dos to create the boot/root/userland floppies for Slackware.  Trying to remember if I paid for mbasic-80 on my CP/M machine or if it was part of the "tax" even back then. :)

So I'm not defending Microsoft and their actions, but I am merely saying, you like most of us, have already paid $$$ in ms taxes.  Maybe make use of it with a clearer conciousness with YUMI?


Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: Juanito on July 30, 2019, 01:25:32 AM
Please advise howto:
1. install current TC64.

* Download the latest corepure64.gz and vmlinuz64
* Rename the above to corepure64.gz_tc10 and vmlinuz_tc10
* Copy corepure64.gz_tc10 and vmlinuz_tc10 to the same place as your current files
* Edit your boot loader config and create a new menu entry referencing corepure64.gz_tc10 and vmlinuz_tc10
* Edit the new boot loader config menu entry and name the tce folder tce64_tc10
* Boot the new menu entry and load extensions from scratch
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: labeas on August 12, 2019, 12:18:52 PM
 I haven't studies the replies. Just want to get this report off
 before my memory of the events fades. Using USBstiks on laptops.
 By <trying something> I lost the ext:Patn1 of the <Grub2UEFI>.
 Since I'd already put info on the FAT:Partn2, I kept that.
 AFAIR the TC64 grub entry had been somewhat usable, before
 being lost.
 Now with the new attempt, the "core" entry of <grub.cfg> is
 usable. `uname -a` and `less /proc/cpuinfo` don't show me if
 I'm running 32 or 64 bit.
 
 On the older/less problematic laptop: finally: version == 7.2
 does tell something.
 I've installed V10.0, but the Wifi is problematic.
 Perhaps the book explains the different: "core", "base" ?
 
Observations:
  It's natural to try to INSTRUCT as if the reader was a PC;
ie. "doA ; doB ; ... doN"
Much better, for complex tasks is like prof <Wurz of Pascal>:
 "A causes Ai ; B causes Bi ; ... N causes Ni"
From this the user can CONFIRM the chain/pipe of Ni effects,
to much easierly find the faulty-stage.
What also helped me was the reminder how powerfull GRUB2 is:
 can single-step and examine details of the system, eg.
 devices UUID and size ...etc.
 to confirm what /device/partn/dir/file GRUB2 *CAN* access.
The 2019 July published script <How2 eg. fetch-for-installing
*.tcz for coreVer10.0 using TC64Ver7.2's Wifi facility> was
very valuable.
 
Let me now go to the new/problematic laptop to use the running
TC, to see the <grub.cfg word/s which I deleted from the
recommended entry, which has allowed TC to boot & run.

From: menuentry "core" - to give me "coreB" ,
 I've deleted: "quiet text tce=UUID=....."
 
PS. I've installed gpm & mc & LinuxNativeOberon gives a Frame-
Buffer-based GUI/text application.
12 times: `sudo openvt` gives 12 root-terminals, until `startx`
runs. And links is a killer-app; and links2 even does grafics
by FrameBuffer. Let's try that script to fetch it/them !!

Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: Rich on August 12, 2019, 01:24:31 PM
Hi labeas
  ... `uname -a` and `less /proc/cpuinfo` don't show me if I'm running 32 or 64 bit. ...
If  uname  says  VERSION-tinycore  it's 32 bit. if it says  VERSION-tinycore64  it's 64 bit.
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: PDP-8 on August 12, 2019, 10:02:38 PM
Another quickie way I found was that 32 bit runs with topside for the titlebar, and 64-bit defaults to the titlebars on the side.

Of course adding topside to 64 bit makes this a little less "visual" quickie. :)

But yeah, just run "uname" if you lose track like I do. :)
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: labeas on August 16, 2019, 05:14:18 AM
Use sequential/piping method, starting from working Model,
  to find STAGE/s of failure of Grub2Multi:UEFI project.
============ Working grub.cfg Entry ==
linux /boot/vmlinuz waitusb=10:UUID="bfe6116c-473a-4ee9-bbac-3638039dc9ad"
initrd /boot/rootfs.gz /boot/modules.gz
============= Failed grub.cfg Entry ==
linux /boot64/vmlinuzBigr waitusb=10:UUID="bfe6116c-473a-4ee9-bbac-3638039dc9ad"
initrd /boot64/rootfs64.gz /boot64/modules64.gz
=== Confirm SingleStepping working Model's parameters; using <manually boot> text.
-------------> the following is manually copied: <may have errors> !!
grub> deliberateError == can't find cmnd
grub> ls / == boot/ .... <no EFI ?!>
grub> ls /boot == ... vmlinuz  rootfs.gz  modules.gz
grub> linux /boot/vmlinuz == no Reply
grub> initrd /boot/rootfs.gz /boot/modules.gz == slight delay ? Action?
grub> boot == Thankyou ! = Usable TC.               $ version == 10.0
=== test SingleStepping failed entry's parameters; using <manually boot> text.
grub> ls / == boot/ .... <no EFI ?!>
grub> ls /boot64 == ... rootfs64.gz  vmlinuzBigr  modules64.gz
grub> linux /boot64/vmlinuzBigr ==  no Reply
grub> initrd /boot64/rootfs64.gz /boot64/modules64.gz == slight delay ? Action?
grub> boot == TC Logo, shows "modprobe...modprobe...modprobe
<"busy with 50 thread for more than 5 sec now... Failed to executeb /init>
      "Rebooting in 60 seconds"

---- previous post re. <manually boot> :
    Online coreplayer2
     * Quote
   To manually boot the kernel

   Code: [Select]          >   OWN results
   grub> ls /
   boot EFI                > boot/tce/ Set1 boot64/ MountSDcard
   grub> linux /boot/vmlinuz64 quiet
   grub> initrd /boot/corepure64.gz
   grub> boot
   Or

   Code: [Select]
   grub> linux (hd0,msdos1)/boot/vmlinuz64 quiet
   grub> initrd (hd0,msdos1)/boot/corepure64.gz
   grub> boot
=====
?! best not use "quiet" and WASTE all valuable debug info ?
TC's idea of building from an updating repository, causes the
MOVING TARGET PROBLEM. For serious work I must use my ver 7.2.
Q: are these sizes correct/compatible:
  vmlinuzBigr   4106416
  rootfs64.gz   3595754
  modules64.gz  6826959

AFAIR there was some inconsistency in the repository IMO.

==TIA
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: Rich on August 16, 2019, 08:15:29 AM
Hi Juanito
There's a small problem here:
http://tinycorelinux.net/10.x/x86_64/archive/10.0/distribution_files/
The  modules64  and  the  vmlinuz64  links (including the md5) are broken:
Code: [Select]
corepure64.gz                                      09-Jun-2019 12:39            10397440
corepure64.gz.md5.txt                              09-Jun-2019 12:39                  48
modules64.gz                                       09-Jun-2019 12:39                  52
modules64.gz.md5.txt                               09-Jun-2019 12:39                  60
rootfs64.gz                                        09-Jun-2019 12:39             3595754
rootfs64.gz.md5.txt                                09-Jun-2019 12:39                  46
vmlinuz64                                          09-Jun-2019 12:39                  49
vmlinuz64.md5.txt                                  09-Jun-2019 12:39                  57
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: Rich on August 16, 2019, 08:27:16 AM
Hi Juanito
Same broken links here:
http://tinycorelinux.net/8.x/x86_64/archive/8.1.1/distribution_files/
http://tinycorelinux.net/8.x/x86_64/archive/8.2/distribution_files/
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: Rich on August 16, 2019, 08:46:10 AM
Hi labeas
....
Q: are these sizes correct/compatible:
  vmlinuzBigr   4106416
  rotofs64.gz   3595754
  modules64.gz  6826959

AFAIR there was some inconsistency in the repository IMO.

==TIA
The  rootfs64.gz  and  modules64.gz  both appear to be from TC10.0 x86_64. The  vmlinuzBigr  is from TC9.0 x86:
Code: [Select]
Index of /9.x/x86/release/distribution_files/
../
core.gz                                            19-Mar-2018 10:33             8730363
core.gz.md5.txt                                    19-Mar-2018 10:33                  42
modules.gz                                         27-Feb-2018 07:19             6000561
modules.gz.md5.txt                                 27-Feb-2018 07:19                  45
modules64.gz                                       27-Feb-2018 07:19             6448695
modules64.gz.md5.txt                               27-Feb-2018 07:19                  47
rootfs.gz                                          19-Mar-2018 10:33             2763805
rootfs.gz.md5.txt                                  19-Mar-2018 10:33                  44
vmlinuz                                            27-Feb-2018 07:19             4106416  <--------------
vmlinuz.md5.txt                                    27-Feb-2018 07:19                  42
vmlinuz64                                          27-Feb-2018 07:19             4491536
vmlinuz64.md5.txt                                  27-Feb-2018 07:19                  44
So  vmlinuzBigr  is the wrong version and it's the wrong architecture.

Try reading Juanitos instructions again:
http://forum.tinycorelinux.net/index.php/topic,22999.msg144515.html#msg144515
This way you only have 2 files to deal with (corepure64.gz == rootfs64.gz  + modules64.gz).
You can find them here:
http://tinycorelinux.net/10.x/x86_64/release/distribution_files/
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: Juanito on August 17, 2019, 01:00:33 AM
Same broken links here:
http://tinycorelinux.net/8.x/x86_64/archive/8.1.1/distribution_files/
http://tinycorelinux.net/8.x/x86_64/archive/8.2/distribution_files/

'should be OK now - thanks
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: Juanito on August 17, 2019, 01:02:01 AM
There's a small problem here:
http://tinycorelinux.net/10.x/x86_64/archive/10.0/distribution_files/
The  modules64  and  the  vmlinuz64  links (including the md5) are broken:

'hopefully fixed
Title: Re: GRUB 2 always starts in command line - can't proceed - EFI Boot
Post by: coreplayer2 on August 17, 2019, 11:46:33 AM
@ labeas

After correctly downloading and installing matching kernel and TC-10 files;  For a full diagnostic, please post the full and unedited results of these commands:

Code: [Select]
ls -l /mnt/sd*
Code: [Select]
fdisk -l | grep sd
Code: [Select]
dmesg | grep sd
Code: [Select]
blkid | grep sd