WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved} Grub2 does not load grub.cfg automatically  (Read 9277 times)

aus9

  • Guest
Re: Grub2 does not load grub.cfg automatically
« Reply #15 on: May 24, 2020, 03:04:53 AM »
Sashank999

I am still guessing your grub.cfg is as shown post one.
Does this file exist in multiple locations when you try to run grub-install command?
I am guessing you did not put a copy under /boot/grub or /boot?

2) I am guessing you have read the core concepts and have chosen to remain cloud mode
http://tinycorelinux.net/concepts.html
so staying with 32 bit TCEs might still be best.

Some of us, have less fast internet and tend to have persistent tcedir.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 388
Re: Grub2 does not load grub.cfg automatically
« Reply #16 on: May 24, 2020, 10:34:20 PM »
Sashank999

I am still guessing your grub.cfg is as shown post one.
Does this file exist in multiple locations when you try to run grub-install command?
I am guessing you did not put a copy under /boot/grub or /boot?

2) I am guessing you have read the core concepts and have chosen to remain cloud mode
http://tinycorelinux.net/concepts.html
so staying with 32 bit TCEs might still be best.

Some of us, have less fast internet and tend to have persistent tcedir.
Hi aus9
Yes, my grub.cfg is still as in post #1.
No. The grub.cfg file is deleted. Whole grub folder (/tce/boot/grub) is deleted. As I have internet, I copied and pasted the code as in post #1.
No, I put a copy of grub.cfg in /tce/boot/grub.
I do not understand the modes and that stuff. I just mounted my USB Drive with TCL (by YUMI Installer) and clicked on tce-install-GUI . After that, in a live TCL session from USB, I installed GRUB v2.02 from App Browser and ran the grub-install command as said in post #1.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 388
Re: Grub2 does not load grub.cfg automatically
« Reply #17 on: May 27, 2020, 10:14:29 PM »
Hello Admins ! ;D
Finally, I got the solution for the problem.
This time I tried it uniquely. Today, I removed the grub folders again and did
Code: [Select]
sudo grub-install --boot-directory=/mnt/sda5/boot /dev/sda5
Where, my TCL Partition was /dev/sda5 and /mnt/sda5 is the mountpoint of my TCL Partition. But, the directory /mnt/sda5/boot was a non-existent directory.
In my previous post, I said that the grub was reading grub.cfg from a folder inside /tce/boot/grub whereas the modules were being loaded from /boot(beside tce directory in that partition)/grub . I have read somewhere that TCL would run from a single directory but may cause problems due to boot directory in tce.
So, this time, I selected a non-existent boot directory which is beside tce ( not inside tce).
And, created a grub.cfg and added
Code: [Select]
menuentry "Tiny Core" {
root=(hd0,msdos5)
linux /tce/boot/vmlinuz quiet
initrd /tce/boot/core.gz
It works like a charm !  :D ;D ;) 8) :)
Note : I also request the admins to update the installation page of TCL and make the wiki accessible too.

aus9

  • Guest
Re: Grub2 does not load grub.cfg automatically
« Reply #18 on: May 27, 2020, 10:43:08 PM »
I did not want to reply to your previous, but now I can not hold back any longer.

where exactly is your current grub.cfg...please show the full pathway from

Code: [Select]
sudo find /mnt -name grub.cfg
2) If I understand you currently, you are claiming grub installs into the Partition Boot Record of sda5 pointing to a dir that does not exist.....and on reboot....your menu appears and you can boot it.

3) Your grub.cfg seems to have changed slightly from post 1. Does that mean it no longer works from post 1?

And....I am gobsmacked your setup works.....I must try that out for my sda3 when I get time.
Normally.....grub2 is told.....set root=(hd0,5)  .....to look for the balance of the grub2 files at first drive fifth partition
and normally expects to find either
/boot  or
/grub as the directories and not /tce.

so I am still gobsmacked

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 388
Re: Grub2 does not load grub.cfg automatically
« Reply #19 on: May 28, 2020, 01:44:10 AM »
I did not want to reply to your previous, but now I can not hold back any longer.

where exactly is your current grub.cfg...please show the full pathway from

Code: [Select]
sudo find /mnt -name grub.cfg
2) If I understand you currently, you are claiming grub installs into the Partition Boot Record of sda5 pointing to a dir that does not exist.....and on reboot....your menu appears and you can boot it.

3) Your grub.cfg seems to have changed slightly from post 1. Does that mean it no longer works from post 1?

And....I am gobsmacked your setup works.....I must try that out for my sda3 when I get time.
Normally.....grub2 is told.....set root=(hd0,5)  .....to look for the balance of the grub2 files at first drive fifth partition
and normally expects to find either
/boot  or
/grub as the directories and not /tce.

so I am still gobsmacked
Ok. Now, I am slowly understanding GRUB2. GRUB2 (according to me) is an overlay over the GRUB4DOS. It boots GRUB2 when the overlay GRUB2 files are available in boot directory and it boots GRUB4DOS when those files are not available. I saw somewhere on the web saying that by default, GRUB2 looks for its own files in (hdX,Y)/boot/grub. And hence, I think this works.
1) My grub.cfg is here (copied as it is from command you said)
sudo find /mnt -name grub.cfg
2)I think there is some confusion. I made the grub-install point to that non-existent directory. Then, the grub created that grub directory itself.
I don't think the --boot-directory option of grub-install. From help of grub-install :
Code: [Select]
--boot-directory=DIR   install GRUB images under the directory DIR/grub
                                instead of the boot/grub directory
And hence I typed --boot-directory=/mnt/sda5/boot .
3) Yes. The post #1 is made for GRUB4DOS and I made it coz I saw GRUB4DOS name above the grub console. It doesn't work for GRUB2. Now, as GRUB2 was booting fine, I changed the "kernel" command as "linux" and the "root" command as a variable. The commands "kernel" and "root" do not exist in GRUB2.

aus9

  • Guest
Re: Grub2 does not load grub.cfg automatically
« Reply #20 on: May 28, 2020, 05:40:23 AM »
Sashank999
copy and paste your results to this command please
Code: [Select]
sudo find / -name grub.cfg
I have changed the command because your reply does not make any sense to me.
I am looking for your full pathway to your file. I hope that is now clearer.

I am unwilling to install grub4dos and instead will attempt to duplicate whatever I think you are doing using only grub2. I hope that is now clearer.

thanks

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 388
Re: Grub2 does not load grub.cfg automatically
« Reply #21 on: May 29, 2020, 09:15:39 PM »
The full result of that command is
Code: [Select]
/mnt/sda5/boot/grub/grub.cfgFor the before post, answering your command, I actually copied it from terminal and pasted in Firefox. I now realised that it doesn't work like that. It is just the same command. Sorry.
Now, it is the result.
Sorry for the late reply. I had my internet connection cut.
« Last Edit: May 29, 2020, 09:19:31 PM by Sashank999 »

aus9

  • Guest
Re: Grub2 does not load grub.cfg automatically
« Reply #22 on: May 30, 2020, 12:24:12 AM »
no worries.

Are you now able to say:
you have grub4dos and grub2
your current setup is a success
you would like this post to be marked as solved?

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 388
Re: Grub2 does not load grub.cfg automatically
« Reply #23 on: May 30, 2020, 12:27:54 AM »
No. I only have grub2 and no grub4dos.
My current setup is a success. ;D
Yes. This post can be marked as solved  ;D .
Additionally, I request the TCL makers or updaters to provide a guide for successful installation of grub2 on TCL.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: [Solved} Grub2 does not load grub.cfg automatically
« Reply #24 on: May 30, 2020, 05:21:30 AM »
Hi Sashank999
... Yes. This post can be marked as solved  ;D ...
Done.

aus9

  • Guest
Re: [Solved} Grub2 does not load grub.cfg automatically
« Reply #25 on: May 30, 2020, 08:41:02 PM »
Hi
Quote
I only have grub2 and no grub4dos.
so your earlier remarks you saw grub4dos.....no longer apply?
Then you have successfully installed grub2 into the PBR of /dev/sda5

I have no experience of using grub4dos

Quote
Additionally, I request the TCL makers or updaters to provide a guide for successful installation of grub2 on TCL.

There are some issues with current wiki, this is a known issue. There are these forum posts, in addition to the wiki entries

http://forum.tinycorelinux.net/index.php/topic,19364.0.html

alternative guide
http://forum.tinycorelinux.net/index.php?action=post;quote=143377;topic=22848.30;last_msg=146885

In addition, altho I do not use it....I believe the coreplus iso that will boot you into a 32 bit OS has an installer.

I think you are actually asking for something more like
"how do I keep Windows bootloader, and chainload to grub2 in a specific partition?"
but you have already confirmed you have that working.

Also you may like to read coreplayer2 assessment of bios makes
http://forum.tinycorelinux.net/index.php?action=post;quote=143186;topic=22848.15;last_msg=146885

cheers


Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 388
Re: [Solved} Grub2 does not load grub.cfg automatically
« Reply #26 on: May 31, 2020, 01:20:44 AM »
Yes. The GRUB4DOS is no longer visible. And I have working GRUB2 !
Cheers !