Repair Samsung NC10 MBR

I removed Ubuntu from a Samsung NC10 yesterday, now the F4 recovery option doesn’t work. Please excuse the lack of screen shots on this Howto but I couldn’t think how to capture from the recovery manager and camera shots look rubbish.

It would appear that Samsung uses a custom Master Boot Record (MBR) – so for Grub all is well because you can choose to boot into the recovery partition and away you go. However if you have followed any of the usual guides to removing grub (such as running an XP CD to a recovery console and typing fixmbr) F4 will not launch the restore tool.

System Rescue CD is a great tool to have handy on a USB key. You can, so booting into it run this command:

fdisk /dev/sda

Now pressing “p” should show you that the recovery partition is 1, so type “a” then “2″, “a” then “1″ to make it bootable. Now write the partition table by typing “w” then reboot. At this point you will boot into the recovery manager and be able to recover but the F4 key will not still not be available at boot and of course trying to create a backup will not work either (as Windows will be booted on restart).

Once Samsung Recovery Manager III has loaded up, press Ctrl+Alt+F10 – I had no idea there was a management mode until I read this page (French) but be aware its only available from the recovery partition. It asks for a password – “secos” (without the quotes). Once in management mode, click the “Image” tab and select “Export” then “Select Location”, I used “D:\”. Click “Start” and accept the dialogue box that comes up. This is a backup of the recovery partition.

Once this stage is finished, select the “Tools” tab, insert a spare USB stick and click “Admin Tool USB”. It will format the USB stick and then install some utilities. It takes a couple of minutes. Once finished click the close button in the top right and it’ll ask if the computer should be turned off – say yes.

Boot with the USB key we just made, bringing you to a completely different recovery menu. Click “MBR Fix” and then close the application.

Now when you reboot you’ll notice that the MBR has been repaired and F4 once again boots into Recovery Manager III.

Compaq CQ10 failed BIOS update

A friend brought me a Compaq CQ10 over earlier. It seems it lost power during a Softpaq BIOS update. Initially the screen was booting to the HP BIOS recovery screen, attempting to rewrite and failing around 10%. I tried a few things and nothing worked, until the owner mentioned they’d upgraded the RAM.

Sure enough, it was a different size and type to the original specification so I refitted a 1 Gb 666MHz stick I had lying around from a previous upgrade and rebooted.

This time we re-flashed, verified and rebooted. Then it kept repeating this cycle so I took off the back panel (use the orange latch visible when the battery is removed) and removed the CMOS battery. After a short pause (30 seconds or so) I put it back and rebooted. This time there was an error message about the CMOS settings (unsurprisingly) and it rebooted.

However this time we got the Compaq BIOS boot screen, so I hit the escape key to enter BIOS. Then hit F9 to load default values, accept it and hit F10 to save values and hey presto the system is back up and running.

Bash

Two things that improve my bash productivity – stopping the cursor keys inserting characters in vim and history search in bash.

Edit ~/.vimrc or /etc/vim/vimrc (for system wide) and add turn off vi compatibility:

set nocompatible

The latter can be improved by editing ~/.inputrc (or /etc/inputrc for everyone). Pressing the up key scrolls through all the commands you’ve typed but by adding:

"\e[A":history-search-backward
"\e[B":history-search-forward

You can type the first letter or two and get the command you need, so if you typed “mysql -u root -p” last Tuesday but can’t remember the options, typing “my” and pressing the up key will find it.

Watch TV with VLC and a Freecom DVB-T Stick

One of the things I need my Aspire One to do is watch TV.  When you’re away, it’s nice to be able to watch a little TV.  I bought a Freecom DVB-T USB stick years ago and have always had success under Linux.  It’s small, sensitive and selective.

I was surprised, especially on Ubuntu, how easy it was to setup.

My netbook runs Arch, so I installed it on that and my Dell 1545 running Ubuntu 9.04.
Continue reading

Install Arch Linux on an Aspire One

I recently decided to reinstall a perfectly good install of Arch on my Aspire One because someone said they couldn’t get it to work. I don’t know why this install was more troublesome than the last but it was. I’m not taking any credit here – this information is available on the Arch Wiki, its more to jog my memory for next time. Continue reading

Building PDF from Ubuntu Documentation

People frequently ask for PDF versions of the Ubuntu System Help. We have a toolchain to build them but why not do it yourself?

This is true of any DocBook – dblatex is in the Ubuntu repositories and can transform DocBook in to many formats, the default being PDF.

Usually it is as simple as:

dblatex filename.xml

To generate filename.pdf. Most errors are easy to rectify because dblatex calls other tools and you can step through some (such as pdflatex).

However if you get an error along the lines of:

Overfull @hbox (20.76302pt too wide)

Well that is a bit of a pain. The prescribed wisdom is that something (usually a ulink) is just really too long, such as one of those really long URLs. In the case of DocBook, more often than not it’s a table that it just cannot render – so keep them simple!