Install Ubuntu without a livecd or pendrive

Uncategorized

So i decided to upgrade my desktop’s ubuntu..

it had been rocking some version of Ubuntu 11 for a few years.. was time for a change. So i got the latest version (13.10) from the site,

burnt a live dvd and popped it in. nothing happend on boot! after a lot of fiddling i gave up on the live cd route, and decided to use a live usb. thats how i installed it on my Dell XPS earlier this year…

So i created a live USB.. and that didnt work either. Basically the motherboard was so old, it didn’t support usb booting!

Since the wifi card was having issues i decided to try something i’ve never done before: Install Ubuntu directly from the hard drive.

Basically what you do is
1) copy the downloaded cd iso to a specific location
2) make an entry in GRUB2(this only works in GRUB 1.9 onwards) so that you can just boot the iso..

heres how you do it(required basic terminal navigation knowledge.. that i googled)

STEP1 – The Live CD is also known as the “Desktop Installer”. It is the default Ubuntu installation CD. The ISO you downloaded has the name “desktop” in its name copy it somewhere easy to navigate to(later you’ll need to type the address in terminal)

STEP2 – Copy CD/iso contents over to the system using the commands:

mkdir /tmp/install_cd
 mkdir /tmp/installer

 sudo mount disk-image.iso -o loop /tmp/install_cd
 sudo mount /dev/sda1 /tmp/installer

 sudo rsync -a /tmp/install_cd/ /tmp/installer

 sudo umount /tmp/install_cd
 sudo umount /tmp/installer

Replace the name of the ISO to whatever you downloaded and /dev/sda1 with whatever your new partition is(use system monitor to check the disk and partition names).

STEP3 – Edit your grub configuration file

GRUB1 users :
to edit the Grub file as root(so you can save your changes) run this

gksudo gedit /etc/grub.conf

or

gksudo gedit /boot/grub/menu.lst

Edit your grub configuration file to boot from the new partition by adding the lines

title           installer
root            (hd0,0)
kernel          /casper/vmlinuz boot=casper root=/dev/ram ramdisk_size=1048576 rw
initrd          /casper/initrd.gz

the first line after the title tells grub which partition contains the installer. hd0 stands for “first hard disk,” and the 0 following it standards for first partition. You will need to change this if your installer partition is different from /dev/sda1. sdaN becomes (hd0, N-1), sdbN becomes (hd1,N-1) and so on. As you can see, grub starts counting from 0, which can be confusing.

GRUB2 users :
to edit the Grub file as root(so you can save your changes) run this

gksudo gedit /etc/grub.d/40_custom

With Grub2, the bootloader in new installations of 9.10, the procedure is a little different. You should edit the file /etc/grub.d/40_custom and add the lines

menuentry "installer" {
        insmod ext2
        set root=(hd0,1)
        linux /casper/vmlinuz boot=casper root=/dev/ram1 ramdisk_size=1048576 rw
        initrd /casper/initrd.lz
}

Note that Grub 2 counts drives from 0, but partitions from 1, so /dev/sda1 becomes (hd0,1).

STEP4 – Having done that run

update-grub

to rebuild the grub configuration.

Reboot and hold “shift” to see grub(incase its hidden) and select the installer.

for more detailed instructions.. like how to install ubuntu to a different partition etc.. check the page i found this originally – here.

For the entire list of methods available for installing Ubuntu on a problem system, check this comprehensive page.

UPDATE:
hmm.. i knew it all went too smoothly.
Ubuntu 13.10 won’t show me the other partitions..
so i can’t even see them in order to mount manually…
This can be fixed if one has.. PySDM .. which i can’t install without internet..
i can’t install it with the cd.. because ubuntu won’t mount the cd drive! ..

looking into other workarounds now..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s