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
Sir Bobert Fishbone
Jan 16, 2006

Beebort
If you're just using Win10 for a single application, why not run it in a VM?

Adbot
ADBOT LOVES YOU

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:
Please post the output of
pre:
efibootmgr -v

SoftNum
Mar 31, 2011

Sir Bobert Fishbone posted:

If you're just using Win10 for a single application, why not run it in a VM?

Seriously if you have install media virt-manager helps you get a VM running. It's almost plug and play. and win10 doesn't care if you don't register it (Though you may have to use a networking trick to avoid creating a Microsoft account)

unimportantguy
Dec 25, 2012

Hey, Johnny, what's a "shitpost"?

Antigravitas posted:

Please post the output of
pre:
efibootmgr -v

Okay.


I'm downloading a win10 iso as well to see if I can get a VM going. (My girlfriend put a bunch of my misc. PC stuff in the storage shed and now I can't find my Windows install media).

unimportantguy fucked around with this message at 21:30 on May 1, 2020

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:
Those seem kind of hosed up.

The Windows boot entry is the only one I'd consider properly set up. It lists a GPT formatted ESP partition including the file used, and MS put it into a vendor folder.

If that Linux install was properly set up it would list another file in that same ESP in a vendor folder for your distro. Pretty much all EFI native distros (i.e. all current ones) will automatically do this on install.

Instead, it lists an 850 Evo in that first slot in the boot order but it's BIOS boot, which I don't think any distro installer does without screaming at you if they detect GPT.

Note that the entry being there does not mean that it points at a functioning or even existing disk. It's just an entry in the list of boot entries. And it should be further noted that BIOS booting is a little nuts because it just checks for a certain byte sequence and then literally jumps execution into the start of the disk.

I'd do an fsck of the partitions on that SSD but with the -n flag so it doesn't modify data. If it comes clear, post some actual error messages and perhaps do a grub install on that disk (which on BIOS systems writes raw code to the beginning of the disk and is, as I said, hosed up). Save your data and do a clean EFI install (change partition to GPT etc).

If you try to grub-install into that SSD, what happens?

FWIW, here's a working dual-boot EFI-based system where I kept ESPs separate and installed grub into the fallback path due to firmware bugs.

code:
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0004,0005,0002
Boot0002  Windows Boot Manager  HD(2,GPT,afd92899-4855-4411-b87e-0fcdeb97c3a3,0xe1800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...d................
Boot0004* UEFI OS       HD(1,GPT,a3ca2a16-2340-46de-b2b7-7af4dd569c3f,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0005* UEFI: PXE IP4 Intel(R) I211 Gigabit  Network Connection       PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x2)/Pci(0x6,0x0)/Pci(0x0,0x0)/MAC(6045cb9bc9f5,1)/IPv4(0.0.0.00.0.0.0,0,0)..BO
//edit:

For the VM, I'd download the red hat signed set of virtio drivers for Windows (as iso):
https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html

I'd add a "Virtio SCSI" adapter to the VM (I don't think the default template does it) and set the virtual disk to SCSI with "discard mode" set to "unmap". The NIC can also be set to virtio.

Add another CD drive as well and boot Windows Setup with the virtio iso added. You should then be able to "have disk" and load the virtio driver during setup. Once installed you can use the combi installer on the iso to install the other drivers.

That gives you trim support for the virtual disk passed through from VM to hypervisor, fast networking, and well working display output.

Antigravitas fucked around with this message at 22:21 on May 1, 2020

unimportantguy
Dec 25, 2012

Hey, Johnny, what's a "shitpost"?
Well, okay. All partitions on my SSD came back clean, so I mounted my EFI partition (/dev/sda2 in this case) and did grub-install and it... worked? "Manjaro" showed up as an option in my motherboard boot tools and it loaded GRUB. I'm... not sure why that worked now but not before. Anyway, it's properly booting GRUB now. Thank you! I'm probably eventually going to wipe everything anyway, but for now I can keep using my computer as I have, though I'm still going to try setting up a Windows VM on my Linux install so I don't have to boot into Windows (unless of course some game comes out I really want to play that I can't get working with Proton or WINE!)

unimportantguy fucked around with this message at 00:49 on May 2, 2020

aTosser
May 3, 2020

unimportantguy posted:

though I'm still going to try setting up a Windows VM on my Linux install so I don't have to boot into Windows.

If you go through the effort of putting windows in a VM be aware that some anti-cheat systems check for the presence of a VM, some of them will ban you for using windows in a VM. The same goes for some games that work perfectly in wine/proton. For example, Destiny 2 will ban you if you are detected to be running in wine.

The list is rather small but you should do some simple googling before abandoning windows in its entirety.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:
Is there an arms race of vm detection methods or is it impossible to hide it completely by design?

xtal
Jan 9, 2011

by Fluffdaddy

taqueso posted:

Is there an arms race of vm detection methods or is it impossible to hide it completely by design?

Definitely an arms race, same thing is happening with rooted phones

Mr. Crow
May 22, 2008

Snap City mayor for life

hifi posted:

try this

e: that might be wrong, but there's all sorts of fast boot/fast reboot/shutdown-but-it's-actually-hibernating type options and my guess is it's one of those.

So just disable hibernating? Disabling fast boot as shown doesn't work.

I think it's a generic real Tek card, whatever is on the gigabyte x570 aorus master.

ultrabay2000
Jan 1, 2010


taqueso posted:

Is there an arms race of vm detection methods or is it impossible to hide it completely by design?

It's often called sandbox detection.

unimportantguy
Dec 25, 2012

Hey, Johnny, what's a "shitpost"?

aTosser posted:

If you go through the effort of putting windows in a VM be aware that some anti-cheat systems check for the presence of a VM, some of them will ban you for using windows in a VM. The same goes for some games that work perfectly in wine/proton. For example, Destiny 2 will ban you if you are detected to be running in wine.

The list is rather small but you should do some simple googling before abandoning windows in its entirety.

I barely play any multiplayer games so unless it's a problem in Dark Souls I should be fine. Thanks for letting me know, though!

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:
You aren't going to play any 3d games in a VM without loving around with passing through a raw dedicated GPU anyway, and at that point you might as well dual boot because that's fiddly and annoying to set up and maintain.

BlankSystemDaemon
Mar 13, 2009



taqueso posted:

Is there an arms race of vm detection methods or is it impossible to hide it completely by design?
Conceptually, there's a big difference between regular sandboxing and what's called oblivious sandboxing; ie. where the program can't tell that it's sandboxed.
Jails in FreeBSD originally (though now less-so with the security.jail.jailed sysctl, plus the lack of access to /dev/mem and other kernel stuff), as well as the capabilities-based Capsicum (which is being applied to Firefox like it was to Chromium before Google decided to implement their own sandboxing) are meant to be forms of oblivious sandboxing.
I would assume Linux has something similar, possibly NIH'd, though I can't think of what it might be right now.

mystes
May 31, 2006

Antigravitas posted:

You aren't going to play any 3d games in a VM without loving around with passing through a raw dedicated GPU anyway, and at that point you might as well dual boot because that's fiddly and annoying to set up and maintain.
I wouldn't necessarily recommend gpu passthrough over using two computers but dual booting is terrible.

SoftNum
Mar 31, 2011

aTosser posted:

If you go through the effort of putting windows in a VM be aware that some anti-cheat systems check for the presence of a VM, some of them will ban you for using windows in a VM. The same goes for some games that work perfectly in wine/proton. For example, Destiny 2 will ban you if you are detected to be running in wine.

The list is rather small but you should do some simple googling before abandoning windows in its entirety.

I know nVidia drivers try not to load if you don't spoof the CPUID (kvm has flags for this.); IDK of what games check for VM.

the wine thing is super real though, since anticheat tries to checksum your windows DLLs and such to detect if you've edited direct x in your quest for cheats, it detects you're not running what it expects and flags you. It's kind of poo poo, the various authors of the compatibility tools have offered support which is basically never taken.


Antigravitas posted:

You aren't going to play any 3d games in a VM without loving around with passing through a raw dedicated GPU anyway, and at that point you might as well dual boot because that's fiddly and annoying to set up and maintain.

Honestly it's not really that bad anymore unless you're trying to squeek out every gnat's rear end of performance. There's pretty easy guides. Hell it's probably simpler than trying to setup pulse on your main computer. It did used to be an archaic hellscape to get working but it's not so bad. virsh even helps (some)

CaptainSarcastic
Jul 6, 2013



mystes posted:

I wouldn't necessarily recommend gpu passthrough over using two computers but dual booting is terrible.

That seems like a weirdly harsh judgement. I've dual-booted my main desktop for like 20 years now and there are a lot of upsides to it. It is more problematic when having to use a single drive for both, but even on the laptops I've owned I still tended to set up dual-boots. On a decent desktop it is still my preferred setup, although over the years my Windows installs has moved and more to just being used for gaming.

aTosser
May 3, 2020

SoftNum posted:

the wine thing is super real though, since anticheat tries to checksum your windows DLLs and such to detect if you've edited direct x in your quest for cheats, it detects you're not running what it expects and flags you. It's kind of poo poo, the various authors of the compatibility tools have offered support which is basically never taken.

It is even more simple than that, wine has an added system call for applications to check for the wine version running. Any anti-cheat system can simply call that system call and if an exception is not generated it knows you are on wine. There is an open bug for it but the wine developers have stated that they will not get into the arms race of trying to hide wine from applications.

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:
Anti-cheat software are also typically rootkits and Wine isn't made for allowing rootkits to run…

mystes
May 31, 2006

aTosser posted:

It is even more simple than that, wine has an added system call for applications to check for the wine version running. Any anti-cheat system can simply call that system call and if an exception is not generated it knows you are on wine. There is an open bug for it but the wine developers have stated that they will not get into the arms race of trying to hide wine from applications.
They specifically changed it to use libraries in PE format instead of some sort of stub files in version 5 because of the thing SoftNum described, though.

Edit: A different topic but related to wine:
Apparently wine almost has working wpf support now. You need to copy a couple dlls that won't compile natively right now but it seems like the open source wpf release plus the wine directx code is actually enough that it should be possible to get everything working with open source code.

This made me wonder if it would be possible to use stuff from wine to get wpf working on .net core on Linux and I found this page: https://ccifra.github.io/PortingWPFAppsToLinux/Overview.html

Right now he's using windows .net core running under wine, but he suggests at the end that it should be possible to use Linux .net core with winelib which actually might not be that bad.

mystes fucked around with this message at 11:27 on May 4, 2020

BlankSystemDaemon
Mar 13, 2009



Something something dtrace, something something best rootkit.

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:
I'm fairly sure ebpf is an even better rootkit now. Inspired by dtrace of course :v:

e: WPF support in Wine would be pretty neat. I know a number of software that uses it, including game launchers.

mystes
May 31, 2006

Antigravitas posted:

e: WPF support in Wine would be pretty neat. I know a number of software that uses it, including game launchers.
It sounds like it actually works now if you just copy three dll files (but it would be nicer if it was built in).

It's funny because when they opened source WPF everyone was like "oh but that won't help get WPF support on linux because you don't have all the low level windows apis to support it," but wine apparently does actually have that already.

Also I don't know even know why I want to be able to use WPF from .net core on linux because i hate WPF, but it would be cool.

Actually now I wonder if anyone's tried to use winelib to get winforms support on .net core on linux? Winelib normally sounds like it's way more trouble than its worth (probably significantly more trouble than just porting programs), but if you could just use the graphics parts it might actually be almost decent.

BlankSystemDaemon
Mar 13, 2009



Antigravitas posted:

I'm fairly sure ebpf is an even better rootkit now. Inspired by dtrace of course :v:

e: WPF support in Wine would be pretty neat. I know a number of software that uses it, including game launchers.
Yes, but eBPF is Linux-only (and possibly FreeBSD, depending on the status of a GSOC I need to check up on) whereas dtrace exists on Windows, macOS, Linux (as a kernel module, not in mainline), FreeBSD, and of course Solaris.

Mr. Crow
May 22, 2008

Snap City mayor for life
Is there any way to control the order in which devices are presented to applications?

E.g. some games see my joystick when it's plugged in before my gamepad and only use that effectively making the gamepad useless. Unplugging the joystick fixes it but is annoying when I'm downstairs on the couch.

Mr. Crow
May 22, 2008

Snap City mayor for life
Also I just tried to do a system upgrade using LVM snapshots which I normally do and it works fine; however this time my snapshot seems to have disappeared and it partially merged? After the upgrade to F32 things were fine and I rebooted a few times like I normally do to make sure everything is working fine before trying to merge my snapshot.

What is the best way to recover from a hosed up merge and what things should I look out for? I ran xfs_repair and reported doing some stuff and the sizes reported by vgs and lvs are consistent but now I'm super paranoid about the system.

The upgraded kernel fails to boot and it's missing a bunch of poo poo e.g. all of the /lib/modules/ however my older kernels still work fine, it's quite bizarre...

other people
Jun 27, 2004
Associate Christ

Mr. Crow posted:

The upgraded kernel fails to boot and it's missing a bunch of poo poo e.g. all of the /lib/modules/ however my older kernels still work fine, it's quite bizarre...

This sounds like the new kernel rpm did not install correctly. Was the update interrupted or did it run out of disk space or something?

Try an rpm verify or just reinstall the packages (kernel, kernel-core, kernel-modules, etc).

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:
Do LVM snapshots even quiesce the fs on top when you create one? XFS is journaled but I still don't like to take my chances during a rollback.

Anyway, as far as I know you aren't going to unmerge a snapshot. If it's not there and it isn't merging in the background you may be hosed. It does sound really weird though, that's not a thing I've ever heard of.

I have heard of weird things happening if you run out of free space for the delta volume though. That scenario always sounded utterly terrifying to me.

I'm sorry I can't be of much help.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:
I use rsnapshot which creates temporary LVM snapshots every 15 minutes and I've never had a snapshot end up with the FS corrupted, it must ensure that the FS is at a good point.

Mr. Crow
May 22, 2008

Snap City mayor for life
After some more investigation it looks like it actually got dropped, though I didn't see anything in the logs; however update still had F32 images under /boot which was confusing and part of the problem (of me figuring out what the hell happened).

I think I've cleaned it up and am in a consistent state so trying to upgrade again we'll see if we choke again.

quote:

Do LVM snapshots even quiesce the fs on top when you create one? XFS is journaled but I still don't like to take my chances during a rollback.

Can you ELI5? I'm not super familiar with filesystems details so I like to learn this stuff when I can but it's arcane to read a man page about it and understand what it means. Like I understand the very high level basics of a journaling filesystem and that it keeps transactions on record until it's fully commited and flushed from the system but not in terms of most practical cases (e.g. this one and rolling poo poo back and how/why that would affect LVM).

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:
If the snapshot just happened whenever, the filesystem might be in the middle of making changes. With a journaling filesystem, that isn't a huge problem because the journal ensures you can go backwards in the journal until you are at a good spot. Rather than a full fsck like you might need with an fs like ext2

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:

Mr. Crow posted:

Can you ELI5?

Let's say the package manager is installing updates. You wait for it to finish, then pull a snapshot. However, the file system had been holding some changes back in cache before flushing to disk. At the time of the snapshot the fs is inconsistent.

If LVM quiesces the fs, it would send some kind of signal to tell the fs to flush all its changes and block new ones until the snapshot is done.

If it doesn't, then once you return to the old point in time you'll have to fsck because the fs is dirty. You will lose data.

I have absolutely no idea if LVM snapshots force this flush properly. Generally speaking though, you can't return to snapshots of mounted file systems without putting data at risk unless the fs itself supports snapshots.

The LVM docs just say that "some filesystems do this automatically", which is not helpful.

Btw., I found this in the docs:

quote:

If the snapshot logical volume becomes full it will be dropped (become unusable)

Yikes. ZFS will ENOSPC, but LVM just shits itself?

Mr. Crow
May 22, 2008

Snap City mayor for life
Actually I'm just an idiot and too used to thinking in terms of git. When you merge a snapshot you're actually reverting back to the previous state and I switched the methodology in my head so I reverted (merged) when I should have dropped.

Pebkac

Warbird
May 23, 2012

America's Favorite Dumbass

What would be considered best practice for handling logs for user crons? I've got a youtube-dl job automated via cron that currently just dumps a formatted output to a file in ~/bin where the script being called lives. Tail-ing the output file certainly works well enough, but I was curious if there may be a reason to be redirecting output of the script to /var/log or something vs the way I'm doing it now.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Letting your cron print to stdout will save the output to your cron facility's log location, probably in journald?
It's one of those things where there is a sane default behavior, but you don't know which one it is because there are lots of options for running crons

xtal
Jan 9, 2011

by Fluffdaddy
Sidestepping your question, but instead of using cron, make a systemd unit that has a timer, provided you're using systemd. If you use systemd to run a cron daemon such as crony, the logs for all cron tasks will probably be in journald for crony's systemd unit. Whereas if you make a systemd unit for each task, you get separate logging for each task in the journal (and much better control of its execution.)

Pablo Bluth
Sep 7, 2007

I've made a huge mistake.
What am I missing?....

I have two machines at home, Win10 and Kubuntu. The latter has a samba share setup. Works fine with my main account and has done for ages. I have a laptop I only want access to one area so I've:
Created a new linux account. Group permissions correct on folder and can ssh in as the new account and access the required directory
Done a 'smbpasswd -a' to add the user to Samba. It shows up in pdbedit -L -v
I've modified smb.conf and added the account to the 'valid users'
Restarted smbd and nmdb

Yet I get a NT_STATUS_ACCESS_DENIED error for the new user account. Primary account still works.

fakedit: I've discovered if I rename the share in smb.conf, ie [OldName] to [NewName] and restart Samba, it works for both accounts. If I go back to [OldName], it stops working for the new user again. Is there some weird permission cache somewhere?

SoftNum
Mar 31, 2011

Pablo Bluth posted:

What am I missing?....

I have two machines at home, Win10 and Kubuntu. The latter has a samba share setup. Works fine with my main account and has done for ages. I have a laptop I only want access to one area so I've:
Created a new linux account. Group permissions correct on folder and can ssh in as the new account and access the required directory
Done a 'smbpasswd -a' to add the user to Samba. It shows up in pdbedit -L -v
I've modified smb.conf and added the account to the 'valid users'
Restarted smbd and nmdb

Yet I get a NT_STATUS_ACCESS_DENIED error for the new user account. Primary account still works.

fakedit: I've discovered if I rename the share in smb.conf, ie [OldName] to [NewName] and restart Samba, it works for both accounts. If I go back to [OldName], it stops working for the new user again. Is there some weird permission cache somewhere?

Windows SMB client caches poo poo. So it probably cached that it didn't work. You have to flush the credentials and the net sessions on the laptop. something like net use * /DELETE. also try restarting the 'Workstation" service.

It'll eventually start working again though.

Pablo Bluth
Sep 7, 2007

I've made a huge mistake.
I gave up on the laptop and was using smbclient on the linux machine and was still getting that behaviour.

Adbot
ADBOT LOVES YOU

BlankSystemDaemon
Mar 13, 2009



quote:

If the snapshot logical volume becomes full it will be dropped (become unusable)
Huh, that's quite impressive.

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