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.
 
  • Locked thread
kastein
Aug 31, 2011

Moderator at http://www.ridgelineownersclub.com/forums/and soon to be mod of AI. MAKE AI GREAT AGAIN. Motronic for VP.

Marinmo posted:

This was indeed the problem. Why are we using hexadecimal netmasks anyway?! Combination of being tired and not used to them proved to be a bad thing. Thank you, nevertheless!

I always do because it's easier to visualize, 0xf8 says more to me about which bits are being masked off than 248 does, for instance.

Never realized you could put a CIDR spec in rc.conf though, that's a nice feature I'll have to remember.

Adbot
ADBOT LOVES YOU

Goon Matchmaker
Oct 23, 2003

I play too much EVE-Online

doomisland posted:

Is there a way to enable PXE booting on an Intel NIC while booted into the OS? On intel's site they have the Boot Util tool for linux, windows, and dos but I haven't been able to find anything.

Have you tried running the util under Linux emulation?

doomisland
Oct 5, 2004

Goon Matchmaker posted:

Have you tried running the util under Linux emulation?

Hm, I haven't. I'll have to try it out on Monday.

underlig
Sep 13, 2007

underlig posted:

I broke something.
I solved it myself, by adding a new virtual disk to my server, i then used
http://www.wonkity.com/~wblock/docs/html/disksetup.html "The New Alternate Method: gpart(8)" to setup the disk like the old one but 25GB instead of 10.

I then booted livecd and used http://www.wonkity.com/~wblock/docs/html/backup.html#_copying_filesystems "Copying Filesystems" used dump/restore to move everything to the new disk. Rebooted, removed old disk, booted using the freebsd9 cd as a livecd, edited /etc/fstab and rebooted again.

I am now very happy, so is my clientservers who finally can talk to my icinga setup again.

feld
Feb 11, 2008

Out of nowhere its.....

Feldman

kastein posted:

I always do because it's easier to visualize, 0xf8 says more to me about which bits are being masked off than 248 does, for instance.

Never realized you could put a CIDR spec in rc.conf though, that's a nice feature I'll have to remember.

If you think that's nice, you're probably also unaware of the ability to configure a RANGE of IPs on an interface:


#ipv4_addrs_fxp0="192.168.0.1/24 192.168.1.1-5/28" # example IPv4 address entry.


no more lovely _aliasX lines

feld
Feb 11, 2008

Out of nowhere its.....

Feldman

optionsng is now in progress. I'm sure some of you are going to update your ports tree and go "wtf, why do I have to recompile everything?". I can't explain that for you. However, you can prevent yourself from having to choose options all over again by running "/usr/ports/Tools/scripts/options2ng.sh"

Kenfoldsfive
Jan 1, 2003

The un-bitey-ness of a chicken's head and the "I don't want to cook that"-ness of a dog's body
I'm trying to do an in-place upgrade from 7.4-RELEASE-p9 to 8.3-RELEASE-p3, just using basic freebsd-update:

#freebsd-update upgrade -r 8.3-RELEASE

The problem is when it goes to merge files I get 295 (yes I actually counted) diffs, most of which have this as the only change:

<<<<<<< current version
# $FreeBSD: src/etc/crontab,v 1.32.24.1.2.1 2010/02/10 00:26:20 kensmith Exp $
=======
# $FreeBSD: src/etc/crontab,v 1.33.2.1.8.1 2012/03/03 06:15:13 kensmith Exp $
>>>>>>> 8.3-RELEASE

Since freebsd-update uses diff rather than mergemaster, there doesn't seem to be a way to merge these automatically, so I actually have to update all 295 files by hand even though the only change is the version string. Is there any way to shoehorn mergemaster into the process? Or am I missing something really stupid?

feld
Feb 11, 2008

Out of nowhere its.....

Feldman

Kenfoldsfive posted:

Since freebsd-update uses diff rather than mergemaster, there doesn't seem to be a way to merge these automatically, so I actually have to update all 295 files by hand even though the only change is the version string. Is there any way to shoehorn mergemaster into the process? Or am I missing something really stupid?

This is precisely why I don't use freebsd-update between major releases.

Want to do it quickly? OK, here you go: (precompiled source for 8.3)

code:
cd /root
fetch http://feld.me/priv/8.3-amd64.tar.gz   (or i386)
rm -rf /usr/src /usr/obj
cd /etc && fetch http://feld.me/freebsd/mergemaster.rc
cd /
tar -xzvpf /root/8.3-amd64.tar.gz
cd /usr/src
make installkernel && mergemaster -p
reboot
cd /usr/src
make installworld
mergemaster
yes | make delete-old

