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
niss
Jul 9, 2008

the amazing gnome
I've had a clonezilla server setup on ubuntu 12.04 for some time now and it has been working great. I just got in a batch of new Lenovo T430's and when I go to boot them via PXE boot and try to make an image, it get halfway through the initialization process and then I loose all video signal. The system is still up and running, as I did a test from the server and told it to make the image and the image was created fine. I just don't like not being able to see the output on the client. Any ideas?

Adbot
ADBOT LOVES YOU

kyuss
Nov 6, 2004

Maybe the nvidia Optimus graphics doing some funny stuff like switching to the wrong GPU?
I've been dabbling around with T420/T430ies and Linux at work, and the Optimus part generally makes things more complicated.

Try to force "Internal Graphics only" in the BIOS and see if it makes a difference.

niss
Jul 9, 2008

the amazing gnome

kyuss posted:

Try to force "Internal Graphics only" in the BIOS and see if it makes a difference.

Ill take a look back through the bios and see if I see that option again. I don't recall it when I looked before but I might have overlooked it. I was able to get it to boot without issues into PartedMagic. So I just used that to create an image to my clonezilla server. So worst case if I can't get the video to work, once I have a good working image I can just tell the server to re-image all the client automatically when they connect. Not the greatest, but it should work.

hackedaccount
Sep 28, 2009

Saint Darwin posted:

I'm trying to copy a user's data off of one machine that's about to be wiped into a folder on a netapp; I have the directory NFS mounted on the client machine. I've tried both rsync (twice) and cp and both ways the data on the backup server is reported to be 1 gig less than the data on the original box. I've done diff on both directories and I see no rhyme or reason for it missing some of the files that aren't showing up. I HAVE to get everything off this box and I need it done as soon as possible, I wanted this reimaged and returned yesterday. What the hell could I be doing wrong?

There's no error messages, no visual reason it'd skip, I'm doing it as root.

Did you find a solution to this? I'm curious what was happening.

Adult Sword Owner
Jun 19, 2011

u deserve diploma for sublime comedy expertise

hackedaccount posted:

Did you find a solution to this? I'm curious what was happening.

du --apparent-size showed that they did in fact match. The user has not complained that anything is missing and this is a guy who would have instantly discovered something.

niss
Jul 9, 2008

the amazing gnome
So this is odd, didn't see anything in the bios related to multi video cards on the Lenovo t430. I booted up another lenovo to restore and image to and it worked just fine. :iiam:

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

niss posted:

So this is odd, didn't see anything in the bios related to multi video cards on the Lenovo t430. I booted up another lenovo to restore and image to and it worked just fine. :iiam:

They can have either integrated video or integrated+NVIDIA. If it wasn't in the BIOS options maybe it only has integrated video.

niss
Jul 9, 2008

the amazing gnome

Bob Morales posted:

They can have either integrated video or integrated+NVIDIA. If it wasn't in the BIOS options maybe it only has integrated video.

Thats the odd part, they are both the same and one worked fine the other didn't. oh well

Scruffy the janitor
Dec 31, 2007

A greater tragedy my eyes have never beheld
This may be as good of a place as any to ask, where would be a good place to sell a laptop running Ubuntu? I think people on Craigslist get scared when they see it isn't a Windows or Mac and I didn't get any hits listing it on SA Mart. Am I stuck with ebay?

babies havin rabies
Feb 24, 2006

Scruffy the janitor posted:

This may be as good of a place as any to ask, where would be a good place to sell a laptop running Ubuntu? I think people on Craigslist get scared when they see it isn't a Windows or Mac and I didn't get any hits listing it on SA Mart. Am I stuck with ebay?

Why not sell it as a no-OS system?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Scruffy the janitor posted:

This may be as good of a place as any to ask, where would be a good place to sell a laptop running Ubuntu? I think people on Craigslist get scared when they see it isn't a Windows or Mac and I didn't get any hits listing it on SA Mart. Am I stuck with ebay?

Does it still have a Windows sticker on the bottom? Re-install it. Or offer some nerd 20 bucks off if he re-installs it himself.

