Installing Ubuntu without CD and without Network

Previously I used Wubi-installer to install Ubuntu 8.04 on my HTC Shift, but this time I wanted to partition my Hard Drive and use separate partitions for Ubuntu. Here’s what I did…

First, resize the Vista partition: You don’t need Partition Magic or gparted to do this, vista itself can do it. Right click on my computer, select Manage, click on Disk Management, Right click on the partition you want to shrink.

Then create 2 (or more) partitions using the Vista Computer Management console, one should be around 1Gb, which we will use to place the Ubuntu ISO image. Later on, when installation is finished you can use it as a swap partition. In the HTC Shift you must create these two partitions using Vista Disk Management tool, if you do it with Linux you can easily damage the Host Protected Area partition which holds the Vista Recovery (Fn + F3 at boot time), so it is safer to do this with Vista.

Now install Slax on a USB Pendrive. When installed, copy the following files to the PenDrive too:

Now boot using the USB stick (on HTC Shift, Fn+F10 at boot time). Once Slax has booted, use cfdisk to setup your Linux partitions, remember you need to leave a ~1Gb ext3 partition for the ISO.

Format the 1Gb partition as Ext3 (change XX to your partition number):

mke2fs -I 128 -j /dev/hdaXX

the ‘-I 128‘ is to set the inode-size to 128 as grub can’t read bigger inode sizes, and Slax formats to 256 by default.

Mount the partition in /boot:

# mount /dev/hdaXX /boot

Install grub package on Slax:

# cd /mnt/sda1
# installpkg grub-0.97-i486-3.tgz

Copy the files needed to boot Ubuntu installer on the 1Gb partition:

# cp ubuntu-8.04-alternate-i386.iso vmlinuz initrd.gz /boot
# cd /boot ; ln -s . boot

Create the ‘menu.lst’ file for grub:

title Install Ubuntu
root (hdX,Y)
kernel /boot/vmlinuz vga=normal ramdisk_size=14972 root=/dev/rd/0 rw --
initrd /boot/initrd.gz

hdX,Y should be changed to the value matching your partition, in my case it was (hd0,2) which refers to the 1st hard drive ‘hd0′ and the 3rd partition ‘2’.

Now Install grub:

# grub-install /dev/hda

Reboot, and ubuntu installation should start. Remember not to screw the 1Gb partition during the installation, you can safely remove it once ubuntu has been installed.

This entry was posted in gadgets, linux. Bookmark the permalink.

3 Responses to Installing Ubuntu without CD and without Network

  1. annath says:

    Hi POF,
    I were used to use wibu but recently I tried this instalation. Wibu is nice but is slower and from time to time I have to reboot to windows as linux dont find its root filesystem. Typically after system crash. BTW do you suffer from-time-to-time crashes? It is the same in windows and the linux so it seems to be hardware problem. But back to this instalation. It looked well untill I launched the installer. Installer started but then it didnt find an iso image and the instalation had to be terminated. I used ubuntu-8.04.1-alternate-i386.iso renamed to ubuntu-8.04-alternate-i386.iso. Could it be source of the problem? Couldnt you put here link to the right iso file? Thanks a lot.

  2. Pingback: pofHQ » Blog Archive » Linux on HTC Shift

  3. Mark says:

    hi pof
    i have htc shift with vista on it but recently i was thinking of installing linux on it, the thing is suddenly the vista stopped working, so i installed the iso from another computer and burn it, then i tried to install it in the htc but it keep giving me crtc something failed, i’d really appreciate it if u tell me what to do

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>