LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-10-2008, 10:58 AM   #1
rubiconman500
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Rep: Reputation: 0
Grub Issues


I have an older desktop that is running XP SP 1 and Kubununto.
I havent booted up into linux for awhile since I finished my c++ classes for a few semesters. But I booted in this morning just get update it cause i knew that there would be some waiting...

Well I updated and went to restart the computer into windows which in my Grub was the 1st default option...

Well the update changed my menu.lst file and now just my Distros are on there and it delted my XP boot sequence...

I run Kubunuto on my laptop also so I got this from the grub menu on it

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

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

I put sudo'd into kate to edit the menu.lst on the desktop and saved it...
Then I rebooted and went to go to windows.
I got an error of Invalid or ____ execuatable file.

I know my desktop C: from XP is located at sda1 from viewing it in Linux.

Any suggestions? Anything else I can add here to help?
 
Old 04-10-2008, 11:05 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Please post the full menu.lst file.
 
Old 04-10-2008, 11:11 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
It might help to include the output of 'fdisk -l' and the windows menu entry from menu.lst on the desktop.
 
Old 04-11-2008, 12:48 AM   #4
rubiconman500
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Agrouf View Post
Please post the full menu.lst file.
Full menu.lst

# 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=UUID=62dc5c71-a053-44b0-9b9a-1899aef5c864 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

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

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

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) 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 ##





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

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





title Ubuntu, kernel 2.6.20-16-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=62dc5c71-a053-44b0-9b9a-1899aef5c864 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=62dc5c71-a053-44b0-9b9a-1899aef5c864 ro single
initrd /boot/initrd.img-2.6.20-16-generic

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=62dc5c71-a053-44b0-9b9a-1899aef5c864 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=62dc5c71-a053-44b0-9b9a-1899aef5c864 ro single
initrd /boot/initrd.img-2.6.20-15-generic

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

### END DEBIAN AUTOMAGIC KERNELS LIST
 
Old 04-11-2008, 12:54 AM   #5
rubiconman500
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bigrigdriver View Post
It might help to include the output of 'fdisk -l' and the windows menu entry from menu.lst on the desktop.
I did the fdisk -l from just using the konsole (terminal) program and didnt get anything back... Should i be i a certain directory for this?

taylor@taylor-desktop:~$ fdisk -l
taylor@taylor-desktop:~$ fdisk

Usage: fdisk [-l] [-b SSZ] [-u] device
E.g.: fdisk /dev/hda (for the first IDE disk)
or: fdisk /dev/sdc (for the third SCSI disk)
or: fdisk /dev/eda (for the first PS/2 ESDI drive)
or: fdisk /dev/rd/c0d0 or: fdisk /dev/ida/c0d0 (for RAID devices)
...
taylor@taylor-desktop:~$ fdisk -l
taylor@taylor-desktop:~$

__________________________________________

The menu.lst is the one that I ADDED the windows line to after it suddenly dissapeared, thats not default... put that is exactly what is on my laptop running XP SP2 and kubunutu.

___________________________________________

I dont know if this helps but this is where I can view the data from my windows drive...
/media/sda1
 
Old 04-11-2008, 01:08 AM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
If your 'Buntu' CD is a live CD. Boot into a live session and open a terminal and issue these four commands, re-boot. You can also do this from withing 'Buntu' if you can boot into it.
Code:
sudo grub
root (hd0,2)
setup (hd0)
quit
These commands are assuming your Linux root partition is in the third partition and you install grub in the MBR of the first drive.
To find which partition is your Linux root partition, try the command:
Code:
sudo fdisk-l
Grub counts starting from 0, the third partition would be "2", the third drive would be (hd2).

Last edited by Junior Hacker; 04-11-2008 at 01:12 AM. Reason: Added info
 
Old 04-11-2008, 01:26 AM   #7
rubiconman500
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Original Poster
Rep: Reputation: 0
I got it figured out...
I saw on some other forum that they had a boot partition from dell so they had to change it to (0,1) ... like on my laptop with a dell boot partition.

So on my old school desktop I needed (0,0)

I changed that part of the menu.lst and I am back in windows now.

My next question...

How do edit the grub so the default selection is not the top one?
I also read that the reason why it was deleted was because I had it between the begin and end of the debian kernal information... which was the only way I knew to change the default of it was to have it be selected first.
 
Old 04-11-2008, 01:44 AM   #8
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Every time the word "title" appears, becomes an entry. The first one is (0), if the default is set to zero like what your menu.lst shows in the cut-out below, Windows is the default.
Change the (0) to the entry position in the menu.lst that you want as default in the cut-out section displayed below:
Code:
entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
 
Old 04-11-2008, 02:05 AM   #9
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
I just bought a Dell
Quote:
XPS M1530
Intel® Core™ 2 Duo Processor T8300 (2.4GHz/800Mhz FSB, 3MB Cache), Genuine Windows Vista® Ultimate Edition
3GB Shared Dual Channel DDR2 SDRAM at 667MHz (2 Dimms)
For a friend with little computer knowledge, he has money, so I loaded her up nice. Paid $1800.00 +change for it. Pisses me off though, it's got wicked graphics and out-performs my $3500.00 two+ year old XPS Gen 5. What a sweet machine.
 
Old 04-11-2008, 09:51 AM   #10
rubiconman500
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Junior Hacker View Post
Every time the word "title" appears, becomes an entry. The first one is (0), if the default is set to zero like what your menu.lst shows in the cut-out below, Windows is the default.
Change the (0) to the entry position in the menu.lst that you want as default in the cut-out section displayed below:
Code:
entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
OK so from my grub above...
I put windows at the bottom past ## END DEBIAN AUTO....

TITLE appears 6 times above ## END DE....
So my windows entry is #7 = #6 in an array, so would my default number be 6?





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


title Ubuntu, kernel 2.6.20-16-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=62dc5c71-a053-44b0-9b9a-1899aef5c864 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=62dc5c71-a053-44b0-9b9a-1899aef5c864 ro single
initrd /boot/initrd.img-2.6.20-16-generic

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=62dc5c71-a053-44b0-9b9a-1899aef5c864 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=62dc5c71-a053-44b0-9b9a-1899aef5c864 ro single
initrd /boot/initrd.img-2.6.20-15-generic

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

## END D....

title Windows...
 
Old 04-11-2008, 10:17 AM   #11
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
yes indeed
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub issues Sintu Linux - General 7 02-19-2007 08:36 AM
Grub 0.97 issues on slackware - grub-install is very slow, & updating menu.lst fails dieyouspammer Linux - Software 1 02-27-2006 02:06 PM
Grub Issues Archer36 Slackware 2 08-24-2005 11:50 AM
Grub issues ChronusDark Linux - Software 6 03-18-2005 12:59 AM
GRUB issues Teilyr Linux - Newbie 6 10-25-2003 08:20 PM


All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration