Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
-1
votes
1
answers
39
views
Why is the root partition not remounted rw after booting is finished if mounting other disks fails?
I have a Debian 12 server that I just restored to a different hardware from backups. The new hardware is missing some disks and of course they failed to mount. After the machine booted, the root filesystem was still mounted read-only. I checked everything, but didn't find any issue. Then I removed a...
I have a Debian 12 server that I just restored to a different hardware from backups. The new hardware is missing some disks and of course they failed to mount.
After the machine booted, the root filesystem was still mounted read-only. I checked everything, but didn't find any issue.
Then I removed all the *.mount services for the missing disks and the server booted with the root filesystem mounted writeable.
That makes no sense to me. Why should the root filesystem, which is completely fine and without any errors, not be mounted rw if any other mount point fails?
Is that a behaviour that I can configure somehow?
Markus Grunwald
(173 rep)
Jul 26, 2025, 01:00 PM
• Last activity: Jul 26, 2025, 03:37 PM
0
votes
1
answers
73
views
Can you explain why mount -o ro,noload sometimes modifies the filesystem?
This reddit post explains that using `mount -o ro` over NTFS changes the atime of files. They say something like that the kernel is not obliged to honour the ro flag, and to achieve reliable readonly one must mount the device as readonly block device. I'm very confused by this seemingly buggy implem...
This reddit post explains that using
mount -o ro
over NTFS changes the atime of files.
They say something like that the kernel is not obliged to honour the ro flag, and to achieve reliable readonly one must mount the device as readonly block device.
I'm very confused by this seemingly buggy implementation!
For various filesystems: which method is reliable, in which cases, and why does the standard mount -o ro,noload
not always work reliably!
And by the way why does mount have the weird syntax mount -o ro
rather than a more natural syntax like mount --ro
?
- "mount -o ro" does not write-protect last access dates on NTFS.
user324831
(113 rep)
Jun 23, 2025, 01:35 PM
• Last activity: Jun 23, 2025, 03:46 PM
0
votes
1
answers
1980
views
Read-only filesystem - Considerations and Loss of Functionality
I'm creating an embedded system using Buildroot. Currently, my Buildroot configuration ensures the rootfs is remounted as read/write during startup. However I would like to remove this feature and keep my rootfs as read-only. I have a few questions regarding this: ---------- How do I change a user's...
I'm creating an embedded system using Buildroot. Currently, my Buildroot configuration ensures the rootfs is remounted as read/write during startup. However I would like to remove this feature and keep my rootfs as read-only.
I have a few questions regarding this:
----------
How do I change a user's password? This would require changing /etc/passwd & /etc/shadow.
How do I change the timezone? This would require changing /etc/localtime.
How do I create ssh keys for sshd? ssh-keygen creates the keys in /etc/ssh/
According to the Filesystem Hierarchy Standard, a Linux system is required to function with a read-only /etc/ directory, but it seems I'm finding a distinct loss of functionality as described above.
----------
Secondly, after specifying that the rootfs is to remain read-only in my Buildroot configuration, it elects to mount /var/ as a tmpfs (in RAM, so it is writable)
But, this is volatile, how can I ensure runtime files (which I need to save) aren't lost on reboot or unexpected power-loss?
I'm using UBIFS, in my embedded system. Am I required to create a read/write UBI volume which I use as persistent storage? Is this the standard in embedded systems?
----------
And finally, should I re-evaluate my idea to use a read-only rootfs at all? Given I am using UBI, and as wear-levelling is implemented across all the UBI volumes (the exist on the same device, of course), will I receive any benefit in making my rootfs read-only?
Mattmatician
(1 rep)
Apr 29, 2018, 01:47 PM
• Last activity: Jun 9, 2025, 07:05 AM
3
votes
1
answers
2818
views
File system goes read-only on NVMe SSD seemingly at random
I am currently running a somewhat fresh Kubuntu 22.04 install on a relatively new M.2 NVMe drive. However, I have a problem where my computer drive (I think) turns read only, causing the system to sort of crash. When I first installed the system, this would happen very frequently until I applied the...
I am currently running a somewhat fresh Kubuntu 22.04 install on a relatively new M.2 NVMe drive.
However, I have a problem where my computer drive (I think) turns read only, causing the system to sort of crash. When I first installed the system, this would happen very frequently until I applied the
=off
fix to the /etc/default/grub file:
="quiet splash pcie_aspm=off"
. This made it happen less frequently.
This issue happens on all the previous systems I've tried to install on this drive, with most of the same symptoms, i.e. some icons disappearing, apps breaking, chromium tabs displaying "aw snap," and in particular, libreoffice gives a "filesystem read only" error when trying to save. One thing different from similar errors though, is that when I reboot the computer manually (holding power button) it goes back to normal for a while, while some seem to have problems booting afterwards. Then it happens again some time later. I can provide more details if needed, e.g. hardware, syslog entries, etc.
Does anyone have a permanent solution to this?
Not a computer whiz, but I do know some.
Lirik
(31 rep)
Nov 22, 2022, 03:13 AM
• Last activity: May 19, 2025, 10:09 AM
1
votes
1
answers
4163
views
Managing systemd services on read-only filesystem
I am looking for strategies how to manage enabling and disabling of systemd services on a read-only filesystem. It's not possible as the multi-user.target.wants directory contents get modified. Keeping /etc/systemd/system as the default location for services, has anyone tried ways to manage the laun...
I am looking for strategies how to manage enabling and disabling of systemd services on a read-only filesystem. It's not possible as the multi-user.target.wants directory contents get modified.
Keeping /etc/systemd/system as the default location for services, has anyone tried ways to manage the launch 'table' / multi-user.target.wants directory such that an application or script running on the target can still enable or disable a specific service (or services) even though the filesystem is RO?
I have thought to symlink the multi-user.target.wants directory to a location on a small rw "config" partition and switch between pre-set multi-user.target.wants directories on boot/reboot according to the need. Alternatively, I suppose a script or application could directly modify this symlinked location by adding or removing entries from it.
I have not tested that yet; I wanted to see if anyone has experience with this, possible strategies, or know of a more standardized approach to this? Thank you.
chameleon
(31 rep)
Jul 21, 2022, 04:05 PM
• Last activity: Apr 17, 2025, 10:08 AM
0
votes
0
answers
42
views
Full R/O linux system
I am planning to setup a “safe” UNIX system. The idea is to a) boot from a (physical) R/O USB stick. b) run the whole system on a RAM disk (volatile RAM). c) and attach a non-volatile device (let’s call it NVD). To the NVD I will only write those files, which I personally know and understand. In oth...
I am planning to setup a “safe” UNIX system.
The idea is to
a) boot from a (physical) R/O USB stick.
b) run the whole system on a RAM disk (volatile RAM).
c) and attach a non-volatile device (let’s call it NVD). To the NVD I will only write those files, which I personally know and understand. In other words: I do not want to have any file on the NVD, which I am not 100 % sure what it is and what the content is.
The NVD could be a special partition on the hard drive or a second USB stick or a special network drive.
Of course, stick content and the NVD should be crypted.
The reason to use a R/O USB stick is that I am surer that it is really write protected.
The idea behind this is that once I switch off (or power down) the system it will go exactly back to where it came from, except for the few and well-known changes to the NVD.
From here I could – for example -do my online banking stuff.
I understand that a lot of comfort will be lost, but I might be willing to accept that for the benefit of increased safety. Also, I can remove the USB stick and the “normal” system (for example a Windows system) appears and nobody knows about the stick.
Does anyone see any problem here?
What about a virus that made it into the UEFI BIOS, any idea to prohibit that?
Has anyone done this already, what are the experience(s)?
Thx for telling
Manamana
(1 rep)
Mar 13, 2025, 07:09 PM
0
votes
2
answers
6538
views
Read/write /etc with read-only filesystem
I have a setup for an embedded project where I'd like to keep the root filesystem read-only and system configuration on a read/write partition. Users cannot install programs, but they can modify configurations. Most of this is fairly easy except for the `/etc` directory. It contains configuration th...
I have a setup for an embedded project where I'd like to keep the root filesystem read-only and system configuration on a read/write partition. Users cannot install programs, but they can modify configurations. Most of this is fairly easy except for the
/etc
directory. It contains configuration that is needed on startup (like fstab
) as well as configuration that can be changed (like passwd
).
I'm not sure what my best option for moving forward. Could I have a default /etc
directory and mount over it after boot? How about symlink all the variable configuration files to the read/write partition? Another better solution? For simplicity, consider how this would be done using a Raspberry Pi.
Some might (rightly) ask how updates are handled. Updates are compressed and signed images of the root and boot partitions the embedded software know how to install. Hence the desire for a read-only root file system as any changes would be lost on upgrade.
A. Que
(663 rep)
Jul 27, 2023, 05:15 PM
• Last activity: Dec 29, 2024, 01:22 PM
1
votes
0
answers
28
views
Selective rw access on read-only mounted partition
I have read-only root file system, protected with [dm-verity][1] and clean read-write user data storage. Nevertheless, I need to make a tiny set of files on rootfs which require persistent storage **modifiable**. As far as I know, the common approach for this is to use **unionfs** like file-systems,...
I have read-only root file system, protected with dm-verity and clean read-write user data storage.
Nevertheless, I need to make a tiny set of files on rootfs which require persistent storage **modifiable**.
As far as I know, the common approach for this is to use **unionfs** like file-systems, for example overlayfs . The problem with overlayfs, is that it seems it doesn't provide file-level granularity. What do I mean: for example if I want to make **/etc/resolv.conf** modifiable, I need to mount entire **/etc/** folder accordingly.
mount -t overlay overlay -o lowerdir=/etc,upperdir=/opt/storage/etc-up,workdir=/opt/storage/etc-wd,noexec /etc
I tried then to use file bind mounts instead of overlayfs, to overcome this, so the idea was to copy target file to read write storage at the boot time, and then bind-mount to original place. However it seems in some cases, for example user add, software also tries to **create** some temporary files in /etc folder (f.e. lock files), so that didn't work for me (file creation of course failed because original rootfs mounted ro)
I'm wondering if there is a solution which will help me to do what I want.
The requirements could be summarized as:
- The most of the rootfs is left forever readonly (implemented already, the rootfs shall be mounted ro)
- I can statically define at the image build time that file1, file2 ... file_n are excluded from this "forever-readonly" data list.
- I can define that new files can be created in folder1, folder2 ... folder_n
Alex Hoppus
(257 rep)
Dec 18, 2024, 10:58 AM
1
votes
0
answers
79
views
External HDDs become read only every 2 days
I decided to have a media server running Linux Mint and CasaOS (Plex) and 2 HDDs connected via USB. All works fine after I turn it on however, after 2 days or so, the drives become read only, causing Plex and CasaOS to stop working. Moreover, if I try to restart it or shut it down it hangs so I need...
I decided to have a media server running Linux Mint and CasaOS (Plex) and 2 HDDs connected via USB.
All works fine after I turn it on however, after 2 days or so, the drives become read only, causing Plex and CasaOS to stop working.
Moreover, if I try to restart it or shut it down it hangs so I need to force shut down.
And it took me a while to notice why things stopped working every 2 days or so.
After that, when I turn it on, if the HDDs are connected, it hangs again.
I need to turn of the enclosure, turn on the PC, then turn on the HDDs and restart.
After that, it works again for a few days and same thing happens.
I'm kinda lost and I would appreciate any suggestions, especially since I am not mainly a Linux user.
I would've posted this on CasaOS forum but to me it seems more of an OS issue.
daydr3am3r
(131 rep)
Sep 2, 2024, 03:56 PM
0
votes
1
answers
151
views
Why did the root file system become RO?
Approximately once every 2 months, the remote dedicated server stops working. ***The logs show that all logs stop being written at the same time.*** Can't connect via ssh. The server responds, but immediately drops the connection. ***ssh -vvv xxx.xxx.xxx.xxx*** ``` OpenSSH_9.3p1 Ubuntu-1ubuntu3.3, O...
Approximately once every 2 months, the remote dedicated server stops working.
***The logs show that all logs stop being written at the same time.***
Can't connect via ssh. The server responds, but immediately drops the connection.
***ssh -vvv xxx.xxx.xxx.xxx***
OpenSSH_9.3p1 Ubuntu-1ubuntu3.3, OpenSSL 3.0.10 1 Aug 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
...
Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-107-generic x86_64)
...
/bin/bash: Input/output error <-!!!!!!!!!!!!!!!!!!!!!
...
debug3: send packet: type 1
Connection to 31.184.218.159 closed.
Transferred: sent 4268, received 4732 bytes, in 0.2 seconds
Bytes per second: sent 17897.8, received 19843.6
debug1: Exit status 1
A reboot through the hosting admin panel restores the server.
It’s as if the root file system became read only, but I don’t understand how to confirm my guess and fix it.
$ sudo smartctl -a /dev/nvme0
...
SMART overall-health self-assessment test result: PASSED
...
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
...
Available Spare: 100%
...
Percentage Used: 1%
...
Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged
$ sudo smartctl -a /dev/nvme1
...
SMART overall-health self-assessment test result: PASSED
...
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
...
Available Spare: 100%
...
Percentage Used: 2%
...
Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged
How to ensure that the server does not stop working anymore?
Access to the server only via ssh.
SkyN
(109 rep)
Jul 19, 2024, 07:16 AM
• Last activity: Jul 19, 2024, 08:09 AM
14
votes
3
answers
1485
views
Why does setting a variable readonly in the outer scope prevent defining a local variable with the same name?
I've found nothing about this in all my searching. In the code below, `Bar1` acts like I'd expect a "regular" variable to act (since `help declare` says that `-g` is only "seen" in function calls): it changes value depending on the scope (outer or inner). `Bar2`, being "plainly" declared, also acts...
I've found nothing about this in all my searching.
In the code below,
Bar1
acts like I'd expect a "regular" variable to act (since help declare
says that -g
is only "seen" in function calls): it changes value depending on the scope (outer or inner).
Bar2
, being "plainly" declared, also acts like I expect (being gfhjnfd
in the outer scope, and blat
in the inner scope.
But Foo
is a globally unchanging variable. help declare
only says "to make NAMEs readonly". Where is this extended (and unwanted) feature documented?
$ cat test.sh
#!/bin/bash
declare -r Foo=bar
declare -g Bar1=fdhtbn
declare Bar2=gfhjnfd
X()
{
local Foo=$1
local Bar1=snorkel
local Bar2=$2
echo Foo in X = $Foo
echo Bar1 in X = $Bar1
echo Bar2 in X = $Bar2
}
echo Foo, above X, = $Foo
echo Bar1, above X = $Bar1
echo Bar2, above X = $Bar2
echo
X baz blat
echo
echo Foo, below X, = $Foo
echo Bar1, below X = $Bar1
echo Bar2, below X = $Bar2
$ ./test.sh
Foo, above X, = bar
Bar1, above X = fdhtbn
Bar2, above X = gfhjnfd
./test.sh: line 9: local: Foo: readonly variable
Foo in X = bar
Bar1 in X = snorkel
Bar2 in X = blat
Foo, below X, = bar
Bar1, below X = fdhtbn
Bar2, below X = gfhjnfd
RonJohn
(1421 rep)
Jun 14, 2024, 07:46 AM
• Last activity: Jun 17, 2024, 11:07 AM
0
votes
2
answers
5428
views
SCP copy remote to local returns "Read-only file system" error on remote folder
I used the following command: scp -r root@IP:/home/user/remotefolder /localfolder After entering my passphrase (I'm using SSH key), I get the following error: /remotefolder: Read-only file system Not sure why I get this error. When I log in as root, I can copy this folder to another location within...
I used the following command:
scp -r root@IP:/home/user/remotefolder /localfolder
After entering my passphrase (I'm using SSH key), I get the following error:
/remotefolder: Read-only file system
Not sure why I get this error. When I log in as root, I can copy this folder to another location within the server, but the command above doesn't work. Since I'm copying from remote to local, why would a read-only folder/file affect a copy?
Limerick
(11 rep)
Sep 2, 2023, 05:01 PM
• Last activity: Apr 28, 2024, 11:38 PM
63
votes
5
answers
137931
views
How can I exit from read-only mode in Vim?
I opened a file in readonly mode; is there a way to get out of readonly mode? It's an inconvenience to remembering to put an exclamation mark after `w` every time I want to save.
I opened a file in readonly mode; is there a way to get out of readonly mode?
It's an inconvenience to remembering to put an exclamation mark after
w
every time I want to save.
wrongusername
(1057 rep)
Apr 4, 2013, 03:36 AM
• Last activity: Apr 6, 2024, 09:33 AM
2
votes
0
answers
86
views
vgrename but without writing to storage (read-only PV)
when dealing with image backups of systems I often run into issues with the VG within the mounted backup image having the same name as the live one. Also because the backup is read-only I cannot simply vgrename the backup one eihter. How can I mount a partition from within such a LVM to extract file...
when dealing with image backups of systems I often run into issues with the VG within the mounted backup image having the same name as the live one.
Also because the backup is read-only I cannot simply vgrename the backup one eihter. How can I mount a partition from within such a LVM to extract files more easily?
Currently I'm using KVM to mount it to a live-CD linux and then copy files via SSH. There must be a better way.
I also considered renaming the hosts vg, but that is not ideal, as after the next backup I'd have to do it again.
Is there some way to tell vgrename to only rename in "running config" but not sync the rename to disk? Or bring a non unique VG online by some kind of filtering on the backing PVs? I've seen some commands have a
--devices PV
argument, however either I'm using it incorrectly or it alone is not enough to bring a logical volume online from within a non unique volume group.
I also tried using containers, but with --privileged
I get all of the /dev
into the container and therefore it also sees both.
Without and with only e.g. --device /dev/dm-3
it doesn't see anything from LVM, however it also doesn't appear to be able to mount a new one as pvs
is empty and pvs /dev/dm-3
returns with " Cannot use /dev/dm-3: device is missing sysfs info" only an error.
Can someone help?
K. Frank
(121 rep)
Apr 5, 2024, 02:26 PM
• Last activity: Apr 5, 2024, 02:36 PM
4
votes
1
answers
1572
views
Why a filesystem is unmounted but still in use?
I was using ext4 filesystems for a long time, and it's the first time I see a weird behavior of ext4 filesystem. There is ext4 filesystem in `/dev/dm-2` An I/O error happened in the underlying device, and the filesystem was remounted read-only. It is fine and expected by the configuration. But for s...
I was using ext4 filesystems for a long time, and it's the first time I see a weird behavior of ext4 filesystem.
There is ext4 filesystem in
An I/O error happened in the underlying device, and the filesystem was remounted read-only.
It is fine and expected by the configuration.
But for some unknown reason, now it is not possible to completely unmount the filesystem.
The command
The mount entry is gone from output of
But.
First: I can't see the usual
Second thing (it speaks for itself that something is wrong):
Finally the fourth thing which makes the device unusable:
The
There was nothing else using the Dirty Cache at the moment of measuring it with
The unmount call which succeeded, was not an
It resulted in Segmentation fault (Core dumped), and this in dmesg
What can be the cause of these issues?
There is ext4 filesystem in
/dev/dm-2
An I/O error happened in the underlying device, and the filesystem was remounted read-only.
It is fine and expected by the configuration.
But for some unknown reason, now it is not possible to completely unmount the filesystem.
The command
umount /the/mount/point
returned with success. Further runs of that command say "Not mounted".
The mount entry is gone from output of
mount
command. The filesystem is not mounted anywhere else.But.
First: I can't see the usual
EXT4-fs: unmounting filesystem
text in dmesg. In fact, there is nothing in the dmesg.
Second thing (it speaks for itself that something is wrong):
root# cat /proc/meminfo | grep dirty
Dirty: 9457728 kB
root# time sync
real 0m0.012s
user 0m0.000s
sys 0m0.002s
root# cat /proc/meminfo | grep dirty
Dirty: 9453632 kB
Third thing: the debug directory /sys/fs/ext4/dm-2
still exists.
Tried writing "1" to /sys/fs/ext4/dm-2/simulate_fail
in hope that it will bring the filesystem down. But it does nothing, shows nothing in dmesg.Finally the fourth thing which makes the device unusable:
root# e2fsck -fy /dev/dm-2
e2fsck 1.46.5 (30-Dec-2021)
/dev/dm-2 is in use.
e2fsck: Cannot continue, aborting.
I understand that it is possible to reboot and etc. This question is not about solving some simple newbie problem. I want somebody experienced in ext4 filesystem to help me understand what can cause this behavior.
The
dm-2
device is not mounted anywhere else, not bind-mounted, not in use by anything else.
There was nothing else using the Dirty Cache at the moment of measuring it with
cat /proc/meminfo | grep dirty
.
The unmount call which succeeded, was not an
MNT_DETACH
(no -l
flag was used). Despite that, it succeeded nearly immediately (it's weird). The mount point is no longer mounted: but as I described above, it can be easily seen that the filesystem is NOT unmounted.
Update: as A.B pointed out, I tried to check if the filesystem is still mounted in a different namespace. I didn't mount it in a different namespace, so I didn't expect to see anything. But, surprisingly, it was mounted in a different namespace, surprisingly this (username changed):
4026533177 mnt 1 3411291 an-unrelated-nonroot-user xdg-dbus-proxy --args=43
I tried to enter that namespace and unmount it using nsenter -t 3411291 -m -- umount /the/mount/point
It resulted in Segmentation fault (Core dumped), and this in dmesg
[970130.866738] Buffer I/O error on dev dm-2, logical block 0, lost sync page write
[970130.867925] EXT4-fs error (device dm-2): ext4_mb_release_inode_pa:4846: group 9239, free 2048, pa_free 4
[970130.870291] Buffer I/O error on dev dm-2, logical block 0, lost sync page write
[970130.949466] divide error: 0000 [#1] PREEMPT SMP PTI
[970130.950677] CPU: 49 PID: 4118804 Comm: umount Tainted: P W OE 6.1.68-missmika #1
[970130.953056] Hardware name: OEM X79G/X79G, BIOS 4.6.5 08/02/2022
[970130.953121] RIP: 0010:mb_update_avg_fragment_size+0x35/0x120
[970130.953121] Code: 41 54 53 4c 8b a7 98 03 00 00 41 f6 44 24 7c 80 0f 84 9a 00 00 00 8b 46 14 48 89 f3 85 c0 0f 84 8c 00 00 00 99 b9 ff ff ff ff 7e 18 0f bd c8 41 89 cd 41 83 ed 01 0f 88 ce 00 00 00 0f b6 47
[970130.957139] RSP: 0018:ffffb909e3123a28 EFLAGS: 00010202
[970130.957139] RAX: 000000000000082a RBX: ffff91140ac554d8 RCX: 00000000ffffffff
[970130.957139] RDX: 0000000000000000 RSI: ffff91140ac554d8 RDI: ffff910ead74f800
[970130.957139] RBP: ffffb909e3123a40 R08: 0000000000000000 R09: 0000000000004800
[970130.957139] R10: ffff910ead74f800 R11: ffff9114b7126000 R12: ffff910eb31d2000
[970130.957139] R13: 0000000000000007 R14: ffffb909e3123b80 R15: ffff911d732beffc
[970130.957139] FS: 00007f6d94ab4800(0000) GS:ffff911d7fcc0000(0000) knlGS:0000000000000000
[970130.957139] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[970130.957139] CR2: 00003d140602f000 CR3: 0000000365690002 CR4: 00000000001706e0
[970130.957139] Call Trace:
[970130.957139]
[970130.957139] ? show_regs.cold+0x1a/0x1f
[970130.957139] ? __die_body+0x24/0x70
[970130.957139] ? __die+0x2f/0x3b
[970130.957139] ? die+0x34/0x60
[970130.957139] ? do_trap+0xdf/0x100
[970130.957139] ? do_error_trap+0x73/0xa0
[970130.957139] ? mb_update_avg_fragment_size+0x35/0x120
[970130.957139] ? exc_divide_error+0x3f/0x60
[970130.957139] ? mb_update_avg_fragment_size+0x35/0x120
[970130.957139] ? asm_exc_divide_error+0x1f/0x30
[970130.957139] ? mb_update_avg_fragment_size+0x35/0x120
[970130.957139] ? mb_set_largest_free_order+0x11c/0x130
[970130.957139] mb_free_blocks+0x24d/0x5e0
[970130.957139] ? ext4_validate_block_bitmap.part.0+0x29/0x3e0
[970130.957139] ? __getblk_gfp+0x33/0x3b0
[970130.957139] ext4_mb_release_inode_pa.isra.0+0x12e/0x350
[970130.957139] ext4_discard_preallocations+0x22e/0x490
[970130.957139] ext4_clear_inode+0x31/0xb0
[970130.957139] ext4_evict_inode+0xba/0x750
[970130.989137] evict+0xd0/0x180
[970130.989137] dispose_list+0x39/0x60
[970130.989137] evict_inodes+0x18e/0x1a0
[970130.989137] generic_shutdown_super+0x46/0x1b0
[970130.989137] kill_block_super+0x2b/0x60
[970130.989137] deactivate_locked_super+0x39/0x80
[970130.989137] deactivate_super+0x46/0x50
[970130.989137] cleanup_mnt+0x109/0x170
[970130.989137] __cleanup_mnt+0x16/0x20
[970130.989137] task_work_run+0x65/0xa0
[970130.989137] exit_to_user_mode_prepare+0x152/0x170
[970130.989137] syscall_exit_to_user_mode+0x2a/0x50
[970130.989137] ? __x64_sys_umount+0x1a/0x30
[970130.989137] do_syscall_64+0x6d/0x90
[970130.989137] ? syscall_exit_to_user_mode+0x38/0x50
[970130.989137] ? __x64_sys_newfstatat+0x22/0x30
[970130.989137] ? do_syscall_64+0x6d/0x90
[970130.989137] ? exit_to_user_mode_prepare+0x3d/0x170
[970130.989137] ? syscall_exit_to_user_mode+0x38/0x50
[970130.989137] ? __x64_sys_close+0x16/0x50
[970130.989137] ? do_syscall_64+0x6d/0x90
[970130.989137] ? exc_page_fault+0x8b/0x180
[970130.989137] entry_SYSCALL_64_after_hwframe+0x64/0xce
[970130.989137] RIP: 0033:0x7f6d94925a3b
[970130.989137] Code: fb 43 0f 00 f7 d8 64 89 01 48 83 c8 ff c3 90 f3 0f 1e fa 31 f6 e9 05 00 00 00 0f 1f 44 00 00 f3 0f 1e fa b8 a6 00 00 00 0f 05 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 8b 15 c1 43 0f 00 f7 d8
[970130.989137] RSP: 002b:00007ffdd60f7d08 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
[970130.989137] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f6d94925a3b
[970130.989137] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000055ca1c6f7d60
[970130.989137] RBP: 000055ca1c6f7b30 R08: 0000000000000000 R09: 00007ffdd60f6a90
[970130.989137] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[970130.989137] R13: 000055ca1c6f7d60 R14: 000055ca1c6f7c40 R15: 000055ca1c6f7b30
[970130.989137]
[970130.989137] Modules linked in: 88x2bu(OE) erofs dm_zero zram ext2 hfs hfsplus xfs kvdo(OE) dm_bufio mikasecfs(OE) simplefsplus(OE) melon(OE) mikatest(OE) iloveaki(OE) tls vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) ip6t_REJECT nf_reject_ipv6 ip6t_rt ipt_REJECT nf_reject_ipv4 xt_recent xt_tcpudp nft_limit xt_limit xt_addrtype xt_pkttype nft_chain_nat xt_MASQUERADE xt_nat nf_nat xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_compat nf_tables binfmt_misc nfnetlink nvidia_uvm(POE) nvidia_drm(POE) intel_rapl_msr intel_rapl_common nvidia_modeset(POE) sb_edac nls_iso8859_1 x86_pkg_temp_thermal intel_powerclamp coretemp nvidia(POE) snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi cfg80211 joydev snd_hda_intel input_leds snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm_intel snd_hda_core snd_hwdep kvm snd_pcm snd_seq_midi rapl snd_seq_midi_event snd_rawmidi intel_cstate serio_raw pcspkr snd_seq video wmi snd_seq_device snd_timer drm_kms_helper fb_sys_fops snd syscopyarea sysfillrect sysimgblt soundcore
[970130.989137] ioatdma dca mac_hid sch_fq_codel dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua msr parport_pc ppdev lp parport drm efi_pstore ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid1 raid0 multipath linear crct10dif_pclmul hid_generic crc32_pclmul ghash_clmulni_intel sha512_ssse3 sha256_ssse3 sha1_ssse3 usbhid cdc_ether aesni_intel usbnet uas hid crypto_simd r8152 cryptd usb_storage mii psmouse ahci i2c_i801 r8169 lpc_ich libahci i2c_smbus realtek [last unloaded: 88x2bu(OE)]
[970131.024615] ---[ end trace 0000000000000000 ]---
[970131.203209] RIP: 0010:mb_update_avg_fragment_size+0x35/0x120
[970131.204344] Code: 41 54 53 4c 8b a7 98 03 00 00 41 f6 44 24 7c 80 0f 84 9a 00 00 00 8b 46 14 48 89 f3 85 c0 0f 84 8c 00 00 00 99 b9 ff ff ff ff 7e 18 0f bd c8 41 89 cd 41 83 ed 01 0f 88 ce 00 00 00 0f b6 47
[970131.207841] RSP: 0018:ffffb909e3123a28 EFLAGS: 00010202
[970131.209048] RAX: 000000000000082a RBX: ffff91140ac554d8 RCX: 00000000ffffffff
[970131.210284] RDX: 0000000000000000 RSI: ffff91140ac554d8 RDI: ffff910ead74f800
[970131.211512] RBP: ffffb909e3123a40 R08: 0000000000000000 R09: 0000000000004800
[970131.212749] R10: ffff910ead74f800 R11: ffff9114b7126000 R12: ffff910eb31d2000
[970131.213977] R13: 0000000000000007 R14: ffffb909e3123b80 R15: ffff911d732beffc
[970131.215181] FS: 00007f6d94ab4800(0000) GS:ffff911d7fcc0000(0000) knlGS:0000000000000000
[970131.216370] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[970131.217553] CR2: 00003d140602f000 CR3: 0000000365690002 CR4: 00000000001706e0
[970131.218740] note: umount exited with preempt_count 1
Machine still works, it's possible to sync other filesystems:
root# sync -f /
root#
But not global sync:
root# sync
(goes D state forever)
The dirty cache related to that ghost filesystem is not gone, the filesystem still "mounted"
What can be the cause of these issues?
melonfsck - she her
(150 rep)
Mar 14, 2024, 07:51 PM
• Last activity: Mar 15, 2024, 10:58 AM
0
votes
1
answers
1086
views
Is it possible to write on a mounted hard-drive that has Apple HFS/HFS+ file system
Running the latest Tails I have attached my hard-drive that got automatically mounted. However it seems only to be read-only. Is there a way to mount it in read/write ? Or is this not possible since the file system is Apple HFS/HFS+ ?
Running the latest Tails I have attached my hard-drive that got automatically mounted. However it seems only to be read-only.
Is there a way to mount it in read/write ? Or is this not possible since the file system is Apple HFS/HFS+ ?
Johny19
(145 rep)
Feb 10, 2018, 12:28 PM
• Last activity: Mar 1, 2024, 03:42 AM
1
votes
1
answers
132
views
Linux mount and save changes to RAM (while not changing the underlying file system)
I am looking for a way to discard any changes written to a filesystem. Currently, I am mounting a file system with `mount -o ro`. If programs write to it, an error will be raised. I would like to change the behavior so that the changes are saved to RAM and discarded on unmount. How would I do that?
I am looking for a way to discard any changes written to a filesystem.
Currently, I am mounting a file system with
mount -o ro
. If programs write to it, an error will be raised. I would like to change the behavior so that the changes are saved to RAM and discarded on unmount. How would I do that?
user602600
Feb 21, 2024, 06:53 AM
• Last activity: Feb 21, 2024, 09:57 AM
0
votes
1
answers
457
views
Ubuntu file system read-only after Windows system restore at previous point
I am running Ubuntu 18-04 via WSL on a Windows Virtual Machine in Azure. I needed to restore the machine to a previous point, and what happened was that the Ubuntu file system is now read-only.  When I run ``` dmesg ``` I have the following errors on the root file system ``` [250...
I am running Ubuntu 18-04 via WSL on a Windows Virtual Machine in Azure.
I needed to restore the machine to a previous point,
and what happened was that the Ubuntu file system is now read-only.
When I run
dmesg
I have the following errors on the root file system
[25081.148359] EXT4-fs warning (device sdc): ext4_clear_journal_err:5592: Filesystem error recorded from previous mount: IO failure
[25081.150048] EXT4-fs warning (device sdc): ext4_clear_journal_err:5594: Marking fs in need of filesystem check.
[25081.155917] EXT4-fs (sdc): warning: mounting fs with errors, running e2fsck is recommended
[25081.164175] EXT4-fs (sdc): Errors on filesystem, clearing orphan list.
[25081.164913] EXT4-fs (sdc): recovery complete
[25081.167250] EXT4-fs (sdc): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered. Quota mode: none.
Now I had the problem of running fsck on a mounted partition.
Since it is a VM, I can’t use an external disk,
so the only idea I had was to install another Linux version.
I installed SUSE Tumbleweed and attached the Ubuntu root partition with
wsl -d openSUSE-Tumbleweed --mount --vhd C:\Users\adm_difolco_e\Documents\Airflow\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2019.522.0_x64__79rhkp1fndgsc\ext4.vhdx –bare
I followed the WSL2 How-to:
Prepare and Attach Virtual Drives (VHD) tutorial for it.
Now when I run
lsblk
I get
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 389.8M 1 disk
sdb 8:16 0 4G 0 disk [SWAP]
sdc 8:32 0 1T 0 disk
sdd 8:48 0 1T 0 disk /mnt/wslg/distro
The command
df
shows nothing about sdc,
but when I run
sudo fsck -N /dev/sdc
I get:
fsck: error 2 (No such file or directory) while executing fsck.ext4 for /dev/sdc
Eliseo Di Folco
(11 rep)
Jan 15, 2024, 04:35 PM
• Last activity: Jan 31, 2024, 02:20 PM
1
votes
2
answers
2540
views
Why Am I able to edit /etc/resolv.conf on a read only file system?
I have an embedded linux environment which has a read only root file system on it. I am unable to edit files and create new directory in the read only root file system as expected. However, I see that I am still able to change the contents of file `/etc/resolv.conf` How is that possible? This actual...
I have an embedded linux environment which has a read only root file system on it.
I am unable to edit files and create new directory in the read only root file system as expected.
However, I see that I am still able to change the contents of file
/etc/resolv.conf
How is that possible? This actually works out for me. But I was just wondering why am I able to edit it?
Edit1: I am even able to create a write into /sys/class/pwm/$module_name/export
Edit 2: So I see that
resolv.conf -> /etc/resolv-conf.systemd
And
resolv-conf.systemd -> ../run/systemd/resolve/resolv.conf
thesillywhat
(45 rep)
Aug 17, 2020, 07:22 PM
• Last activity: Jan 30, 2024, 09:08 PM
0
votes
1
answers
59
views
Research and Folleys/Three RO Filesystems and No Way to Get the SD Card Back Operating
I have this SD Card that has three read-only filesystems on it. I am using a Linux computer to try to erase via dd or another command tool. I am currently trying to write an image to the SD Card. Nothing I found so far states that a locked SD Card because of it being read-only should stop me from pr...
I have this SD Card that has three read-only filesystems on it. I am using a Linux computer to try to erase via dd or another command tool.
I am currently trying to write an image to the SD Card. Nothing I found so far states that a locked SD Card because of it being read-only should stop me from proceeding with an image build.
But...it does and I cannot configure via commands what steps I should take.
fdisk: cannot open /dev/sdb: Read-only file system
That is one error. I have tried it with /dev/sdb
, /dev/sdb1
, and /dev/sdb2
so far without any luck.
I tried to use dd
to create an if=/dev/zero
to the output file at /dev/sdb but notta so far. Just errors.
I guess using a compiled image from beagleboard.org was a choice that I needed to begin with then at that time.
I was able to use Linux to adjust the micro SD Card image and boot to fruition.
For Ward
(15 rep)
Dec 23, 2023, 01:57 AM
• Last activity: Jan 7, 2024, 08:58 AM
Showing page 1 of 20 total questions