Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to johnstevens77,Bhoddhisatva,scotia,Anonymous,Cornytiv34, for Donating to support the site

W10 Pro vs Ubuntu; no delete function

Seek assistance with all types of tech. - computer, phone, TV, heating controls etc.
GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

W10 Pro vs Ubuntu; no delete function

#419768

Postby GrahamPlatt » June 15th, 2021, 7:21 pm

Hi,

A bit of help from the adepts on here please.

I have been quite happily running a dual boot Windows 10 Home / Ubuntu 20.04 system. C: is an SSD and the OS’s have half each on there. D: is a much larger HDD, formatted NTFS and is where I keep data, such that whichever OS I’m on, it’s there I share the info.

So this weekend I “upgraded” to Windows 10 Pro intending to use the ability to encrypt folders and use bitlocker. All that I did to start was to ask for (recursive) encryption of my Documents folder on the D: drive . I saved the digital key to a USB drive. Then I switched account to a simple ‘user’ (non-admin) to see if that’d worked. Err, not entirely. I could enter the directory and see the file names. Some would not open at that level, but I had full access to the subdirectories.

OK, perhaps I expected it to have “just worked”, and I hadn’t given it time to run the encryption through. So I signed out as user and back in as admin. This time I decided just to switch encryption off. No deal - I get a “can’t unencrypt” message. I go to \Documents and am relieved to note that I can read all the files. I copy them to an external drive just to be on the safe side.

Just to be clear here, bitlocker is not enabled on any drive.

Now I boot into Ubuntu and move into d:/documents. Right click on a random file and - shock horror - there’s no delete option in the menu. I move to another directory I haven’t asked Windows to interfere with... same deal; no delete function. Not even in directories in the Windows partition of the C: drive.

I now effectively have a Windows machine, because as it is, what with Ubuntu being unable to manage the file structure on D: it’s pretty useless.

Is this normal behaviour for Windows Pro, or have I broken something? And if so, is there a way back?

Sorry it’s so long, but I couldn’t shorten the explanation.

JohnB
Lemon Quarter
Posts: 2497
Joined: January 15th, 2017, 9:20 am
Has thanked: 677 times
Been thanked: 997 times

Re: W10 Pro vs Ubuntu; no delete function

#419769

Postby JohnB » June 15th, 2021, 7:26 pm

Bring up a Ubuntu terminal

mount
df
fdisk -l

and see what the mount status of your problem drive is

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419793

Postby GrahamPlatt » June 15th, 2021, 8:25 pm

mount
/mnt/BBEDEF28BEB25CA9 type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096,x-gvfs-show)
df
/dev/sdb1 964447228 138828068 825619160 15% /mnt/BBEDEF28BEB25CA9
fdisk -l
fdisk: cannot open /dev/sdb: Permission denied

fisk -l also lists /dev/sda and all the (many) loops in the same manner - there's not a single successful response

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419813

Postby GrahamPlatt » June 15th, 2021, 10:17 pm

Ah, I see. ro is read-only. This should be rw. But how has this come to be changed? Certainly not my doing. Is it just a matter of editing fstab then?

JohnB
Lemon Quarter
Posts: 2497
Joined: January 15th, 2017, 9:20 am
Has thanked: 677 times
Been thanked: 997 times

Re: W10 Pro vs Ubuntu; no delete function

#419815

Postby JohnB » June 15th, 2021, 10:24 pm

try
mount -o remount,rw

to see if there is a problem having it rw, then look at /etc/fstab

create a temporary directory on /dev/sda as a mount point and try mounting to that to get a feel for it.

servodude
Lemon Half
Posts: 8271
Joined: November 8th, 2016, 5:56 am
Has thanked: 4435 times
Been thanked: 3564 times

Re: W10 Pro vs Ubuntu; no delete function

#419823

Postby servodude » June 15th, 2021, 11:14 pm

GrahamPlatt wrote:Ah, I see. ro is read-only. This should be rw. But how has this come to be changed? Certainly not my doing. Is it just a matter of editing fstab then?


