Post install Grub on separate partition

Good evening guys,

Morning (for me) Mike, I love that Tux penguin avatar :)
THX @wizardfromoz

So I have executed the sudo update-grub command as suggested from @stan, but the grub boot loader menu still doen't appear at Ubuntu startup :(. The reason is as @stan wrote, that because of separate partitions of Ubuntu and Windows GRUB does not recognize Windows when it is installed on the boot partition of the second disc (/dev/sdb). So I believe as mentioned before that I have to add the Windows partition to the GRUB loader but I don't know how to do that. Can you tell me which operations I should execute to do this (if that is possible)?. The output of the update-grub command is:

SCREENSHOT 1 - GRUB-UPDATE OUTPUT
Selection_007.png
 


The reason is as @stan wrote, that because of separate partitions of Ubuntu and Windows GRUB does not recognize Windows when it is installed on the boot partition of the second disc (/dev/sdb).
Good morning, Mike (morning here is US). I'm sorry that sudo update-grub did not work. Well, neither did UEFI for you, when it should. These things are frustrating. But my install DID put Windows on the GRUB menu right away, as expected, but it did not put the #2 hard drive first in the BIOS boot order. That I had to do manually.

Different brand computers (vastly different ages), different UEFI/BIOS, even different drive types, HDD versus SSD. Any of these might explain it, or something else altogether. I am very curious about your response to update-grub that shows, "Adding boot menu entry for EFI firmware configuration" when you say you have UEFI disabled. I wonder if that is a clue for us? It used to be a problem trying to mix UEFI and Legacy operating systems together in dual boot, but maybe that is no longer relevant.

I'll go look about for info on manually adding Windows to GRUB. I'll also look about for other bootloader options. Maybe something will show an easier path for you. And if no one mentioned it before, please be sure that any data that is critically important to you is backed up on a flash drive or DVD from both your Windows and Ubuntu partitions. It's frustrating when you have to reinstall an OS, but it can be devastating if important files are lost (says the voice of experience). Messing with GRUB and boot options are dangerous (again says the voice of experience). :oops::eek:

In the meantime, if you want to see how to force the GRUB menu to appear (and how to make it permanent), take at look at this article. It's very old, but I think that it still applies.
 
I am very curious about your response to update-grub that shows, "Adding boot menu entry for EFI firmware configuration" when you say you have UEFI disabled. I wonder if that is a clue for us?
Still wondering about this. Your Linux screenshot (post #9) definitely indicates that Ubuntu is installed as a UEFI system, using a FAT32 ESP (EFI System Partition) on your #2 drive, /dev/sdb2. But it also shows that this drive is a msdos partition, and UEFI installs are usually done on GPT instead.

Echoing the Wizard, nice work with the screenshots... those are a great help. :)
 
One more thing. Definitely try to force your GRUB menu to show. Maybe Windows is there already? That would be nice, if it is (and if it works). Then you would only need to make the menu show permanently, and make the #2 drive the first in the boot order.
 
If you have forced the GRUB menu to appear and Windows is not there, then I might suggest Grub Customizer as a possible solution. Install instructions for Ubuntu 20.04 are here but it should be the same for 18.04. This app does not always work for everyone either, so your mileage may vary.

Maybe @wizardfromoz will be awake soon and have some other ideas. I am still concerned about the possibility that you may have a conflict due to Ubuntu being installed as UEFI and Windows is not. This may be the source of all of the trouble.
 
Hi guys,

Echoing the Wizard, nice work with the screenshots... those are a great help. :)
There is an idiom in German which says that a picture says more than 1000 words :).

I'll go look about for info on manually adding Windows to GRUB. I'll also look about for other bootloader options.
Thank you very much @stan.

I did a really stupid setting and that was the reason why the Grub menu did not appear at startup (these newbies). I did set the GRUB_TIMEOUT_STYLE=hidden and GRUB_TIMEOUT=0. I have changed this to menu and 5 seconds as shown in the following screenshot and the Grub bootloader now appears, wola :). Nevertheless, windows as an entry does not appear (only Ubuntu and advanced settings are shown as entries) in the GRUB boot loader menu.

SCREENSHOT 1- SUDO NANO /ETC/DEFAULT/GRUB OUTPUT
Selection_009.png


As a second step I installed and executed (issuing grub-customizer) the grub customizer as suggested by @stan (it works with 18.04.). Installation steps were:

Code:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

After running the customizer app I got this output which didn't recognize windows again :(. Because I am not sure what to do from this point, I have decided to post at first here and get some help from you guys :). My question is how can I add the windows 10 entry from here (is this possible by the way?). By the way there is an entry in the Grub customizer file -> install to MBR... which when chosen shows Device: /dev/sda. This is my windows partition should I install it there?.

SCREENSHOT 2 - GRUB CUSTOMIZER OUTPUT
Selection_010.png

EDIT: What about these solutions I have searched a little bit before I go to bed:
solution for windows 10 missing from grub menu
Ubuntu – Add Windows 10 to GRUB OS list
Quickly Add Windows 10 to Grub Menu After Installing Ubuntu

Greetings and THX guys (now it is here 23:30)
 
Last edited:
Still wondering about this. Your Linux screenshot (post #9) definitely indicates that Ubuntu is installed as a UEFI system, using a FAT32 ESP (EFI System Partition) on your #2 drive, /dev/sdb2. But it also shows that this drive is a msdos partition, and UEFI installs are usually done on GPT instead.

Echoing the Wizard, nice work with the screenshots... those are a great help. :)
That is a good question, but I don't know why :(.
 
Get a good sleep and I have an idea for you to try on your tomorrow.

I'm off for more coffee, waking up, and then I'll get cracking.

Cheers

Wiz
 
This article seems to describe your exact situation and offers a solution. If you re-enable UEFI, as the article suggests, you may also need to boot Ubuntu and run sudo update-grub again. Or even before update-grub, you might try to run sudo os-prober to see if Windows is detected. If yes, then update-grub will likely work, and you could proceed to make your #2 drive the first in the boot order.

But Chris may have more and/or better ideas. (He usually does!) :)
 
Last edited:
and the Grub bootloader now appears

and

windows as an entry does not appear (only Ubuntu and advanced settings are shown as entries) in the GRUB boot loader menu.

Mike, it's that second one which may fix the issue.

Step 1. Click on Advanced Options, and a number of lines should be shown, all of them featuring the kernel version being used (numeric string).

One of those lines should have (Recovery Mode) at the end.

2. Press Enter at that line, and you will be presented with a graphical menu that will feature a number of lines.

At or near the bottom will be one reading

Drop to root shell prompt.

3. Scroll/arrow down to that line so that is highlighted and press Enter.

An amount of output will scroll down the screen and when it is finished you will be presented with:

Press Enter for maintenance:
(or press Control-D to continue)

4. Press Enter and you will be at a prompt that says something like:

root@ubuntu:~#

The hash (#) means that you do not need to preface commands with sudo because you are Root.

The next things is to check where we are at. (In the following, where I list a hash, it is my comment, not to be typed)

5. First type and Enter

Code:
lsblk

# that's l for Lima, s for Sierra, b for Bravo, l for Lima again, k for Kilo

that will list the partitions on both of your SSDs.

Look for the drive that features a / (forward slash) at the end, and that is the drive we want.

The entry with the / may be /dev/sdb5 from your previous screenshots from GParted, and there may be a line which reads at the end /boot/efi, which may be /dev/sdb2 from the screenshot.

We won't worry about the partition numbers, only the device (drive), which is /dev/sdb.

6. Next type and Enter

Code:
grub-install /dev/sdb

It may take a few seconds, but at the end, hopefully output will read that it is successful with no errors.

7. If that is so, then type in and Enter

Code:
update-grub

If that goes OK, your Grub Menu will be reconfigured.

8. When that finishes, type and Enter

Code:
reboot

Your computer will reboot.

I hope that you will be presented with a Grub Menu which now features Windows, if so, it will be listed as something like

Windows Boot Manager.

Let us know how you go.

Cheers

Wizard

See how you go.
 
This article seems to describe your exact situation and offers a solution.

That is a really good find, stan, nice one :)

If the above goes belly up, it is very much worth a shot.

Cheers and out for now
 
Hi guys, before I go to bed I did try the guide of @wizardfromoz but the problem still remains (no windows entry shown in boot menu).

I have done all the above steps mentioned by @wizardfromoz but the problem could not be fixed :(. I have provided a screenshot to show the steps I did to get until the reboot step. The only issue I got was that the GUID Partition Table Header... but because at the end the output showed Installation finished. No error reported I did not recognize that as a fault.

SCREENSHOT 1 - ISSUING ALL THE COMMANDS IN RECOVERY MODE
01.jpg


I have also provided a screenshot of my UEFI bios where two entries are shown for the Ubuntu SSD one as UEFI ( UEFI OS (P10: Samsung SSD 860 EVO) ) and one as normal. Nevertheless, I have checked to boot with both settings but the same behavior remains.

SCREENSHOT 2 - UEFI BIOS DRIVE LIST AND BOOT ORDER
02.jpg


For the second solution mentioned by @stan based on this article
Apologies, it seems I expected too much from Microsoft. Even though I installed Windows within the last year and just expected it installed as UEFI, it was installed as BIOS and Ubuntu was installed as UEFI. Just converted Windows# to UEFI and it seems to work fine.
I am not sure if I lose any of my data, that's because I run Acronis true image first to be sure to take a snapshot of my SSD windows disc. I also do not know how to convert the windows partition to UEFI.

By the way, thank you very much guys for supporting me to fix the issue :).
 
