Windows partition filled and turned into "Microsoft basic data" partition, failing to boot

I tried to switch from ubuntu 20.04 to Manjaro tonight, followed this guide here. I used manual partitioning as I want to separate the root and home directories. After completing the install booting into windows fails. It will attempt to repair the system for a few minutes then give up and save a log to C:\Windows\System32\Logfiles\Srt\SrtTrail.txt. I cannot read the log as I cannot mount the partition. I can attempt to boot into windows from the bios and Manjaro bootloader.

$ inxi --full --verbosity=7 --filter --no-host
System:    Kernel: 5.6.15-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0 Desktop: KDE Plasma 5.18.5 tk: Qt 5.14.2 
           wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: Dell product: XPS 15 7590 v: N/A serial: <filter> Chassis: type: 10 serial: <filter> 
           Mobo: Dell model: 095Y8K v: A00 serial: <filter> UEFI: Dell v: 1.7.0 date: 05/11/2020 
Battery:   ID-1: BAT0 charge: 83.9 Wh condition: 83.9/97.0 Wh (86%) volts: 13.0/11.4 model: LGC-LGC8.33 DELL 5XJ2896 
           type: Li-ion serial: <filter> status: Full 
Memory:    RAM: total: 15.27 GiB used: 1.35 GiB (8.9%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Topology: Quad Core model: Intel Core i5-9300H bits: 64 type: MT MCP arch: Kaby Lake rev: A L2 cache: 8192 KiB 
           bogomips: 38408 
           Speed: 800 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 801 5: 800 6: 800 7: 801 8: 800 
           Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon art avx avx2 bmi1 bmi2 bts clflush 
           clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c 
           flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ida intel_pt 
           invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat pbe 
           pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts rdrand rdseed rdtscp rep_good sdbg sep smap 
           smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx 
           vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:3e9b 
           Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Hewlett-Packard driver: nvidia v: 440.82 
           bus ID: 01:00.0 chip ID: 10de:1f91 
           Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia alternate: fbdev,intel,nouveau,nv,vesa 
           compositor: kwin_x11 resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 20.0.7 direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:a348 
           Sound Server: ALSA v: k5.6.15-1-MANJARO 
Network:   Device-1: Intel Wi-Fi 6 AX200 vendor: Bigfoot Networks driver: iwlwifi v: kernel port: 3000 bus ID: 3b:00.0 
           chip ID: 8086:2723 
           IF: wlp59s0 state: up mac: <filter> 
           IP v4: <filter> type: dynamic noprefixroute scope: global broadcast: <filter> 
           IP v6: <filter> type: noprefixroute scope: link 
           WAN IP: <filter> 
Drives:    Local Storage: total: 476.94 GiB used: 8.46 GiB (1.8%) 
           ID-1: /dev/nvme0n1 model: SSDPEMKF512G8 NVMe INTEL 512GB size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 
           serial: <filter> rev: 7002 scheme: GPT 
           Message: No Optical or Floppy data was found. 
RAID:      Message: No RAID data was found. 
Partition: ID-1: / size: 73.42 GiB used: 8.27 GiB (11.3%) fs: ext4 dev: /dev/nvme0n1p9 label: N/A 
           uuid: 212180d8-ee79-45a5-aa0c-71eb22f270e0 
           ID-2: /boot/efi size: 511.0 MiB used: 280 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p7 label: N/A uuid: BB11-B146 
           ID-3: /home size: 74.04 GiB used: 193.4 MiB (0.3%) fs: ext4 dev: /dev/nvme0n1p10 label: N/A 
           uuid: b159c64c-aed4-40f4-90a7-5b048d450b67 
           ID-4: swap-1 size: 8.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p8 label: N/A 
           uuid: be9aceba-6062-46cd-8818-495836faa96d 
Unmounted: ID-1: /dev/nvme0n1p1 size: 680.0 MiB fs: vfat label: ESP uuid: 1840-523F 
           ID-2: /dev/nvme0n1p2 size: 128.0 MiB fs: <root required> label: N/A uuid: N/A 
           ID-3: /dev/nvme0n1p3 size: 300.00 GiB fs: ntfs label: OS uuid: CEBC899FBC898327 
           ID-4: /dev/nvme0n1p4 size: 990.0 MiB fs: ntfs label: WINRETOOLS uuid: 5088F8E788F8CD0A 
           ID-5: /dev/nvme0n1p5 size: 14.63 GiB fs: ntfs label: Image uuid: F0A2F968A2F933A6 
           ID-6: /dev/nvme0n1p6 size: 1.22 GiB fs: ntfs label: DELLSUPPORT uuid: CC2E2E9F2E2E8296 
USB:       Hub: 1-0:1 info: Full speed (or root) Hub ports: 16 rev: 2.0 speed: 480 Mb/s chip ID: 1d6b:0002 
           Device-1: 1-4:2 info: Intel type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s chip ID: 8087:0029 
           Device-2: 1-7:3 info: Shenzhen Goodix Fingerprint Reader type: Abstract (modem),CDC-Data driver: cdc_acm 
           interfaces: 2 rev: 2.0 speed: 12 Mb/s chip ID: 27c6:5395 serial: <filter> 
           Device-3: 1-12:4 info: Microdia Integrated_Webcam_HD type: Video driver: uvcvideo interfaces: 2 rev: 2.0 
           speed: 480 Mb/s chip ID: 0c45:6723 
           Hub: 2-0:1 info: Full speed (or root) Hub ports: 10 rev: 3.1 speed: 10 Gb/s chip ID: 1d6b:0003 
           Hub: 3-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 speed: 480 Mb/s chip ID: 1d6b:0002 
           Hub: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s chip ID: 1d6b:0003 
Sensors:   System Temperatures: cpu: 45.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 247 Uptime: 17m Init: systemd v: 245 Compilers: gcc: 10.1.0 Shell: bash v: 5.0.17 running in: konsole 
           inxi: 3.0.37 
$ lsblk -f
NAME         FSTYPE FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINT
nvme0n1                                                                                   
├─nvme0n1p1  vfat   FAT32 ESP         1840-523F                                           
├─nvme0n1p2                                                                               
├─nvme0n1p3  ntfs         OS          CEBC899FBC898327                                    
├─nvme0n1p4  ntfs         WINRETOOLS  5088F8E788F8CD0A                                    
├─nvme0n1p5  ntfs         Image       F0A2F968A2F933A6                                    
├─nvme0n1p6  ntfs         DELLSUPPORT CC2E2E9F2E2E8296                                    
├─nvme0n1p7  vfat   FAT32             BB11-B146                             510.7M     0% /boot/efi
├─nvme0n1p8  swap   1                 be9aceba-6062-46cd-8818-495836faa96d                [SWAP]
├─nvme0n1p9  ext4   1.0               212180d8-ee79-45a5-aa0c-71eb22f270e0   61.4G    11% /
└─nvme0n1p10 ext4   1.0               b159c64c-aed4-40f4-90a7-5b048d450b67   70.1G     0% /home

Attempting to mount the partition yeilds this,

$ sudo mount /dev/nvme0n1p3 ~/mnt
[sudo] password for jake: 
Failed to read last sector (734003191): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
   or it was not setup correctly (e.g. by not using mdadm --build ...),
   or a wrong device is tried to be mounted,
   or the partition table is corrupt (partition is smaller than NTFS),
   or the NTFS boot sector is corrupt (NTFS size is not valid).
Failed to mount '/dev/nvme0n1p3': Invalid argument
The device '/dev/nvme0n1p3' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
$ sudo fdisk -lu
[sudo] password for jake: 
Disk /dev/nvme0n1: 476.96 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SSDPEMKF512G8 NVMe INTEL 512GB          
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: gpt
Disk identifier: 7D823715-D3A9-481D-85CB-4D87AB033958

Device              Start        End   Sectors  Size Type
/dev/nvme0n1p1       2048    1394687   1392640  680M EFI System
/dev/nvme0n1p2    1394688    1656831    262144  128M Microsoft reserved
/dev/nvme0n1p3    1656832  630802431 629145600  300G Microsoft basic data
/dev/nvme0n1p4  964943872  966971391   2027520  990M Windows recovery environment
/dev/nvme0n1p5  966971392  997650431  30679040 14.6G Windows recovery environment
/dev/nvme0n1p6  997652480 1000214527   2562048  1.2G Windows recovery environment
/dev/nvme0n1p7  630802432  631851007   1048576  512M Microsoft basic data
/dev/nvme0n1p8  631851008  648628223  16777216    8G Linux swap
/dev/nvme0n1p9  648628224  806119423 157491200 75.1G Linux filesystem
/dev/nvme0n1p10 806119424  964943871 158824448 75.8G Linux filesystem

Partition table entries are not in disk order.

Before moving to Manjaro I removed the root, home, and swap Ubuntu partitions. Windows was working immediately before booting to a live usb.

Any help would be greatly appreciated.

Did you create a separate $esp?

Since Ubuntu is supporting secure boot - Manjaro is not

Did you disable secure boot?

Intel optane is not supported? Did you disable?

Fake raid requires special care. Did you disable raid in firmware?

1 Like

I did create a second $esp, or at least I believe I did, I think its /dev/nvme0n1p7

Secure boot is currently disabled. I will try with it enabled in a moment, I really should've thought of that.

I believe optane is disabled, I will have another look.

ACHI is enabled (raid disabled)

Your p3 is not an efi parition neither is p7 is not an efi partition - you can fix this by chroot - using cfdisk to set the partition type to EFI.

Your p1 however is an efi partition - but since your system won't boot I think this is wrong. BTW it has an odd size for an efi partition - but that could be Windows - the size of the efi partition is not important.

EDIT

Sorry - I misread the p3 size - 300G is definately not $esp - I read it for 300M - which is a common size for the $esp..

I still have ubuntu's grub selectable from my bios? It boots to the grub command line.

Secure boot didn't help by the way.

Should I try to change p7 to efi? That was the $esp I created for manjaro

If it is indeed the efi partition you created - you need to change the partition type.

I'm being told there isnt a partition defined, however KDE partition manager says there is a fat32, /boot/efi partition with 280KiB of used space.

$ sudo fdisk /dev/nvme0n1p7

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The device contains 'vfat' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x8212596f.

Command (m for help): t
No partition is defined yet!

Command (m for help): 

Using $ sudo cfdisk /dev/nvme0n1p7 it also says it is free space

EDIT, I think cfdisk is reporting the unused space as free space rather than the whole partition as it says "511M"

EDIT Found my error and managed to change p7 to efi

$ sudo fdisk -lu
Disk /dev/nvme0n1: 476.96 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SSDPEMKF512G8 NVMe INTEL 512GB          
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: gpt
Disk identifier: 7D823715-D3A9-481D-85CB-4D87AB033958

Device              Start        End   Sectors  Size Type
/dev/nvme0n1p1       2048    1394687   1392640  680M EFI System
/dev/nvme0n1p2    1394688    1656831    262144  128M Microsoft reserved
/dev/nvme0n1p3    1656832  630802431 629145600  300G Microsoft basic data
/dev/nvme0n1p4  964943872  966971391   2027520  990M Windows recovery environment
/dev/nvme0n1p5  966971392  997650431  30679040 14.6G Windows recovery environment
/dev/nvme0n1p6  997652480 1000214527   2562048  1.2G Windows recovery environment
/dev/nvme0n1p7  630802432  631851007   1048576  512M EFI System
/dev/nvme0n1p8  631851008  648628223  16777216    8G Linux swap
/dev/nvme0n1p9  648628224  806119423 157491200 75.1G Linux filesystem
/dev/nvme0n1p10 806119424  964943871 158824448 75.8G Linux filesystem

Partition table entries are not in disk order.

Windows no longer tries to repair the system and gives up immediately when trying to start automated repairing.

sudo cfdisk /dev/nvme0n1

Then select the 7th partition - select type - select efi system partition - press enter - select write - type yes - press enter - select quit.

Just did it again, not sure if that changed anything but Ill reboot

EDIT, no change

Again :question:

There must be something else bugging you - but I have no idea what.

What happens when you do this? If still no booting, then it sounds like Windows bootmanager might have become corrupted somehow.

What does efibootmgr -v say?

If you see my edits above I found my error and changed it to efi using fdisk.

Thank you for your help, I'm sure you've saved me some problems down the line

$ efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0000,0003,0001,0002
Boot0000  ubuntu        HD(1,GPT,d4229f8b-3716-4262-a036-a0ec06d46c7d,0x800,0x154000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0001* Windows Boot Manager  HD(1,GPT,d4229f8b-3716-4262-a036-a0ec06d46c7d,0x800,0x800000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...R................
Boot0002* Linux Firmware Updater        HD(1,GPT,d4229f8b-3716-4262-a036-a0ec06d46c7d,0x800,0x154000)/File(\EFI\UBUNTU\SHIMX64.EFI)\.f.w.u.p.d.x.6.4...e.f.i...
Boot0003* Manjaro       HD(7,GPT,c569b333-f7a7-d54b-9395-d2c2c2de5465,0x25994800,0x100000)/File(\EFI\Manjaro\grubx64.efi)

You might want to remove Ubuntu's boot entry to begin with:

sudo efibootmgr -b 0000 -B

If you can boot up your Windows neither from Bios' "one shot" boot menu nor from Manjaro's Grub boot menu, my guess is that its boot manager might have become corrupted.

Would that directly effect the storage partition though? Because it should be NTFS not basic data. I guess I could try to change it using cfdisk but I don't want to risk damaging it further

Not sure if I understand your question. The command in my post above removes Ubuntu's efi boot entry. It has nothing to do with any partitions on your disk.

I understand that, and I removed it, I was referring to your idea that the boot manager might be corrupt sorry.

p3 is what I care about, its my windows install. I dont mind having to reinstall it but I'd like some of the data, but I cant get to it because I cant mount the partition and windows wont boot.

If you have your Windows installation medium, then you could attemtp repairing its bootloader. It wouldn't touch your Windows' installation partition. Please search the www for tutorials about how to go about repairing Windows bootloader.

I can see that there are several recovery partitions as well on your disk. I don't know how they work. Perhaps it is something to look into.

That was my next plan. Unfortunately windows recovery tools wont even load, they crash too. The only one that works is from dell but it isnt any help, just offers to wipe the partition.

I'll look into getting a windows iso onto a usb tomorrow. Thank you for your time

I hope that will work out for you.

The fact that you couldn't mount the partition at the first place with the output you posted before is a bit worrying. Look into chdisk as well. I guess the installation medium would give you a terminal to run the command. Search the web :wink:

Forum kindly sponsored by