LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help with no OS booting after install of Ubuntu 9.04 (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-no-os-booting-after-install-of-ubuntu-9-04-a-776283/)

brohan76 12-16-2009 11:14 PM

Help with no OS booting after install of Ubuntu 9.04
 
I have a box with Windoze expee on the first HD. On the 2nd hdd, I have a 2nd hdd that had one windows partition on it. I installed Ubuntu on this 2nd hard drive, and during the installation I told the installer to make a swap partition and O/S partition on this 2nd hard drive. The install went well, I rebooted, and I get:
GRUB loading.
error: no such disk
grub rescue>

When I then type ls I get: (hd0) (hd0,1) (fd0)

When I boot off of the Ubuntu live CD, enter a terminal and type df here is the gist of what I get:

aufs /
udev /dev
/dev/sr0 /cdrom
/dev/loop /rofs
none /dev/shm
tmpfs /tmp
none /var/run
none /var/lock
none /lib/init/rw

When I cd / and type ls I get the "standard" files and directories

I have tried using various grub commands, and I am told grub command not found, and to install it. I follow the error messages suggestion for installing grub, and it says that it can not install grub

When I type "find boot", it says boot not found

somehow I had typed fdisk -l, and it showed all of the partitions, as well as their respective file system (NTFS, NTFS, swap, etc3), but now when I try that command nothing comes up for some reason.


When I try to reinstall, and the partitioning portion comes up I basically see:

/dev/sda1 ntfs (used and free space)
free space 65 mb
/dev/sdb1 ntfs (used and free space)
/dev/sdb2 ext3 (used and free space)
/dev/sdb3 swap (used and free space)
freespace 10479 MB

I have tried to give as much info as I know regarding this given that I am a noob. My guess is that GRUB is installed on the MBR but does not have access to the info it needs, as Linux was not installed in the default manner.

How to I rectify the situation so that when I boot from the hard drive, I get the option of which OS to load, and then after entering my selection, that OS loads?

Thank you in advance!

yancek 12-17-2009 08:47 AM

Are you using the most recent Ubuntu, 9.10? Ubuntu changed to Grub2 with this version so the methods used will be different than earlier, no menu.lst file, etc...

Did you install Grub to the master boot record? If so, which drive? Is that drive set to first boot priority in the BIOS?

First step would be to post which Ubuntu you are using.

Just re-read the post and see you are using 9.04. If the info you posted is correct, your only Linux partition is sdb2 so that would be where your boot files are. You can use your Ubuntu CD to install Grub. Load the CD, open a terminal and run:

sudo grub (enter passwd if asked? get grub prompt)

type: root (hd1,1)
setup (hd1)
quit

This should install Grub to the mbr of your second drive pointing to the remaining Grub files on that drive. You will then need to have the second drive set to first boot priority in BIOS. If you want to install Grub to the mbr of the first drive, change "setup (hd1)" to "setup (hd0)".

Grub command not found is usually because you are not doing it as root (sudo in Ubuntu). The find boot command needs to be prefixed with the root symbol, find /boot. fdisk also needs to be run as root (sudo).

brohan76 12-17-2009 09:29 AM

My mistake, I am using Ubuntu 9.10 desktop. As far as where everything installed with Ubuntu, I have no idea, I did not change anything from any of the defaults. I left everything normal except for the partitioning, when I told it to make the partitions on the 2nd hard drive, leaving on an original NTFS partition. I also left the BIOS settings the same as it had been originally, so I am assuming it is booting of of the 1st hard drive.

Thanks you for being so knowledgeable with the difference in the newest Ubuntu version, otherwise it could have been a mess. What do I do now since I do have Ubuntu 9.10?

Also, in the above post you said boot from the CD, open a terminal, and type sudo GRUB.(my cd boots me into GNOME by default. I did so, and as before, it says sudo: grub: command not found.

brohan76 12-17-2009 09:30 AM

BTW my command prompt is ubuntu@ubuntu:/$

yancek 12-17-2009 04:17 PM

Quote:

I did not change anything from any of the defaults
The default Grub installation would put it in the master boot record of sda, first boot drive. Do you have sda as first boot priority in the BIOS? Check this.

Grub will install its stage1 file to the master boot record of the first drive and the rest of its files will be on the drive/partition with Ubuntu. Do you open the terminal from Appplications tab at the top of your screen. I don't use Ubuntu so I'm not sure where you find it. Did you just Did you type GRUB in caps when you entered it or did you just do that in your post. It won't work at the command if it's in caps.

The only way you would not have Grub in your installation CD is if it was a bad download. Try the suggestion from my last post if you can get grub in the terminal if Ubuntu is on sdb2. The fdisk command needs to be run as root and lower case letters also.


All times are GMT -5. The time now is 04:18 AM.