*** WARNING *** this will break ports (mostly things linked to libc.so.6 and libz.so.5), but you really should do it to get rid of cruft
yes | make delete-old-libs
Now you're only merging like 15 files by hand (only under certain circumstances will this not be true)

Don't forget to add the hast user and group by hand!

Also when you're done just run freebsd-update to grab -p3 of 8.3

feld fucked around with this message at 22:25 on Jul 24, 2012

feld
Feb 11, 2008

Out of nowhere its.....

Feldman

Tip:

quote:

Oh crap, I just updated ${port} and now things that were linked to libfoo.so.5 are broken because it's libfoo.so.6 now! I don't have time to compile this crap!

Well, the usual VERY WRONG (read: DANGEROUS; it was a shlib bump for a reason) fix on *nix is a symlink, but don't do that on BSD. It's dirty. And stupid. And you'll forget about it.

Just add the override to /etc/libmap.conf:

code:
libfoo.so.5 libfoo.so.6
Examples from the man page (yes, you can even do it on a per-binary basis):

code:
EXAMPLES
     # /etc/libmap.conf
     #
     # candidate             mapping
     #
     libc_r.so.6             libpthread.so.2 # Everything that uses 'libc_r'
     libc_r.so               libpthread.so   # now uses 'libpthread'

     [/tmp/mplayer]          # Test version of mplayer uses libc_r
     libpthread.so.2         libc_r.so.6
     libpthread.so           libc_r.so

     [/usr/local/jdk1.4.1/]  # All Java 1.4.1 programs use libthr
                             # This works because "javavms" executes
                             # programs with the full pathname
     libpthread.so.2         libthr.so.2
     libpthread.so           libthr.so

     # Glue for Linux-only EPSON printer .so to be loaded into cups, etc.
     [/usr/local/lib/pips/libsc80c.so]
     libc.so.6               pluginwrapper/pips.so
     libdl.so.2              pluginwrapper/pips.so

feld fucked around with this message at 22:31 on Jul 24, 2012

Kenfoldsfive
Jan 1, 2003

The un-bitey-ness of a chicken's head and the "I don't want to cook that"-ness of a dog's body

feld posted:

This is precisely why I don't use freebsd-update between major releases.

Want to do it quickly? OK, here you go: (precompiled source for 8.3)


Awesomesauce. Thank you.

feld posted:

yes | make delete-old

*** WARNING *** this will break ports (mostly things linked to libc.so.6 and libz.so.5), but you really should do it to get rid of cruft
yes | make delete-old-libs

Even using freebsd-update it kicks off a full reinstall of all ports so they'll all use the new libraries. I'm assuming the same thing would work here.

Kenfoldsfive fucked around with this message at 22:56 on Jul 24, 2012

feld
Feb 11, 2008

Out of nowhere its.....

Feldman

Kenfoldsfive posted:

Awesomesauce. Thank you.


Even using freebsd-update it kicks off a full reinstall of all ports so they'll all use the new libraries. I'm assuming the same thing would work here.

I prefer running "portmaster --list-origins", saving that to a file, deleting ALL installed ports, and then installing them again via portmaster -d `cat /path/to/list.txt`

Xenomorph
Jun 13, 2001
I guess there isn't a lot of BSD discussion. Sorry to bump the thread, but it was the only BSD-one I saw.

I just installed FreeBSD 9.0 and have been playing with it. I've been using Linux off and on since the mid-1990s, but this is the first time messing with BSD that I can recall.

I installed Xorg & Gnome2 to make things a bit easier. Something a little strange happened though - "Software Update" popped up and said I have 316 updates available.
Where is it getting this information from?

I looked up how to update, and I saw two parts:

# freebsd-update fetch
# freebsd-update install
(to update the system)

# portsnap fetch
# portsnap extract
# portsnap update
(to update ports)

I had already ran those to install/update everything (or at least, what I thought was everything). I ran them again and it says there are no updates.

So why does "Software Update" (gpk-update-viewer) say I have 316 updates?

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!

Xenomorph posted:

So why does "Software Update" (gpk-update-viewer) say I have 316 updates?

Ignore it according to the last post in this thread:

http://forums.freebsd.org/showthread.php?t=33388

hifi
Jul 25, 2012

Xenomorph posted:

# portsnap fetch
# portsnap extract
# portsnap update
(to update ports)

This will only update your ports tree and not any installed ports, and portsnap extract is only needed for the first use of portsnap. The common tools for upgrading installed ports are either portmaster (recommended) or portupgrade, and both are described in the handbook (ctrl-f portupgrade or portmaster) or in their respective man pages. The example sections of the man pages should have an entry for what you want to do.

Xenomorph
Jun 13, 2001
"portmaster -a" gave me an awful lot of config / build options. Where are those config files stored, in case I want to wipe them and install with defaults?

/var/db/ports/*?

Xenomorph fucked around with this message at 23:57 on Oct 10, 2012

hifi
Jul 25, 2012

Xenomorph posted:

"portmaster -a" gave me an awful lot of config / build options. Where are those config files stored, in case I want to wipe them and install with defaults?

/var/db/ports/*?

Correct, and if you are getting config dialogs I would recommend backing up that directory. The default build options are stored with the port in the makefile though. If you haven't ever upgraded your ports via portmaster/portupgrade it is worth reading through the UPDATING file up until the date when you installed freebsd and possibly do whatever the port maintainers recommend.

Xenomorph
Jun 13, 2001
Two things:

I'm testing some things in a virtual machine, and the WinKey is what VMware Fusion uses to escape from the window.

When I press WinKey, I end up with "^[[J" printed in the console or whatever program I currently have going. Is there a way to get the console to ignore the WinKey?
Maybe with a special "bindkey" in my ~/.chshrc?

Second, I guess this is huge FreeBSD noob thing, but does updating ports & stuff really involve the long process of downloading sources and recompiling everything?

What is the quickest way to get a FreeBSD system installed with Xorg and Gnome and then updated? (without using something like PC-BSD)

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!

Xenomorph posted:

Second, I guess this is huge FreeBSD noob thing, but does updating ports & stuff really involve the long process of downloading sources and recompiling everything?

What is the quickest way to get a FreeBSD system installed with Xorg and Gnome and then updated? (without using something like PC-BSD)
There are binary updates now:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html

I just installed 9.0 the other day, the new installation process was nice. A surprise since I haven't played with it in a whiel.

Xenomorph
Jun 13, 2001
Is there a way for a Linux binary to see the locally mounted drives?

I was testing a Linux backup client (Retrospect). It seems to run, but the connecting server sees no file systems. I don't know if this is an issue with the specific program or just running Linux applications in general.

Tern
Oct 18, 2012

Xenomorph posted:

Is there a way for a Linux binary to see the locally mounted drives?

I was testing a Linux backup client (Retrospect). It seems to run, but the connecting server sees no file systems. I don't know if this is an issue with the specific program or just running Linux applications in general.

It depends on how Retrospect tries to find the drives. If it's just looking in /dev for something that's a block device then I can't imagine why it wouldn't see them. If it's using some other Linux-specific API or library for probing, then maybe not.

It also might be that FreeBSD doesn't support the FS. ext2/3 are supported (not flawlessly, but they can at least be mounted), but AFAIK there's no support for ext4; so even if Retrospect can see the drive it won't be able to mount it.

hifi
Jul 25, 2012

Xenomorph posted:

Is there a way for a Linux binary to see the locally mounted drives?

I was testing a Linux backup client (Retrospect). It seems to run, but the connecting server sees no file systems. I don't know if this is an issue with the specific program or just running Linux applications in general.

There's a whole bunch of google results for "retrospect freebsd" that point to creating a mtab entry at /usr/compat/linux/etc/mtab and a bunch of symlinks/nullfs mounts to the directories you want to back up.

Xenomorph
Jun 13, 2001

hifi posted:

There's a whole bunch of google results for "retrospect freebsd" that point to creating a mtab entry at /usr/compat/linux/etc/mtab and a bunch of symlinks/nullfs mounts to the directories you want to back up.

I did not see the second thread that you listed. I will try that. Thanks.

Edit: that worked. I had the /compat/linux/etc/mtab file before, but specifying the filesystem as ext4 instead of ufs made it appear in Retrospect.

Anyone have any idea how "safe" it is then to run something under Linux Compatibility? The program "just" copies everything during a backup... There just will be dozens of terabytes of data.

Xenomorph fucked around with this message at 17:02 on Oct 25, 2012

Xenomorph
Jun 13, 2001
Is there a recommended (9.0+) book on FreeBSD?

Something I could pick up locally at Barnes and Noble?

MrDoDo
Jun 27, 2004

You better remember quick before we haul your sweet ass down to the precinct.

Xenomorph posted:

Is there a recommended (9.0+) book on FreeBSD?

Something I could pick up locally at Barnes and Noble?

From what I have seen BSD has a hilariously poor selection of actual books, especially when new versions come out. I have a copy of Absolute BSD which was published in 2007, so its not the most current, but gives a pretty good overview of FreeBSD in general. I don't know how different 9 is, so someone else might be able to say if it really warrants new material or not.

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!

Xenomorph posted:

Is there a recommended (9.0+) book on FreeBSD?

Something I could pick up locally at Barnes and Noble?

http://www.freebsd.org/docs/books.html

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/bibliography.html

Sadly none of those are really current, your best bet is like MrDoDo suggested. There's this book as well but it's 2 versions old:

http://www.packtpub.com/network-administration-with-freebsd/book?tag=mid/160908zczb7l

BSD is really 'a man up and read the docs and release notes and source code and mailing lists' kind of thing. Ugh.

Ninja Rope
Oct 22, 2005

Wee.
Unlike Linux, though, the man pages are actually useful. There's no "see info page" which says "see http://gnu.org/blah".

There's not too much to worry about except how the boot and init processes work. The rest is similar to linux with a slightly different fs heirarchy and some different apps (automounter, pw, ps and top are slightly different, etc).

You also forgot the FreeBSD handbook, which is probably the best source of info. Feel free to skip sections you don't care about.

cowboy beepboop
Feb 24, 2001

Has anyone got FreeBSD 9 or 9.1RC3 going on Hyper-V yet?

feld
Feb 11, 2008

Out of nowhere its.....

Feldman

Bob Morales posted:

BSD is really 'a man up and read the docs and release notes and source code and mailing lists' kind of thing. Ugh.

You're making it sound worse than it is. Way worse.

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!

feld posted:

You're making it sound worse than it is. Way worse.

I'm not say that's a bad thing - it's just not newbie friendly, at least not compared to _____ Linux. For 3-4 Linux distros you can go to a bookstore (or on Amazon) and get a couple books to get started, and you can go on a forum or IRC channel specifically for that distribution (and in the case of Ubuntu, they have a whole drat StackExchange site for it - AskUbuntu.com).

You can't do that with BSD. Which is fine if you have some UNIX experience and don't mind looking stuff up yourself, but if you go in #FreBSD and ask "why won't apache start", if you even get a response it's going to be "Did you even read the docs?"

hifi
Jul 25, 2012

Bob Morales posted:

I'm not say that's a bad thing - it's just not newbie friendly, at least not compared to _____ Linux. For 3-4 Linux distros you can go to a bookstore (or on Amazon) and get a couple books to get started, and you can go on a forum or IRC channel specifically for that distribution (and in the case of Ubuntu, they have a whole drat StackExchange site for it - AskUbuntu.com).

You can't do that with BSD. Which is fine if you have some UNIX experience and don't mind looking stuff up yourself, but if you go in #FreBSD and ask "why won't apache start", if you even get a response it's going to be "Did you even read the docs?"

Look at it this way: you can go to freebsd.org and get books, a forum, a bugtracker (for the entire OS, documentation set and ports), a list of IRC channels, and more.

If you are mad you literally asked that exact question in your post, you should get poo poo for it from any community and immediately get linked to the how to ask questions article. If you understand what you want and can explain what is wrong, you should be able to get help, and usually people stop telling you to read the docs once you show that your problem lies outside what the docs explain.

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!

hifi posted:

If you are mad you literally asked that exact question in your post, you should get poo poo for it from any community and immediately get linked to the how to ask questions article. If you understand what you want and can explain what is wrong, you should be able to get help, and usually people stop telling you to read the docs once you show that your problem lies outside what the docs explain.

Right - which isn't a bad thing. It keeps out those people who come in and repeat 'how i setup php' like they do in the Linux channels.

text editor
Jan 8, 2007

Bob Morales posted:

I'm not say that's a bad thing - it's just not newbie friendly, at least not compared to _____ Linux. For 3-4 Linux distros you can go to a bookstore (or on Amazon) and get a couple books to get started, and you can go on a forum or IRC channel specifically for that distribution (and in the case of Ubuntu, they have a whole drat StackExchange site for it - AskUbuntu.com).

You can't do that with BSD. Which is fine if you have some UNIX experience and don't mind looking stuff up yourself, but if you go in #FreBSD and ask "why won't apache start", if you even get a response it's going to be "Did you even read the docs?"

I've never been much of a book person and the terse, helpful and uniform documentation that the *BSDs was a breathe of fresh air after learning Linux trudging through multiple thick O'Reilly books, mailing lists and forums.

Xenomorph
Jun 13, 2001

Bob Morales posted:

I'm not say that's a bad thing - it's just not newbie friendly, at least not compared to _____ Linux. For 3-4 Linux distros you can go to a bookstore (or on Amazon) and get a couple books to get started, and you can go on a forum or IRC channel specifically for that distribution (and in the case of Ubuntu, they have a whole drat StackExchange site for it - AskUbuntu.com).

You can't do that with BSD. Which is fine if you have some UNIX experience and don't mind looking stuff up yourself, but if you go in #FreBSD and ask "why won't apache start", if you even get a response it's going to be "Did you even read the docs?"

I've glanced at some BSD sites and asked a few questions in here... then wildly slapped at my keyboard until I had a "good enough" server running. It's not that hard if you've worked with Linux before. I've looked at the "FreeBSD Handbook", but I haven't read most of it. Most stuff seems to work just like Linux, and FreeBSD seems to be well-documented (there's even a whole FreeBSD forum!). A lot of stuff is installed with "pkg_add" (or just "pkg"), and you add some 'enabled=YES' line to /etc/rc.conf. The ports collection seems to be set up well for the few things I needed to compile.

I have a bunch of notes written down, a directory full of configuration files and scripts, and I have FreeBSD at a level where I'm almost as comfortable with it as I am all of my Linux servers. I think I've just checked some Linux site or used existing Linux conf files for most of the configurations and settings I use. I can go from a clean install to a customized FreeBSD file server in less than an hour now.

Besides making sure the ZFS file system is set up and our Linux-based backup program works under load (Retrospect), I just need to figure out why cron emails are coming from "Charlie Root" instead of "Cron Daemon" like our Linux servers send out. :cthulhu:

I plan on replacing half a rack's worth of ancient Apple Xservers and Xraids with a single PowerEdge R720xd running FreeBSD. My employer is putting a lot of faith in my ability to get this weird OS (that I never touched before) working. LDAP, Kerberos, Winbind, Samba, NFS, ZFS, snapshots, backups, etc. It's all gotta work. It can't be too difficult if someone like me (who has been made fun of in just about every other SH/SC thread) can figure it out.

ptier
Jul 2, 2007

Back off man, I'm a scientist.
Pillbug
I started with FreeBSD without doing much with Linux. Everytime I tried to play with linux (command line up). The documentation was horrid / out of date etc

The FreeBSD handbook was really good, and what it didn't fully explain was really easy to look up. I started from nothing, to having a usable gateway with DHCP, DNS, pf Firewall, and super slim kernel in about 5-6 days . It was a lot of fun for a first project. Now it's my go to for server OSes.

EvilMoFo
Jan 1, 2006

my stepdads beer posted:

Has anyone got FreeBSD 9 or 9.1RC3 going on Hyper-V yet?
I asked about this at a BSD conference, it is in -CURRENT but not finalized at this moment.

muskrat
Aug 16, 2004

ptier posted:

I started from nothing, to having a usable gateway with DHCP, DNS, pf

PF alone is a huge reason I like FreeBSD (as dumb as that is). OpenBSD obviously always has the latest/greatest for PF (and it's better integrated), but what a sexy packet filter. I despise working with iptables now.

Ninja Rope
Oct 22, 2005

Wee.

EvilMoFo posted:

I asked about this at a BSD conference, it is in -CURRENT but not finalized at this moment.

Were you at the conference this weekend?

EvilMoFo
Jan 1, 2006

Ninja Rope posted:

Were you at the conference this weekend?
Yeah, I was indeed.

EvilMoFo fucked around with this message at 08:13 on Nov 8, 2012

cowboy beepboop
Feb 24, 2001

EvilMoFo posted:

I asked about this at a BSD conference, it is in -CURRENT but not finalized at this moment.

Nice, thanks.

Adbot
ADBOT LOVES YOU

Xenomorph
Jun 13, 2001
I'm trying to figure out how to best upgrade my installed ports.

Should I just abandon pkg/pkgng completely and stick with "pkg_add"?


Edit, I compiled portmaster from ports instead of using the downloaded binary and now it has pkgng support. It detected & updated stuff correctly, then.


Xenomorph fucked around with this message at 07:49 on Nov 17, 2012

  • Locked thread