Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
2911
views
Connect to RemoteApp Linux Mint 18.3
At our company we run a Remote Desktop Gateway with RemoteApps Does anyone have a good and easy way to connect and use these from within Linux Mint 18.3? Been trying different things and a work around is an openVPN server and just connect directly to the Domain Controller and Remote Desktop Server....
At our company we run a Remote Desktop Gateway with RemoteApps
Does anyone have a good and easy way to connect and use these from within Linux Mint 18.3?
Been trying different things and a work around is an openVPN server and just connect directly to the Domain Controller and Remote Desktop Server.
It would how ever be very neat to be able to just launch the RemoteApp instead.
Datmocc
(1 rep)
Feb 1, 2018, 09:58 AM
• Last activity: Aug 6, 2025, 01:03 AM
0
votes
1
answers
2265
views
How to VNC to Ubuntu 19.04 without monitor while connected via SSH
I am trying to figure out how I can VNC to my Ubuntu 19.04 desktop which doesn't have a monitor or keyboard/mouse. I installed Ubuntu 19.04 on an external USB hard drive using my MacBook Air. I then booted Ubuntu on the MacBook Air and installed SSH. Then the above hard drive which has Ubuntu instal...
I am trying to figure out how I can VNC to my Ubuntu 19.04 desktop which doesn't have a monitor or keyboard/mouse.
I installed Ubuntu 19.04 on an external USB hard drive using my MacBook Air. I then booted Ubuntu on the MacBook Air and installed SSH.
Then the above hard drive which has Ubuntu installed was connected to my headless desktop and Ubuntu boots up perfectly and I was able to connect to my Ubuntu desktop via SSH on my MacBook Air.
I installed
tightvncserver
on Ubuntu via SSH and when I connect to Ubuntu via VNC using MacBook Air, I get a grey screen on VNC.
Read many articles and tutorials using xserver-xorg-video-dummy
and also using dummy plugs for DVI and none of these works.
How can I have Ubuntu boot up normally as if it was connected to a monitor and connect to it using VNC? Seems like Ubuntu 19.04 is not booting up the X server window without a monitor connected.
Please don't provide solutions that requires using thrid-party desktop environments when Ubuntu already has a perfectly working desktop environment which only functions when monitor is connected.
I booted Ubuntu 19.04 on my MacBook Air and logged in with the normal GUI interface. I started tightvncserver
and when I login to VNC I also get a grey screen.
S To
(11 rep)
Sep 2, 2019, 03:28 AM
• Last activity: Jul 27, 2025, 05:04 AM
2
votes
3
answers
629
views
How to securely export a device (HDD)?
So I have a Scientific Linux 6.3 (RHEL clone so basically the question is Redhat related) machine called "B" (with an extra "A" HDD besides the system HDD) and a notebook with SL 6.3. They are in a /24 IPv4 subnet, and can fully reach each other. **Q**: How can I export the "A" HDD device to the not...
So I have a Scientific Linux 6.3 (RHEL clone so basically the question is Redhat related) machine called "B" (with an extra "A" HDD besides the system HDD) and a notebook with SL 6.3. They are in a /24 IPv4 subnet, and can fully reach each other.
**Q**: How can I export the "A" HDD device to the notebook, so that on the notebook I could see the "A" HDD as a device /HDD/? (, and locally encrypt it using LUKS - I know this last encrypting part)
The important thing is that I need the connection to be secured (SSL?) so that no one can intercept the data that I encrypt on the notebook. **OR**: is it already encrypted via LUKS? (and an SSL connection between the notebook and the "B" machine would be just an overhead?) - extra: I also need that the "exporting of the device" must be routable over network.
**ps.: so the main question is: does encrypted communication needed between the notebook and the "B" machine or are ALL the datas on the HDD already encrypted when leaving the notebook (even LUKS pwd too??)**
gasko peter
(5634 rep)
Sep 17, 2012, 09:00 AM
• Last activity: Jul 13, 2025, 04:56 PM
6
votes
1
answers
5745
views
How do I force x11vnc to stream lower quality?
I need to access a remote machine via a high latency, slow connection. It uses `x11vnc` and I want it to broadcast video in much lower quality than what's actually on the screen. First thing that comes to mind is to use less colours (e.g. 8 bit), but it can be anything, as long as the remote machine...
I need to access a remote machine via a high latency, slow connection. It uses
x11vnc
and I want it to broadcast video in much lower quality than what's actually on the screen. First thing that comes to mind is to use less colours (e.g. 8 bit), but it can be anything, as long as the remote machine is responsive even though it may, for example, show a large rich-colour desktop image (which I don't need to see anyway). Something [like this](https://superuser.com/questions/411058/setting-up-tightvnc-for-8-bit-pixels) , except for x11vnc
.
I will, however, appreciate keeping all the text sharp because, I work with the terminal.
Here's what I tried:
- use -notruecolor
, found here http://www.karlrunge.com/x11vnc/x11vnc_opts.html
- use -speeds dsl
, found here https://ubuntuforums.org/showthread.php?t=1331555
- try setting 8 bit video using -rawfb
, found here https://linux.die.net/man/1/x11vnc
- enable -ncache 10
as per https://feeding.cloud.geek.nz/posts/high-latency-vnc-tech-support/ , but got [this issue](https://github.com/novnc/noVNC/issues/525)
I'm using the built-in Screen Sharing app, which [seems to be almost the only option](http://web.archive.org/web/20180324015551/http://www.davidtheexpert.com/post.php?id=5) on Mac OS.
I'm out of ideas. Please help.
ᴍᴇʜᴏᴠ
(818 rep)
Jul 4, 2019, 12:25 PM
• Last activity: Jul 1, 2025, 12:08 AM
0
votes
1
answers
1937
views
Ssh access to a server with internet access but no public IP address
I have an `ssh` server running Kubuntu 22.04 behind a router providing internet connection, but without a public IP (this is the policy of the ISP). So, the server can access the internet, but any port mapping between the router and the `ssh` server is useless, so the server is not directly accessib...
I have an
ssh
server running Kubuntu 22.04 behind a router providing internet connection, but without a public IP (this is the policy of the ISP). So, the server can access the internet, but any port mapping between the router and the ssh
server is useless, so the server is not directly accessible from the internet.
I would like instead to be able to access the server via ssh
from another internet host. If possible, I would like to do this without spending money.
Is there a way to accomplish this?
----------
As correctly guessed in the comments, the ssh
server is behind a CGNAT, so its router has no public IP address and is not reachable.
BowPark
(5155 rep)
Jan 10, 2023, 12:28 PM
• Last activity: Jun 29, 2025, 08:06 AM
1
votes
3
answers
2256
views
Run Ubuntu No Monitor
I would like to run an Ubuntu (18.0.4) desktop with no monitor/keyboard attached, and access it via VNC (or Remote Desktop) from a Windows 10 Pro machine. I have installed VNC Viewer on Windows and enabled remote access from Linux. It all works, but not until I log on to the Linux box from an actual...
I would like to run an Ubuntu (18.0.4) desktop with no monitor/keyboard attached, and access it via VNC (or Remote Desktop) from a Windows 10 Pro machine. I have installed VNC Viewer on Windows and enabled remote access from Linux. It all works, but not until I log on to the Linux box from an actual keyboard - which defeats the purpose. In other words, Linux will let me log in remotely only after I am logged in physically.
I followed instructions to set up Linux for remote access , including the bit about "allowing unencrypted connections", but then I realized that those are instructions for allowing an external user to view/control *the same session* as a logged-on user, as opposed to allowing an external user to start their own session.
What do I need to do to have the Linux-side start up and be ready for connections without the need to attach a physical keyboard? For instance, perhaps I need to make sure that VNC Server starts as soon as the Linux machine boots, etc.
It does not need to be VNC. I can work in the Windows remote desktop window as well. I just want to access this Linux machine without attaching a keyboard/mouse/monitor.
radumanolescu
(123 rep)
Aug 25, 2019, 05:41 PM
• Last activity: Jun 22, 2025, 09:58 AM
0
votes
1
answers
2025
views
What's the best way to rsync two directories with git repositories?
I have two machines that I use for work. One is the local machine located at my home, and the other is the remote machine located at my office. I have a "development" folder in which I keep all my work. It contains various folders of LaTeX documents, Python projects, etc. Most of these folders are g...
I have two machines that I use for work. One is the local machine located at my home, and the other is the remote machine located at my office.
I have a "development" folder in which I keep all my work. It contains various folders of LaTeX documents, Python projects, etc. Most of these folders are git repositories themselves. I need to be able to switch between the machines and pick up my development work as and when I require it depending upon my physical presence at home or office.
What's the best way to do rsync of this "development" folder? I did:
rsync -zvaP /media/shihab/development shihab@remote:/media/shihab/OSDisk/development
and
rsync -zvaP shihab@remote:/media/shihab/OSDisk/development /media/shihab/development
but I ended up messing up my file and folder permissions and groups. How do established programmers manage switching between their machines?
Shihab Khan
(123 rep)
Jun 22, 2022, 01:23 AM
• Last activity: Jun 9, 2025, 09:02 PM
0
votes
1
answers
42
views
macOS: list all Users with Admin privileges
How can I get the list of all Users with Admin privileges, on all selected Macs, in Apple Remote Desktop? I have tried: ```shell dscl . -list /Groups/admin GroupMembership ``` But this does not list anything, not even the results window opens.
How can I get the list of all Users with Admin privileges, on all selected Macs, in Apple Remote Desktop?
I have tried:
dscl . -list /Groups/admin GroupMembership
But this does not list anything, not even the results window opens.
JRP
(9 rep)
Jun 6, 2025, 10:07 AM
• Last activity: Jun 6, 2025, 02:03 PM
2
votes
2
answers
412
views
Receiving " syntax error near unexpected token `then'" from remote Linux server with if, then, fi
I need help in determining why I get ```none syntax error near unexpected token `then' ``` from the following command: for vm in {20..30} ; do ssh -q -o "StrictHostKeyChecking no" 192.168.210.${vm} "hostname; echo $password | su - root -c \"\ if $(whoami | grep -q root);then echo Good; else echo Bad...
I need help in determining why I get
syntax error near unexpected token `then'
from the following command:
for vm in {20..30} ; do ssh -q -o "StrictHostKeyChecking no" 192.168.210.${vm} "hostname; echo $password | su - root -c \"\ if $(whoami | grep -q root);then echo Good; else echo Bad;fi \"" ; done
vm201scf001
-bash: -c: line 0: syntax error near unexpected token `then'
-bash: -c: line 0: `\ if ;then echo Good; else echo Bad;fi '
This simple command does work though:
for vm in {20..30} ; do ssh -q -o "StrictHostKeyChecking no" 192.168.210.${vm} "hostname; echo $password | su - root -c \"\uptime \"" ; done
vm201scf001
22:11:41 up 422 days, 3:32, 0 users, load average: 0.28, 0.44, 0.52
Does the if
, then
, fi
statement not work in this case? Please advise.
Bjoern
(59 rep)
May 9, 2025, 10:17 PM
• Last activity: May 12, 2025, 12:23 AM
0
votes
1
answers
2181
views
PostgreSQL Remote Connection debugging
I'm having issues connecting to my PostgreSQL database from an online source. PostgreSQL seems to be setup up fine it is running on it's default port 5432 and the postgresql.conf has the following line listen_addresses = '*' And the pg_hba.conf has the following host dbname usname all md5 I can conn...
I'm having issues connecting to my PostgreSQL database from an online source.
PostgreSQL seems to be setup up fine it is running on it's default port 5432 and the postgresql.conf has the following line
listen_addresses = '*'
And the pg_hba.conf has the following
host dbname usname all md5
I can connect to the PostgreSQL database from a different machine using the following credentials in pgadmin
Name local
Host 192.xx.xx.xx
Port 5432
Maintenance DB dbname
Username usname
Password psword
Using these I can connect perfectly it seems to work fine.
Then I forwarded the port 192.xx.xx.xx:5432 on the ADSL router and checked it using the public IP address 197.xx.xx.xx (visible to the internet IP)
http://www.canyouseeme.org/
Where I can see the port was forwarded ok.
I've disabled SELinux and disabled the firewall temporarily as well.
However when I try to connect using
Name online
Host 197.xx.xx.xx
Port 5432
Maintenance DB dbname
Username usname
Password psword
I get the server doesn't listen error message
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "197.xx.xx.xx" and accepting TCP/IP connections on port 5432?
Why is this? Do I need to add an extra step to making it accept connections through port forwarding?
TheLovelySausage
(4443 rep)
Nov 3, 2015, 02:53 PM
• Last activity: Apr 20, 2025, 06:02 PM
6
votes
4
answers
9404
views
How to keep a local directory automatically synced with a remote, without latency issues?
I develop a git-tracked codebase that has a lot of files. This code must be run on a remote machine. So every time I make a change locally, I must then sync it to the remote and run the new code on the remote. I want to eliminate the manual sync step. Things I've tried: * Simply doing `git push` (lo...
I develop a git-tracked codebase that has a lot of files. This code must be run on a remote machine. So every time I make a change locally, I must then sync it to the remote and run the new code on the remote.
I want to eliminate the manual sync step. Things I've tried:
* Simply doing
git push
(locally) and git pull
(remotely) works but leads to many useless commits. Also, sometimes I am only trying small changes and I don't want those to be committed.
* Mounting the remote dir locally with sshfs
works, but there is a slight latency in file access. I don't mind, but PyCharm relies on it and many features break.
Is there a better way to accomplish this?
Donentolon
(375 rep)
Nov 20, 2019, 06:43 PM
• Last activity: Apr 12, 2025, 12:47 PM
1
votes
1
answers
1376
views
Can you access bluetooth or Audio devices over XRDP
I have setup XRDP on a ubuntu computer that I wanted to access remotely. There are Bluetooth and audio devices attached to that remote device that I would like to access. Using XRDP, it shows that there is no Bluetooth dongle and under Audio(Sounds) there are no microphones and the only output audio...
I have setup XRDP on a ubuntu computer that I wanted to access remotely. There are Bluetooth and audio devices attached to that remote device that I would like to access. Using XRDP, it shows that there is no Bluetooth dongle and under Audio(Sounds) there are no microphones and the only output audio is a "Dummy Output".
Is there a way to gain access to these hardware devices over XRDP? I have also tried Chrome Remote Desktop and I get the same thing.
Local:
Windows 10 Pro
Remote:
Ubuntu 20.04
SpenserWilson1
(89 rep)
Feb 17, 2021, 05:08 PM
• Last activity: Mar 20, 2025, 09:40 AM
0
votes
0
answers
51
views
Comparison of content of two folders on remote cluster with rsync command
There is my `home` directory and its `backup` on the `remote cluster`.I used `rsync` command to check if `home` directory and its `backup` are completely identical: rsync -rvnc data/ data2 >rsync_out-4.txt 2>rsync_outErr-4.txt The full content of the `rsync_out-4.txt` file is: sending incremental fi...
There is my
home
directory and its backup
on the remote cluster
.I used rsync
command to check if home
directory and its backup
are completely identical:
rsync -rvnc data/ data2 >rsync_out-4.txt 2>rsync_outErr-4.txt
The full content of the rsync_out-4.txt
file is:
sending incremental file list
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libaec.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libaec.so.0"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libcublas.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libcublas.so.11"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libcublasLt.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libcublasLt.so.11"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libcudart.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libcudart.so.11.0"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libhdf5.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libhdf5.so.8"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libnvToolsExt.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libnvToolsExt.so.1"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libnvrtc-builtins.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libnvrtc-builtins.so.11.8"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libnvrtc.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libnvrtc.so.11.2"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libsz.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libsz.so.2"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libzstd.so"
skipping non-regular file "dorado-0.8.3-linux-x64/lib/libzstd.so.1"
sent 156,247 bytes received 1,898 bytes 10.04 bytes/sec
total size is 788,734,385,199 speedup is 4,987,412.72 (DRY RUN)
The file rsync_outErr-4.txt
is empty.
1. Does the output above means that the home
directory and its backup
are completely the identical?
2. How i can be 100% sure that rsync
was executed correctly and successfully finished (in particular that comparison was done for full content of the two mentioned above directories). Is there any indicator of successful run of rsync
command which i can find in the rsync_out-4.txt file
?
Denis
(153 rep)
Mar 17, 2025, 02:03 PM
0
votes
0
answers
124
views
How can a remore long running process return results?
I plan to have a long-running process (a Blender render, from 5 minutes to an hour) run on a remote Linux machine. What I am currently thinking of is a very simple process: 1. Move file to remote machine 2. Start render with SSH 3. Get the render output file This would be one or two bash scripts – n...
I plan to have a long-running process (a Blender render, from 5 minutes to an hour) run on a remote Linux machine.
What I am currently thinking of is a very simple process:
1. Move file to remote machine
2. Start render with SSH
3. Get the render output file
This would be one or two bash scripts – nothing more complex.
In an ideal scenario, I would disconnect the ssh session from the remote machine, and only get the file once the render is done. It's ok to wait for as long as it's necessary to get the render.
Disconnecting seems the proper thing to do as I might launch renders on 20 machines at the same time - I don't know if it's a good idea to keep as many ssh sessions going.
What's the simplest way to handle that?
I am thinking of a couple alternatives:
- use ssh to periodically check if a blender process is running on the remote machine, and if the output file is available
- have curl on the remote machine upload the result of the rendering process to the machine originating the request
The thing here is:
- the originating machine might be behind a NAT
- the rendering machine might be provisioned on the fly to deal with peak demand
Is there something better out there that I - in my ignorance of such things - do not know of?
simone
(111 rep)
Jan 25, 2022, 06:37 PM
• Last activity: Mar 17, 2025, 12:14 PM
61
votes
13
answers
243069
views
"Invalid MIT-MAGIC-COOKIE-1 key" when trying to run program remotely
I am attempting to run an application (ParaView) in client-server mode with its graphics rendering being done on the remote (server) end. I am using SSH as my means of connecting to the server, but do not wish to use X-forwarding since it slows down the rendering process. However, every time I try t...
I am attempting to run an application (ParaView) in client-server mode with its graphics rendering being done on the remote (server) end. I am using SSH as my means of connecting to the server, but do not wish to use X-forwarding since it slows down the rendering process.
However, every time I try to open the application on the server's display, I get an error to this effect:
Invalid MIT-MAGIC-COOKIE-1 keyError: cannot open display ':0'
I have conducted extensive research into this matter and have already tried the following suggested procedure to no avail:
1. Used "
xauth list
" to get the MIT-MAGIC-COOKIE-1 value for my local host's display.
2. Logged into the remote host via ssh.
3. Used "export DISPLAY=:0
" on the remote host.
4. On the remote host, used "xauth add
" to overwrite the cookie value for the remote host's display with that of the local host's.
I'm convinced that this is the correct procedure, but that I'm just not transferring the right cookies to the right displays.
Again, I would like to be able to use ssh to effect the opening of applications on the remote computer's display. Ideally, I would like the entire process to be done via xauth rather than xhost, and once again, I have no need to use X-forwarding. What might I be missing or doing wrong?
CS6394
(611 rep)
May 1, 2015, 05:10 PM
• Last activity: Mar 7, 2025, 02:53 PM
1
votes
1
answers
87
views
Configure git repository on production server with remote source
It may be a vague question, but I can't currently find a good solution in my head. I have a BookStack application running on a company server. To simplify and for security I have a custom `.gitignore` file which ignores everything except our custom extensions and `.env` configuration. The idea is th...
It may be a vague question, but I can't currently find a good solution in my head.
I have a BookStack application running on a company server. To simplify and for security I have a custom
.gitignore
file which ignores everything except our custom extensions and .env
configuration.
The idea is that developers can add the production repository as remote source in a directory with BookStack along a mocked database to test it securely.
Now, this is fine as long I don't have to fetch from BookStack repository. If I add now BookStack as remote source on the production server it will conflict with the .gitignore
on update.
Do you have any advice on how I could solve this problem, other than resolving this conflict with each update?
siery
(221 rep)
Feb 21, 2025, 06:10 PM
• Last activity: Feb 27, 2025, 05:26 PM
0
votes
2
answers
42
views
rewrite linux image on device via ethernet
I have embedded device with Linux (stored in EMMC). When i need to update Linux image (i have one .img file) i need to connect via serial terminal, edit boot_targets to start system from SD-card and then rewrite EMMC from host via dd command. But what if i have device in another city and i can only...
I have embedded device with Linux (stored in EMMC).
When i need to update Linux image (i have one .img file) i need to connect via serial terminal, edit boot_targets to start system from SD-card and then rewrite EMMC from host via dd command. But what if i have device in another city and i can only use remote SSH to connect to it.
How can I update new Linux image then ?
I tried to make copy of existing fs to tmpfs, but get stuck at porting existing fs to tmpfs...
TeachmeDaddy
(1 rep)
Jan 30, 2025, 01:45 PM
• Last activity: Jan 30, 2025, 05:57 PM
0
votes
1
answers
95
views
I need to run script on remote server which require root access using sshpass and its failing
I need to run script on remote server which require root access using sshpass and its failing with eror script not found. I ran below command. sshpass -frhelpass ssh user@IP 'echo mypass | sudo -S "bash -s" < "./pv.sh"' Authorized uses only. All activity may be monitored and reported. bash: pv.ksh:...
I need to run script on remote server which require root access using sshpass and its failing with eror script not found. I ran below command.
sshpass -frhelpass ssh user@IP 'echo mypass | sudo -S "bash -s" < "./pv.sh"'
Authorized uses only. All activity may be monitored and reported.
bash: pv.ksh: No such file or directory
If I copy script remotely ( I can copy script) but execution is failing.
sshpass -frhelpass ssh user@IP 'echo mypass | sudo -Sv && 'bash -s' < /tmp/pv.sh'
Authorized uses only. All activity may be monitored and reported.
[sudo] password for user: _
WARNING: Running as a non-root user. Functionality may be unavailable.
/run/lock/lvm/P_global:aux: open failed: Permission denied
I am running these commands from ubuntu command line
user29368204
(1 rep)
Jan 26, 2025, 03:31 AM
• Last activity: Jan 27, 2025, 08:29 AM
0
votes
1
answers
2221
views
LVM recovery with physical disk failure on remote system
Questions like this have been asked a lot here but I've not found any with the same situation as I have. I have a system with a failed LVM volume group and I have no physical access to it. More details below. I have a Debian 10 linux server with two physical volumes, a 4TB HDD and a 750GB SSD. The S...
Questions like this have been asked a lot here but I've not found any with the same situation as I have. I have a system with a failed LVM volume group and I have no physical access to it. More details below.
I have a Debian 10 linux server with two physical volumes, a 4TB HDD and a 750GB SSD. The SSD contains the boot volume. The HDD is configured as an LVM Volume Group with a single physical volume (/dev/sda, the 4 TB HDD) and a number of logical volumes.
The HDD has apparently failed. No diagnosis appears possible as /dev/sda simply doesn't exist anymore and any attempt to read from the disk results in an i/o error.
The data on the disk isn't critical and I do have a system backup. The issue is that the system is a headless linux box sitting in the cellar of my house in Switzerland, which is half a world away. My concern is that if I reboot it, it may well fail during boot and enter diagnostic mode and I will have no network access to it. In that case I have to ask a friend to collect it and mail it to me - which is what I'm really trying to avoid as it will be down for months. I can live without /dev/sda until the next time I visit the house and replace it.
The output I get from LVM is as follows:
sudo /sbin/pvdisplay -vd /dev/sda
Error reading device /dev/Webcams/Birch-Snapshot at 0 length 512.
Error reading device /dev/Webcams/Birch-Snapshot at 0 length 4096.
Error reading device /dev/Webcams/Birch-Video at 0 length 512.
Error reading device /dev/Webcams/Birch-Video at 0 length 4096.
Error reading device /dev/Webcams/Roof-Snapshot at 0 length 512.
Error reading device /dev/Webcams/Roof-Snapshot at 0 length 4096.
Error reading device /dev/Webcams/Roof-Video at 0 length 512.
Error reading device /dev/Webcams/Roof-Video at 0 length 4096.
Error reading device /dev/Webcams/Tree-Snapshot at 0 length 512.
Error reading device /dev/Webcams/Tree-Snapshot at 0 length 4096.
Error reading device /dev/Webcams/Tree-Video at 0 length 512.
Error reading device /dev/Webcams/Tree-Video at 0 length 4096.
Error reading device /dev/Webcams/Archive at 0 length 512.
Error reading device /dev/Webcams/Archive at 0 length 4096.
Error reading device /dev/Webcams/Video2 at 0 length 512.
Error reading device /dev/Webcams/Video2 at 0 length 4096.
Error reading device /dev/Webcams/Backup at 0 length 512.
Error reading device /dev/Webcams/Backup at 0 length 4096.
Failed to find device for physical volume "/dev/sda".
vgs -vd and lvs -vd both execute and print just the single line:
sudo /sbin/vgs -vd
No volume groups found.
/etc/fstab mounts the individuals logical volumes like so:
#
/dev/Webcams/Archive /mnt/Webcams/Archive ext4 defaults,nofail 1 2
/dev/Webcams looks like this:
ls -l /dev/Webcams
total 0
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Archive -> ../dm-6
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Backup -> ../dm-8
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Birch-Snapshot -> ../dm-0
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Birch-Video -> ../dm-1
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Roof-Snapshot -> ../dm-2
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Roof-Video -> ../dm-3
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Tree-Snapshot -> ../dm-4
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Tree-Video -> ../dm-5
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Video2 -> ../dm-7
There is also a /dev/mapper directory:
ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Aug 3 10:44 control
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Webcams-Archive -> ../dm-6
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Webcams-Backup -> ../dm-8
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Webcams-Birch--Snapshot -> ../dm-0
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Webcams-Birch--Video -> ../dm-1
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Webcams-Roof--Snapshot -> ../dm-2
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Webcams-Roof--Video -> ../dm-3
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Webcams-Tree--Snapshot -> ../dm-4
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Webcams-Tree--Video -> ../dm-5
lrwxrwxrwx 1 root root 7 Aug 25 08:05 Webcams-Video2 -> ../dm-7
So both /dev/Webcams and /dev/mapper have symlinks pointing to files in /dev:
ls -l /dev/*dm-*
brw-rw---- 1 root disk 253, 0 Aug 25 08:05 /dev/dm-0
brw-rw---- 1 root disk 253, 1 Aug 25 08:05 /dev/dm-1
brw-rw---- 1 root disk 253, 2 Aug 25 08:05 /dev/dm-2
brw-rw---- 1 root disk 253, 3 Aug 25 08:05 /dev/dm-3
brw-rw---- 1 root disk 253, 4 Aug 25 08:05 /dev/dm-4
brw-rw---- 1 root disk 253, 5 Aug 25 08:05 /dev/dm-5
brw-rw---- 1 root disk 253, 6 Aug 25 08:05 /dev/dm-6
brw-rw---- 1 root disk 253, 7 Aug 25 08:05 /dev/dm-7
brw-rw---- 1 root disk 253, 8 Aug 25 08:05 /dev/dm-8
My question: What steps should I take to ensure that the system does’t enter diagostic mode during reboot? Is it enough to simply comment out the relevant lines in /etc/fstab or is there something else I need to do?
My concern is that lvm itself might make checks during boot and throw off errors that stop the boot from completing. I am not using lvm for any other volumes so theoretically at least I suppose I could remove the package, although given the state the system is in I’m not sure that would be wise.
Any help much appreciated.
imboeschi
(1 rep)
Aug 27, 2021, 03:06 AM
• Last activity: Jan 24, 2025, 05:01 PM
1
votes
0
answers
418
views
GDB remote: step/next "Cannot find bounds of current function"
I'm trying to run GDB remote debugging on a single source file, very basic C code, and I'm hitting a wall on something that seems like it should be completely obvious. Specifically, I cannot figure out how to get GDB to find the boundaries of procedures defined within this single file, making it imp...
I'm trying to run GDB remote debugging on a single source file, very basic C code, and I'm hitting a wall on something that seems like it should be completely obvious. Specifically, I cannot figure out how to get GDB to find the boundaries of procedures defined within this single file, making it impossible to use either
step
or next
when execution reaches any procedure call.
My environment:
- Dockerized container, running Ubuntu 22.04
- Two shell windows, both on the same host, both under the same container image
- RISCV-64 emulation under QEMU: using qemu-riscv64
, symlinked as qemu
- GCC for RISCV-64, riscv64-unknown-linux-gnu-gcc
, symlinked as gcc
- Using riscv64-unknown-linux-gnu-gdb
, symlinked as gdb
The source file is a basic selection sort demo, with bugs, compiled with
root@75229e1158dd:~# gcc -g -std=c99 -Wall -Werror buggy_sel_sort.c -o buggy_sel_sort
In one window, I start up QEMU for remote debugging:
root@75229e1158dd:~# qemu -g 1234 buggy_sel_sort
In the other, I invoke GDB with:
root@75229e1158dd:~# gdb -ex 'target remote localhost:1234' -ex 'set sysroot /opt/riscv/' buggy_sel_sort
GNU gdb (GDB) 15.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=riscv64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from buggy_sel_sort...
Remote debugging using localhost:1234
Reading symbols from /opt/riscv/sysroot/lib/ld-linux-riscv64-lp64d.so.1...
(No debugging symbols found in /opt/riscv/sysroot/lib/ld-linux-riscv64-lp64d.so.1)
0x0000001555d6b9f4 in _start () from /opt/riscv/sysroot/lib/ld-linux-riscv64-lp64d.so.1
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
(gdb)
So far, so good, at least I think so; my understanding is that the "dynamic linker breakpoint" warning can be ignored. I get the GDB prompt, set the breakpoint at main
, and restart execution:
(gdb) break main
Breakpoint 1 at 0x1086c: file buggy_sel_sort.c, line 64.
(gdb) continue
Continuing.
warning: Could not load shared library symbols for 3 libraries, e.g. linux-vdso.so.1.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Breakpoint 1, main (argc=1, argv=0x1555d56d18) at buggy_sel_sort.c:64
64 long test_array = {1,4,2,0,3};
(gdb) step
65 long test_array2 = {0xddad409b, 0x6b401dbe, 0xc59beda0, 0xf29ec713,
But the next line is a call to a selection_sort
procedure, and this is where it goes off the rails:
(gdb) step
0x0000001555d667e4 in ?? ()
(gdb) step
Cannot find bounds of current function
Unsurprisingly, next
doesn't fare any better. I can advance instructions using stepi
or nexti
, but all I get from that is information about the next instruction address. As you can probably tell, this is for a teaching project, so low-level representation like that really isn't helpful for beginners.
What's strange to me is that I can add explicit breakpoints for all the procedure names in the source file; continue
will reach their entry points, and finish
their returns.
I can step through their bodies until the next call.
There has to be a better way around this. What am I missing that is making these procedure entry/exit points unfindable?
FWIW, here is the output of info sharedlibrary
:
(gdb) info sharedlibrary
From To Syms Read Shared Object Library
No linux-vdso.so.1
No /lib/libc.so.6
No /lib/ld-linux-riscv64-lp64d.so.1
John Lasseter
(11 rep)
Jan 20, 2025, 06:34 PM
Showing page 1 of 20 total questions