Sunday, January 23, 2011

Ubuntu Install (10.10 Maverick Meerkat)

I've just made a new install of Ubuntu 10.10 on my desktop.


At first, I couldn't get my computer to boot off a CD or usb drive. This turned out to be because I'd disabled USB in the BIOS. Apparently for stability reasons. http://johnsunixtips.blogspot.com/2010/09/ubuntu-10041-lts-usb-boot-conflict.html


After that, I could get the computer to boot of a usb drive, although not off a CD. Even when it did boot, it seemed to freeze forever at a purple screen of death with a stupid little picture of a keyboard being equal to a man. Go figure. 


I assume it was trying to load the linux kernel. Pulling out all usb devices except the usb stick it was actually booting from seemed to help.


But even then you just have to wait it out. It seems to take about five minutes, with no progress bar or anything. During which the only indication that it hasn't crashed is that the light on the usb drive is flashing. It's very difficult to wait that long, especially when you've seen it crash ten times already. But eventually it may switch to a different purple screen, on which orange dots move incomprehensibly.


All of this would be much more tractable if there was some indication what the damned thing was doing. I bloody hate the sort of cretins who turn off progress reports. Presumably for 'aesthetic' reasons. As if wasting half a day because you can't see what's going on will make you feel better about linux.


Eventually though, it becomes a friendly graphical installer, and everything gets much less worrying.




Once you're there, it's safe to put in the wireless USB dongle, which the installer recognises and configures immediately. That allows it to download updates as part of the install, which worked flawlessly.


Unfortunately, when the machine reboots, the wireless has stopped working. This turns out to be a problem with bad kernel modules that need blacklisting. See http://johnsunixtips.blogspot.com/2010/08/sitecom-wireless-wl-608-54g-usb-dongle.html, but essentially the fix is to add:




# To stop bad drivers blocking the correct driver for usb wireless dongle
# See http://johnsunixtips.blogspot.com/2010/08/sitecom-wireless-wl-608-54g-usb-dongle.html
blacklist rt2800usb
blacklist rt2x00usb
blacklist rt2x00lib


to the bottom of  /etc/modprobe.d/blacklist.conf:



(On a Dell Mini install the Broadcom STA driver, which works fine.)

(On a Dell Mini 1018 with the Realtek Driver, do:
$ sudo add-apt-repository ppa:lexical/hwe-wireless
$ sudo apt-get update
$ sudo apt-get install rtl8192ce-dkms 
and reboot and everything is fine.

And you should also turn off intel speedstep in the BIOS, 
since otherwise the netbook won't wake up from suspend
)




The boot process also becomes rather more reassuring if you get rid of the purple screens of maybe-death, and let the kernel explain what it's doing as it boots:


$ sudo vi /etc/default/grub
change
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT=""


then run 
$ sudo update-grub


Sheesh. That was far too hard, and took hours. I'd never have managed it if I were a newbie, or even if I'd failed to write all that stuff down during previous encounters. Installing ubuntu used to be dead easy. On this machine I'd now say it was impossible even for an expert unless he was already familiar with the quirks of running it on this machine.


Anyway. All fine now.







The first thing I noticed about the new system was that it doesn't play youtube videos.


As long as you don't care too much about software purity, the first thing to do after installing a new ubuntu is: 





$ sudo apt-get install ubuntu-restricted-extras


which is a huge metapackage that adds all sorts of goodies. At one point it asks to agree to some sort of microsoft font licence. Sigh....


Then do:
$ sudo /usr/share/doc/libdvdread4/install-css.sh
to give your new system DVD reading abilities.




You should add the medibuntu repository, instructions here: https://help.ubuntu.com/community/Medibuntu. What they say to do is:




$ sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update




This page has many more tips for interesting stuff to install:


http://www.my-guides.net/en/guides/linux/193-ubuntu-lucid-lynx-1004-post-installation-guide


More things to do in case I need to do this again soon


Lots of things need installing:
You can make a cup of tea while this is happening. It takes about ten minutes.


$ sudo apt-get install w32codecs gitk epiphany-browser chromium-browser mplayer smplayer emacs maven2 xxdiff emacs-goodies-el tree git-gui mercurial rlwrap vim-gnome nautilus-open-terminal loop-aes-utils xclip filelight htop gparted idle-python3.1 unison build-essential gparted imagemagick fail2ban kate vlc openjdk-6-jdk xine-ui






Turn the firewall on:
$ sudo ufw enable


to check:
$ sudo ufw status




If you want to run an ssh server (client is already installed)




$ sudo apt-get install ssh


Then go fix the config file
$ sudo vi /etc/ssh/sshd_config
Change UsePAM, PasswordAuthentication, PermitRootLogin to no
Also allow Port 443 for login over https port through captive portals


Then allow it through the firewall:



$ sudo ufw allow 22
(also 443, also fix the router to forward appropriately)


Enable the root account, which always seems to come in handy.

$ sudo passwd root


And change the default umask so that files are private for all users


$ sudo vi /etc/profile
change umask from 022 to 077



Encrypt the swap partition:
$ sudo vi /etc/fstab
Change /dev/sda5 none swap sw 0 0 to:
 /dev/sda2 none swap sw,loop=/dev/loop7,encryption=AES256 0 0


and add cryptoloop to /etc/modules 




The version of hplip in 10.10 is not new enough to support an HP Deskjet 3050, latest driver is here: http://hplipopensource.com/hplip-web/index.html
Or it can be fetched directly with:

$ wget http://sourceforge.net/projects/hplip/files/hplip/3.11.1/hplip-3.11.1.run






either way you then need to run an install script and give it your password:
$ chmod +x hplip-3.11.1.run
$ ./hplip-3.11.1.run



the last gasp of this little script is to run $ hp-setup which should discover the printer if it's turned on. If it can't find it the network address is 192.168.1.6 usually.


The system is now set up.


Remaining problems: 


DVD playback with 'movie player' is very slow, even though it was (is) fine in the 10.04 installation. VLC works OK once you change the video to GLX video output, using just under all the CPU to play in 1920x1600 full screen.


xine and smplayer seem to work best of all, but needs a symbolic link from /dev/dvd to wherever your dvd drive is:
$ sudo ln -s /dev/sr1 /dev/dvd



Can't get this to mount on boot
Encrypted /home
add cryptoloop to /etc/modules
add to /etc/fstab:
/dev/sdb1       /home           ext3    noauto,loop=/dev/loop6,encryption=AES128 0 0








Tweaks to a new user account:



System/Preferences/Keyboard/Typing Break to turn on typing break
System/Preferences/Keyboard/Layouts/Options/Ctrl key position/Make CapsLock an additional Ctrl
Use United Kingdom keyboard, with United Kingdom International with dead keys to type foreign.
Disable all the Ctrl-Alt- shortcuts in GNOME using System/Preferences/Keyboard Shortcuts
Make Alt+F11 mean 'toggle fullscreen mode'







Install elpa by evaluating this code in emacs:




(let ((buffer (url-retrieve-synchronously 
               "http://tromey.com/elpa/package-install.el")))
  (save-excursion
    (set-buffer buffer)
    (goto-char (point-min))
    (re-search-forward "^$" nil 'move)
    (eval-region (point) (point-max)) 
    (kill-buffer (current-buffer))))


Then use elpa:


M-x package-list-packages then i to mark packages, and x to do it.


to install clojure-mode, slime, slime-repl and htmlize





Clone your repository from github:

$ ssh-keygen -t rsa -C "john@woc-desktop.aspden.com"
$ cat ~/.ssh/id_rsa.pub | xclip -sel clip
$ git clone git@github.com:johnlawrenceaspden/hobby-code.git

Make links to .bashrc etc

$ ~/hobby-code/makelinks.bash 







In firefox install adblock plus, xmarks, and video download helper

















No comments:

Post a Comment