It's not uncommon to mount a drive as read only if it suspects there are filesystem consistency errors
it's controlled by errors=remount-ro in the fstab entry for the mount

check dmesg for any likey mentions of problems encountered

it might be time to dig out the manual for fsk (https://phoenixnap.com/kb/fsck-command-linux)

-sd

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419857

Postby GrahamPlatt » June 16th, 2021, 8:28 am

Ah-ha! I think you've hit on the problem there sd.

To keep my earlier explanation brief, I did not mention that in that copying to the external disc, some files failed to copy, and refused to delete even under windows... "file does not exist at the location" and listed as zero bytes. Perhaps for this reason, nor could I delete the parent directory /Documents.

So I ran CHKDSK /f/r/x on D: (a couple of hours or more) which found four errors in the journal. No bad blocks. All four had previously been in the Documents folder. Which may also explain Window's problems with encrypt/unencrypt there. (Although, given that's the only folder I tried the encrypt on, and that's the only place there were errors, it seems a bit of a coincidence. Doesn't lend confidence).

Following CHKDSK I was then able to delete D:/Documents
So perhaps booting into Ubuntu whilst these journalling errors existed caused errors=remount-ro to come into play.
Now these are fixed, it should be safe to force rw.

If I remove errors=remount-ro from fstab, reboot and check I then have rw, then replace errors=remount-ro - would that work? - or do I have to be more aggressive and specify rw? Hmm, probably the latter, as now there are no errors, and it's still dropping into ro, that paramenter seems to have become sticky.

Thanks to JohnB too. It's a few years since I've had to bother going "under the hood" with Linux.



Re dmesg, here's the opening

Linux version 5.4.0-74-generic (buildd@lgw01-amd64-038) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021 (Ubuntu 5.4.0-74.83-generic 5.4.114)
Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-74-generic root=UUID=39aa2e4e-1c38-4eff-820c-f457ae82ec32 ro quiet splash vt.handoff=1

and here are the lines highlighted in red

pci 0000:00:00.2: AMD-Vi: Unable to read/write to IOMMU perf counter.

tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/response buffer. [mem 0xcd590000-0xcd590fff flags 0x200] vs cd590000 4000
tpm_crb MSFT0101:00: can't request region for resource [mem 0xcd590000-0xcd590fff]

pcieport 0000:00:01.6: AER: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
pcieport 0000:00:01.6: AER: device [1022:15d3] error status/mask=00100000/04400000
pcieport 0000:00:01.6: AER: [20] UnsupReq (First)
pcieport 0000:00:01.6: AER: TLP Header: 34000000 01000010 00000000 883c883c


kfd kfd: Failed to resume IOMMU for device 1002:15dd
kfd kfd: device 1002:15dd NOT added due to errors

rtw_pci 0000:02:00.0: failed to send h2c command
rtw_pci 0000:02:00.0: firmware failed to restore hardware setting - this line repeats multiple times

servodude
Lemon Half
Posts: 8271
Joined: November 8th, 2016, 5:56 am
Has thanked: 4435 times
Been thanked: 3564 times

Re: W10 Pro vs Ubuntu; no delete function

#419866

Postby servodude » June 16th, 2021, 8:54 am

GrahamPlatt wrote:If I remove errors=remount-ro from fstab, reboot and check I then have rw, then replace errors=remount-ro - would that work?


If the errors are fixed then remounting would be sufficient
- a reboot will be faster than working out what commands to use ;)

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419877

Postby GrahamPlatt » June 16th, 2021, 9:58 am

@JohnB

I can’t even (sudo) mount /dev/sdb1 on a temporary directory
“Mount is denied because the NTFS volume is already exclusively opened.” etc.

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419878

Postby GrahamPlatt » June 16th, 2021, 9:59 am

servodude wrote:
GrahamPlatt wrote:If I remove errors=remount-ro from fstab, reboot and check I then have rw, then replace errors=remount-ro - would that work?


If the errors are fixed then remounting would be sufficient
- a reboot will be faster than working out what commands to use ;)


As I said, it seems to have become sticky.. I have rebooted several times and it remains ro.
Not only /sdb, but also the Windows partition on /sda is read-only now, whereas before the W10 Pro upgrade, that was also rw.

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419883

Postby GrahamPlatt » June 16th, 2021, 10:18 am

Curioser & curioser,

Here's fstab:

# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda5 during installation
UUID=39aa2e4e-1c38-4eff-820c-f457ae82ec32 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=4462-8F58 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
/dev/disk/by-uuid/BBEDEF28BEB25CA9 /mnt/BBEDEF28BEB25CA9 auto nosuid,nodev,nofail,x-gvfs-show 0 0

To my mind, errors=remount-ro only pertains to the linux ext4 partion on /dev/sda (C:) and that is happily rw.

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419886

Postby GrahamPlatt » June 16th, 2021, 10:24 am

It looks like "the system" has added nodev and nosuid somehow, and that's where the problem lies.

Comments & recommendations appreciated

servodude
Lemon Half
Posts: 8271
Joined: November 8th, 2016, 5:56 am
Has thanked: 4435 times
Been thanked: 3564 times

Re: W10 Pro vs Ubuntu; no delete function

#419891

Postby servodude » June 16th, 2021, 10:39 am

GrahamPlatt wrote:
servodude wrote:
GrahamPlatt wrote:If I remove errors=remount-ro from fstab, reboot and check I then have rw, then replace errors=remount-ro - would that work?


If the errors are fixed then remounting would be sufficient
- a reboot will be faster than working out what commands to use ;)


As I said, it seems to have become sticky.. I have rebooted several times and it remains ro.
Not only /sdb, but also the Windows partition on /sda is read-only now, whereas before the W10 Pro upgrade, that was also rw.


Sometimes these days there's "other things" that tinker with/below/before the fstab (looking at you udev) meaning that sometimes it doesn't give you the full picture, and given you've got an sda5, and no fstab entries for the other partitions that implies, perhaps there's that kind of thing happening?

Fixing the partitions is normally done without them mounted
- fsck works on the /dev/sdX directly which will be rw unless there's a hardware thing preventing it (essentially you tell it that there should be a filesystem of a type on a partition and it scans it without worrying about the OS doing anything)

Use mount to see what's mounted

umount the ones you want to scan and repair
- and find the right form of fsck to run on each
- that might help?

-sd

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419893

Postby GrahamPlatt » June 16th, 2021, 10:43 am

Hope so, because I’ve just removed nodev & nosuid from fstab, rebooted, no difference.
It has to be something deeper.

TheMotorcycleBoy
Lemon Quarter
Posts: 3245
Joined: March 7th, 2018, 8:14 pm
Has thanked: 2222 times
Been thanked: 587 times

Re: W10 Pro vs Ubuntu; no delete function

#419900

Postby TheMotorcycleBoy » June 16th, 2021, 10:59 am

Just out of interest, why do you need a windows box at all?

The only things which I imagine, would be a "must-have windows" for some users are certain PC games.

Matt

TheMotorcycleBoy
Lemon Quarter
Posts: 3245
Joined: March 7th, 2018, 8:14 pm
Has thanked: 2222 times
Been thanked: 587 times

Re: W10 Pro vs Ubuntu; no delete function

#419903

Postby TheMotorcycleBoy » June 16th, 2021, 11:09 am

GrahamPlatt wrote:
servodude wrote:
GrahamPlatt wrote:If I remove errors=remount-ro from fstab, reboot and check I then have rw, then replace errors=remount-ro - would that work?


If the errors are fixed then remounting would be sufficient
- a reboot will be faster than working out what commands to use ;)


As I said, it seems to have become sticky.. I have rebooted several times and it remains ro.
Not only /sdb, but also the Windows partition on /sda is read-only now, whereas before the W10 Pro upgrade, that was also rw.

