Life’s an ocean with too much commotion

Boot Toshiba Tecra S3 with Ubuntu 7.10

by koenvereeken on Nov.06, 2007, under Tech

This howto will show you how to boot your upgraded Ubuntu properly on a Toshiba Tecra S3 laptop. Note that this workaround will not work when installing Ubuntu for the first time on your laptop. If so, you will have to change some BIOS settings so that the SATA controller will be recognized as a generic IDE controller. If not, follow this procedure:

When booting a Toshiba Tecra S3 for the first time, it will fail trying to find the SATA harddisk.

A kernel and initrd image has been provided to boot your linux distribution. The initrd image provides a pseudo filesystem (loaded in RAM) which will execute some bash scripts. These bash scripts will do a lot of checks and configuring and load various modules to detect as much hardware as possible needed for booting your linux distribution. The modules that are loaded are specified in the ‘conf’ directory (modules, initramfs.conf) and the ‘/etc/modprobe.d’ directory.

What goes wrong in this case, is that the ‘ata_piix.ko’ module gets loaded before the ‘ahci’ module. In fact, the ‘ata_piix.ko’ module may not be loaded at all. It is a low-level SCSI driver that only needs to be loaded for Intel PIIX/ICH ATA controllers. So what needs to be done is make sure that the ‘ata_piix.ko’ module is unloaded before the ‘ahci.ko’ module gets loaded. This can be done in the bash scripts that are executed in the initrd image.

Follow this procedure to do so:

  1. Boot your Ubuntu distribution with the recovery mode kernel
  2. Wait until the initrd scripts time out. This can take up to 5 minutes. After timeout you will be thrown in a shell, forked by the initram process.
  3. In this shell, execute the following commands:
  4. # modprobe -r ahci
    # modprobe -r ata_piix
    # modprobe ahci
    # mkdir /mnt
    # mount /dev/sda1 /mnt -t ext3
    # chroot /mnt
    # mkdir /tmp/unpacked
    # cd /tmp
    # cp /boot/initrd.img-2.6.22-14-386 initrd.img-2.6.22-14-386.gz
    # gunzip initrd.img-2.6.22-14-386.gz
    # cd /tmp/unpacked
    # cpio -id </tmp/initrd.img-2.6.22-14-386
    # vi /tmp/unpacked/scripts/functions

  5. In this file you will find a function load_modules(). Insert a line on top of this function:
  6. modprobe -r ata_piix 2>/dev/null 1>&2
    modprobe -r ahci 2>/dev/null 1>&2

  7. Save the file and execute the following commands:
  8. # vi /tmp/unpacked/conf/modules

  9. Add the following entry on top of the file
  10. ahci

  11. Save the file and execute the following commands:
  12. # cd /tmp/unpacked
    # find . | cpio -o -H newc | gzip -9 > /boot/initrd.img-2.6.22-14-386.new
    # vi /boot/grub/menu.lst

  13. In this file you have to rename the initrd image filename to the new one:
  14. initrd /boot/initrd.img-2.6.22-14-386.new

  15. Execute the following commands to exit chroot environment, and reboot
  16. # exit
    # reboot

Note: This works for Ubuntu Feisty too.

:, , , , , ,

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!