[SOLVED] LFS Version 9.1, 8.4.3. Setting Up the GRUB Configuration
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As decribed in the book, that this problem can occur, as some files arent yet installed
Quote:
If the system has been booted using UEFI, grub-install will try to install files for the x86_64-efi target, but those files have not been installed in chapter 6. If this is the case, add --target i386-pc to the command above.
So the command
Code:
grub-install /dev/sda --target i386-pc
returns
Code:
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: error: embedding is not possible, but this is required for cross-disk install
My lfs is on my pendrive.
These are my partitions
after running lsblk
Code:
sdc 8:32 1 28.7G 0 disk
|-sdc1 8:33 1 100M 0 part
|-sdc2 8:34 1 12G 0 part /
`-sdc3 8:35 1 4G 0 part [SWAP]
The problem is that GRUB comes in two parts. The first part is just a stub which goes in the MBR. The second, which the stub points to, is a larger program that actually boots your system. On a traditional DOS disk, this goes into the gap between the MBR and the first partition.
If you have a GPT disk, this gap will not be present, so you need a small BIOS boot partition as sda1 and GRUB will go there. This is a special type of partition on which you have no filesystem. It is not the same as the boot partition that the Book recommends as a location for kernels and initrds in multi-booting machines, which is a normal filesystem partition.
Hello Sir,
i already have linux installed on sda1,
i have actually dual booted ubuntu and another ubuntu(but with minimal installation, for working with lfs).
and it already has grub installed.
so you are telling me that i should make a new Bios BOOT partition and then it will work!!
using command lsblk
Yes, that's a GPT disk. But if you already have GRUB installed, it would be better to add LFS to it. The Book points out that installing GRUB afresh from LFS is not necessarily what you want to do in a multiboot situation.
If you have Ubuntu, you will have the complete set of Debian GRUB scripts in /etc/grub.d. There are a couple of "custom" scripts, if I remember correctly, that you can edit to add further systems for GRUB to recognise and boot. In your place, I would go down that route.
I haven't used GRUB for years. I don't even use it for LFS, where it is recommended. But I found this by googling. Which you could have done too by the way!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.