LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB Problem, bootloader messy (https://www.linuxquestions.org/questions/linux-newbie-8/grub-problem-bootloader-messy-469378/)

akurashy 07-31-2006 09:45 AM

GRUB Problem, bootloader messy
 
Important note: I'm using ubuntu dapper a bit tweaked. I asked in ubuntu forums for help but no one have come....


Okay guys, I really need a hand here

I installed windows today in another partition, MBR took over , this is how I messed up

Right now it's a miracle i'm logged in to my ubuntu partition, i've been playing with lady luck for a while

I installed GRUB again but the problem is
root (hd0,1) gives me "can't mount"
then i tried editing with (hd0,2) which worked
then noticed that it didn't work , then noticed that the hda mounting said "2" and changed it to "3" and it started to boot

as you see i have a mess right now

i want to install my GRUB correctly and flawless, knowing that my linux partition is safe i'm glad because i have a lot of data here

my fstab
Quote:

david@akulinux:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0

and this is my menu.lst

Quote:

david@akulinux:~$ cat /boot/grub/menu.lst
# menu.lst - See: grub(, info grub, update-grub(
# grub-install(, grub-floppy(,
# 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'.
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/hda2 ro

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

## 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 ##

splashimage=(hd0,1)/boot/grub/default-splash.xpm.gz

title Ubuntu, kernel 2.6.17
root (hd0,1)
kernel /boot/vmlinuz-2.6.17 root=/dev/hda2 ro quiet splash
initrd /boot/initrd.img-2.6.17
savedefault
boot

title Ubuntu, kernel 2.6.17 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.17 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.17
boot

title Ubuntu, kernel 2.6.15-26-k7
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-26-k7 root=/dev/hda2 ro quiet splash
initrd /boot/initrd.img-2.6.15-26-k7
savedefault
boot

title Ubuntu, kernel 2.6.15-26-k7 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-26-k7 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.15-26-k7
boot

title Ubuntu, kernel 2.6.15-23-k7
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-23-k7 root=/dev/hda2 ro quiet splash
initrd /boot/initrd.img-2.6.15-23-k7
savedefault
boot

title Ubuntu, kernel 2.6.15-23-k7 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-23-k7 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.15-23-k7
boot

title Ubuntu, kernel 2.6.15-22-k7
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-22-k7 root=/dev/hda2 ro quiet splash
initrd /boot/initrd.img-2.6.15-22-k7
savedefault
boot

title Ubuntu, kernel 2.6.15-22-k7 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-22-k7 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.15-22-k7
boot

title Ubuntu, kernel 2.6.15.4
root (hd0,1)
kernel /boot/vmlinuz-2.6.15.4 root=/dev/hda2 ro quiet splash
initrd /boot/initrd.img-2.6.15.4
savedefault
boot

title Ubuntu, kernel 2.6.15.4 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.15.4 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.15.4
boot

title Ubuntu, memtest86+
root (hd0,1)
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/hda1
title Arch Linux
root (hd0,3)
kernel /boot/vmlinuz26 root=/dev/hda4 ro
initrd /boot/initrd26.img
savedefault
boot
i don't know how i did it but i had to edit this

root (hd0,2)
kernel /boot/vmlinuz-2.6.15-26-k7 root=/dev/hda3 ro quiet splash
initrd /boot/initrd.img-2.6.15-26-k7
savedefault
boot

i'm actually very nervous right now , to be honest is my first time playing with GRUB and i don't want to make any mistakes >_<
anyway i hope anyone here can help me

if there is a way to to re-install GRUB with the right things.. please post it :)

jeelliso 07-31-2006 01:10 PM

I'm assuming you've re-installed Grub onto the MBR and this is how you've booted into your computer. If not, then you need to follow the instructions on the Grub website to re-install it.

What is the layout of your hard drive? I'm trying to piece it together from the menu.lst. More specifically, what partition is your kernel sitting on (i.e., /dev/hda1, /dev/hda2, etc.); what partition is your root file system sitting on (this may or may not be the same partition as your kernel); what partition is your windows installation on?

Please post the actual errors in their entirety, as it will be diagnose the problem. Please also post the contents of your /boot directory.

~Justin

akurashy 07-31-2006 04:06 PM

I believe my kernel is on /dev/hda3

Actually let me explain more

What i did was,

I inserted the live cd
I went to terminal
typed sudo grub
typed 'root (hd0,1)' (if im not mistaking)
typed 'setup (hd0)'
it said some things and i restarted

GRUB did install but when i looked over again it didn't want to boot, so like i said above in the other post i had to change a few numbers

the partition of my windows.. i don't know well.. i have to check due to i'm a bit confused of what have happened

jeelliso 07-31-2006 04:43 PM

If it booted to the Grub screen at all (regardless of whether it booted all the way) then you probably installed Grub correctly. You can always go back and change the boot options if they don't work right. I promise that there is nothing you can do by editing the boot options that will lock you out of your computer, so don't worry about that. You will always be able to get to the Grub boot screen again.

Unfortunantly, I'm not sure what you need help with? Sorry if I've missed the point, please ask your question again.

~Justin

louieb 08-01-2006 06:16 PM

it looks to me that you your mbr setup correctly to bring up the grub boot loader. that means your menu.lst aka grub.conf is messed up this is a common problem. I have found the the only operating system that will boot ok is the last one installed.
The only help i have is just to point out that grub numbers partitions and disks starting with 0 (zero) and linux numbers partitions starting with 1 (one). What that means is the first partition
in grub is (hd0,0) and
in linux is /dev/hda1.
Just looking at your menu.lst and fstab i would say ubuntu is installed on the second partition (hd0,1) grub aka /dev/hda2. but you say it is on the 3rd partition.
It looks like at this point you can boot to ubuntu but you cant boot windows. is that correct.

akurashy 08-01-2006 09:02 PM

Yup, correct, i'm confused because the numbers .. well mostly because i just got all confused

but now i'm settling down , trying to do it calmly, it looks like i did something wrong by inserting root (hd0,1) or who knows,

the problem i got confused was because of the partitioners

first it said some numbers then after i installed windows, the numbers changed or something. i think its just me of course if they changed then /hda3 wouldn't be working...

lets see if i figure out this =/


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