[SOLVED] GRUB gone after imaging Linux + Windows 10 to new larger SSD
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Doing this in advance is not necessary. When not letting it tell you how it will install, by selecting manual partitioning, you can explicitly direct it to reuse and reformat the root and swap partitions for the new installation. The screen on which you do so will look something like this whether you are installing in text mode or GUI mode.
Thank you.
Fired up a Live USB Mint 19, went into the advanced mode, couldn't find anything about reformatting the root and swap partitions so deleted them. Went ahead with the installation, got the following message early on:
"This machine's firmware has started the installer in UEFI mode but it looks like there may be existing operating systems already installed using "BIOS compatibility mode". If you continue to install Debian in UEFI mode, it might be difficult to reboot the machine into any BIOS-mode operating systems later. If you wish to install in UEFI mode and don't care about keeping the ability to boot one of the existing systems, you have the option to force that here. If you wish to keep the option to boot an existing operating system, you should choose NOT to force UEFI installation here".
Spooked by the "...don't care about keeping the ability to boot one of the existing systems..." I chose not to force UEFI installation. Installation procedure continued to what seemed to be a satisfactory conclusion and mentioned on the way that when I boot the machine the next time I would be able to choose which operating system to boot. However, at the end of the installation procedure when I restarted the machine there was no boot choice and it simply booted into Windows 10.
I can fire up the Mint system by going into the UEFI boot panel when starting the computer and choosing the fourth option on the boot menu (screenshot attached) but at the moment that is the only way to use the Mint system.
Bootinfoscript Results report attached. When I open it with Notepad it is an unformatted (i.e. incomprehensible) string of text. Does it need a special reader to make it legible ?
Last edited by pacman222; 12-24-2018 at 07:10 AM.
Reason: Added bootinfoscript Results report
I can fire up the Mint system by going into the UEFI boot panel when starting the computer and choosing the fourth option
Interesting. An EFI install requires a FAT32 formatted partition labelled as an EFI partition and you do not have that on any drive.
All your drives are Legacy and labelled as type: dos
The only sign of Grub in the MBR is on the drive you mention you are able to boot from, the original SSD which shows as sda in bootinfoscript.
You have two installations of Mint 19, one on sdb6 and one on sdc5. I expect that if you set the original SSD, the 256GB drive which shows as sda, to first boot priority in the BIOS rather than selecting it from boot options, it would boot one of the Mint installs, probably the last one although we have no idea on which drive/partition that is. There are no entries in either grub.cfg file (sdb6 or sdc5) for windows so if you are able to boot Mint, you would need to update Grub to include windows.
You have two installations of Mint 19, one on sdb6 and one on sdc5. I expect that if you set the original SSD, the 256GB drive which shows as sda, to first boot priority in the BIOS rather than selecting it from boot options, it would boot one of the Mint installs, probably the last one although we have no idea on which drive/partition that is.
Thank you.
I ran a Mint 19 installation but there was no indication that the installation had succeeded so I ran the installation again on the assumption that it would find the previous attempt and overwrite it. Clearly my assumption was wrong. Since I have no idea which of the two Mint 19 systems is which (unless Linux installations leave behind an installation-date-and-time-stamp in one of their folders) I'll just have to delete both and start over again. Or use Wubi, but I have no idea of Wubi's advantages/disadvantages/issues/pitfalls etc.
It seems to me that it would be a lot simpler to set the 238GB drive to first boot priority in the BIOS and see if it boots. It should boot one of the installs. The default for Grub is to install to the first drive MBR pointing to the partition on which the OS is installed. If your Mint boots, you can tell which partition it is on by running the command: df -h
It will show info as in the example below which shows the OS is on sda6.
Quote:
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 98G 45G 49G 48% /
Wubi has not been in development and has not been supported for years. I believe Ubuntu 12.04 was the last Ubuntu release which fully supported it. You would probably be better off using virtual software.
It seems to me that it would be a lot simpler to set the 238GB drive to first boot priority in the BIOS and see if it boots. It should boot one of the installs. The default for Grub is to install to the first drive MBR pointing to the partition on which the OS is installed. If your Mint boots, you can tell which partition it is on by running the command: df -h
Thanks for this rapid response.
I ran the fd -h command and got the attached response.
Quote:
Wubi has not been in development and has not been supported for years. I believe Ubuntu 12.04 was the last Ubuntu release which fully supported it. You would probably be better off using virtual software.
Your df -h output shows that the Mint system you booted is on sdb6. Not sure what the question/problem is now. If you have the first drive (sda) set to first boot priority in the BIOS, it should boot Mint. If you want to boot Mint from the drive it is installed on, boot it and open a terminal and install Grub to the MBR of that drive.
Code:
sudo grub-install /dev/sdb
If you want to try to add windows entries, try running: sudo update-grub to see if it outputs any info on windows. Probably best to do this before you try to install Grub to the MBR of sdb since you have windows partitions on that drive. I don't know if those ntfs partitions are an OS install or just data?
If you want, you should be able to format the other Mint partition on sdc5 to a Linux or windows filesystem from Mint on sdb6. Make sure sdc5 is not mounted when you do this.
My problem is that I have two installations of Linux Mint and no GRUB and I'm afraid of torpedoing my coexisting Windows 10 if I delete the wrong partition.
I'm now working on your suggestions here. Is there a Linux GUI partition manager which you can recommend and which can give me a visual overview of the Linux and Windows partitions ?
My problem is that I have two installations of Linux Mint and no GRUB
Did you look at the bootinfoscripts you posted? They both show Grub in the MBR of sda and both sdb6 and sdc5 show all the correct grub files including grub.cfg for your Mint installs. The df -h output you posted in post 36 shows that you booted the system on sdb6. GParted is a graphical partition manager and should be on the Mint install DVD/USB, just open a terminal and type: sudo gparted to open it. There is nothing in GParted that is going to show this any more clearly than the bootinfoscript output.
As mentioned in Posting #32 the bootinfoscripts I posted were incomprehensible to me because when I opened them in (Windows) Notepad or Libre Office they they were simply unformatted strings of text without line feeds or paragraphing. This morning I finally discovered that they have to be opened in Linux to be formatted readably. I had no idea that something as simple and universal as a .txt file might read differently in Windows and Linux.[/QUOTE]
Quote:
GParted is a graphical partition manager and should be on the Mint install DVD/USB, just open a terminal and type: sudo gparted to open it.
Thank you.
I'll now go off and study these sources.
I cannot say how much I appreciate your patience and persistence, and that of the other posters on this thread, in trying to help me. I'm busting a gut to try to help myself, even if that may not be apparent. I've used and valued Ubuntu and Mint for years as an end-user but this is the first time I've had to "go under the hood with wrenches and screwdrivers" and I'm obviously at the bottom end of the learning curve.
In an earlier post, you indicated the only way you could boot the installed Mint was to select it from the Boot Options, the 4th selection which is the Samsung drive which is /dev/sda. That makes sense since it is the only drive your output shows that has Linux (Grub) code in the MBR. The df -h output you posted shows that the OS (Mint) you booted is on sdb6. In post 32, you indicate that you deleted the Linux and swap partitions and re-installed Mint which now put Mint on sdb6 and the swap on sdb5.
So if you select the Samsung drive in the BIOS Boot Options and boot Mint and you once again run df -h and it shows /dev/sdb6, then that is the partition on which Mint is installed. Deleting the Linux partition on sdc should not be a problem. The problem is that for some reason, no windows entries show in grub.cfg. Generally, when Linux is installed, it will update the grub.cfg file and add entries for another OS such as windows which did not happen.
You have 3 drives with windows partitions, which one are you booting and which one(s) have a windows OS installed?
You have 3 drives with windows partitions, which one are you booting and which one(s) have a windows OS installed?
Thank you.
Gparted screenshots of the 3 physical drives on my PC attached.
Drive ATA Samsung SSD 840 ("Samsung" for short) is the one I boot from* to run Linux Mint 19. It is my old SSD which was replaced with the 512GB ATA KINGSTON SA400S3
Drive ATA KINGSTON SA400S3 ("Kingston" for short) is my new 512GB SSD and is the one I boot from* to run Windows 10. Windows 10 is installed on this drive (presumably /dev/sdc3).
Drive ATA WDC WD10EARX-22N ("Western Digital" or "WD" for short) is a 1TB drive that I installed originally with Windows to hold the Windows data. For some reason, when I installed Mint 19 the Mint installation hijacked half of this drive's space and installed itself there (/dev/sdb6). I had no choice about this as far as I could see. During the Mint installation process I wasn't given an option as to where to install it. I would have preferred it to install on the Samsung SSD drive (my old Windows system drive from which I had deleted the contents with a view to installing Linux on it). On my first abortive attempt at Mint installation it plonked it on the Kingston SSD drive and as far as I can see its corpse is still there (dev/sdc5).
* "...the one I boot from..." means the one I select from the hard drive boot list offered when I fire up the computer and enter the UEFI boot screen by pressing Delete. At the moment, because I have no GRUB menu on startup, I have to take this UEFI boot screen route each time on startup in order to tell it whether I want Linux or Windows.
Last edited by pacman222; 12-26-2018 at 11:33 AM.
Reason: Attached screenshots
Drive ATA Samsung SSD 840 ("Samsung" for short) is the one I boot from* to run Linux Mint 19.
That works because that is the only drive on which you have the Linux bootloader (Grub) installed in the MBR. Have you when booted into this Mint system, tired running sudo update-grub to create a new grub.cfg file and see if it creates an entry there for your windows install?
Quote:
Mint 19 the Mint installation hijacked half of this drive's space and installed itself there (/dev/sdb6)
In post 32, you indicate that you deleted the Linux partition (sdb5) and the swap partition (sdb6) and re-installed Mint which installed itself to that device simply reversing the partitions, The reason it did that is because that was the only unallocated space on any of your drives. Your other drives have ntfs filesystems on all partitions and Linux won't install to a windows filesystem partition.
Quote:
I had no choice about this as far as I could see
Yes, you did. It is called Something Else in Mint which is the manual installation method. If you did an auto-install option such as Install Alongside, it will install to the first unallocated space it finds which is what happened. If you want a specific install to a specific partition on a specific drive, you have to tell it where to install. If you want Mint on the Samsung drive (sda) the first thing you would need to do is to format the two partitions on that drive with a Linux filesystem such as ext4. You will need to select the Something Else manual install option and tell the installer you want Mint on that drive.
Your second install of Mint likely installed to sdc because there was unallocated space there.
Quote:
* "...the one I boot from..." means the one I select from the hard drive boot list offered when I fire up the computer and enter the UEFI boot screen by pressing Delete.
From the images in your earlier posts, that doesn't look like the UEFI boot screen but simply the BIOS boot options which is stated in the image you posted. You don't have any EFI installs, not even an EFI partition so you aren't booting anything EFI. When you select the Samsung drive in the boot options, you are using Grub. You should see a boot menu with Mint, Advanced options for Mint and another option for Mint on sdc. If you don't see that using the down arrow key on the keyboard, that would be unusual since they show in the grub.cfg file for the boot menu.
The current setup booting Mint from the Samsung will only boot Mint as there are no entries in grub.cfg for windows. If you boot Mint and run sudo update-grub as suggested earlier, you should see a windows entry in the output.
If you want Mint on the Samsung, you need to select that drive for the install from the manual Something Else option and leave the default for bootloader installation as /dev/sda.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.