date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,288,013,569,000
I have a screen instance running, and I would need to execute some code inside the screen, and get the result out to my script. The first part is quite easy, I just screen -S session_name -X eval 'stuff "$cmd"\015'. (I modified a line I found in a script) The second part, getting out the output, is trickier. How can I...
You could start screen with the -L option. This will cause screen to create a file screenlog.n (the n part is numerical, starting with a zero) in the current working directory. In your case this would look something like: screen -S session_name -L -X eval 'stuff "$cmd"\015' As long as you remember to clean up afterwa...
How to get the output inside `screen` out to a script?
1,288,013,569,000
I'm having some mixed results with the arecord command in the terminal. The hardware I'm using consists of the Cirrus Audio Card for the Raspberry Pi. I'm trying to record a 24-bit 192kHz sound (from the onboard MIC) into a WAV file, and then play it back (through the headset). First I make sure to enable the MIC and ...
I found out what the problem was. The command defaults because I wasn't specifying a 2-channel (stereo) 192kHz audio input. Here's an example of a command that did work: $ arecord -f S24_LE -c 2 -r 192000 -d 20 test.wav The -c 2 is what fixed my commands.
Issues with arecord command: Channels count non available
1,288,013,569,000
If I can send audio to the output devices, then I can record the same audio as a wave. With filesystems, you can just setup a loopback filesystem and write binary data on a file instead of a device. My question is: Can I send the audio signal to a (for instance) WAV file instead of my audio devices? How?
Yes. Actually there are lots of ways. You can set up a sound dummy sound card device that you can just rip the data out of the device ... however this isn't a very useful format. More useful to you is something like the arecord utility that allows you to eavesdrop on the alsa output stream and save it to several known...
Can I setup a loopback audio device?
1,288,013,569,000
I am trying to save voicemail messages from Verizon Fios phone in best quality possible. The voicemail messages are available online, but for playing only (Java based player), no saving. Officially, there is no supported way how to save original digital voice messages as files from Fios Digital Voice service (no paid ...
Interesting question, a long time ago I was thinking about simple recording of digital audio and video, possible via some virtual audio and video drivers, but never got there. I used your configuration file and had exactly same problem as you described. (I removed OSS compatibility drivers from ALSA to be sure, tested...
recording audio from web-based audio player using ALSA loop device
1,288,013,569,000
I'm trying to record audio that is being played on separate channels using arecord. I do this by executing the following command in separate threads in a python script: arecord -D plug:"+str(in_id)+" -c 1 -d "+str(duration)+" -f S16_LE -r "+str(rate)+" "+rec_filename where in_id is the input channel variable that I p...
The ipc_key is used for communication between the programs that share the same device. This means that you have to use different values for different hardware devices, but that all virtual devices that access the same hardware device (i.e., the same slave usb_audio_1) must use the same ID.
'Device or resource busy' error thrown when trying to record audio using arecord
1,288,013,569,000
I would like to redirect the audio output of a program to file, on the command line, like in $ redirect-wrapper file.wav my-program so that I don't hear the output of the program, i.e. the output should only go to the file I don't record anything besides the program, i.e. only this specific program is redirected to ...
Umm so looking at the pulseaudio documentation. man pulseaudio We have the following environment variables $PULSE_SERVER: the server string specifying the server to connect to when a client asks for a sound server connection and doesn't explicitly ask for a specific server. The server string is a list of...
Programmatically redirect audio output of specific program to file
1,288,013,569,000
I have found a ffmpeg command to record area of my screen: ffmpeg -video_size 2000x1600 -framerate 25 -f x11grab -i :0.0+2140,280 output.mp4 But to find the correct area, I had to do multiple trial/error runs and it was tedious. Is there some possibility to select area by mouse, and have it recorded by ffmpeg ? If th...
Slop (an application that queries for a selection from the user and prints the region to stdout) appears to be the easiest tool exactly fitting your purpose… since… it provides an example linked to ffmpeg capturing straight in its readme. ;-) slop can be used to create a video recording script in only three lines of ...
ffmpeg: record screen area selected by mouse
1,288,013,569,000
So fat, I am setting up microphone settings : $ amixer set 'Rear Mic' 90% mute cap $ amixer set 'Rear Mic Boost' 80% But, after some sys. update, my default recoding chanell changed to 'Front Mic' : $ amixer sget 'Input Source' Simple mixer control 'Input Source',0 Capabilities: cenum Items: 'Front Mic' 'Rear Mic...
I found solution here: http://thenerdshow.com/index30e5.html there I've found : $ amixer -c0 cset iface=MIXER,name='Input Source',index=1 'Front Mic' # (Record from Front Mic) slightly modified according to my sound-card and setup (default sound-card, different items ordering) : $ amixer cset name='Input Source',in...
amixer - How to change recording channel?
1,288,013,569,000
My webcam is detected correctly (and i can use it in skype without any issues), but how can i record video on linux preferably with gui tool ?
You can use Cheese (GNOME) if you just need just that, or VLC for more advanced features.
What is the best tool/tools to record video from webcam on linux?
1,288,013,569,000
My problem is very long recordings, longer than supported by WAV. I'm talking about continuous recordings of around eight hours in length. Now, I do most of my recording using sox into FLAC, which makes the most sense, since those are live recordings from an external sound card. Now, I'd like to encode that into MP3 o...
You should try something like: flac -c -d -force-raw-format --endian=little --signed=unsigned input.flac | \ lame -r --little-endian --unsigned \ -s 44.1 [other encoding options here] - output.mp3 On the flac side: -c means output to stdout -d decode -force-raw-format --endian=little --signed=unsigned force...
How to encode huge FLAC files into MP3 and other files like AAC?
1,288,013,569,000
Recently my trusty home PC died after 10 years. The ensuing upgrade (from SuSE 10 to OpenSuSE 12.3) was something of a culture shock for me - none of the convenient shortcuts and utilities I had collected work anymore. Today I'm trying to get sound input working again. I used to record late-night programmes from my lo...
It turns out the sound stack developers have anticipated me and written a workaround specifically for situations like mine - I just wasn't able to find it at first. Aoss does exactly the desired thing: it preloads libaoss.so and then runs another command line, which will then see a /dev/dsp and be able to ioctl/read/...
What is the modern equivalent of reading `/dev/audio`?
1,288,013,569,000
What is the ffmpeg command to record screen and internal audio (on Ubuntu 18.04)? I'll omit the many things I tried that did not work and skip to the something close to what I am looking for; V="$(xdpyinfo | grep dimensions | perl -pe 's/.* ([0-9]+x[0-9]+) .*/$1/g')" A="$(pacmd list-sources | grep -PB 1 "analog.*moni...
Framerate applied to both streams, but since ffmpeg documentation examples are scattered I'll leave an answer here A="$(pacmd list-sources | grep -PB 1 "analog.*monitor>" | head -n 1 | perl -pe 's/.* //g')" F="$(date --iso-8601=minutes | perl -pe 's/[^0-9]+//g').mkv" V="$(xdpyinfo | grep dimensions | perl -pe 's/.* ([...
record screen and internal audio with ffmpeg
1,288,013,569,000
I conduct business over Skype. Sometimes when I talk to clients they give a lot of instructions real quick. It would be nice to have a way to record conversations so that I could listen to them at a later point of time when I need them. I have noticed people suggesting 'recordmydesktop', 'xvidcap', and 'ffmpeg' for re...
Via ALSA emulation I don't have a Debian 6.0.x box to test on, but I think this way will probably work. Courtesy an example on the Arch wiki. First, use pacmd list-sources to find the name of your sound card's monitor stream. Grep for .monitor works pretty well: $ pacmd list-sources | grep '\.monitor' name: <a...
How to record Skype calls (audio) on Debian 6?
1,288,013,569,000
How can I record and play asciinema screen recordings in a LAN without internet connection? The tool uploads the recordings per default to the asciinema website but I want to keep it local and run the player on a local webserver.
Just pass asciinema rec a file name as an argument, in which case it will simply save the recording to the local file and not try to upload it to the server. For example: $ asciinema rec demo.cast You can then play the recording locally (on the terminal) with: $ asciinema play demo.cast And finally upload it with: $...
How to use asciinema offline?
1,288,013,569,000
I want to record audio from multiple input devices using ALSA and Pulseaudio. More precisely, I want to play UltraStar Deluxe. It is a game using SDL. As far as I can tell, it supports ALSA only. Everything is working fine as long as I simply use the virtual ALSA "pulse" device for output and input. Unfortunately, thi...
I figured it out myself. I was wrong to assume the "device" option would need a device name. Instead, a source (or sink, depending what you are trying to achive) name is needed. This for example gives me ALSA access to an individual microphone handled by pulseaudio: pcm.pulse_mic1 { type pulse device alsa_input.us...
Record audio from multiple devices with ALSA and Pulseaudio
1,288,013,569,000
I want to use Audacity (or similar) to record audio for podcasting. The podcasts will be interviews conducted via voice-over-IP (SIP) telephone. I came across an excellent tutorial here: http://www.linux.com/learn/tutorials/367395-weekend-project-record-from-skype-calls-and-other-apps-on-linux It gives most of the ste...
The solution is to use JACK Audio Connection kit (http://jackaudio.org/). I ended up installed the KX Studio distro (based on Debian/Ubuntu) and I removed PulseAudio for simplicity. The podcasts will be interviews conducted via voice-over-IP (SIP) telephone. I want one side of the conversation in one channel and the ...
record audio on Linux - capture both sides of a VoIP conversation
1,288,013,569,000
I am trying to understand the timing files produced by the script command (which are supposed to be read by scriptreplay while running typescript files). The timing file is always made of two columns, I guess the first one represents the delay before each chunk of the typescript file is printed. However, I have diffic...
The manual page for script gives the answer: -t, --timing[=file] Output timing data to standard error, or to file when given. This data contains two fields, separated by a space. The first field indicates how much time elapsed since the previous output. The second field indicates how many characters were ...
Understanding scriptreplay timing file
1,288,013,569,000
I stumbled across a useful command line recorder that allows the user to copy the text when watching the 'recording'. I just cannot remember the name of the project. I just remember you can play and pause the video and the user can copy and paste the text in the video. Anyone know the name of the project?
Might it be asciinema, showterm or PLAYTERM/ttyrec? Coincidentally a colleague of mine is right now trying to remember something like this as well.
Cannot remember the name of a CLI recorder software
1,288,013,569,000
I am using Trisquel GNU/Linux 6.0.1 (a modified version of Ubuntu) on the XFCE desktop environment. I am trying to record the output of my speakers. I do not have a microphone, and so cannot use it for this purpose (and I don't want to, anyways, due to the loss of quality). Yet no matter what program I use (I have tri...
@eyoung100's comments helped me find the solution on my own. In PulseAudio volume control's "Input Devices" tab, ensure that "Monitor of Built-in Analog Stereo" is not muted.
What is preventing me from recording the output of my speakers?
1,288,013,569,000
I'm working with the application "arecord" (under Arch Linux). I'm want to capture sound from my microphone and save it to the disk. This is my command: arecord -f dat -d 2 --channels 1 -D hw:1,0 /tmp/test.wav This captures a two seconds (-d -> duration) file and then saves it to disk. This basically works. What I wa...
Excerpt from the arecord's man page: -d, --duration=# Interrupt after # seconds. A value of zero means infinity. The default is zero, so if this option is omitted then the record/play‐ back process will run until it is killed. This is the command I used to record sound indefinitely with a Kinobo A...
Record from the microphone indefinitely
1,288,013,569,000
How can I record two audio sources at the same time and create a file where one source is the left channel and the other source is the right channel of a lossless stereo audio recording? My distro is Kubuntu 12.04 LTS. My audio source hardware is listed at bottom. Specifically, I believe the two sources I want to re...
My solution was to use JACK Audio Connection kit (http://jackaudio.org/). I ended up installing the KX Studio distro (based on Debian/Ubuntu) and I removed PulseAudio for simplicity. How can I record two audio sources at the same time and create a file where one source is the left channel and the other source is the ...
audio recording - record two sources simultaneously, merge into a single 2-track recording
1,288,013,569,000
Is there a simple, application-independent way to record audio on given sound card? Lets say I plug in USB headset, which appears as /dev/snd/foo. I then use zoom or skype or any other application to make a call. If the application does not allow recording natively, can I record the audio independently on the sound ca...
Is there a simple, application-independent way to record audio on given sound card? Yes ! There is ! What you are looking for is to simply record the output of your sound card. The easiest way would probably be to wire its outputs to its inputs… the aloop alsa driver will provide a wireless way. A/ So first ensure t...
alsa: record everything on given sound card
1,288,013,569,000
I've been working on a small script today for our minimal server here where I can log into our inventory software, download the csv and put it into the web directory using a cron job periodically. Using script and scriptreplay I was able to get all this working perfectly, until I realized that scriptreplay was litera...
So after a lot of back and forth with Caleb we've finally come up with a solution to the problem. The login i was trying to do straight to the inventory management software was fiddly, but to quote as per our back and forward conversations tonight, this solved it. No need for recording keystrokes at all. Just good old...
Record keystrokes through ssh and be able to replay them
1,481,037,337,000
Suppose you fear you could meet someone who will threaten you with death. Assuming the bad guy won't destroy your handheld (for example an Ubuntu Touch device) on sight, a barely decent form of protection would be to have your phone continuously stream its microphone to a remote server you do not have access to, progr...
The following is simplest procedure I came up with. It will work on any GNU/Linux handheld, but instructions for an Ubuntu touch device are provided, anyway. On the handheld device Ubuntu Touch specific: Increase the size of the system.img of your Ubports phone with some extra gigs. Ubuntu Touch specific: Make your ...
How to use an handheld device with GNU/Linux and YouTube to protect from death threats?
1,481,037,337,000
The below code records the audio for some time (I don't know how much) How to calculate the total time of its recording? For example, if I want to record for just one minute then how would I limit its time? #!/usr/bin/env python ## recordtest.py ## ## This is an example of a simple sound capture script. ## ## The ...
In every second, you record 44100 frames (or whatever sample rate you have set). Just add up the number of frames read, and stop when you have recorded 60*44100 of them: total = 0 while total < 60 * 44100: l, data = inp.read() if l: total += l f.write(data) time.sleep(.001)
Alsaaudio module, recording for specific amount of time
1,481,037,337,000
I'm trying to record lossless videos with ffmpeg of My screen My computer audio My microphone audio using this script: MIC="alsa_input.usb-Logitech_Logitech_USB_Headset-00.mono-fallback" MONITOR="alsa_output.usb-Logitech_Logitech_USB_Headset-00.analog-stereo.monitor" AUDIO0=$(pactl list short | grep "$MIC" | grep -...
There are no faster presets for x264 than ultrafast, so you could: Reduce framerate from 60 to cinematic 24 or even 15 since we are talking about screen casting Use a different video codec Use hardware video encoding acceleration if your GPU supports it Add -thread_queue_size 1024 as encoding options. Some people say...
Lossless ffmpeg recordings with low resource usage
1,481,037,337,000
While I am aware of rfbproxy and ffmpeg's x11grab capability, all the examples online seem to be aimed at users wanting to record their own sessions. My usage model is to maintain a (reasonably) trustworthy audit record of remote access to a system. My problem is how to reconcile the files these create with the sessio...
User "balanceofpain" on Reddit suggests: -- FFmpeg/avconv can do that. You'd have to start it as a different user so the person audited would be unable to interfere with it. The command will be similar to: avconv -f x11grab -s 1366x768 -r 25 -i :0.0 /tmp/out.mpg Remember to allow this user access to X with xhost +si...
X Window / VNC session recording
1,481,037,337,000
I'm trying to record a Google Meet call I'm participating in (audio only). Creating a combined sink from a null sink and my headphones sink, redirecting browser to combined sink and recording null sink monitor fulfills the first part of that task: pacmd load-module module-null-sink sink_name=recording sink_properties=...
Finally got it working. The trick was to create a loopback and direct it to the recording sink: pacmd load-module module-null-sink sink_name=Recording sink_properties=device.description=Recording pacmd load-module module-combine-sink sink_name=Combined slaves=Recording,alsa_output.usb-Sennheiser_Communications_Sennhei...
Recording from Pulseaudio sink AND source at the same time
1,481,037,337,000
I'm trying to record my screen losslessly (or at near lossless quality) with hardware acceleration on a 6700 XT with ffmpeg. I'm running Linux Mint with the 5.14.14-051414-generic kernel. I've tried: ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 2560x1440 -i :0 -r 60 -vf 'hwupload,scale_vaapi=format=...
TL,DR: I think you've mostly hit bugs in ffmpeg and/or other parts of the stack that seem be fixed by now. Your first command: ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 2560x1440 -i :0 -r 60 -vf 'hwupload,scale_vaapi=format=nv12' -c:v h264_vaapi -qp 0 output.mp4 Works for me, on Debian Bookworm w...
Hardware accelerated lossless recording on a 6700 XT using ffmpeg
1,481,037,337,000
I have an RTL-SDR radio receiver which outputs streaming data to stdout. I can listen to the audio with this command: $ rtl_fm -M wbfm -f 96.5M | play -r 32k -t raw -e s -b 16 -c 1 -V1 - As you can see, rtl_fm outputs a stream of samples consisting of 16-bit signed integers at a sample rate of 32 kHz. Now, I would li...
You could replace rec with ffmpeg -f s16le -ar 32k -ac 1 -i pipe: file.wav ffmpeg -formats | grep PCM in case I'm wrong. Your output rec WARN alsa: can't encode 0-bit Unknown or not applicable might indicate you're actually recording from an actual microphone (which I presume is not connected).
Why isn't sox recording anything?
1,481,037,337,000
Months ago I would occasionally record little snippets of audio as FLAC files using ffmpeg and ALSA. I used a command that looked more or less like this: ffmpeg -f alsa -ar 48000 -ac 1 -acodec flac -i hw:0 testfile.flac (hw:0 being my microphone's card via arecord -l) If memory serves, there was one other option in t...
Ffmpeg is capable of applying the same options to different inputs and outputs, which result in ffmpeg being sensitive to the position of the options. The following will use your settings and output to a FLAC file (recognized by the file ending): ffmpeg -f alsa -ar 48000 -ac 1 -i hw:0 testfile.flac The settings are a...
How can one record mic audio straight to a FLAC file?
1,481,037,337,000
I'm trying to record my tmux session. I've got an alias record-session which executes command from ttygif ttyrec ~/ttygif/files/last-session. As far as I understand ttygif starts new terminal instance and starts recording it. Normally I have to do $ record-session $ tmux a # Do something with tmux here # C-b D $ exit...
I'v found a solution. It appears that ttygif allows You to use a starting command with flag -e So it's enough to do ttyrec file_name -e "tmux a" Or in my case record-session -e "tmux a -t my_session"
Execute command inside another command
1,481,037,337,000
I'm trying to record my screen, my mic, and my game audio with ffmpeg. This command records only my screen. ffmpeg \ -video_size 2560x1440 \ -framerate 60 \ -f x11grab -i :0 \ -map 0 \ -c:a copy \ -c:v libx264rgb \ -crf 0 \ -preset ultrafast \ video.mkv It records at a steady 60 fps, and ffmpeg gives the output [x11g...
For anyone having this problem in the future, I fixed it by opening pavucontrol during recording.
ffmpeg recording slows down when audio inputs are added
1,481,037,337,000
ffmpeg -f x11grab -s 1920x1080 -i :0.0 -f alsa -i default -c:a aac -c:v libx264 -crf 18 -preset slower ~/Videos/recording-(date +%F-%I-%M).mp4 I'm using this command to record the screen and my intention is to record only the internal audio. But seems like the source is set to microphone. What will be correct command...
Okay, after fiddling for an hour I found the solution. At first I got pulseaudio output source by running pactl list short sources. Which showed me this list - 0 alsa_input.usb-046d_0825_3AC10B90-02.mono-fallback module-alsa-card.c s16le 1ch 48000Hz RUNNING 1 alsa_output.pci-0000_06_00.1.hdmi-stereo.monitor ...
How do I record just the internal audio with ffmpeg?
1,481,037,337,000
I'm attempting to change the default sample rate when recording audio with arecord. Currently, when running arecord test.wav the rate is 8000 Hz: arecord test.wav Recording WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono I can change the sample rate using the rate flag --rate 44100: arecord --format S16_LE --rat...
Reading the documentation for arecord (see man arecord) it writes, -r, --rate=#<Hz> Sampling rate in Hertz. The default rate is 8000 Hertz. [...] So you can see that the rate is not controlled through asound.conf; it's controlled using this command-line flag.
Change default recording sample rate for "arecord"
1,476,667,381,000
ERROR: device '' not found. Skipping fsck. ERROR: Unable to find root device ''. You are being dropped to recovery shell I've been trying to install Arch Linux for some time, and keep running into this error. I seriously have no idea what to do. A little background: My computer originally had a dual boot with Fedora...
I just deleted the entire partition and reinstalled. LVM was screwing it up all along. Works perfectly now.
Unable to find root device ''
1,476,667,381,000
I want to dual boot my macbook with Arch Linux and thus tried to install rEFInd using the install script, however, after install rEFInd doesn't seem to start at all? Anyone experienced the same issue or have possible solutions on how to fix this?
I'm going to reanswer my own question here because there is now an official solution from rEFInd, and thus I believe this is the right way to go about this. The official guidelines can be found on the rEFInd web site. Following are the steps presented there: Boot to OS X, using whatever means is available to you. Hol...
Install rEFInd on OS X 10.10 Yosemite
1,476,667,381,000
I have a "test all the operating systems"-laptop which was running Windows and Ubuntu MATE, with rEFInd used as boot manager. Yesterday I installed Qubes on the last third of the drive. I've since read why you should not but for just testing the OS I would still not mind doing it. Unfortunately I can no longer boot th...
Looking at the drive with gdisk renders: root@ubuntu-mate:~# gdisk /dev/sda GPT fdisk (gdisk) version 1.0.1 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): v Warning: The 0xEE protective partition in ...
Qubes clobbered my boot, how can I re-enable efi booting?
1,476,667,381,000
I have a dual boot setup on a Windows machine with multiple partitions, the two Linux ones being encrypted using LUKS. For some reason, I can no longer restore a backup to my second Linux LUKS partition and properly boot into the LUKS splash screen so I can enter my decryption password. Instead, it tries to boot the...
The problem was a failing hard drive, with bad (repairable) sectors where this partition was.
Dual boot setup with LUKS and rEFInd: Can't Restore Backup to Second Partition
1,476,667,381,000
I recently set up dual boot on a new dell xps 9700, carving off two partitions (/boot and root) for Pop OS (ubuntu-derivative). This was working fine, except Pop OS was taking boots without giving me an option for windows, and I wanted a more sleek boot experience, so I installed rEFInd using the following methodology...
Well, I feel a bit dumb, but I have an answer to my own question. rEFInd shows all partitions it can find by default, and I was selecting the Pop OS /boot partition, rather than the root partition. Posting this follow-up in the hope that it may help someone else in the future.
“no root device specified. Boot arguments must include a root= parameter” after installing rEFInd on windows 10 / pop os dual boot
1,476,667,381,000
How to bypass rEFInd boot loader and boot straight to Linux OS straight? Hi Guys, I managed to install rEFind Boot loader and Linux Mint on the old macbook. Whenever macbook turns on, it will go into rEFIND Boot loader screen, if I want it to go straight to Linux OS ( Linux Mint). (Although if I didn't press anything ...
Somewhere in /boot, probably (not sure about Mint), or else on your esp at least, you'll find a file called refind.conf. You'll want to edit to edit that to include the line: timeout -1 Sets the timeout period in seconds. If 0, the timeout is disabled—rEFInd waits indefinitely for user input. If -1, rEFInd will norm...
How to bypass rEFInd boot loader and boot straight to Linux OS straight?
1,476,667,381,000
I'm dual booting Elementary OS and Windows. I'm seeing two Windows entries though and I'm not sure where refind is finding them. One is shown as Boot Microsoft EFI boot from ESP and the other is Boot bootmgfw.efi from ESP. Selecting either of them boots with Starting from bootmgfw.efi Using load options '' My efi dire...
The dont_scan_dirs list is a list of directories to skip when looking for efi files. Excluding a directory does not appear to exclude the entire tree at that point. Directories under an excluded one are still searched, just efi files in that explicitly named directory are ignored. To solve the issue you'll need to inc...
Duplicate Windows Entries
1,476,667,381,000
I just upgrade Debian from Stretch to Buster. I have a Win 10 installation on another partition but before I was not able to get a Boot menu with both choices so I had to modify the BIOS settings to be able to boot from Windows. With Buster, the situation is better, I have a rEFInd screen where I choose Windows or Deb...
Per the rEFInd Documentation, the default_selection option is used to set the default operating system to boot. Sets the default boot OS based on the loader's title, which appears in the main menu beneath the icons when you select the loader. By default, the rEFInd configuration file should be located at either /boo...
How to boot by default to Debian Buster
1,476,667,381,000
I am new to Linux and very confused. I need to change the i915.enable_psr and i915.enable_guc parameters or modules or whatever they are called to prevent my laptop from being in a constant state of agony, but I only recently found out that pop!_os instead of grub uses systemd or refind to boot or something and I genu...
Open refind_linux.conf on /boot Add the kernel boot parameter you want, for instance: "Boot with standard options" "root=UUID=bc31044c-8911-481d-8729-xxx ro quiet splash vt.handoff=7 i915.enable_psr=0" Then reboot and check with sudo cat /sys/module/i915/parameters/enable_psr should returns 0 (instead of -1)
how to change kernel boot parameters in systemd or refind
1,476,667,381,000
I downloaded GParted live archive and extracted it to /dev/sda4. The GParted guide explains installation with grub, but since I'm not using grub I wanted to give it a shot adding a manual entry to rEFInd. This is the pratition tree. NAME MOUNTPOINT LABEL SIZE TYPE FSTYPE sda ...
According to https://gparted.org/livehd.php the options string should be quite a bit longer. Something like: options "boot=live config union=overlay username=user components noswap noeject vga=788 ip= net.ifnames=0 live-media-path=/live bootfrom=/dev/sda4 toram=filesystem.squashfs" The error would seem to indicate t...
rEFInd manual stanza for GParted live
1,476,667,381,000
I have installed refind on it's own dedicated partition on my Macbook Pro so that I can boot Linux, but it takes almost 30 seconds between switching the computer on and seeing the refind menu. Is there any way to speed up the boot process using refind?
The solution in this answer solves this problem. Specifically: By security, I added all the "drivers_x64" folder by doing ./install.sh --alldrivers at the rEFInd installation On my EFI partition under Yosemite (stored on/dev/disk0s1), I renamed the "refind" folder to "BOOT" Inside that folder, I renamed "refind_x6...
Refind Boot Too Slow 30 Seconds
1,345,806,144,000
As I understand this, firewalls (assuming default settings) deny all incoming traffic that has no prior corresponding outgoing traffic. Based on Reversing an ssh connection and SSH Tunneling Made Easy, reverse SSH tunneling can be used to get around pesky firewall restrictions. I would like to execute shell commands o...
I love explaining this kind of thing through visualization. :-) Think of your SSH connections as tubes. Big tubes. Normally, you'll reach through these tubes to run a shell on a remote computer. The shell runs in a virtual terminal (tty) through that tube. But you know this part already. Think of your tunnel as a...
How does reverse SSH tunneling work?
1,345,806,144,000
While attempting to SSH into a host I received the following message from xauth: /usr/bin/xauth: timeout in locking authority file /home/sam/.Xauthority NOTE: I was trying to remote display an X11 GUI via an SSH connection so I needed xauth to be able to create a $HOME/.Xauthority file successfully, but as that mes...
Running an strace on the remote system where xauth is failing will show you what's tripping up xauth. For example $ strace xauth list stat("/home/sam/.Xauthority-c", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 open("/home/sam/.Xauthority-c", O_WRONLY|O_CREAT|O_EXCL, 0600) = -1 EEXIST (File exists) rt_sigprocmask(SIG_B...
Why am I getting this message from xauth: "timeout in locking authority file /home/<user>/.Xauthority"?
1,345,806,144,000
Coming from Windows administration, I want to dig deeper in Linux (Debian). One of my burning questions I could not answer searching the web (didn't find it) is: how can I achieve the so called "one-to-many" remoting like in PowerShell for Windows? To break it down to the basics I would say: My view on Linux: I can ...
Summary Ansible is a DevOps tool that is a powerful replacement for PowerShell RunDeck as a graphical interface is handy Some people run RunDeck+Ansible together clusterssh For sending remote commands to several servers, for a beginner, I would recommend clusterssh To install clusterssh in Debian: apt-get install cl...
Linux equivalent to PowerShell's "one-to-many" remoting
1,345,806,144,000
Beside our internal IT infrastructure, we've got around 500 Linux machines hosting our services for the on-line world. They are grouped in a bunch of clusters like Database A-n, Product A-n, NFS, Backoffice and so on. Furthermore, they are administered by an external provider, according to our specifications and requi...
It depends what exactly you need and what you are looking for. But in general there exists multiple solutions for "configuration management like: puppet chef cfengine ansible salt etc. I personally would recommend puppet as it has a big community and a lot of external provided recipes. This allows you to configure a...
Linux Bulk/Remote Administration
1,345,806,144,000
I have a Godaddy dedicated server that I would like to cancel. Before I do that I'd like to do a clean format on the server to make sure that the next person who gets the server isn't able to undelete anything (I don't know how thorough Godaddy is when it comes to reformatting before giving the disk to someone else.) ...
The simplest way to do this would be to overwrite the entire drive with zeros. dd if=/dev/zero of=/dev/sdX bs=1M Just know that once you execute that, there's no going back. As soon as the command finishes, and you get back to a shell prompt, nothing will work and the box will be extremely unhappy. It might also be ...
how do I wipe a server that I don't have physical access to?
1,345,806,144,000
If this should be moved to the DBA exchange, I apologize. Feels more like linux than DB to me, so here goes: I've got some machines that run scheduled cron jobs every night and email me the output. I do not want emails for things like this. In general I think the way we use email is broken, but that's another story. ...
That's all comes from quoting. Try this one: ssh [email protected] 'sqlite3 /home/aaron/dbname.db "UPDATE data SET \ LastStart = DATETIME('''NOW''') WHERE TaskName = '''taskname'''"' ps. You need to quote NOW, otherwise sqlite will try to find column with such name. But your quotes ' will be eaten by quotes from ssh....
perform remote sqlite command
1,345,806,144,000
Consider a headless server like this: A typical x86 box at a remote location, which you can remotely initialize with a stock - say - Ubuntu image. After it is initialized you only can login via ssh - or remotely reset it, i.e. you can't access the BIOS or the boot manager prompt (say Grub 1). Perhaps some kind of KVM ...
Seriously, if your provider does not offer free (or at least cheap) manual assistance for extreme cases, it's time to switch. Otherwise, I think that you are pretty much OK with your setup. When your system is so broken that fsck can't fix it, there isn't much else to do, other than a complete reinstall. I actually ha...
How to setup linux server for headless use?
1,345,806,144,000
In a schoolroom there are 15 machines + 1 the teacher's PC. All have ex.: Ubuntu 10.04 LTS. Are there any softwares that can be used on the teachers machine that can "audit" the students 15 PC? Things needed: - teacher must see the students "display" from his PC. - teacher could show 1 students "display" to all o...
iTALC lets you monitor and control several computers in a classroom environment. It might do what you need. I'm not sure about showing a student's screen on all others, though. There is also LanSchool, Nettop, and NetSupport Assist, all of which are commercial solutions. If none of those are what you're looking for, y...
"supervisory" software for school rooms
1,345,806,144,000
I'm new to Linux, and I'm probably asking a fairly basic question. How do I run a continuous program on Linux? Basically, I have a program that will continuously check for content on a website. This program will be executing for several days. I do not have administrative privileges on the computer I wish to run this ...
If it is something that needs to happen at regularly scheduled intervals use cron( e.g. you need to check the website once every hour, or once every day, or more or less frequently than that but still not arbitrarily defined). However... You may want to run a command at a cerain later time rather than right now, for t...
Running continuous jobs remotely
1,345,806,144,000
I recently setup FreeIPA on an internally accessible system at home. I'd like to manage this web UI from networks that are external to my LAN, but at the same time, I don't want to have to expose this web UI to the public internet. Is there a way I can access it through an SSH tunnel? NOTE: I'm familiar with setting u...
Performing SSH tunneling can get a bit confusing with all the terminology, but there is a complementary feature to -L, which provides you the ability to "dynamically" assign ports by allocating a socket locally, instead of a single port. From the man page: -D [bind_address:]port Specifies a local ``dynamic'' appl...
How can I remotely access an intranet website from an external network via an SSH tunnel?
1,345,806,144,000
My current laptop is falling apart, specifically the screen hinges. Once (or ideally before) they break, I'd like to run the machine as a storage device. I strongly prefer using GUIs over CLI. Any recommendations on a distro/useful tools to install before turning it into a box? Any cautionary tales about running a lap...
If you're using it as a storage device I would configure it now, turn it on, and share your drive via NFS/SAMBA, etc, then never touch it again. Effecively, you're turning your laptop into a NAS. Something like FreeNAS might be worth looking at. It provides a web-based GUI which should suffice for most tasks, leaving ...
Can I still use a GUI on a headless laptop (used for storage)?
1,345,806,144,000
I have a headless Fedora 15 (without GUI) box. With the following partition structure: $ df -T -h Filesystem Type Size Used Avail Use% Mounted on rootfs rootfs 49G 2.8G 46G 6% / udev devtmpfs 1.7G 4.0K 1.7G 1% /dev tmpfs tmpfs 1.7G 0 1.7G 0% /dev/shm tmpfs tmpfs...
Theoretically, sure. You could theoretically change a Fedora box to Slackware in place, if you cared enough to take the time it would require to do so without destroying something. Generally, it's seen as not worth the effort. You'll notice, after reading the CentOS/SL documentation, that they don't even recommend upg...
Changing linux distro remotely while preserving data
1,345,806,144,000
I want to setup froxlor on not fresh install remote server (Ubuntu 10.04.2). I take care of admin the server since two month. Before I start, the previous guy installed and config some services and files. I don't know what he exactly does, I can only view what he installed (by the history) but not what he edit. I wan...
Install etckeeper. On Ubuntu, that's the etckeeper package . Choose your favorite version control system (amongst Bazaar, Darcs, Git and Mercury). Run etckeeper init. Now, every time you modify a configuration file, run sudo bzr commit from /etc (or sudo git commit or whatever). Also, every time you install, upgrade o...
Best practice to backup /etc config files
1,345,806,144,000
My office has one default gateway and behind that is a local network with locally assigned IP addresses to all computers including mine. I hold admin in my Ubuntu installed office PC and is it essential that I access the computer during weekends through SSH. At office, I do not have a public IP but I always get the sa...
It's easy: [execute from office machine] Setup connection Office -> Home (as Home has public IP). This will setup reverse tunnel from your office machine to home. ssh -CNR 19999:localhost:22 homeuser@home [execute from home machine] Connect to your office from home. This will use tunnel from the step 1. ssh -p 19999 ...
SSH PC at office in local network from home
1,345,806,144,000
I have a few different Desktop versions of Ubuntus (13.04, 12.04, Kubuntu,..) on different computers. I would like to manage all of them on a single computer via remote connection and be able to use GUI programs on the remote computer as team viewer allows. But, team viewer provides a limited connection time for the...
I would use the application Vinagre. You invoke it from the command line like so: $ vinagre There is also a applet that should be available when you install it so that you can just pick machines that you've bookmarked with it form a pulldown when you add the applet to your toolbar.
remote desktop connection - similar to team viewer
1,345,806,144,000
I want to execute a process on multiple servers. I am using the following wrapper script. The script moves to servers one at a time. I would like to change it so it can execute on multiple servers. Is there way to do it? #!/bin/bash for ip in $(<ALL_SERVERS_IP); do # Tell the remote server to start bash, but si...
I know some tools for that, but the easiest is Fabric. Take a look and tell me what do you think.
Running commands on multiple servers [duplicate]
1,345,806,144,000
I administer a home server, and sometimes when I'm out, I need to execute some simple commands on the server. 3G + SSH is not an option because it's too expensive from my phone (here in Argentina). It is easier to send an SMS to my mail account. I want to fetch the mails I send to my server, and process the text surro...
I'd recommend you install procmail or some other mail processor. You can configure it so everything from you, with a subject line of a certain magical password that only you know will pass the contents to a script (which you could then execute). But... you're opening a huge security hole so it's unwise to do this as...
How to fetch and process mail in order to execute commands?
1,345,806,144,000
We have a VPS running on AWS, although generic solution is expected regardless of hosting vendor. This VPS is acting as a Jump Box (running CentOS 6) for various other internal server such as SSH access to various other boxes (which are connected to the Jump Box thru reverse SSH). The Jump Box exposes random higher p...
You could build the described system using iptables, ipset and pam_exec. The idea is following: There is a separate chain containing rules to allow incoming traffic to these higher ports. Iptables INPUT chain contains an ipset rule matching your logged in hosts, jumping to the separate chain. On successful log in, a ...
Expose public ports only to the sshed user
1,345,806,144,000
I am running an openSUSE server without any GUI components (for the classical reasons: performance, security, patching, etc.). Are there Linux related graphical tools that I can run on my local (Windows) machines (alternatively local Linux VMs) that allow me to control/administer the remote server? Basically tools th...
You can either setup a management agent on the OS - or setup some tool that can manage your system over SSH. In terms of maturity and ease of use - I'd say go for Webmin or one of the alternatives. Here are some other examples, in order of increasing complexity: Webmin Webmin is a web-based interface for system admin...
Local graphical tools to control remote non-GUI server
1,345,806,144,000
I have a linux machine that I was accessing remotely and I made the mistake of doing #init 1 which turned off networking on the machine. What is the easiest way to turn networking back on and/or get the machine out of single user mode? I do have personnel that can access the machine locally if necessary.
You'll need the remote hands to get into the system via the console and run telinit 3 or telinit 5 if either of those were the runlevels you were using previously.
How to turn off single user mode on a remote machine?
1,345,806,144,000
My ISP gives me a 192.168.* IP to my home router. Only the main company router in the building gets a real IPv4 IP but all of the tenants in the building share that. They don't do IP forwarding so I can't request port 22 to be forwarded just to me or anything like that. Using Tor, I can open a route to the Tor network...
I've did the exact same thing recently to connect to IoT devices connected on the Internet with mobile network and therefore under NAT. My solution is based on a micro-instance on Google Cloud. Its IP must be permanent, let's call it server_ip. No firewall rules seem needed. On your local device, that one that you'd l...
Setting up a bastion host to access local machine
1,345,806,144,000
Assuming a remote machine where you can PXE boot into a GRML image that also provides ssh access. Now the question is how to install CentOS in such an environment. Something like KVM access is not available. A few years ago I used debootstrap with success to install Debian in a similar environment. Is there is somethi...
You can prepare a minimal install inside a qemu KVM instance and then transfer the image to the remote system. For example to install a RAID-1 Centos 7 system: On you local workstation: $ truncate --size 5G disk1.img $ truncate --size 5G disk2.img $ qemu-system-x86_64 \ -cdrom CentOS-7.0-1406-x86_64-DVD/CentOS-7.0...
How to remote install CentOS/RHEL 7 using a rescue image like GRML?
1,345,806,144,000
I want to replace TeamViewer with a FOSS solution. I need to support some remote computers. I have a working SSH tunnel set up between two computers using a middleman server like this: Kubuntu_laptop--->nat_fw--->Debian_Server<--nat_fw<--Kubuntu_desktop This SSH tunnel is working now. Next I want to connect to the de...
It sounds like you currently have a default ssh connection between the laptop and server: Kubuntu_laptop--->nat_fw--->Debian_Server Modify the parameters to the ssh connection so you have -fNL [localIP:]localPort:remoteIP:remotePort For example: -fNL 5900:localhost:1234 If your laptop used VNC on the default port of 5...
Remote support: routing RDP over ssh tunnel?
1,345,806,144,000
I'm trying to copy a bunch of RSA keys to multiple servers for a specific user. Whenever I issue the ssh-copy-id command it asks me to confirm by typing "yes", then asks me for the password. I wanted to avoid wearing out my arms and fingers, so, I decided to create a script for this task, something like this: #!/bin/b...
You can disable the yes checking with the -f option to ssh-copy-id. The password should probably not be part of that script, assuming that script ends up somewhere that might be readable by others. Instead, I'd recommend writing a script like this: #!/bin/sh # Usage: myscript user password RMTUSER=$1 PASSWORD=$2 # ju...
Automatic SSH prompt input
1,345,806,144,000
I've just installed cockpit on my CentOS 8 box: dnf install cockpit systemctl start cockpit.socket systemctl enable cockpit.socket Once I'd let it through the firewall, I can get it up on a.b.c.d:9090 in my browser. But Chrome is saying Not secure, with https crossed out in the address bar. When I click on the war...
Your connection is encrypted. The "problem" is that the certificate is not trusted by Chrome because it is not signed by a trusted certification authority which makes sense because it was created by Cockpit and self signed. You can either ignore this (especially if you are connecting only from a private network) or ge...
How can I fix broken https on Cockpit?
1,345,806,144,000
I have a DELL server R610, on this server there is a RHEL 6.4 This server has an idrac entreprise. I would like to configure the idrac from command line, avoiding reboot. I read on the man page of ipmitool that I can use a command like : #ipmitool lan set 1 mode dedicated but the command return man page : usage: l...
Up until a few years ago, ipmitool was undergoing rapid development. On some Linux distributions from around that time, the man page may not describe all the commands supported by the executable. In your case, setting Dell DRAC and iDRAC parameters is supported by ipmitool 1.8.11, and is done using the ipmitool delloe...
ipmitool set idrac mode
1,345,806,144,000
Ubuntu : sudo DEBIAN_FRONTEND=noninteractive apt-get -y update sudo DEBIAN_FRONTEND=noninteractive apt-get -y upgrade sudo reboot Script is always interrupted after upgrade and then it will stay on the command line, it will never reboots. How to run non-interactive shell scripts correctly, is there a way ?
apt-get -qy update > /dev/null apt-get -qy dist-upgrade >> /var/log/apt/scripted-upgrades.log You can send them both to /dev/null if you want-- but once its gone you can never look at what went wrong after issuing the command. Also if your /etc/apt/sources.list is in bad shape, running a plain interactive apt-get upd...
Why is my shell script hanging on `apt-get -y upgrade`?
1,345,806,144,000
I'm working on BackTrack and I want to give a fake IP from my DHCP server to another PC. I'm trying to make that Windows PC run the command: ipconfig /release, but without remote access. I don't want to have to remote into the Windows PC and run ipconfig /release manually. I'd like to run this command remotely from my...
Release a Window's PC's IP (Rephrased Question) You might be able to use the tool winexe to do this. $ winexe -U DOM/USER_NAME //remotePC "ipconfig /release" Release my IP (original question) The command is ifconfig <interface> on Linux. $ sudo ifconfig eth0 down Will bring down the interface. To release you can u...
How to force PC to release IP?
1,345,806,144,000
I want to push a new user's public key to a host invetory using Ansible. For that, a playbook was created like the following example. --- - name: vms1 - Authorize hosts with pub key hosts: vms1 tasks: - name: Copy ssh pub key to remote host ansible.posix.authorized_key: user: user1 state:...
Q: "How could the password be requested for each play?" A: Use the variable ansible_password. For example, put the variable into the playbooks' vars - hosts: vms1 vars: ansible_password: connection passwd for vms1 tasks: - name: Copy ssh pub key to remote host ... - hosts: vms2 vars: ansible_p...
Ansible - Push authorized key to multiple host groups with different passwords
1,345,806,144,000
Not sure if this is possible, all my google results come up with RDP stuff, or just basic, how to install phpVirtualBox. I was wondering If I can set up a Central phpVirtualBox and connect it to multiple VirtualBox servers? This way I can have centralized management of all my VM's from the same GUI. Update : It is pos...
Yes, you can. According to their sourceforge summary : As a modern web interface, it allows you to access and control remote VirtualBox instances. You will need : one server with Apache/PHP for running phpVirtualBox, one or multiple server running as host with VirtualBox web services each of these host supporting o...
phpVirtualBox - Control Remote Servers - Central Management
1,333,326,770,000
I know that the eject command can be used to eject almost any hardware component attached, but can it be used to eject USB drives? Is it possible to eject USB drives and external HDD's with the eject command?
No. Nor do they need to be; eject is used for opening optical drives, where one cannot pull the media from directly. Unmounting is sufficient for USB/eSATA/etc. storage devices.
Eject USB drives / eject command
1,333,326,770,000
From the Arch Linux Wiki: https://wiki.archlinux.org/index.php/USB_flash_installation_media # dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync [...] Do not miss sync to complete before pulling the USB drive. I would like to know What does it do? What consequences are there if left out? Notes...
The dd does not bypass the kernel disk caches when it writes to a device, so some part of data may be not written yet to the USB stick upon dd completion. If you unplug your USB stick at that moment, the content on the USB stick would be inconsistent. Thus, your system could even fail to boot from this USB stick. Syn...
Why is sync so important when making a bootable linux usb stick?
1,333,326,770,000
What is the purpose of having both? Aren't they both used for mounting drives?
I recommend visiting the Filesystem Hierarchy Standard. /media is mount point for removable media. In other words, where system mounts removable media. This directory contains sub-directories used for mounting removable media such as CD-ROMs, floppy disks, etc. /mnt is for temporary mounting. In other words, where us...
What's the difference between mnt vs media? [duplicate]
1,333,326,770,000
When writing content to removable devices on Linux (USB sticks/HDDs, SD cards, etc), I often see incredible write speeds in the first few seconds, sometimes in the order of GB/s (filling of the write buffer) followed by several minutes of quiet (buffer actually being written to the device). It's misleading. It makes i...
I found the answer. 64-bit Linux maintains a large write buffer (20% of available memory!) by default. (Interestingly, 32-bit Linux limits itself to at most 180MB) To change the dirty buffer size to e.g. 200MB, one can use echo 200000000 > /proc/sys/vm/dirty_bytes OR to use a percentage of RAM, e.g. 1%: echo 1 > /pro...
How to reduce Linux' write buffer for removable devices?
1,333,326,770,000
I have put a CD into my drive. How can I find the rainbow book color on Linux (Red book/Yellow book/Blue book/...)?
You can use cd-info from the libcdio project. This will list all your CD’s tracks, and for each one, give you information about its contents: CD-DA (red book), Photo CD (beige), Video CD (white), etc.
How can I determine the rainbow book color of a CD on Linux?
1,333,326,770,000
Context I'm automating SD card imaging from an existing dd factory image. The SD card is always connected through an external USB card reader and thus appears in the system as a SCSI block device /dev/sd*. Currently the syntax of my command is: write-image DEVICE where DEVICE is the SD card block device, eg. /dev/sdd....
Have a look under the /sys/ directory. In particular, /sys/block/ contains symlinks to block devices in /sys/devices/. /sys/block/sdX/removable looks like it will read as 1 for a removable device, and 0 otherwise. This gives you a basic check for removability. I'm not sure if there's a better way to check if it's a US...
Find out if a specific device is an USB mass storage
1,333,326,770,000
I have quite a bit of removable media (flash drives, external hard drives, etc) that I want to adjust auto mount options for. How does one do this? Is there something similar to /etc/fstab?
In order to specify automount options across any DE you can specify this with udisks configuration: https://wiki.archlinux.org/index.php/Udisks#Udisks Something such as: udisks --mount /dev/sda1 --mount-options options autofs also works: https://wiki.archlinux.org/index.php/Autofs
How to set default auto mount options for removable media?
1,333,326,770,000
In DMESG I see: [sdb] Attached SCSI removable disk How does Linux decide what is removable and not removable? Is there a way I can look up if a device is "removable" or not other than the log, for example somehwere in /sys or /proc?
All block devices have a removable attribute, among other block device attributes. These attributes can be read from userland in sysfs at /sys/block/DEVICE/ATTRIBUTE, e.g. /sys/block/sdb/removable. You can query this attribute from a udev rule, with ATTR{removable}=="0" or ATTR{removable}=="1". Note that removable (t...
How to tell if a SCSI device is removable?
1,333,326,770,000
If I understand correctly, the database locate relies on is just for files on partitions of internal HDDs. I wonder if it is possible to use locate on external HDDs?
The locate database is generally configured to omit files on removable disks, since they can't be assumed to be there later. It can be configured through a file such as /etc/updatedb.conf (the location depends on which of the several locate programs you use and how it is configured by your distribution). For a removab...
Make `locate` able to search files on external HDD
1,333,326,770,000
I've just mounted a microSD card which has 17 partitions in my laptop and I'm getting the following error in the YaST partitioner: Your disk /dev/mmcblk0 contains 17 partitions. The maximum number of partitions that the kernel driver of the disk can handle is 7. Partitions above 7 cannot be accessed and indeed - I ha...
LVM is not overkill if you have 17 partitions. (IMHO) As for the partition limit, it just happens to be the default. Probably no one expected that many partitions on a device that used to have only a few megs. /usr/src/linux/Documentation/devices.txt: 179 block MMC block devices 0 = /dev/mmcblk...
/dev/mmcblk0 partitions limit
1,333,326,770,000
In my question Bash script to output path to USB flash memory stick I got stuck on a problem nobody else seems to be having. (The issue also impedes my desire to use this answer.) So I made that specific problem into this new question. Apparently removable devices listed in /sys/block end with 1. It is stated here and...
USB removable storage selector: USBKeyChooser Rewrited 2022-01-05: USBKEYS=() while read _{,,,,,,} dev _ rdev;do [[ $rdev == */usb[0-9]* ]] && grep -q '^DRIVER=sd$' /sys/block/$dev/device/uevent && (( $(</sys/block/$dev/size) )) && (( $(</sys/block/$dev/removable) )) && USBKEYS+=($dev) done < <(/bi...
Removable USB stick listed as non-removable in /sys/block?
1,333,326,770,000
After installing and configuring Thunar Volume Manager for Arch Linux it doesn't mount any USB devices automatically: $ thunar thunar-volman: Unsupported USB device type. thunar-volman: Unsupported USB device type. thunar-volman: Could not detect the volume corresponding to the device. thunar-volman: Could not detect ...
Turns out you have to install gvfs and polkit-gnome to make this work. After logging out and in again Thunar supports mounting USB devices.
Thunar doesn't auto-mount USB devices with default setup
1,333,326,770,000
I have a memory stick that is not mounted in Ubuntu and it doesn't works in Windows. I can check is connected using Bus 003 Device 011: ID 05e3:0727 Genesys Logic, Inc. microSD Reader/Writer But I cannot mount it. I want to try formatting it to check if is detected again in Windows and Linux. How could I do without m...
There are many ways to format a USB Command line Type this command in the terminal which will help you identify the USB name i.e: sdb,sdc,etc... sudo fdisk -l Make sure the USB is not mounted, if yes then you need to unmount it: umount /dev/sdX Replace sdX with your device name Delete any existing partitions (from...
How to format a USB storage not detected in Ubuntu?
1,333,326,770,000
Terms regarding the OS: Must be installed on pendrive It must contain software for office use Need to save files, GUI settings on it (auto) So I'm not searching for a LiveCD. What could be the best choice?
Most “live CD” distributions can be installed on a pen drive instead of a CD. Then you can use the rest of the pen drive (if it's large enough) as storage. For example, for Ubuntu, prepare a “live CD” on a USB pen drive. The pen drive creator utility will let you choose how much space to devote to storage. Alternative...
Linux on pendrive? Which distro to use? [closed]
1,333,326,770,000
I've added the following line to my /etc/fstab to mount a ramdisk. none /media/ramdisk tmpfs nodev,nosuid,noexec,nodiratime,size=2048M 0 0 It shows up in my desktop as a removable drive, and it is shown as such in the status bar and in the dock, as shown below. How can I disable this? Should I mount it with diffe...
/media is intended for removable media, which is why your desktop environment shows the mountpoint as removable. To avoid that, mount your file system somewhere else, e.g. /mnt/ramdisk.
Mount drive not as removable drive
1,333,326,770,000
I have a USB flash drive with ext4 file system and its files are owned by my user on my local machine, for example by myuser@myhost with 700 permissions. If I unplug my flash drive and plug it in other Linux machine, can users of that machine have access to files in the flash drive? What if there is also a user named ...
Filesystems designed for unix, such as ext4, track the user via a number, the user ID. The user name is not recorded. You can see your own user ID with the command id -u. You can see the user ID who owns a file with ls -ln /path/to/file. If you take an ext4 filesystem to a different machine, the files will still have ...
Permissions on an ext4 filesystem on a removable drive used in different machines
1,333,326,770,000
I keep getting low storage space warnings, I want to increase my total storage space, I was hoping to do that via terminal command, how would I go about doing that? I put in df -h and got: Filesystem Size Used Avail Use% Mounted on udev 484M 4.0K 484M 1% /dev tmpfs 100M 1.3M 99M ...
Unfortunately, there's not much you can do, other than replace the hard disk or get an external disk. You can, of course, try to reduce the amount of disk space you're using, but most modern Linux distros will eat 20 gigs pretty quick. That means you either trim out everything you don't need, or possibly change distr...
low remaining storage space, how do I increase it?
1,333,326,770,000
I am currently using OpenBSD 5.5-release. Whenever I copy files or directories from my USB device to the local HDD, the names of the copied files have all become uppercase. What causes it? How do I fix it?
You can fix it (each time it happens) with this command: find local_directory_name -depth -exec sh -c 'dir="$(dirname "$0")"; FILE="$(basename "$0")"; lowfile="$(echo "$FILE" | tr "A-Z" "a-z")"; if [ "$lowfile" != "$FILE" ]; then mv "$0" "$dir/$lowfile"; fi' {} ";" Type this all as one line (replacing local_director...
Names of copied files from USB device to HDD have all become uppercase. How to fix it?
1,333,326,770,000
I have a backup script which mounts and unmounts a USB harddrive. In Ubuntu I used the command udisksctl but it is not included in the Debian 7.7 repository. Is there a similar command in Debian to mount and unmount USB devices as a normal user?
I believe you can use pmount instead. It's in the Debian 7.7 repos. $ apt-cache search pmount libpmount-dev - portable mount library - development files libpmount0.0 - portable mount library - shared library pmount - mount removable devices as normal user Usage $ pmount -h Usage: pmount [options] <device> [<label>]...
Mounting and unmounting USB storage from the command line
1,333,326,770,000
Sadly the issue reported and described here: Pernicious USB-stick stall problem. Reverting workaround fix? and Is "writeback throttling" a solution to the "USB-stick stall problem"? continues to be unresolved in modern Linux distros as of 2024 despite the availability of the BDI interface introduced in Linux 6.2 relea...
A udev rule, /etc/udev/rules.d/99-adjust-writeback-cache.rules: ACTION=="add", KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_BUS}=="usb", \ RUN+="/usr/local/lib/adjust-writeback-cache.sh $major $minor" cat /usr/local/lib/adjust-writeback-cache.sh #! /bin/bash devroot=/sys/class/bdi max_bytes=134217728 # must be divisibl...
Solving the USB drive/mass storage stall issue
1,333,326,770,000
I am having a version strange problem with a 4GB ATP Industrial Grade Compact Flash Card. I am trying to use it as the boot storage for a ALIX single board PC. When I insert it into another Linux machine I see: [ 421.320908] scsi 3:0:0:0: Direct-Access eUSB Compact Flash 5.06 PQ: 0 ANSI: 2 [ 421.331377] s...
Maybe you can fix this with the quirks mode of the usb_storage driver for this specific device, see https://askubuntu.com/a/1088434 If you have to use the quirks mode this probably means that the Compact Flash card's behavior differs from (most) other CF cards.
Linux specific problem with Write Protected Compact Flash
1,333,326,770,000
The file manager PCManFM has an option (enabled by default) to ask what to do with inserted/mounted volumes (cd, dvds, iso files etc) which is lacking in elementry OS' file manager. That's why I m using PCManFM for this purpose. When connecting an external HDD: When inserting a DVD or mounting an iso-dvd: When inse...
Look for mimeapps.list. It can be $HOME/.local/share/applications/mimeapps.list or, if not, look in $HOME/.config. Edit the section [Added Associations]. To add an application in the pop-up list for inserted CD, add this line: x-content/audio-cdda=name_of_application.desktop To add an application in the pop-up list f...
PCManFM: edit the list of applications available on auto-mount
1,333,326,770,000
I want to format an USB device i suspect to be infected with virus/es to make it safe for use again using my linux machine. If the device is never mounted is there still a risk of a virus or maleware of any time to be able to execute somehow and infect my machine? Do you have any alternatives on how to safely cleaning...
I would suggest to wipe it using a live USB with a distro of your choice. Just make sure you don't mount neither the infected thumb drive nor any of disks that you have on your machine. As thumb drive is actually an empty system without any valuable data on it, there is nothing to corrupt. Also the live distro is loa...
Is there a risk to get infected from unmounted USB storage device
1,333,326,770,000
It's for a bash script. Basically, I want to format, or erase a USB (or SD) storage device; with a single command line. I was going to use fdisk, but it seems to require user interaction where I want automation. So then I decided to try zeroing it out with: dd if=/dev/zero of=/dev/<target disk>; but it only seems ...
If you want to use fdisk, with only one partition, with all blocks used, this will suffice: echo -e "n\np\n1\n\n\nw\n"| fdisk /dev/<target disk> && mkfs.ext4 /dev/<target disk> Change mkfs.ext4 to whatever filesystem type you want it to use. If you just want to delete data, your dd command should be fine.
What's the quickest way to format a disk?