Archive for April 23rd, 2009

Ubuntu 8.10 Server Setup: Tweaks & Glitches

Having just bumped the basement file server from Kubuntu 7.10 to Xubuntu 8.10, a few notes are in order…

The general idea was to saw an existing 20 GB partition in half, maintain the existing 7.10 installation, and install 8.10 in the liberated part. The overview:

  • partimage — back up the 7.10 installation in sda6 and the data in sda7
  • resize2fs -p /dev/sda6 5G — squish the filesystem down
  • partimage — save the squished filesystem
  • cfdisk — delete sda6 and create a pair of 10 GB partitions sda6 and sda7
  • partimage — restore the squished filesystem to sda6
  • e2fsck -fv /dev/sda6 — prep it for resizing
  • resize2fs -p /dev/sda6 — expand to fill entire partition
  • tweak /etc/fstab to reflect the fact that sda7 has become sda8
  • reboot and shazam 7.10 started up just fine

Then install 8.10 in sda7 and configure from there, using the 7.10 installation as a reference to help remember what’s needed.

The only complication was that the Ubuntu 8.10 mini-ISO install enumerated the USB backup drive as sda, so things got a bit weird; evidently, the USB drive now has the grub MBR. Unplugging that drive, then deploying a bit of grub fu from SystemRescueCD fixed that up:

  • find /boot/grub/stage1 — appears in (hd0,5) and (hd0,6), thus sda6 & sda7
  • root (hd0,6)
  • setup (hd0)

Then apply the relevant installation info from the series starting there, omitting all the user apps and foo-foos that won’t be needed on the basement box.

Add useful server programs:

  • nfs-kernel-server
  • xinetd
  • swat

There’s an authorization bug that may kill local login and sudo, as documented there, triggered when you configure CUPS printers (among other causes). The quick-and-dirty solution seems to be:

  • boot in recovery mode
  • remove samba*
  • install samba
  • install xubuntu-desktop

It’s worth noting that I’d just finished configuring ssh for public-key logins, so I could get into the box from my Comfy Chair upstairs, but I couldn’t reconfigure anything because sudo segfaulted.

Create mountpoints, then set up /etc/fstab to automount the various partitions:

/dev/sda8 /mnt/music		ext3	defaults,noatime,auto,rw,nodev,noexec,nosuid 0 0
/dev/sdb1 /mnt/bulkdata		ext3	defaults,noatime,auto,rw,nodev,noexec,nosuid 0 0
/dev/sdb2 /mnt/diskimages	ext3	defaults,noatime,auto,rw,nodev,noexec,nosuid 0 0
/dev/sdb3 /mnt/userfiles	ext3	defaults,noatime,auto,rw,nodev,noexec,nosuid 0 0
UUID=069e50dc-1994-47d2-9c7e-0b5179a89041 /mnt/backup ext2 defaults,noatime,noauto,nodev,noexec,nosuid 0 0

It would be more sensible to use UUIDs for those partitions, but that stuff hasn’t broken yet. If the USB backup drive enumerates as sda again, then I’ll be forced to tweak it.

Add stanzas like this to /etc/exports:

/mnt/bulkdata *(rw,async,subtree_check,root_squash,no_all_squash)

That gets the files served to the other boxes.

Install Turboprint and tweak the printer drivers accordingly.

1 Comment