Downgrading nvidia drivers on Debian 8 to legacy version 304

I have an old HP desktop with onboard nvidia 6150 graphics, and I’ve posted before about installing  the legacy 304 drivers, and installing latest nvidia drivers to support an nvidia 750ti.

I recently moved the 750ti card into my 2008 Mac Pro, so now when booting the HP desktop into Debian with the latest nvidia drivers, Cinnamon crashes, and all I get is a default/low resolution display. So time to go the other way and downgrade back to the legacy 304 drivers (I won’t be moving the 750ti back to this machine).

Taking a gamble that I wouldn’t need to uninstall anything, I followed the steps in this post to install the 304 driver using this command:

aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-legacy-304xx-driver

This gave the error:

The following packages have unmet dependencies:
 nvidia-legacy-304xx-alternative : Depends: glx-alternative-nvidia (< 0.7) but 0.7.3~bpo8+1 is installed.

… accepting the yes option resulted in no changes, so I uninstalled the package it was complaining about:

sudo apt-get remove glx-alternative-nvidia

This removed a number of the previous 375 driver related modules that I had installed for the 750ti card.

Cleaned up anything no longer needed with:

sudo apt-get autoremove

and then rebooted, and success, back to regular 1920×1080 resolution

mysql ‘select … into outfile’ access denied

mysql’s ‘select … into outfile …’ is an easy way to export the results of a query to a file, but to execute this command you need the additional FILE privilege. The privilege is not granted by default, even with ALL, e.g.

grant ALL on exampledb.* to exampleuser;

The ALL privilege does not include FILE, so you’ll see this error:

select * from example into outfile 'test.txt'
ERROR 1045 (28000): Access denied for user 'testuser'@'%' (using password: YES)

To grant the FILE privilege,

grant FILE on *.* to exampleuser;

Note that databasename.* doesn’t appear to work, you have to grant on *.*.

 

Changing root password after initial mysql 5.7 install

It’s been a while since I’ve installed mysql, and it seems with most recent versions root is set a default password on install which you need to logon and change before you can do anything else.

Logon with:

mysql -u root -p

and enter the temporary password, then change the default with:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';

This is described in the docs here.

Installing FreeBSD 11.1 on Parallels

Installing FreeBSD from an ISO in a VM is pretty easy, just follow the menu prompts, set a root password and create a new user when prompted. There’s many step by step guides such as this one if you need help.

Out of the box with a fresh install you don’t get a desktop environment installed like you typically do with Linux distros, so after the first boot there’s a few additional steps to get up and running.

First install any updates  (logon as root):

freebsd-update fetch
freebsd-update install

Next install XWindows using pkg:

pkg install xorg

You can install any of the common desktop environments on FreeBSD. To install Gnome:

pkg install gnome3

After the install completes there’s a couple of manual config steps, which are covered in this guide here.

In summary:

  • add a line to mout /proc to /etc/fstab:
proc          /proc       procfs  rw  0  0
  • edit /etc/rc.config and add the following lines:
dbus_enable="YES" hald_enable="YES"
gdm_enable="YES"
gnome_enable="YES"

During my install of Gnome I ran into an error with corrupted package during install:

After some googling and trying a few different options (pkg clean -a), a post suggested to delete the download the downloaded cached package, but didn’t say how to do that. From some searching I found what looks like the cached files at /var/cache/pkg, so a ‘rm libwmf*’ deleted the file mentioned in the error that were previously downloaded, and then kicking off ‘pkg install gnome3’ again picked back up from where it left off.

Issues fixed, gnome installed, rebooted and we’re at the Gnome desktop: