[SOLVED] installed second hard drive - can't get grub menu to show both.
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.
installed second hard drive - can't get grub menu to show both.
I purchased a larger screen laptop (HP 17-e), and installed an SSD that I had in my other laptop. It booted and ran very well. but I wanted more hard drive space, so I installed another SSD in place of the optical drive. Now, it boots readily into the second hard drive (in the Optical position), but grub doesn't show the other drive at all Both drives are linux only and both already had working installations. I tried 'sudo update-grub' and it went through the motions, but did not find the other hard drive. 'lsblk' sees and identifies all drives and partitions.
How do I get grub.cfg to show both drives? Or lacking that, how can I get the Bios to show me a choice between them?
littlejoe5
Last edited by littlejoe5; 11-14-2018 at 12:36 PM.
Reason: spelling
Very interesting implementation of UEFI with two drives. Maybe we can all learn something from your setup.
First of all, you need to ensure that both drives are formatted using GPT (GUID partition table) with EFI partition on each one. In reality you should need only one EFI on either drive, but another EFI partition is just safe, in case one of the drives fail. Anyway, the EFI partition is quite small, so it doesn't matter that much.
Now, from your UEFI firmware settings (BIOS), we can see that the optical drive is first on the list for the UEFI boot order. So, it will boot the GRUB from the second SSD first. If you can access the other drive once you have booted in your OS, then try running
Code:
sudo grub-mkconfig -o $HOME/test_grub.cfg
If there are errors at the terminal, then please paste the errors here. Else, if the entries for the 1st SSD are still not present, then there are two ways to proceed:
(1.) Remove second SSD and make sure that GRUB from first SSD boots correctly. It will mean that the GRUB installed on the first SSD's EFI partition is correctly registered in the UEFI firmware settings. Then, put in second SSD and register this one's GRUB under another name and make sure it boots. Then, at boot, you can choose between the two "OS managers" by pressing something like F9 or F10. I don't know, you should look for these F keys.
(2.) Make the GRUB from second SSD chainload GRUB from first SSD. This sounds interesting but it is much more complicated to work out than (1.). So please try number 1 first. If (1.) doesn't work, then we can experiment a bit with this one and see if it actually works. I've never tried this. You should add an entry to the grub.cfg of the second SSD to boot the first one. The trick is in loading the root device:
Code:
menuentry 'GRUB on first SSD' {
set root='hd0,gpt1'
chainloader /EFI/GRUB/grubx64.efi
}
(1.) Remove second SSD and make sure that GRUB from first SSD boots correctly. It will mean that the GRUB installed on the first SSD's EFI partition is correctly registered in the UEFI firmware settings. Then, put in second SSD and register this one's GRUB under another name and make sure it boots. Then, at boot, you can choose between the two "OS managers" by pressing something like F9 or F10. I don't know, you should look for these F keys.
,
(
I kept trying here, and did something like what you suggested, but I didn't yet have your instructions. I'm going to keep them handy, because I want to do the same setup on another laptop that I have. I took a chance that might have been foolish, but it seems like I got away with it. Some directions on the internet (don't remember where) refered to the caddy for the second hard drive as being 'hot-swappable'. I had pulled the caddy out, and booted the machine on the internal hard drive. It had two versions of Linux on it, and windows seven. It booted into linuxmate 16. (linuxmate 18 was there, but would not boot, so I reinstalled it, and rebooted - into linuxmate 18 with no problem. So I shut down, and started the reboot process, and as soon as it started the process for linux, I inserted the caddy with the second hard drive. It booted properly into linuxmate 18, on the internal drive, so I ran the command to re-do the grub menu, and it picked up on the drive in the optical bay, so that I can boot into either position (internal or optical) from the grub menu. After booting into the drive in the optical position I ran the command again to update the grub menu, and it picked up the internal drive.
So whichever drive I boot into, will give me the choice. And whichever drive I am running can access the information on the other. I guess that's a degree of overkill, but I like it better than what it was.
I used a Strange way to approach it, and took a chance, I guess, on inserting the optical-position drive while it was running, but it worked out. Afterwords I read that the optical drive caddy can be inserted or taken out 'hot' provided the computer is set for that, and I really have no idea if that is the case.
Very interesting implementation of UEFI with two drives. Maybe we can all learn something from your setup.
This doesn't make sense as you can have as many disks as you have controllers and it doesn't make the "implementation of UEFI" any different. EFI variables can point to multiple disks and ESP partitions.
Last edited by tofino_surfer; 11-24-2018 at 12:49 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.