Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
marc_dna

Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by marc_dna »

Hello,
I am having a boot problem on a HP computer I have installed Linux Mint 18.3 alongside Windows 7.
Since HP computers and UEFI make the dual installation/boot extra complicated, it was already a bit of a problem to install Linux Mint at all, but now that this is done, there seems to be a problem with Grub.

After using Boot Repair, the system starts into Grub, where I can select and start up Linux Mint. But when I select and try to start Windows 7, I get the following error message:
"error: not a valid root device"
After that I can press any key and am redirected back into the Grub menu.

I am not sure how to solve the problem, but I guess it has something to do with the partitioning and MBR.
The partitioning is:
sda1 ntfs Windows Boot
sda2 ntfs Windows System
sda3 ntfs Windows Data
sda4-
-sda5 fat32 EFI boot Linux
-sda6 ext4 Linux root
-sda7 swap Linux swap
-sda8 ext4 Linux home

Does somebody know that error message or how to fix it? I am unfortunately not knowledgeable enough to get it done myself.
Thanks for any help!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mattyboy

Re: Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by Mattyboy »

You've probably done one of two things.

Exceeded the amount of primary partitions 'allowed' on a Windows drive. The Limit is 4.
Over written the Windows boot loader.

I would and its what I would do... back up my data to another drive, format the internal drive create a new partition table one primary for Windows, one primary for your data in NTFS and one logical for Linux.

You may be able to repair the Windows boot loader, google that, but you'll probably have to sort out the existing partition table.

... and, maybe wait for other reply's :)
marc_dna

Re: Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by marc_dna »

Hey, thanks for your reply.
I thought about that too, but because of that I made all Linux partitions logical (unless Swap or EFI are always automatically primaries?). So I think that should be alright...
jschandi

Re: Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by jschandi »

A few queries:
1. Your Windows is EFI installed?
2. Did you enable Legacy support (from bios) before installing Linux?
3. The 'sda5 fat32 EFI boot Linux' was manually made by you and set as EFI Partition?

While installing an EFI system, Mint automatically detects the EFI Boot partition and sets it up. You probably set a partition different from the pre-existing windows one.
If feasible, reinstall Mint while setting the same EFI partition.

A sidenote-
The limit of 4 primary partitions is set only for Legacy systems. The new EFI systems allow more number of primary partitions.
michael louwe

Re: Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by michael louwe »

@ marc_dna, .......
marc_dna wrote:.
.
Try sudo update-grub
marc_dna

Re: Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by marc_dna »

jschandi wrote: Thu Mar 08, 2018 12:55 am A few queries:
1. Your Windows is EFI installed?
2. Did you enable Legacy support (from bios) before installing Linux?
3. The 'sda5 fat32 EFI boot Linux' was manually made by you and set as EFI Partition?

While installing an EFI system, Mint automatically detects the EFI Boot partition and sets it up. You probably set a partition different from the pre-existing windows one.
If feasible, reinstall Mint while setting the same EFI partition.
Hi jschandi, that sounds good. To answer the questions:
1. Yes
2. Yes
3. Yes
I should indeed have two EFI boot partitions now (sda1 for Win, and sda5 for Linux). I am not sure if it was possible to select the sda1 partition for the Linux boot loader, but if it is possible, that does sound like a good possiblity. I will check. Thanks!
michael louwe wrote: Thu Mar 08, 2018 4:14 am @ marc_dna, .......
marc_dna wrote:.
.
Try sudo update-grub
Hi michael, I have already tried that, and also run boot repair, which should automatically re-install and update Grub, I think. Thanks!
michael louwe

Re: Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by michael louwe »

@ marc_dna, .......
marc_dna wrote:.
.
Please post the Terminal output for sudo parted -l and inxi -Fxz
....... Also, launch GParted from the Live LM 18.3 USB/DVD and have a look at your Win 7 and LM 18.3 partitions on the internal hard-drive. If Win 7 was installed in UEFI mode, there should be an EFI System Partition = fat32/104MB/flagged as boot/efi or boot,esp.

From what I can tell, Win 7 was installed in Legacy BIOS mode while LM 18.3 was installed in UEFI mode. If so, the dual-boot system is pretty screwed-up.

If so, try reinstalling LM 18.3 in Legacy BIOS mode.
marc_dna

Re: Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by marc_dna »

Hey Michael, thanks for your help!

parted -l

Model: ATA ST1000DX001-1NS1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 106MB 105MB primary ntfs boot
2 106MB 214GB 214GB primary ntfs
3 214GB 770GB 556GB primary ntfs
4 770GB 1000GB 231GB extended
5 770GB 770GB 210MB logical fat32 esp
6 770GB 796GB 26.2GB logical ext4
7 796GB 813GB 16.8GB logical linux-swap(v1)
8 813GB 1000GB 187GB logical ext4

inxi -Fxz

System: Host: Mike-Linux Kernel: 4.13.0-36-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: MATE 1.18.0 (Gtk 3.18.9-1ubuntu3.3)
Distro: Linux Mint 18.3 Sylvia
Machine: System: HP product: HP ProDesk 600 G2 SFF
Mobo: HP model: 805D v: KBC Version 05.36
Bios: HP v: N02 Ver. 02.20 date: 06/05/2017
CPU: Quad core Intel Core i7-6700 (-HT-MCP-) cache: 8192 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 27264
clock speeds: max: 4000 MHz 1: 3400 MHz 2: 3400 MHz 3: 3400 MHz
4: 3400 MHz 5: 3400 MHz 6: 3400 MHz 7: 3400 MHz 8: 3400 MHz
Graphics: Card-1: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0
Card-2: NVIDIA GK208 [GeForce GT 730] bus-ID: 01:00.0
Display Server: X.Org 1.18.4 drivers: nouveau (unloaded: fbdev,vesa) FAILED: intel
Resolution: 1920x1080@60.00hz
GLX Renderer: NV106
GLX Version: 3.0 Mesa 17.2.8 Direct Rendering: Yes
Audio: Card-1 NVIDIA GK208 HDMI/DP Audio Controller
driver: snd_hda_intel bus-ID: 01:00.1
Card-2 Intel Sunrise Point-H HD Audio
driver: snd_hda_intel bus-ID: 00:1f.3
Sound: Advanced Linux Sound Architecture v: k4.13.0-36-generic
Network: Card: Intel Ethernet Connection (2) I219-LM
driver: e1000e v: 3.2.6-k bus-ID: 00:1f.6
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives: HDD Total Size: 1000.2GB (2.8% used)
ID-1: /dev/sda model: ST1000DX001 size: 1000.2GB temp: 34C
Partition: ID-1: / size: 24G used: 7.4G (33%) fs: ext4 dev: /dev/sda6
ID-2: /home size: 172G used: 3.8G (3%) fs: ext4 dev: /dev/sda8
ID-3: swap-1 size: 16.78GB used: 0.00GB (0%) fs: swap dev: /dev/sda7
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 38.5C mobo: N/A gpu: 39.0
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 244 Uptime: 21:08 Memory: 2749.4/15921.6MB
Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35


Gparted
Untitled.png
michael louwe

Re: Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by michael louwe »

@ marc_dna, .......
marc_dna wrote:.
.
Your 1TB internal hard-drive is in ms-dos/MBR disk mode. This means Win 7 was installed in Legacy BIOS mode with the UEFI-BIOS setup accordingly, eg CSM enabled. So, LM 18.3 should have been installed alongside Win 7 in Legacy BIOS mode also, ie not in UEFI mode which requires GPT disks and 64bit.

So, if I were you, I will reinstall LM 18.3 in Legacy BIOS mode; ...

1. Boot the Live LM 18.3 USB/DVD in Legacy BIOS mode and not UEFI mode, at the Boot menu.
2, At the Live desktop, click "Install LM".
3. Follow the prompts from the Install Wizard, eg unmount internal hard drive = Yes, tick the box for "Install 3rd-party software, Wifi drivers, etc".
4. Select the manual "Something else" install method.
5. Delete all the Linux partitions by clicking on the partition and clicking -. This will create a new free space.
6. Click on this free space to manually partition it ... viewtopic.php?f=42&t=122276 (manual partitioning Tutorial for Legacy BIOS mode and MBR/ms-dos disks)
7. Ensure that the "Device for boot loader installation" is the internal hard-drive or /sda.
8. and so on.

Good luck.

I'll be offline after this.

P S - ms-dos/MBR disks are limited to 4 Primary partitions and 2TB in size. So the Swap and Home partitions should be Logical partitions.
Last edited by michael louwe on Fri Mar 09, 2018 2:47 am, edited 2 times in total.
marc_dna

Re: Linux Mint and Windows 7 Dual Boot Grub Problem "error: not a valid root device"

Post by marc_dna »

Cool, I will try. Thanks a lot for the help!
Locked

Return to “Installation & Boot”