Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Grey Area
Sep 9, 2000
Battle Without Honor or Humanity
How do I find out which device name is tied to which physical interface?

Situation: I have four SATA disks connected to an ICH9DH motherboard controller. I want to know which device name (/dev/sd[abcd]) is connected to which physical SATA channel (SATA[0-5]) on the motherboard. I would assume that they would be mapped sda->SATA0, sdb->SATA1, etc, but when I try hot-swapping this breaks: when I yank sda and plug it back in it shows up as sde.

My primary concern is to be able to identify a malfunctioning disk among four identical devices.

edit: lsscsi to the rescue!
code:
[root@alfa ~]# lsscsi
[0:0:0:0]    disk    ATA      WDC WD2500AAJS-7 12.0  /dev/sda
[1:0:0:0]    disk    ATA      WDC WD2500AAJS-7 12.0  /dev/sdb
[2:0:0:0]    disk    ATA      WDC WD2500AAJS-7 12.0  /dev/sdc
[4:0:0:0]    disk    ATA      WDC WD2500AAJS-7 12.0  /dev/sdd
[6:0:0:0]    cd/dvd  TSSTcorp DVD-ROM SH-D162D SB00  /dev/scd0

Grey Area fucked around with this message at 15:24 on Dec 20, 2007

Adbot
ADBOT LOVES YOU

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

TheHeadSage posted:

Finally, what would be an appropriate filesystem for this new raid drive? I always used to use reiserfs on all my HDDs, would it be suitable? I'm looking to virtualise all my servers, so it's gotta be suitable to store large vmware images on it.
The best way to do tjis is to assign the VMs one or more LVM volumes, You can also do cool stuff like using LVM copy-on-write snapshots to save disk space.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

rugbert posted:

Oh wow, I just upgraded my kernel and Im immediately noticing a HUGE speed boost when surfing the internet. Ive always thought there to be a noticeable difference in browsing speeds between XP and Linux.

Anyways, how can I go about changing the boot/login images?
What distribution are you using? The GDM/KDM control panel should be installed by default on most distros. For GNOME systems it's called gdmsetup

Ubuntu has a program called startupmanager that can change your boot settings. I don't know about other distros.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity
Khatib: It look like Linux is confused about which of your cards should be eth0 and which should be eth1

Try reading this for solutions: http://linux.dell.com/files/whitepapers/nic-enum-whitepaper-v3.pdf

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

MeramJert posted:

I had some problems with uninstalling Ubuntu last week, so I ended up reinstalling it. Now that I have Gentoo up and running (a bad stick of RAM was causing seg faults in pretty much every compile that took longer than two minutes) I want to again get rid of Ubuntu. Problem is, Ubuntu overwrote the MBR, which wouldn't be a problem since I want to have the option to boot into Windows or Gentoo, but I don't know how to change it so GRUB will look in the Gentoo partition for the configuration file. I don't want to spend another couple hours messing with the bootloader. It works now, I just want to move the configuration to another partition. Can anyone help me with this?
If /boot is your original Gentoo /boot directory, just run "setup (hd0)" from the grub prompt.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

MeramJert posted:

Well, my Gentoo installation is on /dev/hdb, but right now grub is running on /dev/hda, and I want to keep it that way. Is this potentially a problem? (I'm sure this is a very simple problem. I'm just very new to linux)
OK, I'm going to go ahead and assume your /boot directory is on the same device as your / directory. What setup(hd0) will do is to install Grub stage1 on the Master Boot Record of the first hard drive. STAGE1 will be configured to load stage2 from (hd1,0) or whatever it's set to in /boot/grub/menu.lst, and start the kernel specified in menu.lst

Basically, the BIOS will only load the 512 byte master boot record from the first disk and the rest from (hd1). You can also install grub into the second disk (setup (hd1)) and change the boot order in the BIOS setup utility if you don't want to touch the MBR on (hd0) for some reason.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

DEAD MAN'S SHOE posted:

I want to be able to run `mount -t cifs` as a user, on the fly. I don't want to have to specify the share in /etc/fstab (which is a stupid idea anyway).
You can use sudo to run a command as root. In /etc/sudoers add the line
code:
shoe ALL= /bin/mount, /bin/umount
Now the user shoe can run /bin/mount as root by saying
code:
sudo mount [i]args[/i]
at which point sudo will ask for your password. (It will cache your password for a few minutes if you want to run several commands.)

edit: You want umount as well of course.

Grey Area fucked around with this message at 22:39 on Mar 4, 2008

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity
I'm playing with chroot, but I can't seem to get it to work.
code:
[root@alfa chroot]# ls -l bin
totalt 772
-rwxr-xr-x 1 root root 786240 22 mar 10.10 bash
[root@alfa chroot]# ldd bin/bash
        libtermcap.so.2 => /lib64/libtermcap.so.2 (0x00000039a6000000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00000039a4800000)
        libc.so.6 => /lib64/libc.so.6 (0x00000039a4400000)
        /lib64/ld-linux-x86-64.so.2 (0x00000039a4000000)
[root@alfa chroot]# ls -l lib64
totalt 3836
-rwxr-xr-x 1 root root   10000 21 mar 12.46 libcom_err.so.2
-rwxr-xr-x 1 root root 1329816 21 mar 12.46 libcrypto.so.6
-rwxr-xr-x 1 root root   30760 21 mar 12.46 libcrypt.so.1
-rwxr-xr-x 1 root root 1687464 21 mar 12.46 libc.so.6
-rwxr-xr-x 1 root root   23360 21 mar 12.46 libdl.so.2
-rwxr-xr-x 1 root root    9472 21 mar 12.46 libkeyutils.so.1
-rwxr-xr-x 1 root root  114352 21 mar 12.46 libnsl.so.1
-rwxr-xr-x 1 root root   53880 30 nov 04.44 libnss_files-2.5.so
lrwxrwxrwx 1 root root      19 21 mar 12.46 libnss_files.so.2 -> libnss_files-2.5.so
-rwxr-xr-x 1 root root  141344 21 mar 12.46 libpthread.so.0
-rwxr-xr-x 1 root root   92736 21 mar 12.46 libresolv.so.2
-rwxr-xr-x 1 root root   95464 21 mar 12.46 libselinux.so.1
-rwxr-xr-x 1 root root  247528 21 mar 12.46 libsepol.so.1
-rwxr-xr-x 1 root root   15584 22 mar 10.07 libtermcap.so.2
-rwxr-xr-x 1 root root   18152 21 mar 12.46 libutil.so.1
[root@alfa chroot]# chroot . /bin/bash
chroot: cannot run command `/bin/bash': No such file or directory
:wtc:

This is on CentOS 5.1 with kernel 2.6.18-53.1.13.el5xen. SELinux is off, so it can't be that

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

chryst posted:

I'm probably being too simplistic here, but try

chroot /full/path/to/chroot/ /bin/bash
No good. Here is the output of mount if it helps.
code:
[root@alfa ~]# mount
/dev/md0 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mapper/llvg0-lvvar on /var type ext3 (rw,acl,grpquota,user_xattr,usrquota)
/dev/mapper/llvg0-lvhome on /home type ext3 (rw,acl,grpquota,user_xattr,usrquota)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
proc on /home/chroot/proc type proc (rw)
I'm trying to chroot into /home/chroot

Grey Area fucked around with this message at 18:27 on Mar 22, 2008

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

covener posted:

your missing the ELF loader, ld-linux*.so. (strace probably shows execve returning -1/ENOENT, man execve fills you in on the rest). Your ldd-vs-ls hints at this too.
Oh drat, I was sure I had checked that. Thanks a lot.

What I'm trying to do is run do chrooted SFTP using rssh. I'm following this guide, and it even mentions that I need the ld-loader, but I managed to miss it... :facepalm:

Anyway, I can now chroot as root, but when I try to SFTP in as a user with rssh as shell, it opens the root directory (i.e. /home/chroot in actuality) and I get this in /var/log/messages:
code:
Mar 22 22:47:44 alfa rssh[23491]: setting log facility to LOG_USER
Mar 22 22:47:44 alfa rssh[23491]: allowing scp to all users
Mar 22 22:47:44 alfa rssh[23491]: allowing sftp to all users
Mar 22 22:47:44 alfa rssh[23491]: setting umask to 027
Mar 22 22:47:44 alfa rssh[23491]: chrooting all users to /home/chroot
Mar 22 22:47:44 alfa rssh[23491]: chroot cmd line: /usr/libexec/rssh_chroot_helper 2 \
"/usr/libexec/openssh/sftp-server"
Mar 22 20:47:44 alfa rssh_chroot_helper[23491]: new session for jrsshtest, UID=815
Mar 22 20:47:44 alfa rssh_chroot_helper[23491]: user's home dir is /home/jrsshtest
Mar 22 20:47:44 alfa rssh_chroot_helper[23491]: couldn't find /home/jrsshtest in chroot jail
Mar 22 20:47:44 alfa rssh_chroot_helper[23491]: chrooted to /home/chroot
Mar 22 20:47:44 alfa rssh_chroot_helper[23491]: changing working directory to / (inside jail)
(There is a problem with timezones there, but I'll fix that later.) But
code:
[root@alfa chroot]# pwd
/home/chroot
[root@alfa chroot]# ls -ld home
drwxr-xr-x 3 root root 4096 21 mar 13.03 home
[root@alfa chroot]# ls -l home
totalt 4
drwxr-xr-x 2 jrsshtest jrsshtest 4096 21 mar 13.03 jrsshtest
So I don't see why rssh can't find the /home/jrsshtest directory.
I can navigate to the home folder just fine using sftp, but it doesn't go directly to $HOME.

/home/chroot/etc/passwd:
code:
root:x:0:0:root:/root:/bin/bash
jrsshtest:x:815:815::/home/jrsshtest:/usr/bin/rssh
edit: fixed table-breaking syslog line.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

Zophixan posted:

Hey everyone, I've been using Ubuntu for a while, and was thinking of changing to Gentoo. I used sabayon before but couldn't get my head around compiling from source (there aren't ebuilds for everything!).
Could someone post a guide to compiling from source for me?

apt-get source <package>
cd <package>-<version>
fakeroot dpkg-buildpackage
cd ..
dpkg -i <package>_<version>_<arch>.deb

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity
I have a Samsung 174T 17" 1280x1024 display now, but the Eclipse IDE is awfully crowded at this resolution. I'm looking at getting an BenQ E2200HD 1920x1080 display side-by-side with the 17", so I'd like to check that my understanding of multi-monitor on X.org is right:

1. With an Nvidia 8600 GT card I want to use the TwinView sytem in the binary Nvidia drivers.
2. TwinView supports monitors with different resolutions.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity
On RHEL you can use the daemon function in /etc/init.d/functions

code:
. /etc/init.d/function

daemon --user=my_user my_cmd
in your init.d script and put the actual script in a separate file outside init.d

You can look at the scripts in /etc/init.d to see how you use it.

edit: It's best to use chkconfig to create the links in the rc?.d directories so you con't gently caress it up.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

drainpipe posted:

I have an account from a school I had attended that is running Red Hat Enterprise. I would like to remote desktop access it. Can anyone point me to a way that I can set up remote desktop from ssh command line? I am allowed to install npm packages, and I'd like to do it with as little footprint as possible as I only have 8GB.

edit: My laptop is a mac
What are you trying to do? If you just want to use a graphical text editor you might be better of mounting the files using sshfs and editing them with your favourite Mac editor.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

McGiggins posted:

The problem is, i think it requires something called a submodule (libpicofe?) in order to compile and i cant seem to figure out what that is or where to get it from.
Googling libpicofe gives me the location of the libpicofe Github and this OpenEmu bug report which explains why it's broken and how to fix your .gitmodules to work around it.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity
When you are reading a man page you are probably reading it in "less". Man outputs to $PAGER, which defaults to "/usr/bin/less" on most Linuxes. Only exception is bare-bones distros that use a basic "more" clone, and non-linux Unix-likes.

You can use a custom pager like bat by setting PAGER in your shell configuration.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity
(The successor is probably you three years from now and that psycho definitely knows where you live.)

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity
I'm trying to set up some monitoring of my servers with access restricted to a Wireguard VPN, so I have a wg master runing on one server and a bunch of vms on several different hosts that expose the monitoring service on the wg interface.

The problem is that every time I restart wg on the main wg server after I add a new peer, all the other peers stop responding to the peer running the monitoring system until I ping it.


After restarting wg-quick@wg0 on ::1, ::3 can't make HTTP connections to ::4-6 until I ping ::1 from ::3 and then ::3 from each host.

Is there something I can do to make the peers reconnect automatically after the wg master resets? Making a cron job that pings ::3 every five minutes seems inelegant.

code:
[Interface] 
Address = 10.66.66.8/24,fd42:42:42::8/64
PostUp = wg set %i private-key /etc/wireguard/wg0.private

[Peer]
PublicKey = XXXXXXX
PresharedKey = YYYYYYYY
Endpoint = 123.123.123.123:54321
AllowedIPs = 10.66.66.0/24,fd42:42:42::/48
PersistentKeepAlive = 25 seems to do nothing.
All systems run Ubuntu Server 20.04

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

22 Eargesplitten posted:

Has anyone tried Asahi yet? I just got a MacBook Air and so far I love everything except the OS, which I’m iffy about. I’ve got another 12 days in the return window so I’m evaluating my options. I’m not generally a Linux on the Laptop guy but I’ve been using Linux a lot more at work so I’d like to get basically immersion lessons in it. I’m not interested in games aside from really wanting to get around to Disco Elysium so the lack of GPU acceleration at this point isn’t a problem.

Ars Technica posted:

But there are still big features missing, including DisplayPort and Thunderbolt, the webcam, Bluetooth, sleep mode, and GPU acceleration.
It's very impressive that they've gotten this far, but writing production quality drivers will still take years.

Get an XPS or a Thinkpad for Linux.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

cruft posted:

Oh, hi, my Vanilla OS Thinkpad X220 has a 250GB SSD. / is a 13GB partition that's 33% full. /home is a 161GB partition that's 17% full. There's also /boot and /boot/efi which who cares.

Turns out I also have handbrake and vscode, but this is not a "heavy use" laptop. Still, I think you should give it a run! I would love to get a second opinion on this crazy OS.
Also you can get a 1 TB SSD for €50 now, so consider how much effort dealing with disk space limitation is worth.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

cruft posted:

Canonical:

  • abandoned flatpak and called snap the winner.
  • abandoned systemd and called upstart the winner.
  • abandoned docker and called juju the winner.
  • abandoned wayland and called mir the winner.
  • abondoned git and called bazaar-ng the winner.
  • abandoned Gnome and called Unity the winner.

I'll let other people add more.
The only ones of those claims that really hold up is Unity and Mir. The others were introduced at a time when it was unclear what option would emerge as the winner. And of course systemd was only released four years after upstart was added to Ubuntu.

It's certainly true that Canonical is bad at building community support for its initiatives.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity
"pip3 list -v" should list where your currently installed packages are.

pip normally installs packages in /usr/lib/python3.x/site-packages if you run it as root or in your home directory otherwise, probably in .local/lib/python3.x/site-packages

But if you're using a customized Python installation or virtual environment all bets are off.

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

NihilCredo posted:

Yeah I messed around with three different podman-dockercompose bridges a few months back and gave up due to various bugs or unsupported features. It was easier to just port my homeserver to Nomad, and my laptop's background services to systemd quadlets.

You can just use docker-compose directly if you install the podman-docker* compatibility tool.

* That's what it's called in Debian. don't know about other distros.

Adbot
ADBOT LOVES YOU

Grey Area
Sep 9, 2000
Battle Without Honor or Humanity

Woolie Wool posted:

To me the idea of a desktop environment that looks and behaves like a desktop from 20 years ago while actually working on a modern system seems pretty cool.
XFCE already works without using weird versions of important libraries.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply