LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Dual Boot Grub Problem - Drive Not Found (https://www.linuxquestions.org/questions/linux-hardware-18/dual-boot-grub-problem-drive-not-found-4175590452/)

ss32 09-29-2016 06:08 PM

Dual Boot Grub Problem - Drive Not Found
 
This issue popped up one day out of seemingly nowhere. I have linux on sda and windows on sdc. Grub is installed on both, but for whatever reason if I try to boot windows from grub on sda it doesn't work, but that isn't the issue. I've been booting to sdc and selecting linux or windows from there and everything works fine, until recently. If I shut down or reboot from linux I'll get a grub error telling me the boot device isn't found. If I reboot/shut down from windows everything is fine. If I select my boot device at the splash screen and select sdc, everything is fine. I'm stumped.

offgridguy 09-29-2016 06:23 PM

Quote:

Originally Posted by ss32 (Post 5611755)
This issue popped up one day out of seemingly nowhere. I have linux on sda and windows on sdc. Grub is installed on both, but for whatever reason if I try to boot windows from grub on sda it doesn't work, but that isn't the issue. I've been booting to sdc and selecting linux or windows from there and everything works fine, until recently. If I shut down or reboot from linux I'll get a grub error telling me the boot device isn't found. If I reboot/shut down from windows everything is fine. If I select my boot device at the splash screen and select sdc, everything is fine. I'm stumped.

If you are using ubuntu or Mint, the first thing I would try is updating grub, next time you are logged in.

Code:

sudo update-grub

syg00 09-29-2016 07:13 PM

Let's see a photo of the message.

ss32 09-29-2016 08:08 PM

Code:

sudo update-grub
[sudo] password for user:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.15.10-031510-generic
Found initrd image: /boot/initrd.img-3.15.10-031510-generic
Found linux image: /boot/vmlinuz-3.13.0-96-generic
Found initrd image: /boot/initrd.img-3.13.0-96-generic
Found linux image: /boot/vmlinuz-3.13.0-24-generic
Found initrd image: /boot/initrd.img-3.13.0-24-generic
  No volume groups found
Found Windows 10 (loader) on /dev/sdc1
Found Windows 10 (loader) on /dev/sdc2
done

As far as the message, it drops to grub rescue and says
Code:

Error, no such device: UUID of hard drive
grub rescue>

edit: The UUID it's displaying is for sda. And I just double checked my BIOS and sdc is the only boot device I have enabled.

syg00 09-29-2016 08:47 PM

You're really shutting down, not hibernating one, or worse, both ?.

c0wb0y 09-29-2016 08:50 PM

That is probably because Grub is installed on sdc and not sda. What's the default BIOS boot drive, sda or sdc?

Once booted from Linux, install Grub to sda

grub2-install /dev/sda

Optionally, you might wish to boot Windows from sda too. You create a new menuentry and that's it.

ss32 09-30-2016 05:44 AM

Quote:

Originally Posted by syg00 (Post 5611801)
You're really shutting down, not hibernating one, or worse, both ?.

Nope, full shutdown.
Quote:

Originally Posted by c0wb0y (Post 5611802)
That is probably because Grub is installed on sdc and not sda. What's the default BIOS boot drive, sda or sdc?

Once booted from Linux, install Grub to sda

grub2-install /dev/sda

Optionally, you might wish to boot Windows from sda too. You create a new menuentry and that's it.

Read my first post. Booting windows from sda fails, and the only boot device enabled in BIOS is sdc

c0wb0y 09-30-2016 06:52 AM

Why don't you ask your bios why it keeps on insisting to boot from sda? :)

BW-userx 10-04-2016 08:20 AM

yes if you have a BIOS that can search for the boot drive, then set it up as such.
your actual boot drive your useing to be the first drive it looks at, then the rest are or can be a in case senerio.

but too, putting everything on /dev/sda for your boot drive reguardless where it is installed it a good idea. you got a have windows installed first, then linux and let linux over write windows boot file .. I use MBR so that is where I put it. /dev/sda

if you do a install-grub /dev/sda then do not forget to do a update-grub right afterwords.

if you are getting UUID erros then do blkid to get your UUID's then bounch them off your fstab for Linux UUID's for windows I'd have to look that up. I USE MBR BIOS boot but have UUIDs in my fstab .. strange as they maybe.

mrmazda 10-05-2016 11:06 PM

Linux/Grub boot device order isn't necessarily identical to the BIOS boot device order. With some BIOS, selecting a different boot device than usual at run time can "stick" in the BIOS until again changing something in the BIOS that affects drive order.

Grub can be configured to boot based on Volume Label rather than UUID. You might want to consider it. All my Linux/Grub booting, multiboot on all of more than two dozen machines, is done by Volume Label, and Grub is installed on no MBR, only on / or /boot partitions.

tofino_surfer 10-06-2016 02:25 AM

>>>Read my first post. Booting windows from sda fails, and the only boot device enabled in BIOS is sdc

This is because Windows expects to be installed on the first hard drive.

From the grub2 manual:

If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command drivemap (see drivemap), like this:

drivemap -s (hd0) (hd1)

This performs a virtual swap between your first and second hard drive.

>>> I USE MBR BIOS boot but have UUIDs in my fstab .. strange as they maybe.

There is nothing strange about this. UUIDs are an attribute of the filesystem ( ext4,xfs ..) and have nothing to do with disk partioning ( old MBR or modern GPT). I have filesystem UUIDs on an old MBR disk as well as on new GPT disks. Also with Linux you can use either MBR or GPT partitioned disks with BIOS boot.

BW-userx 10-06-2016 06:55 AM

Quote:

Originally Posted by mrmazda (Post 5614518)
Linux/Grub boot device order isn't necessarily identical to the BIOS boot device order. With some BIOS, selecting a different boot device than usual at run time can "stick" in the BIOS until again changing something in the BIOS that affects drive order.

Grub can be configured to boot based on Volume Label rather than UUID. You might want to consider it. All my Linux/Grub booting, multiboot on all of more than two dozen machines, is done by Volume Label, and Grub is installed on no MBR, only on / or /boot partitions.

my experience is , I set my boot dirve to where ever I installed grub to, if I put grub on the MBR /dev/sdb then that is the hard drive I have my BIOS look at frist.

therefore if you have more then one OS install, one on /dev/sdb and one on /dev/sda grub then takes over the directing the traffic to which hdd to actaully boot off of. therefore, just pointing the BIOS to the hard drive that has Grub installed on it is what is the deciding factor in initial booting.

that looks and seems to be the logic behind it from my experiences. Keeping in mind this is MBR booting not UUID

JZL240I-U 10-06-2016 07:55 AM

As I understand it, the UUIDs are used in the /boot/grub2/grub.cfg (and /etc/fstab). A BIOS in a x86 PC always loads the MBR (master boot record) which just points to where the (first stage of the) real bootloader is located (and stores the adresses of the first four partitions). Cf. http://www.ibm.com/developerworks/li...y/l-linuxboot/ and https://en.wikipedia.org/wiki/Bootin...n_boot_loaders.

I usually have on every disk a workable MBR and bootloader(s). In case something of my normally running system gets really broken I just switch disks in the BIOS.

BW-userx 10-06-2016 08:14 AM

Quote:

Originally Posted by JZL240I-U (Post 5614640)
As I understand it, the UUIDs are used in the /boot/grub2/grub.cfg (and /etc/fstab). A BIOS in a x86 PC always loads the MBR (master boot record) which just points to where the (first stage of the) real bootloader is located (and stores the adresses of the first four partitions). Cf. http://www.ibm.com/developerworks/li...y/l-linuxboot/ and https://en.wikipedia.org/wiki/Bootin...n_boot_loaders.

I usually have on every disk a workable MBR and bootloader(s). In case something of my normally running system gets really broken I just switch disks in the BIOS.

sounds fancy woo hoo fancy.. whenever I get a no boot blackscreen run level 2 (I think it is) I just nano /etc/fstab and revert back to the old /dev/sdx changing which ever partitons I need to reflect the old way then reboot .. mostly if I've changed something to change th UUID and forget to update the fstab file.

zeebra 10-07-2016 06:49 AM

A bit more info would be useful on this thread. And clarifications of details.

Which bios are you using? UEFI?
Where exactly is your Grub?
How many disks do you have? SDC implies windows is on the third disk on a desktop machine.
Can you show your grub.cfg file?
Can you show your blkid output?
Fdisk -l?
Which order is the HD's connected on Sata ports?

Can you get any help from this guide?
http://www.dedoimedo.com/computers/g...mozTocId706228


All times are GMT -5. The time now is 02:45 PM.