mystes
May 31, 2006

Scruffy the janitor posted:

This may be as good of a place as any to ask, where would be a good place to sell a laptop running Ubuntu? I think people on Craigslist get scared when they see it isn't a Windows or Mac and I didn't get any hits listing it on SA Mart. Am I stuck with ebay?
Did it come with Ubuntu? If not, why don't you just reinstall Windows?

Scruffy the janitor
Dec 31, 2007

A greater tragedy my eyes have never beheld

mystes posted:

Did it come with Ubuntu? If not, why don't you just reinstall Windows?

It didn't, but I have no idea how to reinstall Windows since it doesn't have a CD drive and I'm not exactly computer savvy. My dad is the one who put it on there.

Qtotonibudinibudet
Nov 7, 2011



Omich poluyobok, skazhi ty narkoman? ya prosto tozhe gde to tam zhivu, mogli by vmeste uyobyvat' narkotiki

Scruffy the janitor posted:

This may be as good of a place as any to ask, where would be a good place to sell a laptop running Ubuntu? I think people on Craigslist get scared when they see it isn't a Windows or Mac and I didn't get any hits listing it on SA Mart. Am I stuck with ebay?

A dumpster.

Wait, damnit, this isn't YOSPOS.

If it's a new enough model you may want to try Amazon, since people searching for that model will see it as a used option specifically for that, rather than just people searching for some sort of laptop on eBay.

Frozen Peach
Aug 25, 2004

garbage man from a garbage can
I feel really stupid for having to ask this, but I'm missing something really obvious here. One of my linux servers isn't mounting it's second partition on boot and I can't figure out why. It was all setup by default using Ubuntu's installation cd, so I'm not sure why it won't start on boot.

Here's the fstab:

code:
# <file system>                           <mount point>   <type>  <options>                <dump>  <pass>
proc                                       /proc           proc    nodev,noexec,nosuid      0       0
# / was on /dev/sda1 during installation
UUID=49dd526e-ccdf-471e-8219-95741e33501a  /               ext4    errors=remount-ro        0       1
# /srv was on /dev/sdb1 during installation
UUID=20995c96-799c-4644-a2d9-d58fbbd3ac1e  /srv            ext4    defaults                 0       2
# swap was on /dev/sda5 during installation
UUID=64215f3a-982d-4d59-a44e-d3a042ef2654  none            swap    sw                       0       0
/dev/fd0                                   /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
/srv                                       /srv            bind    bind                     0
/webapps                                   /webapps        bind    bind                     0
The mount in question is the /srv mount point. After it's booted, if I just login and "sudo mount /srv" everything is fine. The defaults option is supposed to automount, isn't it? What's with the two bind types, that bind a folder to itself? I'm wondering if after /srv is auto mounted, those binds might be breaking it somehow. If I delete those, will that fix the problem?

Scruffy the janitor
Dec 31, 2007

A greater tragedy my eyes have never beheld
Ah I didn't even think of Amazon. :downs: It's a Lenovo Thinkpad, you know, just in case anyone's interested.

3spades
Mar 20, 2003

37! My girlfriend sucked 37 dicks!

Customer: In a row?

Frozen-Solid posted:

The mount in question is the /srv mount point. After it's booted, if I just login and "sudo mount /srv" everything is fine. The defaults option is supposed to automount, isn't it? What's with the two bind types, that bind a folder to itself? I'm wondering if after /srv is auto mounted, those binds might be breaking it somehow. If I delete those, will that fix the problem?

What is /srv a bind mount of? It's usually /pathoriginal/ /pathnew/ bind defaults,bind 0 0

Do a cat /proc/mounts after you do 'mount /srv' to find the source of the mount.

Frozen Peach
Aug 25, 2004

garbage man from a garbage can

3spades posted:

What is /srv a bind mount of? It's usually /pathoriginal/ /pathnew/ bind defaults,bind 0 0

No idea. All of that was setup at install as far as I know. I never mess with fstab.

3spades posted:

Do a cat /proc/mounts after you do 'mount /srv' to find the source of the mount.

code:
x@y:~$ cat /proc/mounts | grep srv
/dev/disk/by-uuid/49dd526e-ccdf-471e-8219-95741e33501a /srv ext4 rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb1 /srv ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
I did find this though:

code:
x@y:/dev/disk/by-uuid$ ls -la /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 100 Apr 29 22:12 .
drwxr-xr-x 5 root root 100 Apr 29 22:12 ..
lrwxrwxrwx 1 root root  10 Apr 29 22:12 20995c96-799c-4644-a2d9-d58fbbd3ac1e -> ../../sdb1
lrwxrwxrwx 1 root root  10 Apr 29 22:12 49dd526e-ccdf-471e-8219-95741e33501a -> ../../sda1
lrwxrwxrwx 1 root root  10 Apr 29 22:12 64215f3a-982d-4d59-a44e-d3a042ef2654 -> ../../sda5
Apparently the by-uuid doesn't link to the right drive letter? I'm confused by that too.

Frozen Peach fucked around with this message at 16:56 on May 2, 2013

mystes
May 31, 2006

Scruffy the janitor posted:

It didn't, but I have no idea how to reinstall Windows since it doesn't have a CD drive and I'm not exactly computer savvy. My dad is the one who put it on there.
I guess it's outside scope of this thread but if you have an appropriate Windows CD you could just get a $30 USB cd-rom drive, plug it in, and reinstall it (you would likely recoup the $30 when you resell it), which shouldn't be hard even if you don't know much about computers. The laptop probably has the serial number on it somewhere and you won't have a problem activating it since it's the same laptop you had it activated on before. The laptop may also have come with a recovery partition with a copy of the original windows install but it's likely your father wiped this out when installing Ubuntu.

Note that if Windows is actually still installed along with Ubuntu you could just get rid of Ubuntu and resize the Windows partition.

evol262
Nov 30, 2010
#!/usr/bin/perl

Frozen-Solid posted:

No idea. All of that was setup at install as far as I know. I never mess with fstab.


code:
x@y:~$ cat /proc/mounts | grep srv
/dev/disk/by-uuid/49dd526e-ccdf-471e-8219-95741e33501a /srv ext4 rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb1 /srv ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
I did find this though:

code:
x@y:/dev/disk/by-uuid$ ls -la /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 100 Apr 29 22:12 .
drwxr-xr-x 5 root root 100 Apr 29 22:12 ..
lrwxrwxrwx 1 root root  10 Apr 29 22:12 20995c96-799c-4644-a2d9-d58fbbd3ac1e -> ../../sdb1
lrwxrwxrwx 1 root root  10 Apr 29 22:12 49dd526e-ccdf-471e-8219-95741e33501a -> ../../sda1
lrwxrwxrwx 1 root root  10 Apr 29 22:12 64215f3a-982d-4d59-a44e-d3a042ef2654 -> ../../sda5
Apparently the by-uuid doesn't link to the right drive letter? I'm confused by that too.

You're misconstruing your bind mount (/dev/disk/by-uuid...) with by-uuid not linking to the right drive letter. sdb1 matches the UUID in fstab.

The "defaults" option has nothing to do with automounting. Being in fstab means it will be automatically mounted. "defaults" means "rw,relatime,user_xattr,barrier=1,data=ordered"

Those bind mounts are less than useless. Remove them. And you may want to try to figure out what added them. Does the modification time of fstab match the install time of the system? I'm guessing it does not. The syntax for those bind mounts is somewhat off, and bind mounting a directory to itself is useless. If it's something the Ubuntu installer does, you should file a bug.

3spades
Mar 20, 2003

37! My girlfriend sucked 37 dicks!

Customer: In a row?

Frozen-Solid posted:

code:
# <file system>                           <mount point>   <type>  <options>                <dump>  <pass>
proc                                       /proc           proc    nodev,noexec,nosuid      0       0
# / was on /dev/sda1 during installation
UUID=49dd526e-ccdf-471e-8219-95741e33501a  /               ext4    errors=remount-ro        0       1
# /srv was on /dev/sdb1 during installation
UUID=20995c96-799c-4644-a2d9-d58fbbd3ac1e  /srv            ext4    defaults                 0       2
# swap was on /dev/sda5 during installation
UUID=64215f3a-982d-4d59-a44e-d3a042ef2654  none            swap    sw                       0       0
/dev/fd0                                   /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
/srv                                       /srv            bind    bind                     0
/webapps                                   /webapps        bind    bind                     0
code:
/dev/sdb1 /srv ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0

Sorry, I missed the actual mount in the sea of uuids, so /dev/sdb1 is /srv. Drop the bind mounts from fstab for /srv since its not a bind mount but a secondary disk already being called to mount itself.

renzor
Jul 28, 2004

...I still get the ham, right? Good.
Are there any other PDF printer drivers other than cups and the stock Save As..? The stock takes 20 or so seconds to print in Draftsight while cups likes printing 2-4mb PDF files that are 1-300kb in Windows.

Varkk
Apr 17, 2004

What sort of quality settings do you have?
I have tried a few test ones here just choosing print print to file and it is generating about 50kb files for a simple 300dpi A4 page with text and colour blocks. I think it can go as high as 1200dpi or even more if you set it to. Also are the PDFs generated just essentially images of the page or is the text etc separate elements?

renzor
Jul 28, 2004

...I still get the ham, right? Good.

Varkk posted:

What sort of quality settings do you have?
I have tried a few test ones here just choosing print print to file and it is generating about 50kb files for a simple 300dpi A4 page with text and colour blocks. I think it can go as high as 1200dpi or even more if you set it to. Also are the PDFs generated just essentially images of the page or is the text etc separate elements?

I'm doing 300dpi A4. And yes, just images of the page, no seperate elements.

epwvt
Mar 22, 2012
I need a to have 100 users preferably all with the same password in openLDAP to use in performance testing software. My RedHat like distro has openLDAP 2.3.43 installed. Can anyone assist?

covener
Jan 10, 2004

You know, for kids!

epwvt posted:

I need a to have 100 users preferably all with the same password in openLDAP to use in performance testing software. My RedHat like distro has openLDAP 2.3.43 installed. Can anyone assist?

You can generate a simple ldif text file for input to ldapadd:

code:
for i in `seq 1 100`; do printf "dn: cn=user$i, o=foo, c=US;\nobjectclass: person;\nobjectclass: organitionalPerson; \ncn: Joe $i; \nsn: user$i;\nUserpassword: userpw\n\n"; done > users.ldif

evol262
Nov 30, 2010
#!/usr/bin/perl

epwvt posted:

I need a to have 100 users preferably all with the same password in openLDAP to use in performance testing software. My RedHat like distro has openLDAP 2.3.43 installed. Can anyone assist?

You want to batch create LDAP users? Can we help you? Probably not.

You can help yourself, though. You probably want to either batch-create user LDIFs (easier), or add them all to one LDIF, then import it. Use Perl/Python/Ruby.

code:
#Group
dn: cn=john.doe,ou=groups,dc=example,dc=com
cn: john.doe
objectClass: top
objectClass: posixGroup
gidNumber: 10000

#Account
dn: uid=john.doe,ou=people,dc=example,dc=com
cn: John Doe
givenName: John
sn: Doe
uid: john.doe
uidNumber: 10000
gidNumber: 10000
homeDirectory: /home/john.doe
mail: [email]john.doe@example.com[/email]
objectClass: top
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
loginShell: /bin/bash
userPassword: {CRYPT}somecryptedpassword
You'll want to generate a pre-crypted password and put it after {CRYPT} (or whatever password scheme you're using). Perl/Python/whatever makes this easier.

I don't know if you have CRYPT support compiled in, or if you're using a different password schema. I don't know your UID scheme. I don't know your user/group OUs. I don't know your DC. I don't know your username scheme. You'll need to provide a lot more information or muddle your way through it. Do you have an LDAP admin there? Is this a fresh setup that you can do whatever you want with?

other people
Jun 27, 2004
Associate Christ

wolrah posted:

You can certainly PXE boot from non-local hosts as long as the machine doing the booting has a valid gateway and a decent PXE implementation. At one point my customer-facing TFTP server for phone configs was also our in-house PXE boot server and sites with Linksys or Aastra phones use the same DHCP option 66 as PXE can use, so I would intermittently see a computer at a customer site try to boot from my server over the internet.

You just need to make sure the host being booted is getting the correct server IP and has a valid route to it. If you're using the virtualization environment's internal NAT it may not have an appropriately capable DHCP implementation, so you may have to set up your own sitting on that network.

Just as a side note, personally I prefer avoiding such internal NAT implementations and instead attach any VMs I wish to be natted to an internal network and stick a pfSense VM in there with a WAN interface bridged to the physical interface. It allows for much better control over the NAT, not to mention diagnostic capabilities and a variety of add-on features. I'm not sure how bad the performance penalty may be for this in a worst case environment, but I've never seen it do anything notable.

OpenWRT would probably work well if one is only using Linux VMs on a Linux host, also being a Linux probably allows some performance benefits in certain configurations.

I would certainly love to use a bridge for the VMs, but this is a laptop and I need the convenience of using wifi and vpns with NetworkManager.

I have the pxeboot working with the VMs behind the libvirt default NAT network now. I had edited libvirt's default network xml correctly, but only now have I realized that I didn't stop/start the network to load my changes. Doh.

However, it is still not able to download the pxelinux.0 file. It has the right URI, but it times out every time.
I can boot another VM and use the tftp client to connect to the same tftp server, but 'get pxelinux.0' times out there as well. I am guessing this has something to do with the data transfer trying to happen on random ports? Shouldn't the connection tracking of the libvirt default network NATing accommodate this?

JHVH-1
Jun 28, 2002

covener posted:

You can generate a simple ldif text file for input to ldapadd:

code:
for i in `seq 1 100`; do printf "dn: cn=user$i, o=foo, c=US;\nobjectclass: person;\nobjectclass: organitionalPerson; \ncn: Joe $i; \nsn: user$i;\nUserpassword: userpw\n\n"; done > users.ldif


ANyone else use brace expansion for stuff like this? I found out about it through climagic and basically you could do an iteration of numbers like this without a command like seq:

code:
for i in {1..100} ; do echo $i ; done
https://www.youtube.com/watch?v=gPuK9KwVHF4

evol262
Nov 30, 2010
#!/usr/bin/perl

Kaluza-Klein posted:

I would certainly love to use a bridge for the VMs, but this is a laptop and I need the convenience of using wifi and vpns with NetworkManager.

I have the pxeboot working with the VMs behind the libvirt default NAT network now. I had edited libvirt's default network xml correctly, but only now have I realized that I didn't stop/start the network to load my changes. Doh.

However, it is still not able to download the pxelinux.0 file. It has the right URI, but it times out every time.
I can boot another VM and use the tftp client to connect to the same tftp server, but 'get pxelinux.0' times out there as well. I am guessing this has something to do with the data transfer trying to happen on random ports? Shouldn't the connection tracking of the libvirt default network NATing accommodate this?

TFTP is a fairly stupid protocol, and you may not be connected when you think you are (no matter what the client says). :10bux: says you're not actually making it to the TFTP server. Packet dump to verify.

other people
Jun 27, 2004
Associate Christ

evol262 posted:

TFTP is a fairly stupid protocol, and you may not be connected when you think you are (no matter what the client says). :10bux: says you're not actually making it to the TFTP server. Packet dump to verify.

Just looking at the tftp server logs:

This is a VM running on the NATed libvirt network trying to connect:
code:
May  3 14:21:32 pxeserver xinetd[14757]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
May  3 14:21:32 pxeserver xinetd[14757]: Started working: 1 available service
May  3 14:22:34 pxeserver xinetd[14757]: START: tftp pid=14763 from=10.20.30.113
May  3 14:22:34 pxeserver in.tftpd[14764]: tftpd: read: Connection refused
This is the VM host OS connecting and downloading a file successfully:
code:
May  3 14:23:16 pxeserver xinetd[14757]: Exiting...
May  3 14:23:16 pxeserver xinetd[14782]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
May  3 14:23:16 pxeserver xinetd[14782]: Started working: 1 available service
May  3 14:23:36 pxeserver xinetd[14782]: START: tftp pid=14785 from=10.20.30.113
I will see what I can find with wire shark...

edit: http://ntrnt.com/huh.pcapng.gz ???

other people fucked around with this message at 20:10 on May 3, 2013

Endymion FRS MK1
Oct 29, 2011

I don't know what this thing is, and I don't care. I'm just tired of seeing your stupid newbie av from 2011.
Simple question, if I have 8gb of RAM and a solid state drive, can I install without a swap partition?

ExcessBLarg!
Sep 1, 2001

Endymion FRS MK1 posted:

Simple question, if I have 8gb of RAM and a solid state drive, can I install without a swap partition?
You can, but you need a swap partition if ever want to use suspend-to-disk.

Having a relatively small swap partition can't hurt, it's useful for both suspend-to-disk and also gives the kernel the option of paging out stuff it really doesn't care about. 1 GB would be more than sufficient here. Otherwise folks regularly run machines without swap, and if you have a few GB or more it's usually not an issue, depending on your workload.

Endymion FRS MK1
Oct 29, 2011

I don't know what this thing is, and I don't care. I'm just tired of seeing your stupid newbie av from 2011.

ExcessBLarg! posted:

You can, but you need a swap partition if ever want to use suspend-to-disk.

Having a relatively small swap partition can't hurt, it's useful for both suspend-to-disk and also gives the kernel the option of paging out stuff it really doesn't care about. 1 GB would be more than sufficient here. Otherwise folks regularly run machines without swap, and if you have a few GB or more it's usually not an issue, depending on your workload.

Alright thanks, I ended up going with 2GB anyways after some quick reading. New problem though. I'm doing a dual boot of Xubuntu and Windows 8, followed this guide pretty much to a t. However, I can't boot back into Xubuntu. I get a screen that looks like this:



Edit: Nevermind, fixed it using a boot loader repair thing from Ubuntu support

Endymion FRS MK1 fucked around with this message at 00:47 on May 4, 2013

kyuss
Nov 6, 2004

^^
Tip: If you plan to rw-mount the NTFS partition(s) in Linux, be sure to turn off the "fast startup" feature in Windows.
Windows 8 by default will write temporary information to disk for a faster startup which, if accidentally overwritten, may result in data loss.

spankmeister
Jun 15, 2008






kyuss posted:

^^
Tip: If you plan to rw-mount the NTFS partition(s) in Linux, be sure to turn off the "fast startup" feature in Windows.
Windows 8 by default will write temporary information to disk for a faster startup which, if accidentally overwritten, may result in data loss.

As long as you don't touch hiberfil.sys you should be fine though right?

e: I don't dual boot anymore but when I did I used one (back then fat32) data partition and just never mounted the windows system partition (or just ro if you needed a file off your windows c drive in linux). I suggest the same approach for dual booting.

spankmeister fucked around with this message at 09:30 on May 4, 2013

wolrah
May 8, 2006
what?

Kaluza-Klein posted:

However, it is still not able to download the pxelinux.0 file. It has the right URI, but it times out every time.
I can boot another VM and use the tftp client to connect to the same tftp server, but 'get pxelinux.0' times out there as well. I am guessing this has something to do with the data transfer trying to happen on random ports? Shouldn't the connection tracking of the libvirt default network NATing accommodate this?

TFTP through NAT can be a bitch.


Ugh, I forgot about that little "quirk" of TFTP. It's pretty much designed to break in NAT environments (mostly because it was designed in 1980 before NAT was a thing).

Rather than make the packets larger with a session ID or something, TFTP effectively uses the ports involved as the connection identifier. Client picks a random port from the ephemeral range and uses it to send a UDP packet containing the request to the server. The server then responds by picking its own ephemeral port and sending from there at the client's port.

NAT doesn't know this, so NAT is tracking the "connection" from client:random1 to server:69 and isn't expecting a response from server:random2 at client:random1. NAT has nowhere to send this and responds or simply ignores depending on configuration.

There are a few ways to get TFTP through NAT reliably:

1. Tweaked client using a fixed port on the return side, port forward in NAT. This however prevents multiple simultaneous requests from the same client.

2. Full "DMZ Mode" as most home routers call it where anything not otherwise specified is forwarded to the client by NAT. This of course only works for one at a time.

3. TFTP-aware NAT. On Linux it's a kernel module, on pfSense it's a checkbox. I don't know the specifics of any given implementation, but a simplified functional version could just look for connections out to port 69 and open a hole for the outside host to get back in to the actual client on the client's source port. Obviously that simple of an implementation would be a security nightmare, but you get the idea.

4. TFTP Proxy. Basically putting a server on a machine that has access to both the inside and outside networks, typically the NAT box, and having it simply forward requests and responses to/from the real server. One of the VoIP NAT boxes I use does this, I set the internet IP of my config server and DHCP tells the phones to just connect to the router.


Every time I'm dealing with TFTP and NAT it's on a box that does either 3 or 4 and both work great, so I had entirely forgotten that by default NAT hates TFTP.

wolrah fucked around with this message at 19:30 on May 4, 2013

other people
Jun 27, 2004
Associate Christ

wolrah posted:

TFTP through NAT can be a bitch.


Ugh, I forgot about that little "quirk" of TFTP. It's pretty much designed to break in NAT environments (mostly because it was designed in 1980 before NAT was a thing).

Rather than make the packets larger with a session ID or something, TFTP effectively uses the ports involved as the connection identifier. Client picks a random port from the ephemeral range and uses it to send a UDP packet containing the request to the server. The server then responds by picking its own ephemeral port and sending from there at the client's port.

NAT doesn't know this, so NAT is tracking the "connection" from client:random1 to server:69 and isn't expecting a response from server:random2 at client:random1. NAT has nowhere to send this and responds or simply ignores depending on configuration.

There are a few ways to get TFTP through NAT reliably:

1. Tweaked client using a fixed port on the return side, port forward in NAT. This however prevents multiple simultaneous requests from the same client.

2. Full "DMZ Mode" as most home routers call it where anything not otherwise specified is forwarded to the client by NAT. This of course only works for one at a time.

3. TFTP-aware NAT. On Linux it's a kernel module, on pfSense it's a checkbox. I don't know the specifics of any given implementation, but a simplified functional version could just look for connections out to port 69 and open a hole for the outside host to get back in to the actual client on the client's source port. Obviously that simple of an implementation would be a security nightmare, but you get the idea.

4. TFTP Proxy. Basically putting a server on a machine that has access to both the inside and outside networks, typically the NAT box, and having it simply forward requests and responses to/from the real server. One of the VoIP NAT boxes I use does this, I set the internet IP of my config server and DHCP tells the phones to just connect to the router.


Every time I'm dealing with TFTP and NAT it's on a box that does either 3 or 4 and both work great, so I had entirely forgotten that by default NAT hates TFTP.

Woah, thank you for that. I just got it working by loading nf_nat_tftp on the VM host. I had nf_conntrack_tftp, but was not aware of nt_nat_tftp.

pseudorandom name
May 6, 2007

spankmeister posted:

As long as you don't touch hiberfil.sys you should be fine though right?

No.

Fast shutdown (which is the default) terminates user sessions and then suspends the kernel to disk. That includes the current state of the Windows NTFS driver, which is storing in memory information about what's located where on the disk.

So if you shutdown Windows 8, modify the filesystem in Linux, and then restart Windows 8, the saved NTFS driver state will potentially be stale, which means it can corrupt data.

Adbot
ADBOT LOVES YOU

Naffer
Oct 26, 2004

Not a good chemist
Does anyone have any experience with Linux on ARM "TV-stick" computers like the MK808? There is a Linux build called "Picuntu" for this thing, but wanted to see if anyone had any experience with these before buying it. I really just want a cheap, low power device to run Tiny Tiny RSS on, and it apparently runs pretty rough on the raspberry pi.

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