SSD Partitions are somehow broken

I have dual boot with windows 10, both installed in the same ssd. After booting in windows safe mode, i can´t boot manjaro anymore, it skips grub and goes straight to windows. I can use windows correctly.
I can boot from Manjaro live usb, and i´m trying to restore grub.
Boot device used to be sdb (SSD where OS are), but now its sda2 (Data HDD). I´d like to mount sdb and install grub in sdb2, i think that´s how i can solve this problem and recover my linux boot. But i cant mount the ssd, i get this error message:

UPDATE: This is what happens if i try to mount any sdb partition:

sudo mount /dev/sdb2 /mnt  1 ✘
mount: /mnt: special device /dev/sdb2 does not exist.
dmesg(1) may have more information after failed mount system call.


sudo mount /dev/sdb /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.

Here you can see fdisk-l output

sudo fdisk -l
Disk /dev/sda: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-08W
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xc87dde76

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 419430399 419428352 200G 7 HPFS/NTFS/exFAT
/dev/sda2 * 419432448 1953523711 1534091264 731,5G 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 465,76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 860
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4fef845f

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 656680959 656678912 313,1G 7 HPFS/NTFS/exFAT
/dev/sdb2 975638528 976769023 1130496 552M 27 Hidden NTFS WinRE
/dev/sdb3 656680960 975638527 318957568 152,1G 83 Linux

Partition table entries are not in disk order.

Disk /dev/loop0: 19,14 MiB, 20066304 bytes, 39192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop1: 704,09 MiB, 738287616 bytes, 1441968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop2: 1,87 GiB, 2008064000 bytes, 3922000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 634,8 MiB, 665636864 bytes, 1300072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sdc: 3,75 GiB, 4023385600 bytes, 7858175 sectors
Disk model: Cruzer
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 64 6848071 6848008 3,3G 0 Empty
/dev/sdc2 6848072 6856263 8192 4M ef EFI (FAT-12/16/32)

Thanks for your help!

/dev/sdb is your entire drive, not a partition. You cannot mount a drive — you can only mount filesystems, in this case being partitions.

That said however, I think the problem is to be found in your UEFI settings, rather than on the drive itself. Windows does appear to be altering UEFI settings under certain conditions — or so I’ve heard.

Thanks for your answer, Aragorn.
I’ve updated the original post, with the output when i try to mount any sdb partition.

Anyway, is there anything i can do to detect which UEFI setting should i check? When i installed linux i used MBR insted of GPT, maybe that’s what windows altered later…

If your system has an MBR partition table, then it most likely boots in legacy BIOS mode rather than in native UEFI mode. In that case, GRUB would have been installed in the master boot record of the first drive detected by the hardware at power-up. Windows would not have converted your MBR into GPT, because that’s quite a difficult thing to do.

What you should check is…

  1. whether your UEFI is set to boot in UEFI mode, in BIOS mode, or both; and
  2. whether your Manjaro drive is recognized by the firmware.

If both of the above are favorable to booting Manjaro, then I would advise starting up from the installer medium in live mode, opening up a terminal window, and issuing the following commands… :arrow_down:

sudo su -
lsblk

At this point, take note of which drive is the GNU/Linux drive. If it is /dev/sdb, issue the following commands… :arrow_down:

manjaro-chroot -a
grub-install --no-rs-codes --recheck --target="i386-pc" /dev/sdb
update-grub
exit

If the above was successful, it should now be safe to reboot — be sure to remove the installer medium when the hardware starts booting.

Bios configuration: Boot: Legacy + UEFI.
Bios boot priority: 1) Hard Disk 2) UEFI Hard Disk.
So this should make the system to first try and boot BIOS mode, shouldn´t?

Yes, the drive is recognized. With Hiren’s Boot usb i can force the system to boot from SDB, i get to GRUB, and then i get the message: partition not found.

grub-install --no-rs-codes --recheck --target=“i386-pc” /dev/sdb

Installing for 1386-pc plataform.

grub-install: error: failed to get canoncial path of “overlay”

I’ve found in the forum that i can fix this error by mounting the partition, but i can’t mount it…

Yes, that is correct.

That’s what manjaro-chroot -a is for. It’s on the installer medium. :wink:

:arrow_down:

manjaro-chroot -a
grub-install --no-rs-codes --recheck --target="i386-pc" /dev/sdb
update-grub
exit

… Assuming that it’s /dev/sdb, of course. If it’s /dev/sda, adapt the grub-install command accordingly.

Sorry, i accidentally skipped manjaro-chroot -a. Let’s start over:

sudo su
[manjaro manjaro]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 19,1M 1 loop /run/miso/sfs/livefs
loop1 7:1 0 704,1M 1 loop /run/miso/sfs/mhwdfs
loop2 7:2 0 1,9G 1 loop /run/miso/sfs/desktopfs
loop3 7:3 0 634,8M 1 loop /run/miso/sfs/rootfs
sda 8:0 0 931,5G 0 disk
├─sda1 8:1 0 200G 0 part
└─sda2 8:2 0 731,5G 0 part
sdb 8:16 0 465,8G 0 disk
sdc 8:32 1 3,7G 0 disk /run/miso/bootmnt
├─sdc1 8:33 1 3,3G 0 part
└─sdc2 8:34 1 4M 0 part

So i have:
sda - HDD, with two data partitions
sdb - SSD, wich has three partitions (windows, recovery,linux) but none of them are shown. I can confirm they exist, as i can see them from windows disk manager, and i can explore sdb3 with ext2explore and see the linux directories.
sdc- live usb

[manjaro manjaro]# manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
==> ERROR: No Linux partitions detected!

Whoa, then that means that Windows has messed up the partition table. Check with a partitioning tool whether the partitions have been marked “hidden”, and if so, remove that flag and set your GNU/Linux partition back to “Linux Native”.

I´ve checked with KDE partition manager, and Windows Disk Manager. This is what they show:
imgur. com/a/3r34oC4

I’ve also checked with another disk manager, can’t remember the name. Linux partition was not hidden, and it was marked as 83-Linux Native

Maybe at this point, it´s easier to reinstall Manjaro. It was a couple months old installation, so it´s not a big loss.

Sorry for the link, but i wasn´t allowed to add images and i find it difficult to explain myself in english, i think its easier with pictures

What’s bizarre in that screenshot is that all three of those partitions are mounted at the same mountpoint, i.e. /run. This means that only the last-mounted of the three partitions will be accessible, because with every new filesystem being mounted at the same mountpoint, that which was mounted on there earlier becomes obscured.

Either way, from what it looks like, whatever it is you did — you mentioned running Windows in “safe mode” as the suspect — appears to have sufficiently damaged your partition table, and possibly also the filesystems on those partitions.

Even as an experienced user, I wouldn’t recommend trying to fix that mess, and especially not given that Windows is proprietary software and that we thus don’t know what it has done. I myself also don’t even use Windows, so I do not know what it did or attempted to do. All I can say at this pint is that its “safe mode” appears to not be quite so safe. :astonished:

Therefore, in my personal opinion, best would be to try and create a backup of the data through whichever of the tools you’ve used which can read the partitions’ contents, and to then wipe the whole drive clean and reinstall everything.

I’m afraid it’s the only advice I can still give you at this point. :man_shrugging: :white_flag:

Just to be sure. Is this just after you boot the liveUSB? Have you done anything else before that? The output of fdisk -l command shows the partitions (and the correspondent devices), so it’s very estrange that those devices doesn’t exist.
Can you try again? Boot the liveUSB, open the terminal and run sudo lsblk -f (without doing anything else before that)