Last edited:
I also do not know how to convert the windows partition to UEFI.
Do not attempt to change your "msdos" partition table to "gpt" on either of your drives. That will guarantee losing data and require reformatting. I think that the errors you show (GUID Partition Table Header signature is wrong) is due to the Ubuntu UEFI install is on a "msdos" partition table. Yet it works, so I'd not change that until you are ready to erase that drive and install Ubuntu 20.04.

What I am hoping for is that in your BIOS/UEFI settings that you can enable UEFI again. You said in post #9 that you had disabled it so that Ubuntu would boot. Changing back and forth to enable and disable UEFI should not kill either system, but it is possible that it will return you to the problem of Ubuntu not booting. If it does, then disable it again... but you may be stuck using your BIOS boot menu to switch between your OS'es until you can take the time to start over and install one (or both) OS'es correctly. If you re-enable UEFI, and if Ubuntu will still boot from the BIOS boot menu, then run sudo os-prober and sudo update-grub and see what happens. Both os-prober and update-grub should give an output indicating if Windows is seen.

Let's be sure we are not confusing UEFI with Secure Boot. Both Windows and Ubuntu should both work with, or without, Secure Boot enabled. But that is not your problem, from what I can tell. If Secure Boot is off, leave it off. It seems to me that it is a mismatch trying to use GRUB to boot both a UEFI and a non-UEFI system. Your BIOS boot menu doesn't care... it sees 2 hard drives, and each has a distinct viable bootloader, and it boots them. GRUB will usually boot Windows with no trouble, but because you are having these problems, I don't think even manually adding Windows information to the GRUB configuration will help (though I am certainly open to correction).

In your screenshot, it does seems that Ubuntu (not GRUB) "sees" the Windows drive as nvme0n1, with a p1 and p2 partition. But you've indicated that you want these drives to be "isolated" from one another, so for that reason you should not try to put GRUB on that drive. And because of this mismatch, I'm not sure that it would work anyway. Wizard may have better ideas on this. I'm confused why one SSD shows as /dev/sdb with standard Linux identification but the other drives shows as nvme. Maybe nvme is standard too, but my current SSD is /dev/sda. Usually, your Windows drive would be /dev/sda... but the screenshot looks like that might be a 4 TB backup drive? If that is an external hard drive, you might also try unplugging it while doing all this troubleshooting.
 
Last edited:
@stan , do you think there is anything to be said for checking in the BIOS that Raid is not set, or if so, then

System Configuration -> SATA Operation -> Choose AHCI

Other than that, I am leaning towards Mike going into Windows Disk Management and deleting the Linux Partitions from there, then flip back to UEFI with his Windows and reboot, and we can take a look at the installation of Linux again from scratch under UEFI conditions and troubleshoot any errors from there.

There is also the possibility of Mike being able to swap the 2 SSD to each other's housing, to restore the usual order.

Other than that, I am drawing a bit of a blank.

Cheers

Wizard
BTW You have been very patient with us, thank you. :)
 
BTW You have been very patient with us, thank you. :)
@wizardfromoz: This is good cooperation. BTW you are also patient with me :).

Do not attempt to change your "msdos" partition table to "gpt" on either of your drives. That will guarantee losing data and require reformatting. I think that the errors you show (GUID Partition Table Header signature is wrong) is due to the Ubuntu UEFI install is on a "msdos" partition table. Yet it works, so I'd not change that until you are ready to erase that drive and install Ubuntu 20.04.
Ok, guys, I have decided to get rid of Ubuntu 18.04. version and install 20.04. LTS (maybe today in the afternoon) now to bypass all these GRUB problems. But before I would like to ask you how should I proceed to execute all steps right (if you don't mind), like how to partition to UEFI, etc. I also want to install only the necessary partitions like @stan mentioned in [#post14].

Greetings from Greece :).
 
Good evening to you, Mike (as Wizard sleeps down under). It is about 10:00am here near Chicago. We are quite spread out across the globe! :)

You can get your Ubuntu 20.04 USB flash drive ready, but don't rush to install it. There may be more kinks to work out as we go, and the time zone differences will make many delays. Chris may prefer that you start a new thread for this change in direction as it might be easier for future readers to find a thread that is specific to installing Linux to a 2nd hard drive.

Take note of his remarks above and check your UEFI/BIOS settings to be sure that:
1. No RAID configuration is enabled
2. SATA controller setting is AHCI
3. (My addition) Check if you have a "TPM" or other type of "Trusted Platform" or other security modules enabled. Not necessary to disable it at this time, and probably will not.

I will describe what in my mind would be "ideal"... but I know that you may not go this far. That's okay. I might not go that far either. If your 4TB backup drive is internal, we can probably work around it (unless Chris thinks otherwise)... but if it is USB, then definitely unplug it to minimize confusion.

In an ideal world (and with backup drive removed)....

#1. I would start with only one SSD installed (and plugged into Drive 0 on your motherboard, if you can determine that). I would make UEFI/BIOS settings so that UEFI is enabled (Legacy disabled, also sometimes called "BIOS Mode" or "CSM" - Compatibility Support Module) and I would enable Secure Boot. I would boot the Ubuntu USB flash drive and use GParted to make this first SSD a "GPT" drive (GUID Partition Table) but I would not format it with GParted, just leaving it as unallocated space. GParted should identify this drive as /dev/sda. Installing Windows 10 now will format and partition the SSD as it should be for UEFI. Let Windows get any needed updates.

GPT and UEFI are the modern methods. MBR (msdos) and BIOS are very, very old (like Chris and me ;)). Obviously Windows 10 would prefer modern methods. Some Linux distros are falling behind, but Ubuntu is also very modern and should be able to use UEFI and Secure Boot. I'd only disable them if absolutely necessary. Your UEFI/BIOS settings (UEFI and Secure Boot both enabled) will apply to both hard drives.

Windows will probably create at least 3 partitions, and one or two small unallocated space areas. One of the partitions will be FAT32 and will hold your UEFI bootloader. With Windows 10 running properly, I would shut it down and remove (or disconnect) that drive.

#2. Then, install the 2nd SSD. Drive 0 on the motherboard is still okay, so you can use the same cable for now, or you can use the Drive 1 motherboard cable, either one. Booting up the Ubuntu 20.04 flash drive, I would run GParted to make sure that this drive is also set to GPT, and change it if necessary. Again, leave only unallocated space on the whole drive. Start the Ubuntu installation from the desktop icon. At the partitioning step, the best choice is to "use entire disk." With there being only one SSD installed, there is no confusion about where to put the GRUB bootloader. Probably all the default choices will work fine during the install. I never recommend new users to choose "LVM partitions" or to use any encryption that is offered. They are certainly useful, just not good for new users. With UEFI enabled, you will get two partitions: a FAT32 boot partition and an EXT4 Linux partition that contains everything it needs (including a swapfile that you don't see). When finished, reboot the new system and let it update.

#3. Add the Windows drive back in with the Drive 0 cable, if you can tell. If there is a BIOS boot hardware preference, it will be Drive 0, or it may recognize Windows and prefer that regardless. But as you will know, both of your drives will be very independently setup, and you will need your BIOS Boot Menu to select Ubuntu. This time, with any luck, you can run sudo os-prober and sudo update-grub and Windows will be recognized. Then you can make this drive first in your BIOS boot order and use GRUB will boot every time and allow you to choose between Ubuntu (which will be default) and Windows.

Now, in the real world, I doubt that you want to reinstall Windows. But just reading all of my description will give you food for thought in the future. And you can probably see all of my reasoning for these steps. But, remember.... stuff still goes wrong. Different computers, different UEFI, different SSD drives, or for whatever reason. Maybe you will need Secure Boot disabled, or other changes, to finally find success.

With that long summary, I'll pause so that maybe you can read it before your bedtime, and we can hope for Wizard's input on the next steps. You can try to enable UEFI in your BIOS settings to see if that will allow sudo os-prober and sudo update-grub to work. It still might offer you a bandaid solution while we look at your other options more carefully.
 
Hi guys,

Good evening to you, Mike (as Wizard sleeps down under). It is about 10:00am here near Chicago. We are quite spread out across the globe! :)
O yes, there are time differences until 11 hours. You in the US have less I know :).

You can get your Ubuntu 20.04 USB flash drive ready, but don't rush to install it. There may be more kinks to work out as we go, and the time zone differences will make many delays. Chris may prefer that you start a new thread for this change in direction as it might be easier for future readers to find a thread that is specific to installing Linux to a 2nd hard drive.
That is right when I will proceed in the future to install 20.04. (I have considered not to do it now) then I will open a new thread :) .

Take note of his remarks above and check your UEFI/BIOS settings to be sure that:
1. No RAID configuration is enabled
2. SATA controller setting is AHCI
3. (My addition) Check if you have a "TPM" or other type of "Trusted Platform" or other security modules enabled. Not necessary to disable it at this time, and probably will not.
I did all the steps and the options all as you wrote @stan.
SCREENSHOT 1 - UEFI BIOS STATA SETUP
01.jpg


Now, in the real world, I doubt that you want to reinstall Windows. But just reading all of my description will give you food for thought in the future. And you can probably see all of my reasoning for these steps. But, remember.... stuff still goes wrong. Different computers, different UEFI, different SSD drives, or for whatever reason. Maybe you will need Secure Boot disabled, or other changes, to finally find success.
Thank you for the detailed and long suggestion @stan, but to be honest, at this stage I will not proceed to exchange any hard drive and do all the mentioned (and awesome steps) because I want only to work both of these OS in parallel. If it is not possible with this config then I will leave it as it is and switch the os partitions in the bios.

BTW how can I merge the home partition and the / partition? Is it possible with the current configuration?.
 
Good morning from DownUnder - Mike you must be ready to hit the sack.

@stan 's submission is an excellent blueprint for how to proceed, but I understand your reluctance to get into moving the drives physically.

The migration of data and folder setup for the Home to a a home folder under / is very difficult at the moment, because of the MBR setup of /dev/sdb with what is known as the 4 Partition Rule, which is a limitation imposed on us by Microsoft, not by Linux, GPT would remedy that.

I have to go in and out this morning but will be stable after about 4 hours from now, and I will explain more at that time.

In the meantime, you may need to content yourself with the individual boots through your BIOS. :(

I am mindful of the fact that you have only about 10 GB left in Home, so we can look at the options on your tomorrow.

Cheers for now

Wizard
 
Hi guys, hope you are doing well :).

@stan 's submission is an excellent blueprint for how to proceed, but I understand your reluctance to get into moving the drives physically.
Yes, @stan has provided nice detailed instructions and I would like to thank you both again for the further support. Unfortunately, at present I have not much time to do a complete reinstall (I'm already behind with my work :( ), because I need a fully running Ubuntu OS for machine learning and computer vision tasks. That is why I will leave the OS as it is now and proceed in the future to reinstall it using the 20.04. LTS version (for which I will open a new thread then).

I am mindful of the fact that you have only about 10 GB left in Home, so we can look at the options on your tomorrow.
Me too but what should I do :(.

The migration of data and folder setup for the Home to a a home folder under / is very difficult at the moment, because of the MBR setup of /dev/sdb with what is known as the 4 Partition Rule, which is a limitation imposed on us by Microsoft, not by Linux, GPT would remedy that.
Oh these partition rules from MS, that's a reason to switch completely to Linux, but unfortunately there are many applications which are only running on windows and I don't know if all are supported via wine :(. Also, while I was trying to move the content from the /home partition to the /dev/sbd5 partition to gain more space (as shown in in post #9 the sbd5 has 420GB), I could not see and access this disc. Do you know why?. I have posted a screenshot to depict this problem (not even that yet):

SCREENSHOT 1 - SDB5 PARTITION NOT LISTED
Selection_001.png


BTW I got this message to update to LTS 20.04. while running 18.04 should I do this? Should I do it or not at present.

SCREENSHOT 2 - UPDATE MSG TO 20.04. LTS
Selection_002.png


Have a nice day guys (in USA the sun is coming up now :) )
 
BTW I got this message to update to LTS 20.04. while running 18.04 should I do this? Should I do it or not at present.

Absolutely not, at present. This would simply install a newer version of Ubuntu over the existing, cumbersome, partition structure that needs a substantial revision. Not harsh words, just fact :)

Me too but what should I do :(.

For this question, you really need to start a new Thread so that helpers can focus on the issue.

I would suggest to place it in General Linux, with a Subject Title such as

"Need Help to Grow or Enlarge Home Partition, on Ubuntu 18.04 under MBR"

I could not see and access this disc.

This question may or may not need a separate Thread, we'll know soon.

In the right hand pane, what do you get when you click Computer?

BTW have food shopping to do (mundane for a Wizard, but we have to eat, LOL) so in and out a bit this morning.

Wizard
 

Staff online


Top