date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,319,313,753,000 |
I am trying to automate adding Homebrew to my path in a shell script, but these two lines do not evaluate inside my shell script:
#!/bin/sh
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
The second line of code runs the program [home]brew with the argument shellenv. It echoes several environment variables to... |
Running the script creates a local environment, inherited from the invoking environment, in which the script is executing and which ultimately is destroyed when the script terminates.
I'm first assuming that by "does not evaluate" and "not working", you are observing that the brew shellenv command does not appear to b... | Command output evaluation not working in Bash script [duplicate] |
1,319,313,753,000 |
I'd like to execute a statement to start a server. For that I have an environment variable to determine which server is to be started. I was given this command as a starting point:
eval "exec gunicorn --chdir /this/dir package.sub:call_main() -b 0.0.0.0:80"
As I have a few kinds of servers to start up, I would like t... |
In your second piece of code, you have removed the double quotes around the argument to eval. Don't do that. Removing them would make () special to the shell (it starts a sub-shell).
Instead:
app=main
eval "exec gunicorn --chdir /this/dir package.sub:call_$app'()' -b 0.0.0.0:80"
The parentheses still has to be quot... | Eval and exec with variable substitution |
1,319,313,753,000 |
Tracking down strange behavior a bash script resulted in the following MWE:
set -o errexit
set -o nounset
set -x
my_eval()
{
eval "$1"
}
my_eval "declare -A ASSOC"
ASSOC[foo]=bar
echo success
fails with: line 9: foo: unbound variable. Yet it works if eval is used in place of my_eval (and, obviously, if the declare ... |
A glance at the man pages tells us:
The -g option forces variables to be created or modified at the
global scope, even when **declare** is executed in a shell function.
Thus, if your script would say:
my_eval "declare -gA ASSOC"
it/you would be happier.
The point is that the "declare" statement sees its scope at whe... | why doesn't eval declare in a function work in bash? |
1,319,313,753,000 |
In a bash script:
jenkins_folder=`cut -d "|" -f1 -s input.csv`
jenkins_url='https://url.com:8181/jenkins/view/'
echo "jenkins_folder : ${jenkins_folder}"
for job in `java -jar jenkins-cli.jar -s ${jenkins_url}${jenkins_folder} list-jobs ${jenkins_folder} `
do
echo "Job name:: ${job} ****"
java ... |
The first issue is obvious: your url is https://url.com:8181/jenkins/view, so since it doesn't end with a slash, the value of ${jenkins_url}${jenkins_folder} is https://url.com:8181/jenkins/viewPlatform-X.X.X-SPO-MyPD-Integration-Dummy. So fix the url:
jenkins_url='https://url.com:8181/jenkins/view/'
Or, add the sla... | Shell script: Using variables makes command fails ( substituting values of variables manually ; command works fine ) |
1,319,313,753,000 |
My code
docker-machine create --driver virtualbox dev
VBoxManage list vms
"minikube" {9c326ed5-faf4-42fe-acda-bf3a283f1a74}
"kalinew" {de6de631-0d51-4638-b967-66db463cbf05}
"dev" {84a116bf-02b9-48e3-809a-f5232518c8ee}
Then
eval "$(docker-machine env dev)"
My goal was to check with echo
echo $dev
Got empty line.
Wh... |
Because docker-machine env dev doesn't set the environment variable dev, it sets environment variables for the host called dev.
Run docker-machine env dev without the eval to see what environment variables get set. Also compare with the output of docker-machine env (without dev) if your docker-machine configuration is... | How to check "eval" command? |
1,319,313,753,000 |
From https://unix.stackexchange.com/a/7739/674, why does parameter expansion happen before brace expansion in the following example?
eval rm foo.{$ext0..$extN}
|
It's doing a no-op brace expansion first (expanding to what you started with), then parameter expansion, then brace expansion within "eval":
# No-op brace expansion example:
echo foo.{not..understood}
# See: foo.{not..understood}
ext0=10
extN=20
# Parameter expansion
echo foo.{$ext0..$extN}
# See: foo.{10..20}
# Fi... | Why does parameter expansion happen before brace expansion in this example? |
1,357,727,051,000 |
I have two folders on the same partition (EXT2)
If I mv folder1/file folder2 and some interruption occur (e.g. power failure) could the file system ever end up being inconsistent?
Isn't the mv operation atomic?
Update:
So far on IRC I got the following perspectives:
it is atomic so inconsistencies cannot happen
first... |
First, let's dispel some myths.
it is atomic so inconsistencies cannot happen
Moving a file inside the same filesystem (i.e. the rename) system call is atomic with respect to the software environment. Atomicity means that any process that looks for the file will either see it at its old location or at its new locati... | Can the filesystem become inconsistent if interrupted when moving a file? |
1,357,727,051,000 |
Why don't ext2/3/4 need to be defragmented? Is there no fragmentation at all?
|
Modern filesystems, particularly those designed to be efficient in multi-user and/or multi-tasking use cases, do a good fairly job of not fragmenting data until filesystems become near to full (there is no exact figure for where the "near to full" mark is as it depends on how large the filesystem is, the distribution ... | Defragging an ext partition? |
1,357,727,051,000 |
I was reading the Kernel Documentation where it says
There are various limits imposed by the on-disk layout of ext2. Other
limits are imposed by the current implementation of the kernel code.
Many of the limits are determined at the time the filesystem is first
created, and depend upon the block size chosen. ... |
The 2TiB file size is limited by the i_blocks value in the inode which indicates the number of 512-bytes sector rather than the actual number of ext2 blocks allocated.
Referenced from: http://www.nongnu.org/ext2-doc/ext2.html
| What determines the maximum file size in ext2 file system |
1,357,727,051,000 |
What is the difference between disabling journal on ext4 file system using:
tune2fs -O ^has_journal /dev/sda1
and using data=writeback when mounting? I thought ext4 - journal = ext2. means when we remove journal from a ext4 file system, it is automatically converted to ext2(thus we can not benefit from other ext4 fea... |
The two are in no way equivalent. Disabling the journal does exactly that: turns journaling off. Setting the journal mode to writeback, on the other hand, turns off certain guarantees about file data while assuring metadata consistency through journaling.
The data=writeback option in man(8) mount says:
Data ordering ... | disabling journal vs data=writeback in ext4 file system |
1,357,727,051,000 |
summary
Suppose one is setting up an external drive to be a "write-once archive": one intends to reformat it, copy some files that will (hopefully) never be updated, then set it aside until I need to read something (which could be a long while or never) from the archive from another linux box. I also want to be able t... |
I don't agree with the squashfs recommendations. You don't usually write a squashfs to a raw block device; think of it as an easily-readable tar archive. That means you would still need an underlaying filesystem.
ext2 has several severe limitations that limit its usefulness today; I would therefore recommend ext4. Sin... | "write-once archive": ext2 vs ext4^has_journal vs |
1,357,727,051,000 |
How to remove a file that is corrupted?
In Linux (Fedora based), when I type: ls -l I get
drwxr-xr-x. 2 dmiller3 dmiller3 4096 Jul 26 13:57 SomeFile
?????????? ? ? ? 4096 Jul 26 13:57 CorruptedFile
I can't do anything with this CorruptedFile. I can't use it in delete or anything. It's the o... |
you could have been writing to a file during a hard reset, or your hard drive could have problems. a fsck should fix it (you will have to umount the fs to do this). I'd check dmesg and smartctl -a /dev/hdx (latter is part of smartmontools ) to see if your HD is reporting any errors. I'd also run a non-destructive badb... | Remove a corrupted file in a Linux system |
1,357,727,051,000 |
Is a journaling filesystem needed in today's desktop world?
A good OS doesn't kernel panic every month, and if we are using a laptop, then there aren't any power outages, so why shouldn't we use ext2 as the standard filesystem on a desktop or laptop?
|
Hardware can still randomly glitch or fail from time-to-time. There are so many components involved in writing a file to storage - CPU, RAM, HDD, I/O BUS, etc. It's not just power-outages or reboots that can cause file-system corruption.
That said, it's still okay to use EXT2, just don't complain if something goes wro... | Is ext2 suitable for daily use on a desktop or laptop? |
1,357,727,051,000 |
Is the ext2 filesystem good for /boot partition? I set ext4 for / root partition, but wasn't sure which filesystem to select for the /boot partition, and I just set ext2. Does it matter in this case?
|
It only matters if you're going to use the ancient GRUB, ext4 is only supported by GRUB2.
ext2 is simple, robust and well-supported, which makes it a good choice for /boot.
| Ext2 filesystem for /boot partition |
1,357,727,051,000 |
I'm about to setup my new USB key with Grub or Grub2. In the old days I used ext2 for the boot partition.
I'm wondering if I could use ext4 for Grub2?
And if use Grub 0.9X, what about support of ext3?
|
Grub legacy (0.9x) supports ext2 and ext3 (ext3 is backward compatible with ext2) but not ext4 (unless you've turned off the backward-incompatible features, which doesn't leave much additional goodness compared with ext3). The development of Grub legacy stopped before ext4 was mature. There are unofficial patches to s... | Ext4 support in Grub 0.9X (legacy) and Grub 1.9X (Grub2) |
1,357,727,051,000 |
In The Design and Implementation of a Log-Structured File System, It says:
It takes at least five separate
disk I/Os, each preceded by a seek, to create a new file in Unix FFS: two different accesses to the file’s attributes
plus one access each for the file’s data, the directory’s data,
and the directory’s att... |
Prof. Remzi Arpaci-Dusseau's book Operating Systems: Three Easy Pieces has an aside about file creation:
As an example, think about what data structures must be updated when a
file is created; assume, for this example, that the user creates a new
file /foo/bar.txt and that the file is one block long (4KB). The
... | Why does creating a file need at least five separate disk I/Os in Unix FFS? |
1,357,727,051,000 |
In every publication I found about ext2, the structure of a block group is defined as following:
Super Block: 1 block
Group Descriptor: N blocks
Data Bitmap: 1 block
Inode Bitmap: 1 block
Inode Table: N blocks
Data Blocks: remaining blocks
However in the ext2 kernel doc it is stated that versions >0 may not store co... |
The resize_inode feature creates a hidden inode (number 7, you can view it in debugfs with stat <7>) to reserve those blocks so that the GDT can be grown. By default it reserves enough space to grow the filesystem to 1024 times its original size. You can disable the feature or adjust the size using options to mke2fs a... | Ext2 block structure: size of reserved GDT Blocks |
1,357,727,051,000 |
I want to make ext2 file system. I want to set "number-of-inodes" option to some number. I tried several values:
if -N 99000 then Inode count: 99552
if -N 3500 then Inode count:
3904
if -N 500 then Inode count: 976
But always my value is not the same. Why?
I call mkfs this way
sudo mkfs -q -t ext2 -F /dev/sda2 -b 40... |
The number hasn't been ignored, it's been rounded up. It looks like space for inodes are allocated in groups. See in your output:
Inodes per group: 1632
When you request 99,000 inodes, that's not divisible by 1,632. So to ensure that you get the number of inodes you requested, the number has been rounded u... | mkfs ext2 ignore number-of-inodes |
1,357,727,051,000 |
I read somewhere that an operating system which knows nothing about ext3 and ext4 (i.e. antique Linux version) is able to read/write to ext4, and it detects any ext4 file system as ext2.
I am not quite sure, whether the same is possible to Tux2 to tux3 or with FAT12. (FAT64 is exFAT)
How exactly is that possible?
How... |
This depends heavily on how the ext4 filesystem was formatted. Some newer ext4 features (e.g. extents or 64bit) cannot be understood by older ext2 drivers, and the kernel would refuse to mount the filesystem (see, for example this post). In general, any filesystem formatted with a modern mke2fs with the default -t e... | How exactly is ext2 upwards-compatible? |
1,357,727,051,000 |
I'm trying to create disk device in a file with:
dd if=/dev/zero of=file.img bs=516096 count=1000
sudo losetup /dev/loop0 file.img
(echo n; echo p; echo 1; echo ""; echo ""; echo w;) | sudo fdisk -u -C1000 -S63 -H16 file.img
sudo mke2fs -b1024 /dev/loop0 503968
Thank i mount it with:
sudo mkdir /mnt/fcd
sudo mount -t... |
1.- Originally, fdisk created partitions trying to make them aligned to cylinder boundaries, leaving the first cylinder on disk free, as it would be used for the MBR, patition table and other stuff. This way, the first partition usually started on block 63 (each block being 512 bytes). The fdisk from distributions lik... | Creating disk device in a file |
1,357,727,051,000 |
I decided to switch from CentOS to FreeBSD 10 after I had a really good experience installing it on a Xserve G4 (PowerPC, that's a story for another day if anyone is interested).
Anyway, my CentOS machine (x86) connected to an iSCSI target that held all of my data. I am now trying to connect my new FreeBSD machine to... |
Answer
I ran across this thread on the FreeBSD Forums. While it was nearly identical to my issue in almost every way, the main differentiating point was it was in reference to ext4, not ext2.
Since ext4 is technically backward compatible with ext2/3, I I decided to take the chance and see if I could try this solution... | Mount iSCSI ext2 Linux Partition on FreeBSD 10.2 |
1,357,727,051,000 |
using dumpe2fs on some ext4 partition, I get in the initial data, that the first inode is #11. However, if I ls -i on this disk root partition, I get that it's inode number is #2 (as expected). So... What is this “first partition” reported by dumpe2fs ?
|
#11 is the first "non-special" inode, that can be used for the first regularly created file or directory (usually used for lost+found). The number of that inode is saved in the filesystem superblock (s_first_ino), so technically it doesn't need to be #11, but mke2fs always sets it that way.
Most of the inodes from #0 ... | what is this “first inode” reported by dumpe2fs? |
1,357,727,051,000 |
I have an embedded Linux device with a read-only file system. I have another partition that is used to store an archive of logs.
This partition will be written to a lot. What linux partition should I use to ensure longevity and stability?
I heard the ext2-ext4 file systems use a lot of reads/writes for journaling. Wha... |
You could safely use ext3 with noatime option: then only actual file writes would touch your flash device in write mode. The ext3fs journal is a good thing in case of embedded system that may get lack of power suddenly.
I personally run this way a few Raspberry PI's equipped with simple SD memory cards for a couple ... | Embedded device, log partition, what file system is more resilient and uses less reads/writes? |
1,357,727,051,000 |
I just saw an answer question about filesystems for embedded hardware on another Stack Exchange site. The question was "What file system format should I use on flash memory?" and the answer suggested the ext2 filesystem, or the ext3 filesystem with journaling disabled a'la tune2fs -O ^has_journal /dev/sdbX
This made m... |
The journal is the difference. You can not have an ext3 filesystem without a journal. If you disable the journal, it becomes an ext2 filesystem again.
ext4 has a number of beneficial features and can run without a journal, making it a much better choice.
| Besides the journal, what are the differences between ext2 and ext3? |
1,357,727,051,000 |
Can I safely conclude that the sticky bit is not used in current file sysems and reuse the bit for my own purpose.
|
No, you cannot assume that. It's not true for directories. You can make the narrower assumption that it's true for non-directory files.
| Is the sticky bit not used in current file systems |
1,357,727,051,000 |
Leaving out many details, I need to create a read/write file system on a device with the following main goals:
Eliminate all writes while data is not being explicitly written.
Reduce all indirect writes when data is written.
Run fsck on boot after unclean unmount.
Currently I am using ext3, mounted with noatime. I a... |
You don't need to switch to ext2, you can tune ext3.
You can change fsck requirements of a filesystem using tune2fs. A quick look tells me the correct command is tune2fs -c <mount-count>, but see the man page for the details.
You can change how data will be written to the ext3 filesystem during mounting. You want eit... | Minimizing "idle" writes on a file system |
1,357,727,051,000 |
I have a latency sensitive application running on an embedded system, and I'm seeing some discrepancy between writing to a ext4 partition and an ext2 partition on the same physical device. Specifically, I see intermittent delays when performing many small updates on a memory map, but only on ext4. I've tried what seem... |
One word: Journaling.
http://www.thegeekstuff.com/2011/05/ext2-ext3-ext4/
As you talk about embedded im assuming you have some form of flash memory? Performance is very spiky on the journaled ext4 on flash. Ext2 is recommended.
Here is a good article on disabling journaling and tweaking the fs for no journaling if y... | Ext4 exhibits unexpected write latency variance vs. ext2 |
1,357,727,051,000 |
I'm formatting a disk with following command switches, I can format the disk to ext4.
sudo mke2fs -F -E lazy_itable_init=0,lazy_journal_init=0,discard -t ext4 -b 4096 ...
However, once I added this switch:
-O ^has_journal
It will be formatted to ext2. Could you explain why?
|
Because ext4 is an extension of the ext2 and ext3 filesystems; one of the features that it extended was the use of a journal.
References:
https://ext4.wiki.kernel.org/index.php/Frequently_Asked_Questions#What_is_the_difference_between_ext2.2C_ext3.2C_and_ext4.3F
https://unix.stackexchange.com/a/60757/117549
| Why this switch will effectively format disk to ext2 instead of ext4? |
1,481,190,816,000 |
What are the commands to find out fan speed and cpu temp in linux (I know lm-sensor can do the task). Is there any alternative for that?
|
For CPU temperature:
On Debian:
sudo apt-get install lm-sensors
On Centos:
sudo yum install lm_sensors
Run using:
sudo sensors-detect
Type sensors to get CPU temp.
For fan speed:
sensors | grep -i fan
This will output fan speed
or install psensor using:
sudo apt-get install psensor
One can also use hardinfo
sudo a... | Find fan speed and cpu temp in Linux |
1,481,190,816,000 |
How is it possible to control the fan speed of multiple consumer NVIDIA GPUs such as Titan and 1080 Ti on a headless node running Linux?
|
The following is a simple method that does not require scripting, connecting fake monitors, or fiddling and can be executed over SSH to control multiple NVIDIA GPUs' fans. It has been tested on Arch Linux.
Create xorg.conf
sudo nvidia-xconfig --allow-empty-initial-configuration --enable-all-gpus --cool-bits=7
This wil... | How to adjust NVIDIA GPU fan speed on a headless node? |
1,481,190,816,000 |
I am using ArchLinux on an HP Pavilion dv9000t which has overheating problems. I did all what I can do to get a better air flow in the laptop and put a better thermal paste but there is still a problem:
the fan stops spinning when the CPU temperature is low (even if the GPU temperature is high, which is problematic).
... |
I finally decided to choose a hardware solution.
I cut two wires from the fan and now the fan always spin (at the max level though).
I found this solution in this blog post.
| How to force the fan to always spin? |
1,481,190,816,000 |
I am trying to find a way to access and/or control fan speed via Linux on an Intel Q45 Express/ICH10DO chipset. This chipset contains a feature called Intel Quiet System Technology (Intel QST), which is a part of the Intel Management Engine (Intel ME) running on an embedded co-processor. Intel describes QST as follows... |
This answer documents definitive information on Linux support for Intel QST, which was assembled by tracking down archives of the defunct lm-sensors mailing list and directly contacting the authors of some of those messages. The information here is organized in chronological order of the development of Linux QST suppo... | What is the state of Linux kernel support for Intel Quiet System Technology (Intel QST)? |
1,481,190,816,000 |
I am facing issues with Thinkpad T410's fan. Now and then my fan stops working (meaning 0 rpm).
Long time, the only solution for me was to shutdown (not to restart, instead power off) the system and then boot again. (Which is, what you can guess, not a good solution. Sometimes I even had to cancel cpu-heavy tasks, to... |
Using the following line allows me to restart the fan without suspending my laptop.
echo disable | sudo tee /proc/acpi/ibm/fan; sleep 5; echo enable | sudo tee /proc/acpi/ibm/fan
Thanks to @Stephen Harris
| Restart fan manually in Linux |
1,481,190,816,000 |
I'm trying to lock RPM of my AMD Radeon videocard fans at the full speed:
echo 1 > /sys/class/hwmon/hwmon1/pwm1_enable
echo 255 > /sys/class/hwmon/hwmon1/pwm1
What I have tried so far
Obviously, it doesn't work due to missing permissions (even with sudo/root) because it is /sys:
$ sudo su
$ echo 255 > /sys/class/drm/... |
In case anyone is interested the solution I made and the corresponding systemd service is here: redfan https://github.com/nmtitov/redfan
So far my best guess is to write the following script and keep it always running in the background:
while sleep 1; do echo 0 > /sys/class/drm/card1/device/hwmon/hwmon1/pwm1_enable; d... | How to lock fan speed for amd gpu in Ubuntu 20.04? |
1,481,190,816,000 |
I have a strange (and annoying) problem with my ASUS UX32LA notebook: I suspect that multiple Linux distros (Ubuntu 16.04 and newer major versions using the 4.18.0-17-generic kernel, plus Fedora 28 LiveUSB), somehow breaks BIOS control over fans.
I also tried upgrading Ubuntu to 5.x kernel line. Every attempt was foll... |
Please check the BIOS setting before installing Linux. The common BIOS optiona for Linux installation is to enable CSM support and select UEFI and legacy support option in the boot device control. Then, in the secure boot option, set the os type to other os.
| Multiple Linux distros break BIOS fan control? |
1,481,190,816,000 |
I was wondering how Linux could handle a Gamer Computer, so I have built one, but as we know GeForce does not like Linux so much as AMD, that is why I choose the last.
I built up a computer with AMD Ryzen 7 1800X CPU and Radeon RX 560D GPU, as the Vega is too expensive for me to purchase, and the benchmarking said 560... |
I found the solution, there are some files on /sys/class/drm/card0/device the file pp_dpm_mclk indicates GPU memory clock, and the file pp_dpm_sclk indicates GPU core clock, mine:
$ egrep -H . /sys/class/drm/card0/device/pp_dpm_*
/sys/class/drm/card0/device/pp_dpm_mclk:0: 300Mhz
/sys/class/drm/card0/device/pp_dpm_mcl... | How to prevent GPU from overheating and auto turning off |
1,481,190,816,000 |
I've to manage 50 workstations of different brands, mostly DELL T76** and HP Z800. They are all installed on CentOS 7.4.
I would like to have a tool to test fan speed in command line, not only CPU fans.
Is there such a general tool or will it always be depending on the motherboard?
|
I've solve this using lm_sensors as suggested by @bananguin. Here is an explanation for the basic usage:
To install on CentOS:
sudo yum install lm_sensors
To set this up:
sudo sensors-detect
This will detect and setup the various hardware. The "safe" answers are the defaults.
Finally, using sensors command will displa... | Is there a general command line tool to manage fan speed? |
1,481,190,816,000 |
How can I set fans speed to 100% or more in linux ?
|
Be aware that fiddling around with the fan speed can overheat your machine and kill components!
Anyway, the ArchLinux wiki has a page describing how to setup lm-sensors and fancontrol to achieve speed control.
| Setting processor fan to 100% |
1,481,190,816,000 |
How can I adjust fan speed according to hard drive temperature via Fancontrol?
|
I finally found a simple script to control fan speed according to hard drive temperature via Fancontrol, Hddtemp, and Lm-sensors. In the following script, “/dev/sda” is the hard disk to be monitored, and “/Fancontrol/Hddtemp” is the output file to be read by Fancontrol. Press Ctrl + Alt + T to open Terminal and run th... | Adjust fan speed via Fancontrol according to hard disk temperature (Hddtemp) |
1,481,190,816,000 |
Hi I have a laptop (Fujitsu Siemens Amilo 4000), I'd like to control the cooling fan manually.
How do I do that? /proc/acpi/fan/ is empty, the fan is otherwise working well.
Distro is Fedora 14.
|
The fujitsu_laptop module dans control acpi for Fujitsu-Siemens laptops does not appear to have fan control code (as of today) see:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/platform/x86/fujitsu-laptop.c
(You can look at the thinkpad acpi code in the same directory, it has a fan... | How to deliberately activate cooling fan of laptop? |
1,481,190,816,000 |
How may I slow down or turn off my fan in Linux Mint Debian?
In Windows 7, it had a function called 'System Cooling Policy' and I had set for passive cooling, so the laptop's fan wouldn't spin up. Just using a simple code studio makes the fan speed up a lot and it's super loud. Windows 7 had this function, and I re... |
Note before starting:
This functionality depends on both your hardware and software. If your hardware doesn't support fan speed controls, or doesn't show them to the OS, it is very likely that you could not use this solution. If it does, but the software (aka kernel) doesn't know how to control it, you are without luc... | How to change the system cooling policy on Linux Mint Debian laptop |
1,481,190,816,000 |
Here I am repeating a question previously asked in a sister forum, as it is relevant here and I have neither received a response, nor been able to resolve the issue.
On my ThinkPad T470 which is a dual boot with Linux Ubuntu 18.04 and Windows 10, everything was working fine in Ubuntu until after a while I needed to bo... |
It sounds like you are going to have to do some manual intervention to get ACPI working properly with your hardware
https://github.com/vmatare/thinkfan/
echo "options thinkpad_acpi fan_control=1" > /etc/modprobe.d/thinkfan.conf
Load the module like this.
$ su
# modprobe thinkpad_acpi
# cat /proc/acpi/ibm/fan
Then e... | Fan constantly running at full speed |
1,481,190,816,000 |
I am running DELL Vostro 3750, operating system Linux Mint and despite all my attempts the fan is still running very fast and loud. So far I have tried first edit Grub according to this article. Than I tried to install nvidia drivers according to this manual but all got was a screen telling me that the X screen can't ... |
The nvidia drivers will not affect the fan. You might want to not use the NVidia card though. The integrated graphics card will give out less heat. In fact, I would disable the dedicated card in the BIOS, you almost certainly do not need it.
In any case, what you will need is to install i8kutils. This package will in... | Despite all attempts fan is still running very loudly and fast |
1,481,190,816,000 |
I'm using a sony vaio pro 13 with linux, but unfortunately the fan is already at maximum at only 50 degrees Celsius.
How can I change the threshold it sets in?
Distro is arch btw.
|
Everything you need should be covered in the Arch Linux wiki article titled Fan speed control.
excerpt
Once sensors is properly configured, run pwmconfig to test and configure speed control. Follow the instructions in pwmconfig to set up basic speeds. The default configuration options should create a new file, /etc/f... | How can I configure the threshold when my fan sets in (laptop) |
1,329,337,905,000 |
I cant measure how hot it gets during boot but then in desktop after launch it cools down rapidly
NVIDIA rtx 3060 ti
|
This is normal, yes, within reason.
After reset, no power-saving mechanisms are enabled. They are enabled later on, usually by the driver loaded by the operating system.
| Is it normal for GPU to overheat during boot with fans running max |
1,329,337,905,000 |
I accidentally ended up using the Nouveau driver (as opposed to the proprietary NVIDIA driver) for my GPU today and was surprised by how well it worked. I am aware of the reclocking issue (that is, that the clock speeds are stuck low). Regardless, I'm considering switching to primarily using it, but I have one signifi... | ERROR: type should be string, got "\nhttps://wiki.archlinux.org/index.php/nouveau#Fan_control\nAs for the fan curve, man fancontrol :\nhttps://wiki.archlinux.org/index.php/fan_speed_control#Fancontrol_(lm-sensors)\n" | How do I set my GPU's fan curve when using Nouveau? |
1,329,337,905,000 |
I tried to find a solution but this whole situation drives me crazy, especially with a server next to with three fans and all run on max with no obvious reason. He seems to have the same problem sensors-detect not detecting my fan.
I have a HP ProLiant server with a quad core CPU and centOS. I did the following steps:... |
Welcome to Unix & Linux StackExchange!
HP uses a proprietary fan controller system in their servers, that is not supported by lm-sensors at all. In some models, the fan control is partially relegated to software, with a hardware failsafe: if the appropriate drivers are not communicating with the fan control hardware, ... | HP ProLiant Server with centOS no fans detected |
1,329,337,905,000 |
I need to monitor an Lenovo system x3650 m5 (8871) server. Unfortunately lm_sensor just show the CPU temperature. Do anyone have an advice, how I could monitor the fan speed with an commandline tool?
Output sensors:
sensors
power_meter-acpi-0
Adapter: ACPI interface
power1: 141.00 W (interval = 1.00 s)
core... |
Your system has a correctly configured BMC with IPMI support, so you should be able to use ipmitool locally to extract all the monitoring information supported by your BMC:
yum install ipmitool
ipmitool sensor
(assuming the ipmi_si module is loaded, which should be the case on RHEL 7 on your setup). The interesting v... | Monitoring CPU fan speed on Lenovo system x3650 m5 (8871) on RHEL7 |
1,329,337,905,000 |
I just bought a Clevo N141WU (at system 76 it's known as the galago pro) from a Danish PC shop.
It mostly works really nicely, but when the fan is spinning down (after a hard workload) it starts making a really high pitched sound and the fan stops (it sounds like the fan isn't getting the needed voltage to spin).
I've... |
I was successful in Windows 10 with the code below. It handles both failures that the fan can have, being: "fan stops suddenly with fan duty=0" and "fan stops suddenly with rpm > 10000 with a electric noise that can be heard coming from the fan". It requires a program that loads Winring0 such as ThrottleStop running i... | Clevo N141WU noise when fan is cooling |
1,329,337,905,000 |
I have a Samsung NP900X3E laptop and I would like to control the fans as one of them is making weird noise.
I'm running Ubuntu 14.04.4 LTS with "Linux laptop 3.13.0-85-generic #129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux"
sensors reports:
root@laptop:/# sensors
acpitz-virtual-0
Adapter: ... |
Based on your output of sensors, it appears that lm_sensors does not detect any fan speed reading.
You should try running sensors-detect and answer yes to all questions to hopefully detect one that wasn't previously configured. If not, then it simply won't be possible to control those fans.
The BIOS controls the fans... | Control fans of Samsung NP900X3E |
1,329,337,905,000 |
I'm running Debian Testing on a Dell Latitude 7480.
I've been having a lot of freezing issues, and I have finally narrowed it down to an overheating problem. On battery, I can work for 1hr+ with no problem, and sometimes the system will freeze: mouse stops moving, the backlight of the keyboard doesn't power off, I can... |
The solution in this case was to set modify /etc/default/grub so as to contain this line: GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=!Windows 2020". The acpi_osi parameter tells the kernel to treat ACPI events as if they were happening on the value OS.
| Debian Testing freezing because of overheating, fan sensors give confusing info |
1,329,337,905,000 |
I am running Debian 8 with the 3.16 kernel on an eeePC 1001P. I have a fair bit of Linux experience but unfortunately this one has me and my google-fu at a loss.
Initially almost everything worked out of the box, except brightness control was random and my fan was always running. I tracked the brightness issue to the ... |
I fixed this by installing acpid (sudo apt-get install acpid).
I then created 2 files:
/etc/acpi/events/asus-brightness:
event=hotkey ASUS010:00 0000002[0-9a-f]
action=/etc/acpi/brightness.sh %e
/etc/acpi/brightness.sh:
#!/bin/bash
test -f /usr/share/acpi-support/key-constants || exit 0
export DISPLAY=:0
PREV=$(cat ... | Booting with acpi_osi=Linux fixes fan control but breaks brightness keys |
1,329,337,905,000 |
Recently I have installed openSUSE 12.3 on my Lenevo U410. I am using Windows on this machine too. But when I using openSUSE I realize that my laptop get much hotter than what is it in Windows. I also used Ubuntu before openSUSE. Ubuntu works fine, but now my fan works a little.
Do you know how to solve this?
|
I have finally find the problem. The problem was from my discrete NVIDIA GPU. OpenSUSE 12.3 found it and all the drivers were good, but I do not know why its gets hot. I think the main problem is from Optimus technology (I have some display problems with it in Ubuntu 12.04 too!). Since I am not using my discrete GPU i... | My Laptop gets hot on OpenSUSE |
1,329,337,905,000 |
I have a Lenovo Legion Y520 with these specs:
zjeffer@ArchLinux
-----------------
OS: Arch Linux x86_64
Host: 80WK Lenovo Y520-15IKBN
Kernel: 5.1.7-arch1-1-ARCH
Uptime: 42 mins
Packages: 1659 (pacman)
Shell: zsh 5.7.1
Resolution: 1920x1080, 1920x1080
WM: bspwm
Theme: OSX-Arc-Plus [GTK2/3]
Icons: Papirus-Lig... |
Partial answer:
From your dmesg, thinkpad_acpi gets loaded. I had a quick look at the kernel source code, and there don't seem to be any fan related messages it outputs.
However, some comments in the code say:
ThinkPad EC register 0x84 (LSB), 0x85 (MSB):
Main fan tachometer reading (in RPM)
This register is present... | Laptop fan always says it's running at 8 RPM |
1,329,337,905,000 |
Previously, on Ubuntu 14.04.1 LTS, my computer's fans were always spinning just as much as they needed to. Today I switched to the base version of Debian 8.3.0 and now they are always running at 100% speed, even when the computer is completely idle.
Looking at other, similar questions around the web, fancontrol should... |
Turns out that after the computer had cooled down completely over night, the fans weren't running that fast, initially at least. I checked sensors and it reported a temperature of 16°C (60°F), but as that quickly rose to about 42°C (108°F) the fans started spinning up again. Conclusions:
There must already be some ot... | Fans always spinning at max. speed |
1,329,337,905,000 |
I am trying to boot AntiX LiveCD on my old Toshiba A200 laptop with 2 GB of RAM. But when I accidentally launched the "sensors" in the terminal, I saw that the CPU temperature was 70°C! I turned off the laptop and turned it on again, and the fan revved up to the maximum. It turns out that antiX stops the fan? What sho... |
Fan control, especially for old hardware like yours, is a quite obscure matter on Linux;
there are multiple variables to take into account, e.g.:
kernel version;
BIOS version;
BIOS settings;
and their combination;
personally I have never had a such problem, rather the opposite: fan running constantly at 100% with no... | AntiX linux disable laptop fan |
1,329,337,905,000 |
I am on a custom board using an i.MX6. I am using Yocto (Pyro) to build my kernel (4.14.16).
I am using the generic imx6qdl.dtsi device tree entry for PWM2 to drive the fan and it appears to work fine. The fan has a Tachometer input, which is connected to GPIO2_7. How do I read the fan speed? I have seen device ... |
I was unable to find a device tree solution, but found enough code snippets to make an application to read it. Basically I just set up an interrupt on the GPIO and used clock_gettime to measure the period between edges. It requires a lot of filtering, but I am only using it to make sure the fan is running so that is... | How to read back a fan speed? |
1,343,357,466,000 |
How can I change the volume name of a FAT32 filesystem?
I know I can set the volume name when I format the partition
with the -n option of mkfs.vfat.
But how to just change the name without formatting?
I especially want to be able to use lower and uppercase letters.
In worst case, I can use a Windows tool, but Wind... |
So far the only way I found to change a FAT volume name
with lower case letters is to edit it with a hex editor
(copy the first few sectors with dd to a temporary file,
edit it and copy it back).
It works well so far (even with FAT16)
and neither fsck nor CHKDSK from Windows 7 complained.
But no guarantee, of course... | How can I change the volume name of a FAT32 filesystem? |
1,343,357,466,000 |
Is there a way to create a FAT32 filesystem containing a set of files, without needing to mount it or have root access?
I am developing a software application for an old operating system as a hobby, and as part of the build process I would like to package up some source files into a FAT32 disk image, then launch QEMU ... |
Of course despite all my unsuccessful searching, I finally find the answer only moments after posting a question about it.
So the mtools package can do it like this:
# Create a 2 MB file
dd if=/dev/zero of=disk.img bs=1M count=2
# Put a FAT filesystem on it (use -F for FAT32, otherwise it's automatic)
mformat -i disk... | Create and populate FAT32 filesystem without mounting it |
1,343,357,466,000 |
When you upgrade or reinstall a package with dpkg (and ultimately anything that uses it, like apt-get etc) it backs up the existing files by creating a hard link to the file before replacing it. That way if the unpack fails it can easily put back the existing files. That's great, since it protects the operating syst... |
The behaviour you're seeing is implemented in archives.c in the dpkg source, line 1030 (for version 1.18.1):
debug(dbg_eachfiledetail, "tarobject nondirectory, 'link' backup");
if (link(fnamevb.buf,fnametmpvb.buf))
ohshite(_("unable to make backup link of '%.255s' before installing new version"),
ti->name)... | dpkg replacing files on a FAT filesystem |
1,343,357,466,000 |
I have an application which will search for a corrupted FAT file system and repair it.
For testing the application I will need a corrupted file system.
What is a good and reproducible way for corrupting a FAT file system? Creating bad sectors for example.
|
a partial solution
dd if=/dev/zero count=100 bs=1k of=fs.fat
mkfs -t vfat fs.fat
mount fs.fat /mnt ## as root
# cp some file
umount /mnt ## as root
cp fs.fat fs.ref
vi fs.ref ## change some bytes
cp fs.ref fs.sampleX
now you have a good fs (fs.fat) and a corrupted one (fs.ref)
sudo mount -t vfat fs.ref /mnt
... | create a corrupted FAT file system |
1,343,357,466,000 |
I'm wondering if this is considered safe. I know the file handles work just fine as long as a link remains, and I know the identifier is the inode rather than the name, but I am not sure how it works across different FS.
For example copying from an ext4 harddrive to a NTFS USB stick, or copying from a FAT stick to an ... |
I am not sure how it works across different FS.
The rename operation itself doesn’t operate across different file systems; there is no difference between writing to a file from say a text editor and writing to a file using cp with a source file on another file system.
On Linux, the rename system call is transparent ... | Renaming a file while it is being written |
1,343,357,466,000 |
I need a way to change the creation time of a file on a mounted FAT32 volume. I have to do that because my MP3 player will only read files sorted by this creation time.
If I can find a way to set the file creation time (like touch can do with modification / access time) of a file, a trivial script will allow MP3 files... |
I finally ended up using fatsort, which does the job nicely, and it's also a lot quicker than copying the files over and over.
| Change file creation time on a FAT filesystem |
1,343,357,466,000 |
I'm trying to understand which FAT based filesystems my Real Time 2.6 Linux supports. I have tried 3 things:
/proc/filesystems shows vfat among others non-relevant for the question (like ext2, etc)
/proc/config.gz shows:
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT... |
The FAT drivers include support for FAT32; it’s treated as a variant along with FAT12 and FAT16. If you see vfat in /proc/filesystems, then FAT32 is supported.
exFAT is supported, in recent kernels, by a specific exFAT driver, with its own configuration option (EXFAT_FS). It’s listed separately in /proc/filesystems.
e... | Understanding Linux FAT fs (FAT, VFAT, FAT32, exFAT) support |
1,343,357,466,000 |
I mounted a FAT32 drive onto my Linux computer using the following terminal command:
> sudo mount /dev/sdb1 /media/exampleFolderName -o dmask=000, fmask=111
I did this so I could share / edit the files over a network connection. Unfortunately Linux doesn't support per file permissions in FAT32 format, so this sets th... |
You probably want to add a line like
/dev/sdb1 /media/drive1 vfat dmask=000,fmask=0111,user 0 0
to /etc/fstab. The additional ,user in the options field allows any user to mount this filesystem, not just root.
| Linux, fat32 and etc/fstab |
1,343,357,466,000 |
Can somebody show me how to make Gentoo mount my USB? This is what I got when trying mount /dev/sdb1 /mnt:
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so... |
You need to set codepage and charset in kernel options:
make menuconfig -> File systems:
-> Native language support:
<*> Codepage 437 (United States, Canada)
<*> NLS ISO 8859-1 (Latin 1; Western European Languages)
-> DOS/FAT/NT Filesystems
(437) Default codepage for FAT
(iso8859-1) Default iocharset for FAT
an... | Mount USB (FAT) in Gentoo |
1,343,357,466,000 |
I've noticed that when I mount a FAT filesystem on Linux, all of the files have their executable permissions set. Why is this? There's almost no chance that you can or want to directly execute any program found on a FAT file system, and having the executable bit implicitly set for all files seems annoying to me.
I un... |
FAT may not be a POSIX-style filesystem, that doesn't mean that you shouldn't be allowed to store executables on it and run them directly from it. Because FAT doesn't store POSIX permissions, the only way this can happen (easily) is if the default mode used for files allows their execution...
In the past, when (V)FAT ... | Why does Unix set the executable flag for FAT file systems? [closed] |
1,343,357,466,000 |
I am experiencing the same problem described here: Fail to boot: Codepage not found.
My error is: FAT-fs (sdx1): codepage cp437 not found
My fstab mount command for the device is:
LABEL=ESP /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
The above is... |
I'm running Arch Linux. This problem can generally be resolved by including vfat in the modules list in /etc/mkinitcpio.conf. Here's an example:
MODULES=(nvidia vfat)
However, another way this same error message can occur is if you boot Arch with a kernel version that does not exactly match the version of the librari... | failed to mount fat filesystem: codepage cp437 not found |
1,343,357,466,000 |
Out of curiosity, is this possible nowadays? I remember some old Slackware versions did support FAT root partition but I am not sure if this is possible with modern kernels and if there are any distros offering such an option. I am interested in pure DOS FAT (without long names support), VFAT 16/32 and exFAT.
PS: Don'... |
OK, I tried it.
First two problems from the beginning: NO support for hard and symbolic links. It means that I had to copy each file, duplicating it and wasting space.
Second problem: no special file support at all. This means things like /dev/console are unavailable at boot time to init before even /dev is remounted ... | Can I install GNU/Linux on a FAT drive? |
1,343,357,466,000 |
If I put a USB memory stick (FAT formatted) into a Windows PC, then unplug it without "ejecting" it, then put it in again, Windows is okay with that, without giving any warning about it "possibly having problems".
But if I do the same with Linux (e.g. Ubuntu 15.04), then after inserting it the second time, I get warni... |
My C is rough but it looks like the fat dirty bit is set when the superblock is read (this commit explains why it was implemented the way it was).
Windows may choose to not set the bit until after something is changed in the FS where linux takes a bit more paranoid approach of setting it upon mount.
To me it seems lik... | Why does Linux mark FAT as 'dirty' simply due to mounting it? |
1,343,357,466,000 |
E.g: I need to know when was the last time a pendrive was mounted. Where could I see that? The pendrive has e.g.: FAT32, EXT3 filesystem.
|
ext3 stores the last mount time and can be retrieved with:
dumpe2fs -h /dev/node
I'm not sure that FAT stores this information.
| Where can I see the last mount time? |
1,343,357,466,000 |
Question: How does one define the size of a FAT16 / FAT 32 file system with mkdosfs in Linux
I want to create a, say 2 GB FAT16|32 filesystem on a partition in the size of 8 GB or more?
This is how far I got:
created a partition with fdisk
mkdosfs -F 16 /dev/sdb1 creates a FAT16 file system over the WHOLE partition –... |
This worked for me:
# truncate -s 8G foobar
# losetup -f --show foobar
/dev/loop0
# mkdosfs -F 32 /dev/loop0 $((2*1024*1024))
mkfs.fat 3.0.25 (2014-01-17)
Warning: block count mismatch: found 8388608 but assuming 2097152.
Loop device does not match a floppy size, using default hd params
# mount /dev/loop0 /mnt/tmp
# d... | mkfsdos: define the size of FAT16|32 file system on USB pendrive in Linux |
1,343,357,466,000 |
I have a bash script which copies data across to a USB stick. It works. The data is copied across fine, but the filenames are always changed. They are the same as they were before, but any longer names are cut to only 8 chars long, and have an extension that is only 3 chars long (11 char max total).
So an original fi... |
I suspect you are using a mount command like the one below:
mount -t msdos /dev/XYZ /mnt/test
This will force the partition to be mounted in legacy DOS FAT filesystem which uses the 8.3 filename convention (See https://en.wikipedia.org/wiki/8.3_filename) instead of vfat which uses Long filenames (https://en.wik... | Copying to USB drive modifies filename |
1,343,357,466,000 |
I have several audio devices (car radio, portable radio, MP3 player) that take SD cards and USB sticks with a FAT file system on it. Because these devices have limited intelligence they do not sort filenames on the FAT FS by name but merely play them in the order in which they have been copied to the SD card.
In MS DO... |
I remember asking this a long time ago (you are welcome to search for it). My guess at this long future time is: mount the device with option sync (removes the buffering), sort the list to ensure that they are copied in order.
| File order on FAT/FAT32/VFAT file systems |
1,343,357,466,000 |
What's the easiest way to rename (change the volume label of) a fat16 volume (e.g. on a USB drive) from linux? It seems like mlabel from the mtools package is meant to do this, but the documentation is not geared to rapid assimilation.
|
Try sudo mlabel -i <device> ::<label>, for example sudo mlabel -i /dev/sdb1 ::new_label.
Reference: RenameUSBDrive on the Ubuntu community documentation.
| renaming a fat16 volume |
1,343,357,466,000 |
I'm struggling to create a FAT-formatted a disk image that can store a file of known size. In this case, a 1 GiB file.
For example:
# Create a file that's 1 GiB in size.
dd if=/dev/zero iflag=count_bytes of=./large-file bs=1M count=1G
# Measure file size in KiB.
LARGE_FILE_SIZE_KIB="$(du --summarize --block-size=1024 ... |
It would seem to me you're trying to fit a file on a file system that doesn't have enough space – by design! You're basically saying "For a file that takes N kB, make a disk image exactly N kB in size". Where exactly is FAT going to store the file metadata, directory tables and volume descriptor?
With FAT32, the stand... | Create FAT-formatted disk image that can fit 1G file |
1,343,357,466,000 |
I have a flash drive formatted with a FAT32 partition. When I pull it out before unmounting it naturally has the dirty bit set and when I use the flash in a Windows machine, Windows complains that the drive should be repaired.
The Linux machine is an embedded device and has no "unmount" in its GUI. But I have SSH acce... |
There was a commit to dosfstools to fix the dirty bit correctly in jan 2021. This became release 4.2, and it seems you have 4.1.
| fsck does not repair FAT32 partition correctly |
1,343,357,466,000 |
Just encountered a problem: when rebooting a Linux system, timestamps of all files in the mounted VFAT filesystem are shown in the incorrect timezone. It seems like a device starts thinking that its local time is in UTC, so it displays all timestamps with the shift.
Steps to reproduce:
Create some small FAT-formatted... |
Seems like the problem resides in the Linux kernel itself, as the timezone may (and usually do) differ between the kernel and the userspace. time.c file in the kernel/time in the Linux kernel source tree holds (and exports) the struct timezone sys_tz, which is then used in fs/fat/misc.c in the FAT time <-> UNIX time c... | VFAT, Linux: Invalid file timestamps shown after a reboot |
1,343,357,466,000 |
How to run Linux script e.g configure etc, in FAT (or alike raw) filesystem ?
$ sudo chmod -R 777 .
$ ./configure
bash: ./configure: Permission denied
How to solve ?
|
Assuming it is a shell script, manually passing it to the relevant binary should let you run it:
$ head -n 1 configure
#!/bin/bash
$ bash configure
FAT does not support individual file permissions. So you cannot assign one with chmod. Though, it should be possible to configure to treat all files in a FAT as executabl... | How to run Linux script in FAT (it is not working like on Linux' FS) |
1,343,357,466,000 |
I trying to figure out what the following Mountoption for (v)FAT exactly does (in Linux):
allow_utime=### -- This option controls the permission check of
mtime/atime.
20 - If current process is in group of file's group ID,
you can change timestamp.
2 - Other users can... |
On a filesystem that supports normal Unix file attributes, each file has a user who is designated as owner. Only the owner of a file may change its timestamps with utime. Other users aren't allowed to change timestamps, even if they have write permission.
FAT filesystems don't record anything like an owner. The FAT fi... | FAT Mountoption allow_utime explained |
1,343,357,466,000 |
I am trying to get the map of empty space on any partition in a filesystem-agnostic way. To do this I create a file that uses all of the empty space, then use the 'filefrag -e' command (e2fsprogs v1.42.9) to create a map of the space (on Ubuntu 14.04 Trusty, tested with kernels 3.16.0-67 and 4.1.20-040120, dosfstools ... |
I have been in touch with OGAWA Hirofumi and Theodore Ts'o and tested various kernels and e2fsprogs tags. The remaining problem is fixed in e2fsprogs v1.43-WIP from 2015 onwards. I believe this commit fixed the issue.
Full testing history and test script can be found here.
The moral of the story: don't bother using fi... | filefrag fibmap returning wrong physical offset for FAT |
1,343,357,466,000 |
So, I created a FAT16 partition in the following way
I plugged in my 16 GB thumbdrive.
dd if=/dev/zero of=/dev/sdX count=1
Opened up cfdisk for simplicity.
Selected dos label type
Created new partition of type "FAT16 <32M"
Written the changes to the partition.
mkfs -t vfat /dev/sdXY
I am surprised to see that it rea... |
Since you didn’t specify a FAT size with mkfs’ -F option, it chose the appropriate size for your partition’s size (in your case, FAT32). mkfs.vfat doesn’t care what partition type you selected in fdisk.
| How FAT16 worked on a 16 GB thumbdrive flawlessly? |
1,343,357,466,000 |
I was under the impression that the only character not allowed in file names was /, but I don't seem to be able to create a file whose name contains characters such as *, \, ", :, |, < or > either. For instance,
$ echo "*"
> *
$ touch "*"
> touch: setting times of `*': No such file or directory
I'm writing a shell sc... |
I'm pretty sure the only reserved bytes are 0 (ASCII Nul) and 0x2f (ASCII '/', forward slash).
You can easily make a file with '.', '\' and other funky things in it. Think "unicode file names", which contain all kinds of weird byte values.
Naturally, you can't have duplicate file names in the same directory, so files ... | Reserved characters in file names |
1,343,357,466,000 |
When playing with filesystems and partition, I realized that when I created a ext file system on my USB drive and plug it to Windows, I am forced to format it. On the other end, when building a FAT partition on Windows, and plugging it to my virtual machine, Linux is perfectly able to read and mount my FAT partition.... |
Windows can’t read “Linux” file systems (such as Ext4 or XFS) by default because it doesn’t ship with drivers for them. You can install software such as Ext2fsd to gain read access to Ext2/3/4 file systems.
Linux can access FAT file systems because the kernel has a FAT file system driver, and most distributions enable... | Why can't Windows read Linux filesystems? [closed] |
1,343,357,466,000 |
So I would like to be able run Linux an a Fat32(preferably ExFat) partition is this possible?
It appears this has been done Can I install GNU/Linux on a FAT drive?
Couldn't shorcuts be used in place of hard and soft symbolic links?
Watching random videos on youtube it appears ExFat is faster then NTFS in most cases ht... |
It's technically possible. The posixovl filesystem allows storing files on a FAT filesystem, with extra metadata stored in additional files to implement things that FAT doesn't provide: file names containing characters that FAT forbids or that are too long, additional metadata such as permissions and ownership, other ... | Is it possible to run basic Linux on file permissionless file system(ex. Fat32) |
1,343,357,466,000 |
I am connecting a 4-bay HDD hub (FANTEC QB-35US3-6G) via USB to my Raspberry Pi. I have two disks inside the hub and formated them as FAT.
The formating I did on a Mac because I was not able to see the unformated disks in the hub with blkid when connected to the Raspberry, which is strange.
When sudo blkid I see
/de... |
You have two GPT formatted "disks". Both have a 200 MB EFI system partition.
sdc has "PMBR size mismatch", meaning protective MBR.
In other words maybe a mess...but the way you tell: with external multi-disk from a different system.
ADDED: I also don't like Start=40. I have 2048. So I have the first MB (?) "out of h... | Why am I seeing an EFI partition when I created a FAT on my external USB hub? |
1,343,357,466,000 |
How does a Linux OS format an SD card and magically fix everything?
I have an STM32 running FreeRTOS and FAT-FS.
When I have a corrupted SD card and FAT-FS can't do anything about it, I format the SD card through Linux and everything starts working again.
How does Linux format an SD card?
FAT-FS says there is a physic... |
I have an old phone. If I let it write the SD card, sometimes it writes bad sectors. I suspect this happens when the battery is low, and because the phone fails to satisfy the standard electrical requirements of the SD card.
On a modern block device, a bad logical block might repeatedly fail to read (checksum mismatc... | How does unix / linux format an SD card? |
1,343,357,466,000 |
I have ArchLiinux Linux comp001 3.18.7-1-ARCH #1 PREEMPT Wed Feb 11 11:38:34 MST 2015 armv6l GNU/Linux for Arm installed on rPi and here is my /etc/fstab file:
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot vfat defaults ... |
You are confusing the rw option with the umask.
The rw option merely dictates that the partition is not mounted read-only.
The umask option dictates what permission that not set on files and directories. Your current umask of 022 sets the permission bits to 755 which translates to rwxr-xr-x. Change the umask to 000,... | /etc/fstab/ rw option is being ignored for mircosd card partition in ArchLinux |
1,294,409,653,000 |
While browsing through the Kernel Makefiles, I found these terms. So I would like to know what is the difference between vmlinux, vmlinuz, vmlinux.bin, zimage & bzimage?
|
vmlinux
This is the Linux kernel in an statically linked executable file format. Generally, you don't have to worry about this file, it's just a intermediate step in the boot procedure.
The raw vmlinux file may be useful for debugging purposes.
vmlinux.bin
The same as vmlinux, but in a bootable raw binary file format.... | What is the difference between the following kernel Makefile terms: vmLinux, vmlinuz, vmlinux.bin, zimage & bzimage? |
1,294,409,653,000 |
Someone sent me a ZIP file containing files with Hebrew names (and created on Windows, not sure with which tool). I use LXDE on Debian Stretch. The Gnome archive manager manages to unzip the file, but the Hebrew characters are garbled. I think I'm getting UTF-8 octets extended into Unicode characters, e.g. I have a fi... |
It sounds like the filenames are encoded in one of Windows' proprietary codepages (CP862, 1255, etc).
Is there another decompression utility that will decompress my files with the correct names? I'm not aware of a zip utility that supports these code pages natively. 7z has some understanding of encodings, but I belie... | How can I correctly decompress a ZIP archive of files with Hebrew names? |
1,294,409,653,000 |
I'm trying to send a bug report for the app file, /usr/bin/file
But consulting the man and sending an email
BUGS
Please report bugs and send patches to the bug tracker at http://bugs.gw.com/
or the mailing list at ⟨[email protected]⟩ (visit
http://mx.gw.com/mailman/listinfo/file first to subscri... |
You are following the correct procedure to file an issue or enhancement request: if a program’s documentation mentions how to do so, follow those instructions.
Unfortunately it often happens that projects die, or that the instructions in the version you have are no longer accurate. In these cases, things become a litt... | What's the correct way to ask for a feature in GNU Linux? |
1,294,409,653,000 |
I have found the term "LSB executable" or "LSB shared object" in the output of the file command in Linux. For example:
$ file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=4637713da6cd9aa30d1528471c... |
“LSB” here stands for “least-significant byte” (first), as opposed to “MSB”, “most-significant byte”. It means that the binary is little-endian.
file determines this from the sixth byte of the ELF header.
| What does "LSB" mean when referring to executable files in the output of /bin/file? |
1,294,409,653,000 |
I need to recognize type of data contained in random files. I am new to Linux.
I am planning to use the file command to understand what type of data a file has. I tried that command and got the output below.
Someone suggested to me that the file command looks at the initial bytes of a file to determine data type. The ... |
file uses several kinds of test:
1: If file does not exist, cannot be read, or its file status could not be determined, the output shall indicate that the file was processed, but that its type could not be determined.
This will be output like cannot open file: No such file or directory.
2: If the file is not a regu... | Linux file command classifying files |
1,294,409,653,000 |
I was reading about the file command and I came across something I don't quite understand:
file is designed to determine the kind of file being queried.... file
accomplishes this by performing three sets of tests on the file in
question:
filesystem tests,
magic tests,
language tests
What are magic tests?
|
That refers to the "magic bytes" which many file formats have at the beginning of a file which show what kind of file this is.
E.g. if a file starts with #! then it is considered a script.
| What does “magic tests” mean for the file command? |
1,294,409,653,000 |
Which format (Mac or DOS) should I use on Linux PCs/Clusters?
I know the difference:
DOS format uses "carriage return" (CR or \r) then "line feed" (LF or \n).
Mac format uses "carriage return" (CR or \r)
Unix uses "line feed" (LF or \n)
I also know how to select the option:
AltM for Mac format
AltD for DOS format
... |
Use neither: enter a filename and press Enter, and the file will be saved with the default Unix line-endings (which is what you want on Linux).
If nano tells you it’s going to use DOS or Mac format (which happens if it loaded a file in DOS or Mac format), i.e. you see
File Name to Write [DOS Format]:
or
File Name to ... | GNU nano 2: DOS Format or Mac Format on Linux |
1,294,409,653,000 |
How can we read Microsoft Word (.doc) files in a Linux system? It doesn't support .doc files. I tried
strings filename.doc | less
but it gives ugly output. Any other option?
I would prefer a GUI based tool.
|
If you want a graphical solution, then you might be able to open them with Open Office or Libre Office.
There's also antiword
Antiword is a free MS Word reader for Linux and RISC OS. There are
ports to FreeBSD, BeOS, OS/2, Mac OS X, Amiga, VMS, NetWare, Plan9,
EPOC, Zaurus PDA, MorphOS, Tru64/OSF, Minix, Solaris and ... | How to read Word .doc files? |
1,294,409,653,000 |
I know that in ~/.bashrc one must not put spaces around = signs in assignment:
$ tail -n2 ~/.bashrc
alias a="echo 'You hit a!'"
alias b = "echo 'You hit b!'"
$ a
You hit a!
$ b
b: command not found
I'm reviewing the MySQL config file /etc/my.cnf and I've found this:
tmpdir=/mnt/ramdisk
key_buffer_size = 1024M
inno... |
I'll answer that in a more general way - looking a bit at the whole "Unix learning experience".
In your example you use two tools, and see the language is similar. It just unclear when to use what exactly. Of course you can expect there is a clear structure, so you ask us to explain that.
The case with the space aro... | When are spaces around the = sign forbidden? |
1,294,409,653,000 |
I have a gzip archive with trailing data. If I unpack it using gzip -d it tells me: "decompression OK, trailing garbage ignored" (same goes for gzip -t which can be used as a method of detecting that there is such data).
Now I would like to get to know this garbage, but strangely enough I couldn't find any way to extr... |
Figured out now how to get the trailing data.
I created Perl script which creates a file with the trailing data, it's heavily based on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604617#10:
#!/usr/bin/perl
use strict;
use warnings;
use IO::Uncompress::Gunzip qw(:all);
use IO::File;
unshift(@ARGV, '-') unless ... | How to get trailing data of gzip archive? |
1,294,409,653,000 |
Can I use file and magic ( http://linux.die.net/man/5/magic ) to override the description of some other known formats ?
for example, I would like to describe the following formats:
BED: http://genome.ucsc.edu/FAQ/FAQformat.html#format1
Fasta : http://en.wikipedia.org/wiki/FASTA_format
...
that are 'just' text file... |
You can use the -m option to specify an alternate list of magic files, and if you include your own before the compiled magic file (/usr/share/file/magic.mgc on my system) in that list, those patterns will be tested before the "global" ones. You can create a function, or an alias, to transparently always transparently ... | file(1) and magic(5) : describing other formats |
1,294,409,653,000 |
Is there any command line tool available on Linux to check a PDF file version?
|
Yes. The file command covers this
$ file x1.pdf
x1.pdf: PDF document, version 1.7
$
To get greater detail, you could try pdfinfo, part of popper-utils.
$ pdfinfo x1.pdf
Title: Full page photo
Author: steve
Producer: Microsoft: Print To PDF
CreationDate: Fri Apr 5 10:14:34 2019
ModDate: ... | Check PDF file version from command line |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.