Forcing grub to install in it's fallback directory with a LiveUSB!!
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
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.
Forcing grub to install in it's fallback directory with a LiveUSB!!
So being as I am NOT a fan of Microsoft or ANY of it's products so when I was given a Laptop with Windows 10 installed my first thought was to trash it and install Linux.
I tried over and over in MANY different ways to get Linux to install, but they failed every time. One I could see as an input error or just plain human error, but 30 times and I'm diagnosing hardware issues (More thinking those are my issues as I have very little knowledge to diagnose anything and I know it)
I researched the issue to death and was finally made aware that my computer was "Forcing" the Linux software to look for GRUB in the SECONDARY Grub-Install whereas it was installed in the primary location therein causing Linux to fail every time I tried... Fortunately for me this knowledge came with a solution of installing Endless OS as it installs Grub into it's secondary or fallback directory as a default.
I installed Endless OS and succeeded in getting Microsoft to go away, but Endless OS is a Fedora Based Operating system and for more than a decade I've been using Debian based Systems. Being as they are both Linux they are close enough not to be too much an issue to learn and still keeps me from using a Microsoft product as an Operating System so on a scale of 1 to 10 my issues went from a 22 to a 4 so other than a personal project I can weed through all the Microsoft solutions I am NEVER going to even try as I would see that as a step in the wrong direction.
So as explaining my issue and putting it in the title will be seen as a "Rant" with no Question...
HOW DO I GET GRUB TO INSTALL INTO IT'S SECONDARY/FALLBACK DIRECTORY? WHERE IS THAT SECONDARY INSTALLATION DIRECTORY? IS THERE A DEBIAN BASED DISTRIBUTION THAT I CAN INSTALL BECAUSE IT INSTALLS INTO SAID DIRECTORY THAT ANYONE KNOWS OF?
Three questions and NONE of them are opinions and all of them address a problem that Endless OS seems to have found enough of a niche to develop a software to exploit so maybe someone else thought to be an idea, but used Debian Systems to design theirs giving people an option to see if Linux is their problem or their computer is and NOT HAVE a two week timeframe where they have 0 information as to how to do it with their computer if this becomes an issue for them.
Last edited by WinterStreet; 06-22-2022 at 10:37 PM.
For some-one who claims over a decade experience, this reads as yet another example of the xyproblem.
Show us some real data rather than diatribe - either the report from bootinfoscript or the one from boot-repair. From a liveCD is fine if you can't get an overlay for Endless.
Which directories are those?
Which is grub's primary install directory?
Which is grub's "SECONDARY/FALLBACK" directory?
Quote:
Originally Posted by WinterStreet
So being as I am NOT a fan of Microsoft or ANY of it's products so when I was given a Laptop with Windows 10 installed my first thought was to trash it and install Linux.
I tried over and over in MANY different ways to get Linux to install, but they failed every time. One I could see as an input error or just plain human error, but 30 times and I'm diagnosing hardware issues (More thinking those are my issues as I have very little knowledge to diagnose anything and I know it)
I researched the issue to death and was finally made aware that my computer was "Forcing" the Linux software to look for GRUB in the SECONDARY Grub-Install whereas it was installed in the primary location therein causing Linux to fail every time I tried... Fortunately for me this knowledge came with a solution of installing Endless OS as it installs Grub into it's secondary or fallback directory as a default.
I installed Endless OS and succeeded in getting Microsoft to go away, but Endless OS is a Fedora Based Operating system and for more than a decade I've been using Debian based Systems. Being as they are both Linux they are close enough not to be too much an issue to learn and still keeps me from using a Microsoft product as an Operating System so on a scale of 1 to 10 my issues went from a 22 to a 4 so other than a personal project I can weed through all the Microsoft solutions I am NEVER going to even try as I would see that as a step in the wrong direction.
So as explaining my issue and putting it in the title will be seen as a "Rant" with no Question...
HOW DO I GET GRUB TO INSTALL INTO IT'S SECONDARY/FALLBACK DIRECTORY? WHERE IS THAT SECONDARY INSTALLATION DIRECTORY? IS THERE A DEBIAN BASED DISTRIBUTION THAT I CAN INSTALL BECAUSE IT INSTALLS INTO SAID DIRECTORY THAT ANYONE KNOWS OF?
Three questions and NONE of them are opinions and all of them address a problem that Endless OS seems to have found enough of a niche to develop a software to exploit so maybe someone else thought to be an idea, but used Debian Systems to design theirs giving people an option to see if Linux is their problem or their computer is and NOT HAVE a two week timeframe where they have 0 information as to how to do it with their computer if this becomes an issue for them.
For some-one who claims over a decade experience, this reads as yet another example of the xyproblem.
Show us some real data rather than diatribe - either the report from bootinfoscript or the one from boot-repair. From a liveCD is fine if you can't get an overlay for Endless.
If it is not broken I have no real reason to fix it so the fact that I have been installing Linux for a Decade and THIS time I run into issues... I have a basic understanding of the inner workings of Linux (enough to work Linux day to day). As to backups, I back up important items and an Operating System that I'm not comfortable with usually does not make the cut, but if it important to keep around a way to start over I do so as an undesirable situation is something to rectify and not hold on to.
Which directories are those?
Which is grub's primary install directory?
Which is grub's "SECONDARY/FALLBACK" directory?
These are all questions that I have no answer to the last being one of MY main questions so I do not understand the point of this? Other than to say You think my post is long-winded... If that is the point, I'm thinking your just upset because you cannot answer any of those questions to answer, but still want to spout off and be recognized because there was nothing to answer ANYTHING asked, so it is just to get noticed.
If the computer you have had windows 10 installed on it it was almost certainly a UEFI install. Do you know the difference between UEFI and Legacy/CSM? How old is this computer and what type is it (HP, Dell, Toshiba, Lenovo,etc.)?
On a Legacy install the OS you are installing which you want to be in charge of booting needs to install some Grub code in the MBR with most of the Grub files on the OS system partition. With a UEFI install, this is not done, some Grub boot code is installed on the EFI partition and most on the OS system partition. Do you have an EFI partition? Do you have a directory there for the Endless OS? Apparently you can boot it, correct?
Quote:
HOW DO I GET GRUB TO INSTALL INTO IT'S SECONDARY/FALLBACK DIRECTORY?
I've never heard of anything like this nor am I familiar with Endless OS. Could you post a link to the site where you got this information?
I only have two and half to three years of Linux experience. Still, one of the easiest things to do is wiping out the disk and install a different operating system on it. I could do that since day one.
Since you cannot answer the questions of post #3, how do you have ten years of experience?
Quote:
HOW DO I GET GRUB TO INSTALL INTO IT'S SECONDARY/FALLBACK DIRECTORY? WHERE IS THAT SECONDARY INSTALLATION DIRECTORY? IS THERE A DEBIAN BASED DISTRIBUTION THAT I CAN INSTALL BECAUSE IT INSTALLS INTO SAID DIRECTORY THAT ANYONE KNOWS OF?
How do know about these? Where did you find them? What part of the installation told you that? And as far as I know, any Linux distribution would install in the same way, or install as it is told to.
grub-install/grub2-install installs grub files in /boot/grub on debian based systems and /boot/grub2 on fedora based systems.
in legacy mode grub-install/grub2-install install grub boot code to the mbr of the drive, on uefi systems installs grubx64.efi file to /boot/efi/EFI/<distro directory> if the efi partition exist and is mounted. grub-mkconfig/update-grub generates the /boot/grub(2)/grub.cfg file that generates the grub menu seen at boot. /etc/default/grub and the files in /etc/grub.d/ are used to generate the /boot/grub(2)/grub.cfg. Some distros in uefi mode there is a /boot/efi/EFI/<distro directory>/grub.cfg that sets the grub prefix from the efi partition back to /boot/grub(2)/
Because of the versatility of grub there are exceptions to how grub-install works with the different distros
As far as grub packages go, Each distro packages grub differently
Last edited by colorpurple21859; 06-23-2022 at 02:38 PM.
Do you have an EFI partition? Do you have a directory there for the Endless OS? Apparently you can boot it, correct?
I've never heard of anything like this nor am I familiar with Endless OS. Could you post a link to the site where you got this information?
First off it is a Lenovo Ideapad 320 and as stated I have been installing Linux systems for a Decade so if it was as easy as booting Legacy it would be done and over with. I have tried 4 ways to Sunday to get them to install until I found this post and it sounds like you want to know rather than say do this and expect it to work so... https://bugs.launchpad.net/ubuntu/+s...r/+bug/1832282 This should have been in my initial posting as it probably explains my issue better than I can, but as no-one has asked as to where I got my information it had slipped my mind. ;P
Endless, unlike other distributions, copies their bootloader to the fallback location (EFI/BOOT/bootx64.efi) on the EFI partition. Other distributions don't do that because they don't want to fight with Windows for ownership of this fallback boot loader. And your laptop is one the few bad ones that always boots the fallback entry regardless of what is in the EFI variables.
This is your issue: And your laptop is one the few bad ones that always boots the fallback entry regardless of what is in the EFI variables. The fix is to copy EFI/<distro directory>/grubx64.efi to EFI/BOOT/bootx64.efi on the EFI partition. Have you attempted to go into the bios/firmware to change the default boot.
I have a hp that efibootmgr doesn't work to set the EFI default boot entry, however I can from within the bios/firmware setup menu.
Last edited by colorpurple21859; 06-23-2022 at 03:32 PM.
From your link
This is your issue: And your laptop is one the few bad ones that always boots the fallback entry regardless of what is in the EFI variables. The fix is to copy EFI/<distro directory>/grubx64.efi to EFI/BOOT/bootx64.efi on the EFI partition. Have you attempted to go into the bios/firmware to change the default boot.
I have a hp that efibootmgr doesn't work to set the EFI default boot entry, however I can from within the bios/firmware setup menu.
Been there, Done that... The LiveUSB seems to format the directory If I tell it to or not. Which is why I'm looking for a way to force the LiveUSB to do it within the install. As I have said Endless OS has found a way, but I would like to tweak that idea to my purposes so I am more comfortable and in the meantime I get to play around and figure things out.
I have been doing this for a Decade so I am familiar with the basics and THIS particular laptop is doing whatever it can to make sure Linux cannot be installed and I found a way to do so. Now I am looking for a Distro based on the Debian Distro or a way to alter the LiveUSB install to install the way this particular Laptop will allow me to force onto it.
With this Laptop normally doesn't work so you hear hoof-beats don't think Horses or Zebras, think the mules got loose from the petting zoo, what spooked them? Throw the box out (I know I sure did) .
Last edited by WinterStreet; 06-23-2022 at 07:32 PM.
Reason: Hit the mouse button and posted before I had completed it
but Endless OS is a Fedora Based Operating system and for more than a decade I've been using Debian based Systems. Being as they are both Linux they are close enough not to be too much an issue to learn
When it comes to the grub boot loader in uefi mode, fedora does things differently than debian
Quote:
The LiveUSB seems to format the directory If I tell it to or not.
explain this, a live usb won't touch a efi partition on it's own.
Last edited by colorpurple21859; 06-23-2022 at 07:02 PM.
When it comes to the grub boot loader in uefi mode, fedora does things differently than debian
This being said I may have a new one built by the time someone decides to build a Debian based system and as I have no rush to find a solution as getting Microsoft off the computer was a big deal to me and this is more housekeeping (Annoying, but the thought of NOT doing makes my skin crawl)
Quote:
Originally Posted by colorpurple21859
explain this, a live usb won't touch a efi partition on it's own.
Explain how a software that installs onto THOUSANDS of computers EVERY day fails to install on this Laptop. Installs fail every time because they don't do things the way they are SUPPOSED to be done. This is in my opinion is where the failure to communicate comes into play. The COMPUTER has a BUG that PREVENTS the install of Linux as it looks at the FALLBACK destination for the GRUB install that was installed in the primary location and if I install grub into what I think is the backup directory (Which either I have been misinformed or it gets formatted before the install happens.
Supposed to or not... There is my issue, my Laptop has a BUG that prevents any NORMAL installation of Linux and I'm hopeful that Debian systems can handle the install, but if not it is not the end of the world. This was a computer that someone else didn't want for whatever reason (I'm guessing the Bug affects Windows somehow that made it inconvenient to keep and not just buy a new one). This is a project computer so No huge ramifications to taking my time and getting it the way I want.
Last edited by WinterStreet; 06-24-2022 at 01:24 AM.
This should have been in my initial posting as it probably explains my issue better than I can, but as no-one has asked as to where I got my information it had slipped my mind.
Yes, that link should have been in your initial post, thanks for posting it. You were asked where you got that information in posts 6 and 7.
The solution on that page is the same as the solution proposed in post 10. You indicate you have tried that already and it seems pretty bizarre that it didn't work so I guess the problem is with your computer. If Endless installs to that location, installing Debian and then copying/renaming its boot file as suggested to that location should work. So the solution on the page you linked doesn't actually work or at least not on some machines.
Quote:
Which is why I'm looking for a way to force the LiveUSB to do it within the install.
Based on the information you have posted, the Debian installer does not give you such options and I expect most other Linux systems would not give you that option. You would probably need to extract or loop mount the Endless iso file and search through it for the files related to the install of Grub and if you find them, extract/loop mount Debian and copy those files to the extracted Dbian and recreate the Debian iso. Hope you're up for a challenge and good luck.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.