0

I installed Ubuntu onto my USB hard drive, works sorta fine. I have Windows installed on it from this article on lifehacker, and what I'm trying to do is boot into there. But I can't. Before, I had a Grub entry that when it tried to boot in I get something like "drive can't get c/h/s values".

How would I get it to boot like Windows does when I add it in msconfig? If I try fixing it with live installation disk it doesn't recognize it, and I can access the partition just fine from Ubuntu.

Not sure if this is the right place but... I'll give it a try since I've searched up a lot, but came up with no working answers.

If you need additional information, I'll be happy to give it.

  • the tutorial linked shows windows installed in EFI mode. c/h/s values is Legacy mode booting. Did you install Ubuntu in Legacy mode? Grub can not switch boot modes "on the fly". – ravery Aug 31 '17 at 01:19
  • I'm not sure, I don't remember since that was quite some time. But I got both UEFI and Legacy systems to boot it by adding it in msconfig. I know this because I have a new laptop that my family owns, and a really old pc, and both booted em just fine. @ravery – JasorYEH Aug 31 '17 at 02:04
  • if it will boot both modes, some systems automatically drop to Legacy mode. – ravery Aug 31 '17 at 02:07
  • Then it was made in legacy mode? – JasorYEH Aug 31 '17 at 02:09
  • can't say without more info. is there an EFI folder/partitin ont eh drive? what is the contents of it? it is better to use the grub boot loader than the windows boot loader. – ravery Aug 31 '17 at 02:13
  • Uhhhhhh hmmm.. there was.. but that was deleted.... – JasorYEH Aug 31 '17 at 02:15
  • this partitin is required to boot in EFI mode (Windows was installed in EFI mode) – ravery Aug 31 '17 at 02:20
  • Uhmmm so im pretty much screwed? – JasorYEH Aug 31 '17 at 03:17
  • Yes, you are and it's entirely your doing. If you don't know such details as UEFI/CSM differences and requirements you shouldn't be installing OSes. –  Aug 31 '17 at 09:41
  • Please run the Boot Repair utility with the external drive plugged in and select the "Create BootInfo Summary" option. (DO NOT click "Recommended Repair," at least not yet!) When asked whether to upload the report, click "Yes," and then post the URL provided here. This will give us more details about your configuration, which is required to base an answer on more than guesswork. – Rod Smith Aug 31 '17 at 13:17
  • The disk we are looking at is /dev/sdg(WD My Passport) not /dev/sda thats something else completely separate. https://hastebin.com/esimuwatat.vbs @RodSmith – JasorYEH Sep 02 '17 at 02:58
  • /dev/sdg2 is where it is installed at – JasorYEH Sep 02 '17 at 02:59
  • The URL you posted is invalid, even when I changed "hastebin" to "pastebin". Please re-post. – Rod Smith Sep 02 '17 at 15:49
  • Try: https://hastebin.com/raw/esimuwatat @RodSmith – JasorYEH Sep 02 '17 at 15:55

1 Answers1

0

As I read your Boot Repair output, you have three OSes installed:

  • Windows in BIOS mode on /dev/sda -- This installation is on your internal disk.
  • Windows in EFI mode on /dev/sdg -- This installation is on your external disk.
  • Ubuntu in EFI mode on /dev/sdg -- This installation is on your external disk, and includes an EFI-mode GRUB on the same disk.

You should first understand that GRUB cannot redirect across boot modes. Thus, the EFI-mode GRUB on your external disk will not boot to your internal-disk Windows. It doesn't sound like you're trying to do this, though; it sounds like you want to boot the Windows on your external disk from the EFI-mode GRUB on the external disk. This should work, but for some reason, OS-prober has not detected the Windows on the external disk. There are several possible solutions to this problem, including:

  • Create a custom GRUB configuration -- You can edit the /etc/grub.d/40_custom file, as described in jarondl's answer to this question,, then run sudo update-grub, to create the necessary entry.
  • Use GRUB Customizer -- The GRUB Customizer tool makes it easier to make customizations like the preceding one. That said, I've never used it and I'm not sure it would really help much, compared to editing 40_custom directly, in your specific case.
  • Use Boot Repair -- The Boot Repair tool can sometimes correct boot problems like yours. That said, I can't promise it would really help much, if at all.
  • Install rEFInd -- My rEFInd boot manager sometimes does a better job of detecting and/or launching Windows than GRUB does. Thus, installing it may help. Note, however, that if Secure Boot is enabled, you'll have to jump through some extra hoops. With appropriate options settings, rEFInd can redirect the boot process from EFI to BIOS, so rEFInd would enable you to boot either of your Windows installations.
  • Disable Hibernate and Fast Startup -- These two Windows features are often the root cause or problems like what you're seeing. If you can boot into Windows, even temporarily, you should disable them, as described here and here, respectively. If you keep using GRUB, you'll need to run sudo update-grub after you disable these features before you'll see any benefit.

The first three options carry an increasing risk of creating new problems; mucking with GRUB's configuration files is not entirely risk-free. rEFInd could also mess things up, but you can try it on a USB flash drive or CD-R first to minimize the risk. The final option is distinct from the others, in that it addresses one possible root cause of the problem rather than try to work around it.

Overall, my recommendation is to try disabling Hibernate and Fast Startup in Windows first. If you can't find any other way to boot it, try using rEFInd on a USB flash drive or CD-R. (You may need to temporarily disable Secure Boot to get this to work.) If, after you do this and run sudo update-grub, you still can't boot Windows from GRUB, you can try either installing rEFInd to your hard disk or try whichever of the GRUB repairs appeals to you.

Note also that EFI-mode booting works differently for disks that are permanently associated with a computer (such as internal disks and external disks that are permanently attached to a computer) and for temporary disks (external disks that you move around, such as OS installer disks). In this answer, I've assumed that your external disk, although external, is more-or-less permanently plugged into your computer. If you're moving your external disk around and expect it to boot on any computer, you'll probably need to adjust the boot loader filenames on the ESP. See my answer to this question for details.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • Already tried first three, boot-repair doesn't do anything, grub ignores and grub-customizer removes the new entry. I guess I have to try the rest of the two. – JasorYEH Sep 02 '17 at 18:02