Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, 3 November 2009

Ubuntu upgrade woes

After having upgraded my laptop (a Dell Latitude D420) to Ubuntu Karmic Koala, it refused to boot. The normal boot process was only showing the usual splash screen, that only consists in the Ubuntu logo, then switched to a black screen, where nothing was possible anymore -- no switching to a text console, nothing. Damn.


Here's how I fixed that (in the hope that could be useful to someone). I found out, by booting without the splash screen, that the root partition wasn't mounted on boot, which was the cause of all problems. For the record, to boot without the splash screen, you have to select the kernel you want in the grub menu, edit its command-line, and remove the words "quiet splash" from it.


So I booted on the rescue kernel (by selecting it in grub), which gave me a basic busybox shell in RAM. There, I mounted manually my root partition, /dev/sda1, to a newly created directory /grumpf. I moved /grumpf/etc/fstab away and wrote a basic working fstab with the commands:

echo proc /proc proc defaults 0 0 > /grumpf/etc/fstab
echo /dev/sda1 / ext3 defaults,errors=remount-ro 0 1 >> /grumpf/etc/fstab

Then I rebooted. In the grub selection menu, I selected the regular kernel, but edited its command-line: I replaced the part root=UUID=deafbeef... by root=/dev/sda1, actually telling grub to look up the device by symbolic name instead of UUID. At this point the computer successfully booted.


Once there, I could log in as root, edit /boot/grub/menu.lst to make permanent my changes to the kernel command-line, and complete the fstab with appropriate lines for the swap, the cdrom and my /home partition. One last reboot, and voilà, the system was fully functional again.


This doesn't explain why device UUIDs aren't supported in the boot sequence on that hardware, though.

Tuesday, 30 October 2007

Ubuntu, Dell laptop and hard disk power management

There has been some talk those days on laptop hard disk lifespan. See, for example, what Pascal says about it.

So, after some investigation, I saw that on my laptop (Dell Latitude D420) the BIOS doesn't handle an APM value of 255. By default the startup scripts execute hdparm -B 255 /dev/sda (or other devices) and that actually sets the APM value to 128 (as given by hdparm -I /dev/sda | grep Advanced). (I'm using Ubuntu 7.10 -- the script I'm talking about is /etc/acpi/power.sh.)

On the other hand, using -B 254 seems to disable APM. So here's a way to do it, by default, on every boot:

  • Add those lines to /etc/hdparm.conf:
    /dev/sda {
    apm = 254
    }

  • Make /etc/init.d/hdparm run at startup:
    ln -s /etc/init.d/hdparm /etc/rcS.d/S07hdparm

And now the load cycle count reported by SMART remains stable. Which means that hopefully my hard disk will live longer.

Addendum: if you don't use SMART, you should. Install the smartmontools package, enable SMART on your disks with smartctl -s on, and read the smartctl(8) manpage. Optionally, enable the smartd monitoring daemon (via /etc/default/smartmontools).