Can't access windows C partition from linux (solved)

i have a laptop where i used to dual boot windows and linux, at some point i deleted my windows bootloader while installing a distro because i had a couple of leftover boot loaders i never got rid of and i deleted the windows one by accident.
i have tried the bootrec.exe /FixMbr and bootrec.exe /FixBoot in the start menu of the windows recovery konsole and that did not restore the bootloader.
i do not care about being able to use windows or not but i want some files i have on it and i am having troubles accessing them from the linux (antergos with openbox) install i have. i have done the preliminary first page on google research beforehand.

i am not sure if this is important but it is an Acer Aspire V17 nitro (VN7-791 series)

note: i can not remove the hard drive at all since one of the screws on the laptop is broken so i can not remove the back cover

update: i can now access the partition i have no idea how i did it, but it works now

Gparted has some nice recovery options.

one does not mount a dlrive in linux. One has to mount a partition on a logical drive.

This is a drive
/dev/sda
This is a partition
/dev/sda1
Notice the number ‘1’?

In order to get your copy of the files, you need to mount the correct partition.
First, fire up your terminal and do:

sudo fdisk -l

It will give you something like this:

luke@Mercury ~> sudo fdisk -l
[sudo] password for luke: 
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
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: gpt
Disk identifier: EF92B1B8-B518-DD45-9AB7-7FAF66333590

Device          Start        End    Sectors   Size Type
/dev/sda1        2048 1953507327 1953505280 931.5G Solaris /usr & Apple ZFS
/dev/sda9  1953507328 1953523711      16384     8M Solaris reserved 1


Disk /dev/sdb: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
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: gpt
Disk identifier: 2AC4424E-359F-47C6-8B3E-D24B60C8E7CB

Device     Start        End    Sectors  Size Type
/dev/sdb1   2048 5860532223 5860530176  2.7T Microsoft basic data


Disk /dev/sdc: 238.5 GiB, 256060514304 bytes, 500118192 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
Disklabel type: gpt
Disk identifier: AFDF09F6-9A56-4597-9D5E-A01634644C23

Device       Start       End   Sectors  Size Type
/dev/sdc1     2048    616447    614400  300M Windows recovery environment
/dev/sdc2   616448    821247    204800  100M EFI System
/dev/sdc3   821248   1083391    262144  128M Microsoft reserved
/dev/sdc4  1083392 500117503 499034112  238G Microsoft basic data


Disk /dev/sdd: 238.5 GiB, 256060514304 bytes, 500118192 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
Disklabel type: gpt
Disk identifier: 9B0B74DE-95AB-4FDF-94C8-8C3544CBF14D

Device       Start       End   Sectors  Size Type
/dev/sdd1     2048   1050623   1048576  512M EFI System
/dev/sdd2  1050624 500117503 499066880  238G Linux filesystem


Disk /dev/sde: 698.7 GiB, 750156374016 bytes, 1465149168 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
Disklabel type: gpt
Disk identifier: 00ADCEC9-F510-498D-BEC0-C5666A963A80

Notice that for me, its on /dev/sdc4. The other one on /dev/sdb1is just a mass storage for all my games; ignore it.

Once we’ve found the partition we need then we need to mount it to a location. We do that with:

sudo mount /dev/sdxy /media/hdd

Where x is the drive letter, and y is the partition number. /media/hdd is the directory we are mounting it to.

Once its mounted, then we can copy the data.

cp -r /media/hdd/* /home/$USER/hdd

if it says that you don’t have permissions and it fails, just type

sudo !!

Which will re-do your last command as root, after you give the password.

Lastly, there will be a ~/hdd directory in your user’s home directory with all your files.

4 Likes

i feel really dumb but at some point yesterday i made it permanently mounted to /mnt/Windows. i have no idea when i did this since i have restarted my computer a couple of times since then. could it be that fucking around in gnome-disks could have caused this? i threw everything at the wall yesterday and i know it didn’t work before i changed some settings in gnome-disks.

thanks for the tips and sorry for the wrong terminology i know about the partition being mounted.

When you turned windows off, or it died (I’m super tired rn and can’t really see anything lel), your windows machine didn’t unmount the hard drive. For whatever god awful reason MS has never ever bothered to update their HDD management technology past 2001 status so you HAVE to make sure you CORRECTLY power off your machine or you’ll NEVER get it to mount.

Its fucking stupid. You could even just plug your drive into another windows machine and power that one off and it would actually be fine. Windows just has to say “aight you’re done bruh”

yeah i read that while on my basic research tour of already answered posts which were similar.
it is weird i deleted my windows bootloader at the start of the year and the laptop has run out of power multiple times on top of all the turning on and off i do manually

1 Like

then you need to find its entry in /etc/fstab and remove it.