So the issue is windows. I don't know how your ub20 is mounting the ntfs partition (is it an automagical invocation which the ub20 boot process constructs? FWIW I gave up with windows/linux coexistence playing back the 2001/2002 I think, which was writing LILO and fstab entries by hand etc.), but at first glance it seems that the linux box has specified "ro" because that's what it (correctly?) thinks windows is wanting to grant.

to use the ability to encrypt folders and use bitlocker

Presumably this complicates matters quite dramatically.

Matt

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419913

Postby GrahamPlatt » June 16th, 2021, 11:33 am

Ffksck!!

Now fsck won’t run.

Firstly checked that I had the correct fsck... no fsck.ntfs in /usr/bin. OK, download & install ntfs-3g.
Unmount /dev/sdb
Run ntfsfix /dev/sdb

“Bad magic number... try chkdsk”!

So I’m re-running chkdsk, but not getting any errors.

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419915

Postby GrahamPlatt » June 16th, 2021, 11:38 am

TheMotorcycleBoy wrote:
GrahamPlatt wrote:
servodude wrote:
If the errors are fixed then remounting would be sufficient
- a reboot will be faster than working out what commands to use ;)


As I said, it seems to have become sticky.. I have rebooted several times and it remains ro.
Not only /sdb, but also the Windows partition on /sda is read-only now, whereas before the W10 Pro upgrade, that was also rw.

So the issue is windows. I don't know how your ub20 is mounting the ntfs partition (is it an automagical invocation which the ub20 boot process constructs? FWIW I gave up with windows/linux coexistence playing back the 2001/2002 I think, which was writing LILO and fstab entries by hand etc.), but at first glance it seems that the linux box has specified "ro" because that's what it (correctly?) thinks windows is wanting to grant.

to use the ability to encrypt folders and use bitlocker

Presumably this complicates matters quite dramatically.

Matt



I think you’re probably right there Matt. Windows is the problem. All began when I did that upgrade to Pro.
I have Macrium backups of the before state, so I could just revert to WH, and hope that works. But I’m now at the tearing my hair out stage. I think I’ll step away and calm down before I really damage the thing.

Infrasonic
Lemon Quarter
Posts: 4479
Joined: November 4th, 2016, 2:25 pm
Has thanked: 644 times
Been thanked: 1260 times

Re: W10 Pro vs Ubuntu; no delete function

#419922

Postby Infrasonic » June 16th, 2021, 11:48 am

Windows does have a habit of 'overwriting' certain things with major upgrades - even on a multi-boot W10 box (C and D boot drives + USB boot) - I've sometimes had to fix things after, mainly around boot issues.

The general rec is to keep secure boot off (even with Linux distros that support it like Ubuntu), have Windows and Linux on separate drives (which also helps with failures) and with things like Linux NTFS write make sure the driver is decent and not corrupting anything.
Paragon do free/paid for versions which tend to be more robust if you have a business critical set-up.
https://www.paragon-software.com/home/n ... comparison

Windows 10 has a repair/in place upgrade facility which will preserve most of the settings, so if all else fails you could try that and /or restoring a W10/Linux backup. Ultimately that might be quicker than faffing in the command line for days trying to figure out what went wrong with Bitlocker.
https://www.tenforums.com/tutorials/163 ... grade.html

GrahamPlatt
Lemon Quarter
Posts: 2059
Joined: November 4th, 2016, 9:40 am
Has thanked: 1032 times
Been thanked: 824 times

Re: W10 Pro vs Ubuntu; no delete function

#419946

Postby GrahamPlatt » June 16th, 2021, 12:46 pm

I have an idea that I know what it is now. It’s just come to mind that I had the same problem some years ago, and it was Windows “fast boot” which was the culprit. Once chkdsk has finished, I’ll go and turn that off. Here’s hoping.


Return to “Technology - Computers, TV, Phones etc.”

Who is online

Users browsing this forum: No registered users and 7 guests