Tuesday, June 28, 2011

Installing Ubuntu 11.04 from Hard Disk

I run linux on an old PC, which can't boot from USB yet, and I'm tired of burning a CD-R(W) each time I want to reinstall the system with another version. I could just upgrade the old system, but sometimes I want to do a clean install.

I found some information on these pages, but it didn't work for me (and it looks like I am not the only one).

I followed most of the instructions from the first link, but the installer couldn't mount the iso.

Here's how I managed after all:

You need 2 partitions.

1. A parition that contains an old Ubuntu installation (7.10).

Copy vmlinuz and initrd.gz from directory "install" of the iso to directory "/new" of this partition. Add these lines to the end of /boot/grub/menu.lst:

title Install Ubuntu
root (hd0,0)
kernel /new/vmlinuz
initrd /new/initrd.gz


This partition will be replaced by the installer.

2. A partition that is an exacy copy of the iso

I placed this partition on a second drive, so I could let the installer use the entire first disk.

Copy the contents of the iso to the second partition by executing:
dd if=ubuntu-11.04-server-i386.iso of=/dev/sdb6
(replace with applicable device)

Note that this creates a partition with the same format as the iso (iso9660). I figured that's the problem with other methods which create an ext3 or fat partition and use rsync to fill it with the contents of the iso.

Reboot and select the new grub entry. Proceed with the installation until you see the message "Detect and mount CD-ROM". Open a new shell (Ctrl-Alt-F2) and replace the physical cdrom drive with the second partition:

rm /dev/sr0
ln -s /dev/sdb6 /dev/sr
0

(replace with applicable devices)

Then switch back to the original screen (Ctrl-Alt-F1) and choose to retry. All should go smoothly from there.

Good luck !

0 Comments:

Post a Comment

<< Home