Saturday, June 18, 2011

EeePC 901 almost back to normal

If ever I get a serious illness, I just hope I can experience something similar to the spectacular recovery I saw this week in my netbook.
Just a few days ago, I was almost sure its time had come.
Now, I have Grub2 as the bootloader booting Haiku, Ubuntu 11.04 and LinuxMint 11 and everything is working almost normally.
Even the incidence of non-functioning keyboard and touchpad has become very, very rare.
The only real persistent anomaly is that the BIOS always opens after the initial EeePC page but this creates few, if any, problems.

I did a lot of playing around today, so it's best to summarize what I did in the following points:

1. As I initially couldn't find how to install Grub2 to /dev/sda, I used an older version of Gparted (4.9) which has an easily accessible network connection. Actually, I think the reason I couldn't install anything to the MBR of /dev/sda was because I installed Haiku to sda (/dev/disk/ata/master/1/raw) rather than to a partition (/dev/disk/ata/master/1/0).
To do the grub install to /dev/sda from Gparted, I used the following commands:

# mount /dev/sdb1 /mnt
# mount --bind /dev /mnt/dev
# mount --bind /proc /mnt/proc
# mount --bind /sys /mnt/sys
# chroot /mnt
# update-grub
# grub-install --force /dev/sdb1
# update-grub

Without the --force switch, the grub-install errored out because Gparted doesn't like putting bootloaders outside of the mbr.
With the bootloader installed in /dev/sdb1, I could rely on BootManager (in /dev/sdb mbr) I was able to boot in to Ubuntu using BootManager.
Once in Ubuntu, I deleted everything on the /dev/sda disk and then used grub-install (without --force) to install Grub2 to the mbr of the first disk.

2.
With Grub installed, I rebooted expecting the grub menu, but rather a BootManager menu appeared.
I then tried to remove the Haiku bootloader from the mbr of the second disk using this command
# dd if=/dev/null of=/dev/sdb bs=446 count=1 ### do NOT use this command as it's wrong

However, even then after a reboot, I got the BootManager menu.
This unexpected behaviour resulted from two mistakes as explained in this thread that I started.
There were two problems:
i) The above dd command contains a serious error and should be
# dd if=/dev/zero of=/dev/sdb bs=446 count=1

ii) For some reason, I had inadvertently gone to BIOS and changed the second ssd (/dev/sdb) to be the PRIMARY boot disk. So, on boot, it saw only BootManager.
Both problems were easily rectified.

3.
I should mention that I used the boot_info_script to help me diagnose my problems in booting. I was even able to use this from Gparted because it looks at all partitions and describes their bootability as well as problems, if any.

4.
Despite this progress, the Grub-menu still didn't appear. I found I had to comment out the line GRUB_HIDDEN_TIMEOUT=0 in /etc/default/grub. However, I'm not totally sure if it's necessary.
Post #2 in this thread provides a somewhat different method to achieve the same thing.

5.
Then I installed LinuxMint 11 on two partitions (/ and /home) on the large disk from a USB key I made from the iso and StartUpDesk Creator on another computer.
In contrast to the problems I had with the Ubuntu 11.04 USB-key (actually, it was the very same key), the LinuxMint key behaved immaculately and the install was smooth.

No comments:

Post a Comment