LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices



Reply
 
Search this Thread
Old 11-01-2010, 10:21 AM   #1
lucid_dino
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Rep: Reputation: 0
Grub : Lost my windows partition, can't find menu.lst in /boot/grub.Someone can help?


Hi everyone,
I got ubuntu 10.04 lucid lynx along with windows (dual boot) and using Grub.
On my computer, I have my C:/ (programs) and D:/ (data).
I've never used my D:/ before that day that I've lost my windows partition on my grub menu.
I usually use my D:/ with windows. The first time I used my D:/ to store data with linux, I lost my windows option in my grub menu. I'm not sure what I did wrong but I do want to restore my windows option in my grub menu.

After "fdisk -l",
/dev/sda1* 1 3188 7 HPFS/NTFS
/dev/sda2 3189 6642 f W95 Etendue (LBA)
/dev/sda3 6643 9729 83 Linux
/dev/sda5 3189 5070 7 HPFS/NTFS
/dev/sda6 6504 6642 82 Linux swap / Solaris
/dev/sda7 5070 6437 83 Linux
/dev/sda8 6437 6503 82 Linux swap / solaris

I checked in /boot/grub and there is no menu.lst to modify.
Someone knows how I can get back my windows option in my grub menu ?

Thanks a lot !!

Last edited by lucid_dino; 11-01-2010 at 10:23 AM. Reason: Forgot a detail to mention
 
Old 11-01-2010, 10:39 AM   #2
hughetorrance
Member
 
Registered: Aug 2009
Location: London North West
Distribution: x86_64 Slack 13.37 current : +others
Posts: 459

Rep: Reputation: 59
1/ you need to mention what GRUB you are using,is it legacy or GRUB2. I expect its GRUB2 so its not the /boot/grub/menu.lst you modify to add your windows partition its the /boot/grub/grub.conf
2/ you dont need two swap files,so you can remove one of them,the one not in use.

3/ more on GRUB http://www.google.co.uk/#sclient=psy...eafc35fdbce132
 
Old 11-01-2010, 10:57 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Quote:
Originally Posted by hughetorrance View Post
1/ you need to mention what GRUB you are using,is it legacy or GRUB2. I expect its GRUB2 so its not the /boot/grub/menu.lst you modify to add your windows partition its the /boot/grub/grub.conf
Please don't edit the grub.conf file, your changes will be overwritten the next time your kernel, one of the drivers or Grub is updated.

It is a known issue (at least for me) that Grub2 sometimes "looses/misses" an OS at install time or when an update makes it necessary to update your grub.conf. This can most of the times be solved by a simple
Code:
sudo update-grub
in terminal. Sometimes the command has to be repeated until Grub finds every OS on your system.
 
Old 11-01-2010, 11:01 AM   #4
lucid_dino
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks hughetorrance for your quick reply,

I got grub2 (Gnu grub 1.98-ubuntu 7), so I have grub2.
Here is my output of grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 9bce6d7d-6e58-4398-b7be-ccf0ed0451ac
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 9bce6d7d-6e58-4398-b7be-ccf0ed0451ac
set locale_dir=($root)/boot/grub/locale
set lang=fr.UTF-8
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 9bce6d7d-6e58-4398-b7be-ccf0ed0451ac
linux /boot/vmlinuz-2.6.32-25-generic root=UUID=9bce6d7d-6e58-4398-b7be-ccf0ed0451ac ro quiet splash
initrd /boot/initrd.img-2.6.32-25-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 9bce6d7d-6e58-4398-b7be-ccf0ed0451ac
echo 'Loading Linux 2.6.32-25-generic ...'
linux /boot/vmlinuz-2.6.32-25-generic root=UUID=9bce6d7d-6e58-4398-b7be-ccf0ed0451ac ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-25-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 9bce6d7d-6e58-4398-b7be-ccf0ed0451ac
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=9bce6d7d-6e58-4398-b7be-ccf0ed0451ac ro quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 9bce6d7d-6e58-4398-b7be-ccf0ed0451ac
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=9bce6d7d-6e58-4398-b7be-ccf0ed0451ac ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 9bce6d7d-6e58-4398-b7be-ccf0ed0451ac
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 9bce6d7d-6e58-4398-b7be-ccf0ed0451ac
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu, kernel 2.6.20-16-generic (on /dev/sda3)" {
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set d9eb7995-d340-42fe-aca3-c7194a04059e
linux /boot/vmlinuz-2.6.20-16-generic root=UUID=d9eb7995-d340-42fe-aca3-c7194a04059e ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
}
menuentry "Ubuntu, kernel 2.6.20-16-generic (recovery mode) (on /dev/sda3)" {
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set d9eb7995-d340-42fe-aca3-c7194a04059e
linux /boot/vmlinuz-2.6.20-16-generic root=UUID=d9eb7995-d340-42fe-aca3-c7194a04059e ro single
initrd /boot/initrd.img-2.6.20-16-generic
}
menuentry "Ubuntu, kernel 2.6.20-15-generic (on /dev/sda3)" {
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set d9eb7995-d340-42fe-aca3-c7194a04059e
linux /boot/vmlinuz-2.6.20-15-generic root=UUID=d9eb7995-d340-42fe-aca3-c7194a04059e ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
}
menuentry "Ubuntu, kernel 2.6.20-15-generic (recovery mode) (on /dev/sda3)" {
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set d9eb7995-d340-42fe-aca3-c7194a04059e
linux /boot/vmlinuz-2.6.20-15-generic root=UUID=d9eb7995-d340-42fe-aca3-c7194a04059e ro single
initrd /boot/initrd.img-2.6.20-15-generic
}
menuentry "Ubuntu, memtest86+ (on /dev/sda3)" {
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set d9eb7995-d340-42fe-aca3-c7194a04059e
linux /boot/memtest86+.bin
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###


Do you know how to modify this file to gat back my windows option in my grub menu ?
Thanks again
 
Old 11-01-2010, 11:03 AM   #5
lucid_dino
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks tobySGD,
I'll try this before!!
 
Old 11-01-2010, 11:13 AM   #6
lucid_dino
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Original Poster
Rep: Reputation: 0
I tried sudo update-grub a couple times, and got that output in my terminal(each time):
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-25-generic
Found initrd image: /boot/initrd.img-2.6.32-25-generic
Found linux image: /boot/vmlinuz-2.6.32-24-generic
Found initrd image: /boot/initrd.img-2.6.32-24-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu 7.04 (7.04) on /dev/sda3
done

And I still don't have my windows option in grub.
Someone has another suggestion ?
 
Old 11-01-2010, 01:09 PM   #7
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,111

Rep: Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816
In your initial post, you indicate you are using Ubuntu 10.04.
In your last post, the output from sudo update-grub shows

Quote:
Found Ubuntu 7.04 (7.04) on /dev/sda3
so you have Ubuntu 7.04 on sda3. Where is Ubuntu 10.04? Did you run the update command from sda3? Ubuntu 7.04? Your grub.cfg file shows Ubuntu 10.04 on (hd0,7), sda7. Your grub.cfg file also shows 4 different kernels.

If you have 7.04 and 10.04 installed, boot 10.04 and run the command. If that fails, you may have to re-install grub. I haven't used Grub2 but you could check this tutorial for detailed information:

http://www.dedoimedo.com/computers/grub-2.html
 
Old 11-01-2010, 01:36 PM   #8
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 288Reputation: 288Reputation: 288
If you do still have Ubuntu 7.04 installed, get rid of it. Ubuntu 7.04 reached end of life ages ago, and it is no longer getting updates.
 
Old 11-01-2010, 02:09 PM   #9
lucid_dino
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Original Poster
Rep: Reputation: 0
I run linux with 10.04.

What is the best way to get rid of 7.04 without injuring linux 10.04 ?

I'm still lokking to retrieve my windows partition, ..if someone knows how

Thanks,
 
Old 11-01-2010, 02:51 PM   #10
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 288Reputation: 288Reputation: 288
Quote:
Originally Posted by lucid_dino View Post
What is the best way to get rid of 7.04 without injuring linux 10.04 ?
You could simply delete the partition using GParted. Then use GParted to grow one of the contiguous partitions into the unallocated space. Or install another distro to the partition used by 7.04. Or reformat that partition and use it to store data. The choice is yours.
Quote:
Originally Posted by lucid_dino View Post
I'm still lokking to retrieve my windows partition, ..if someone knows how
You can create a custom boot file for booting Windows in the /etc/grub.d/ directory. For reference, here is my custom boot file for booting WindowsXP using grub2 from Lubuntu 10.10:
Code:
echo "Adding WindowsXP on /dev/sda1" >&2
cat << EOF
menuentry "WindowsXP on /dev/sda1" {
        set root=(hd0,1)
        chainloader +1
}
EOF
I named the file 33_WindowsXP so it would show up after 31_Slackware and 32_Salix.
Be sure to make the file executable, then run:
Code:
sudo update-grub
in order to update your boot/grub/grub.cfg file.
See this for the details:
https://help.ubuntu.com/community/Grub2
And specifically for custom boot entries:
https://help.ubuntu.com/community/Gr...Menu%20Entries

NOTE: The first part of the file:
Code:
echo "Adding WindowsXP on /dev/sda1" >&2
cat << EOF
is not really necessary. It just provides some visual feedback about what grub2 is doing. I got that from another tutorial that seems to have vanished from: https://wiki.ubuntu.com/
What version of Windows are you using???

Last edited by tommcd; 11-01-2010 at 02:53 PM.
 
  


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
[SOLVED] find: `/boot/grub/menu.lst': No such file or directory TheIndependentAquarius Linux Mint 27 10-23-2010 10:01 PM
[SOLVED] lost grub menu after windows installation & forgot to backup menu.lst jesman1 Linux - Kernel 4 08-13-2010 12:57 AM
grub menu.lst Won't boot Windows XP tschima Solaris / OpenSolaris 2 07-23-2008 09:35 PM
Lost boot/grub/menu.lst MRDucks Linux - Newbie 12 12-17-2005 02:44 PM
Grub - how do I change which partition is used to find menu.lst nickhen Linux - General 1 01-24-2005 02:48 PM


All times are GMT -5. The time now is 12:15 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration