Posted by Ceri Davies
Thu, 13 Apr 2006 21:37:00 GMT
I previously wrote about putting a 6.1-BETA4 FreeBSD installation on a USB stick. Since the bugs that were in the 6.1-BETA4 installation have been fixed, plus to get 6.1-RC1 tested, here are updated instructions (which should work with 6.1-RELEASE as well).
These instructions result in a downloadable image suitable for dding direct to a USB stick of 512MB or larger.
arved pointed out that it’s good to minimize the amount of writes done to USB sticks (and flash memory in general), and I’ve got some pointers in these instructions, but I haven’t really looked at this point.
If you are looking to install FreeBSD from a USB stick, you should check out Dario Freni’s script.
Read more...
Posted in FreeBSD, FreeBSD on USB | 11 comments | no trackbacks
Posted by Ceri Davies
Fri, 24 Mar 2006 12:42:00 GMT
In an echo of the trouble two days ago, shrike died again this morning just after 3am.
This time it came back up after Stef gave it the finger, which indicates that the fsck problem was bad luck, but there’s nothing logged, there’s no crash dump, nada.
The accounting utilities are coming up with no likely causes. Time to try out the new audit(8) bits, perhaps…
Posted in FreeBSD, General | 2 comments | no trackbacks
Posted by Ceri Davies
Wed, 22 Mar 2006 20:01:00 GMT
At around 2am this morning, shrike died.
shrike comprises the entire backbone of my setup here. It’s the network router and external firewall and runs the database server, the web server, the web proxy server, the CVS server, the SMTP (in- and out-bound) and IMAP server.
Since this happened in the early hours, I didn’t notice until Stef called me in work to complain that she couldn’t reach the Internet. Attempts to connect to anything on shrike just timed out, so I told her to powercycle it.
A couple of minutes later, I attempted to SSH in and see what was up: Connection refused. Waited another five minutes, and attempts to connect just timed out. Five minutes later, connection refused again. Moments later, time-outs. WTF?
Read more...
Posted in FreeBSD, General | no comments | no trackbacks
Posted by Ceri Davies
Mon, 20 Mar 2006 22:55:00 GMT
Note: this is pretty much obsoleted by the followup article. You really should read that one instead.
It seems that a bunch of folks are ending up here by searching for instructions for installing FreeBSD on a USB stick, so here they are.
Read more...
Posted in FreeBSD, FreeBSD on USB | 4 comments | no trackbacks
Posted by Ceri Davies
Sun, 12 Feb 2006 21:03:00 GMT
Today has been very interesting, as in times.
Firstly, I discovered that the reason that my DHCP server was failing to respond to any requests was that I didn’t have the binaries installed. At some point in the past I obviously had a dumbass day like today and restored the configuration from backup without installing the package. When I think of the hours I have spent pulling my hair our in front of tcpdump and my ipfw configuration it makes me want to cry.
I also dropped a jar of redcurrant jelly on the floor, throwing sticky glass shards everywhere. And to top it all, I completely screwed the timing on today’s dinner, so everything is currently going cold in the kitchen while the meat is practically still trying to kick its way out of the oven.
On the plus side, my DHCP server works now. I managed to get FreeBSD installed non-interactively over the network, and proved that sysinstall doesn’t require you to specify a hostname in install.cfg, so long as your DHCP server provides one.
Back on the down side, the PXE article at FreeBSD.org is out of date and it looks like I just volunteered to update it. I cannot face any DocBook today, so here are some notes.
Setting up the TFTP server
- Enable
tftp in inetd.conf and restart inetd:
# grep tftp /etc/inetd.conf
tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /a/tftpboot
# /etc/rc.d/inetd reload
- Copy
pxeboot to the TFTP root
# mkdir -p /a/tftpboot
# cp /boot/pxeboot /a/tftpboot
Setting up the DHCP server
- Don’t forget: install the
net/isc-dhcp3-server package!
- As a minimum, you want something like the following in your
/usr/local/etc/dhcpd.conf:
option subnet-mask 255.255.255.0;
option routers 192.168.10.1;
filename "pxeboot";
option root-path "/a/pxeinstall";
ddns-update-style none;
option domain-name "private.submonkey.net";
option broadcast-address 192.168.10.255;
option domain-name-servers 192.168.10.17;
server-name "dr.private.submonkey.net";
server-identifier 192.168.10.17;
default-lease-time 7200;
max-lease-time 7200;
subnet 192.168.10.0 netmask 255.255.255.0 {
next-server 192.168.10.17;
range 192.168.10.32 192.168.10.64;
host quinch {
hardware ethernet aa:02:b3:d1:e2:77;
fixed-address 192.168.10.19;
option host-name "quinch";
}
}
If you will be specifying a hostname in install.cfg, you don’t need the host quinch entry. However, we’re definitely going to want to use the same install.cfg for all of our clients, since it has to go inside the mfsroot!
Setting up the NFS server
The loader is configured to do NFS by default. Can’t argue with that.
- Create
/a/pxeinstall and share it:
# mkdir /a/pxeinstall
# echo 'rpcbind_enable="YES"' >> /etc/rc.conf
# echo 'nfs_server_enable="YES"' >> /etc/rc.conf
# echo '/a -alldirs -maproot=nobody' >> /etc/exports
# reboot
Once the machine comes back up, you need to copy the boot files to the NFS root. The easiest place to get them is from a bootonly ISO, so grab one that’s appropriate for your environment - I’m installing the amd64 bits:
# ftp -a ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/6.0/6.0-RELEASE-amd64-bootonly.iso
# mdconfig -a -f `pwd`/6.0-RELEASE-amd64-bootonly.iso
md2
# mkdir /dist
# mount -t cd9660 /dev/md2 /dist
# rsync -avH /dist/ /a/pxeinstall/
Adding install.cfg to the mfsroot
Now you have the correct bits in the NFS root, we need to add our install.cfg to the mfsroot.
# gzip -d /a/pxeinstall/boot/mfsroot.gz
# mdconfig -a -f /a/pxeinstall/boot/mfsroot
md3
# mount /dev/md3 /mnt
# cp install.cfg /mnt
# umount /mnt
# mdconfig -d -u 3
Note that I haven’t gzip’d the mfsroot again, since in my testing that just caused the client to reboot.
Finally, we just need to add a loader.rc to tell loader to boot the mfsroot:
# cat >> /a/pxeinstall/boot/loader.rc << EOF
load /boot/kernel/kernel
load -t mfs_root /boot/mfsroot
set vfs.root.mountfrom="ufs:/dev/md0c"
boot
EOF
I’m pretty sure that the vfs.root.mountfrom line should read /dev/md0 rather than /dev/md0c, but this works, so we’ll go with it.
Now boot your target machine from PXE. Hope you didn’t have anything you wanted to keep on there!
Posted in FreeBSD, General | no comments | no trackbacks
Posted by Ceri Davies
Wed, 28 Dec 2005 13:16:00 GMT
First things first, we have a privacy policy now. Google Analytics insists that you have one in order to use the service, and since it is the lowest maintenance tool for creating inane and useless statistics, I am using it.
I managed to park in front of my house, whereupon someone drove a skip truck into my car (and yes, my number plate says GNU on it — call it coincidence). My insurer, Sainsbury’s, have been pretty good.
After discussion on hackers@, the crunchgen patch got committed. On a related note, had some discussion with Adrian and Philip Paeps about pivot_root(), which is a system call which switches the root mountpoint with another mountpoint. Seems that what we want is rather different to the Linux syscall of the same name. Adrian’s idea was to reuse the devfs_fixup() code, but I’m under the impression that this gets away with murder by virtue of there being no userland processes running while it is doing the business. More thought required…
I received a nice PowerBook from work, thanks. I still need a new i386 laptop, but my budget isn’t going to stretch to one this year unless Yonah does crazy things to prices.
In that vein, I finally caught up with this century and got a USB stick. Can maybe get to work on that GELI/kenv stuff now.
Christmas was good, although I haven’t been nearly drunk enough due to a cold that I just cannot get rid of. Six days left before we have to go back to work though ;-)
Posted in Consumer, FreeBSD, General, Apple | no comments | no trackbacks
Posted by Ceri Davies
Sun, 04 Dec 2005 12:19:00 GMT
Adrian Steinmann and I knocked the crunchgen(1) patch into submission; it’s now available for testing. All pre-existing configuration files should produce the same code — only use of the new libs_so keyword should make a difference. We’re looking at a 6 week MFC period or so.
I can’t mail Marius Nünnerich for some reason, so if you know him, let him know that his patch doesn’t work on the FreeBSD cluster; use bytes doesn’t exist in Perl 5.00503. I suspect that we can just get away without it.
I finally managed to buildworld after about 6 weeks; took a make installincludes and a make install in lib/libmemstat for some reason; I must have screwed something up somewhere. I can start work on some of that kernel side stuff I mentioned, though I don’t really have a test machine :-/
On which note, I’ve decided on a laptop that I want but I don’t think that December is the best time of year to be buying. I’m expecting the usual raft of price drops in the new year, and if the rumour about Apple based Intel laptops coming in January turns out to be true, I may be better off with one of them (assuming that it will run Windows too — that’s the real clincher here).
Sun released practically their entire Enterprise suite as free (as in beer, for now). This means that the Java Availability Suite which, despite the crappy name, is Sun Cluster and some other tools is now free, and so is the Grid Engine. The Grid Engine supports a whole bunch of operating systems and is a much better candidate for a compile farm than I thought Condor was. I strongly suspect that the Linux bits will work fine on FreeBSD too. I’ll be firing up the old Netra for a fiddle when these downloads finish; Stef will be pleased — I suppose it will save on heating.
Posted in FreeBSD, Apple, Solaris, Condor, Sun | no comments | no trackbacks
Posted by Ceri Davies
Tue, 29 Nov 2005 23:18:00 GMT
EuroBSDcon 2005 was a resounding success for me. I had lost a large amount of enthusiasm for the project, which has probably shown in the contributions from myself and my dealings with others.
After the weekend in Basel, I can categorically state that BSD fucking rocks, and you’d do well to use and learn it now before everyone else realises and you’re just another guy who has no idea about the “great new OS that actually makes your life easier”. Straight up.
Read more...
Posted in FreeBSD, Software | 2 comments | no trackbacks
Posted by Ceri Davies
Thu, 27 Oct 2005 12:00:00 GMT
We have a Condor deployment for intensive jobs and while I was reading the documentation today I found an illustration that would surely have won the FreeBSD logo contest if it had only been entered.
Condor looks really interesting. I wonder I can get it to make release…
Posted in FreeBSD, Condor | no comments | no trackbacks
Posted by Ceri Davies
Wed, 05 Oct 2005 22:06:00 GMT
Jeremie Le Hen followed up the locked accounts stuff and had *LOCKED* committed to the portable OpenSSH tree. Those patches to cron(8) that I posted do not work, so now I have to earn my bullshit by fixing them. Misery.
I also did some work with netgraph(4), netflow and rrdtool this week which I’m still finishing off. My netgraph setup is reasonably simple but includes divert(4) sockets and ipfw(4) so may be of interest to others. Once I have the setup finalised I’ll document it here.
Emily Boyd’s redesign also spent a day or two being merged to the main site this week; murray, simon and hrs seemed to do most of the heavy lifting, so thanks to them and Emily. There are still a number of people crowing that they don’t like it, but now we can just ask them to submit a new stylesheet, and there’s no news sweeter than that.
Posted in FreeBSD | no comments | no trackbacks