Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › installing grub from ubuntu livecd
New Posts  All Forums:Forum Nav:

installing grub from ubuntu livecd

post #1 of 6
Thread Starter 
i am installing xubuntu on an old computer for my grandpa to get on the internet and whatnot. i formatted over windows and everything.. it's going to be solely a linux box. so i stupidly didn't install a bootloader, thinking that since it only has linux, it wouldn't need one. well i do. how can i install grub from the livecd?

i've found a few guides on various websites, but they only tell you how to RESTORE grub, and not how to do a fresh install.
can anyone help?

thanks =)
post #2 of 6
Just reinstall Xubuntu and choose to install the bootloader.
1+8
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Celeron G530 AsRock H61M-VS ASUS 8800 GS 384MB 2x2GB DDR3 1333MHz 
Hard DriveOSMonitorPower
WD Caviar Blue 500GB Gentoo Samsung 226BW HiPro 480W 
  hide details  
Reply
1+8
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Celeron G530 AsRock H61M-VS ASUS 8800 GS 384MB 2x2GB DDR3 1333MHz 
Hard DriveOSMonitorPower
WD Caviar Blue 500GB Gentoo Samsung 226BW HiPro 480W 
  hide details  
Reply
post #3 of 6
from the live cd you should only have to use the setup command from grub menu and it will copy the files to the place specified.
I'm Back
(19 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X6 1055T @3.71 Asus M4A785TD-V EVO Gigabyte GTX 460 1GB 16 GB Corsair XMS 3 
Hard DriveHard DriveHard DriveHard Drive
Kingston V300 SSD Western Digital Caviar Samsung Spinpoint Western Digital Caviar black 
Optical DriveCoolingOSMonitor
Sony CD DVD R/WR Prolimatech Megahalems  Windows 7 x64 Samsung Smart TV 
MonitorKeyboardPowerCase
Hanns G POS Saitek Eclipse II Corsair 750 TX NZXT Source 210 
Mouse
Logitech G700S 
  hide details  
Reply
I'm Back
(19 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X6 1055T @3.71 Asus M4A785TD-V EVO Gigabyte GTX 460 1GB 16 GB Corsair XMS 3 
Hard DriveHard DriveHard DriveHard Drive
Kingston V300 SSD Western Digital Caviar Samsung Spinpoint Western Digital Caviar black 
Optical DriveCoolingOSMonitor
Sony CD DVD R/WR Prolimatech Megahalems  Windows 7 x64 Samsung Smart TV 
MonitorKeyboardPowerCase
Hanns G POS Saitek Eclipse II Corsair 750 TX NZXT Source 210 
Mouse
Logitech G700S 
  hide details  
Reply
post #4 of 6
Thread Starter 
i know i could just reinstall it.. i want to get the experience under my belt of restoring it in the terminal

so would it be something like this?

sudo grub
setup /boot/grub

thanks guys
post #5 of 6
First of all check the partition number you installed xubuntu on. Should be smth like /dev/sda1, or /dev/hda1. I guess you didn't separate /boot from root partition, so in your terminal you'll have to mount that partition and chroot to it (chroot). For example:

sudo mount /dev/sda1 /myxubuntu
sudo chroot /myxubuntu /bin/bash

You will be in your installed xubuntu environment. Now you have do download (if it is not there yet) and setup grub. To download it:

sudo apt-get install grub

You have it, and now all you have to do is configure it.
First of all, check what's in your /boot folder. You must have at least on kernel, also there may be an initrd file. The name of the kernel can be smth like vmlinuz, vmlinux, or kernel. Write somewhere the names of the files. Now open /boot/grub/grub.conf in your favourite editor (let's say nano):

sudo nano /boot/grub/grub.conf

Modify it like in the example below:

default 0 #default selection
timeout 10 #number of seconds till it boots

title=Xubuntu #the name you will see in your grub selection list
root(hd0,0) #hdd number and partition number, zero means first.
kernel /vmlinuz-2.6.25-xubuntu root=/dev/sda1 #kernel and root partition
initrd /initrd-2.6.25-xmth.img
1+8
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Celeron G530 AsRock H61M-VS ASUS 8800 GS 384MB 2x2GB DDR3 1333MHz 
Hard DriveOSMonitorPower
WD Caviar Blue 500GB Gentoo Samsung 226BW HiPro 480W 
  hide details  
Reply
1+8
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Celeron G530 AsRock H61M-VS ASUS 8800 GS 384MB 2x2GB DDR3 1333MHz 
Hard DriveOSMonitorPower
WD Caviar Blue 500GB Gentoo Samsung 226BW HiPro 480W 
  hide details  
Reply
post #6 of 6
I forgot to mention. To setup grub:

sudo grub

and when you'll see "grub>", execute

root (hd0,0)
setup (hd0)
quit
1+8
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Celeron G530 AsRock H61M-VS ASUS 8800 GS 384MB 2x2GB DDR3 1333MHz 
Hard DriveOSMonitorPower
WD Caviar Blue 500GB Gentoo Samsung 226BW HiPro 480W 
  hide details  
Reply
1+8
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Celeron G530 AsRock H61M-VS ASUS 8800 GS 384MB 2x2GB DDR3 1333MHz 
Hard DriveOSMonitorPower
WD Caviar Blue 500GB Gentoo Samsung 226BW HiPro 480W 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › installing grub from ubuntu livecd