LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   GRUB is not configured correctly after installing Kubuntu (https://www.linuxquestions.org/questions/linux-software-2/grub-is-not-configured-correctly-after-installing-kubuntu-489448/)

9a3eedi 10-04-2006 02:05 PM

GRUB is not configured correctly after installing Kubuntu
 
If anyone of you recalls from my last thread, I was considering on whether to reinstall my corrupted SuSE or to format the partition and install Kubuntu. I decided on the latter, so I downloaded an AMD64 build DVD of Kubuntu, burnt it, booted it up, and attempted to install it on my old linux partition.

Everything seems to have gone well, until I had to reboot it. When I reboot it, I get a bootloader menu which is GRUB. I tried running Kubuntu, but it doesn't mount the partition. I tried running Windows, but it gives me the message that NTLDR is missing (which I know isn't because I never touched it).

Right now I'm on the liveCD of Kubuntu (don't know why.. I think I'll boot Knoppix now), and I'm writing this post in desperation. I don't know what to do and I hope somebody helps me out as soon as possible.

and I do NOT want to format my whole PC .___.

pljvaldez 10-04-2006 06:26 PM

Okay, calm down. This is usually fixable. From your live CD, give us the output of fdisk -l (that's L, not 1). This should print the disk geometry, number of partitions, etc.

Also, if you know which drive contains your kubuntu install, mount it and navigate to /mnt/kubuntu/boot/grub (NOT just /boot/grub, because that would be the LiveCD's /boot directory). Post the contents of the menu.lst file.

Or if you're good at following directions without any further assistance from us, follow B5 of this post. Just change /dev/hda4 and /dev/hda to the correct partition/drive where you installed Kubuntu.

9a3eedi 10-05-2006 06:33 AM

The output of fdisk -l:

Code:

Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1              1        4569    36700461  83  Linux
/dev/hda2            4570        4961    3148740  82  Linux swap / Solaris

Disk /dev/hdb: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hdb1  *          1        3649    29310561    7  HPFS/NTFS

Disk /dev/sda: 150.0 GB, 150038863360 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1      18240  146512768+  7  HPFS/NTFS

Disk /dev/sdc: 524 MB, 524288000 bytes
16 heads, 32 sectors/track, 2000 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1  *          1        1999      511728    b  W95 FAT32

/dev/sdc is my flash disk.
/dev/sda is a SATA hard disk which contains the windows partition
/dev/hda is my Linux hard disk which contains an ext3 parition and a swap partition
/dev/hdb is just a normal NTFS hard disk


contents of /boot/grub/menu.lst in my linux partition

Code:

# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default                0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout                10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title                Windows 95/98/NT/2000
# root                (hd0,0)
# makeactive
# chainloader        +1
#
# title                Linux
# root                (hd0,1)
# kernel        /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/hda1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title                Ubuntu, kernel 2.6.15-26-amd64-generic
root                (hd0,0)
kernel                /boot/vmlinuz-2.6.15-26-amd64-generic root=/dev/hda1 ro quiet splash
initrd                /boot/initrd.img-2.6.15-26-amd64-generic
savedefault
boot

title                Ubuntu, kernel 2.6.15-26-amd64-generic (recovery mode)
root                (hd0,0)
kernel                /boot/vmlinuz-2.6.15-26-amd64-generic root=/dev/hda1 ro single
initrd                /boot/initrd.img-2.6.15-26-amd64-generic
boot

title                Ubuntu, memtest86+
root                (hd0,0)
kernel                /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title                Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title                Microsoft Windows XP Professional
root                (hd2,0)
savedefault
makeactive
map                (hd0) (hd2)
map                (hd2) (hd0)
chainloader        +1


syg00 10-05-2006 07:33 AM

Just for completeness, let's also see the (hard-disk) /boot/grub/device.map

9a3eedi 10-05-2006 07:37 AM

Quote:

Originally Posted by syg00
Just for completeness, let's also see the (hard-disk) /boot/grub/device.map

there you go
Code:


(hd0)        /dev/hda
(hd1)        /dev/hdb
(hd2)        /dev/sda
(hd3)        /dev/sdf


syg00 10-05-2006 09:02 AM

For the Windoze issue, I'd be looking to ensure that ntldr was in fact on /dev/sda1. What about /dev/hdb1 maybe ???. At the grub menu, select the 'doze entry, and hit the "e" key. Change all the hd2 to hd1, (hit <enter> for each separate line), then enter "boot", and see what happens.
Quote:

Originally Posted by 9a3eedi
When I reboot it, I get a bootloader menu which is GRUB. I tried running Kubuntu, but it doesn't mount the partition.

What does this mean - exactly ???.
Error 17, or something else ???.

9a3eedi 10-05-2006 11:49 AM

Quote:

Originally Posted by syg00
For the Windoze issue, I'd be looking to ensure that ntldr was in fact on /dev/sda1. What about /dev/hdb1 maybe ???. At the grub menu, select the 'doze entry, and hit the "e" key. Change all the hd2 to hd1, (hit <enter> for each separate line), then enter "boot", and see what happens.

I'm pretty sure that ntldr is in fact in sda1 (which is my windows partition), as seen in this snapshot

http://i5.photobucket.com/albums/y15.../snapshot1.png

Quote:

What does this mean - exactly ???.
Error 17, or something else ???.
No it just gives me exactly the same error message:

Cannot Mount Partition

but I can't remember whether there was an error number with it or not.

9a3eedi 10-06-2006 10:19 AM

bbump

i desperately need to boot into my windows partition

syg00 10-06-2006 05:43 PM

Well, why didn't you say so earlier ???.
Check M$ofts site - they have pages with this info.

The standard answer to this is to boot the Windows CD, hit "r" when it tells you, and from Recovery Console run fixmbr.
This will replace the bootloader (grub in your case) with the M$oft one. You may also find you need to run fixboot (from recovery console) to get around the "ntldr not found".

9a3eedi 10-06-2006 05:52 PM

Quote:

Originally Posted by syg00
Well, why didn't you say so earlier ???.
Check M$ofts site - they have pages with this info.

The standard answer to this is to boot the Windows CD, hit "r" when it tells you, and from Recovery Console run fixmbr.
This will replace the bootloader (grub in your case) with the M$oft one. You may also find you need to run fixboot (from recovery console) to get around the "ntldr not found".

umm I already said so.

and while this solution would allow me to boot windows, it wouldn't allow me to boot my freshly installed kubuntu, now would it...

pljvaldez 10-06-2006 05:58 PM

It seems like it should be working. Maybe try reordering some of the terms like this
Code:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title                Microsoft Windows XP Professional
rootnoverify                (hd2,0)
map                (hd2) (hd0)
map                (hd0) (hd2)
chainloader        +1
makeactive
boot


9a3eedi 10-07-2006 02:55 AM

Quote:

Originally Posted by pljvaldez
It seems like it should be working. Maybe try reordering some of the terms like this
Code:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title                Microsoft Windows XP Professional
rootnoverify                (hd2,0)
map                (hd2) (hd0)
map                (hd0) (hd2)
chainloader        +1
makeactive
boot


I attempted doing so, but it still doesn't work. NTLDR is still.. "missing" when it's not, as I've shown you a couple of posts ago.

I also tried booting kubuntu one more time, and it gives me the same error message, but I would like to add that it was error number 17. The more information the better I suppose. Plus, the messages state that the file system type is unknown, so maybe this also has some relevance.

9a3eedi 10-08-2006 07:27 AM

bump. I need to solve my problem ASAP

9a3eedi 10-09-2006 08:55 AM

bump again. .______.


All times are GMT -5. The time now is 06:09 PM.