| Ubuntu This forum is for the discussion of Ubuntu Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-01-2010, 09:21 AM
|
#1
|
|
LQ Newbie
Registered: Nov 2010
Posts: 11
Rep:
|
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 09:23 AM.
Reason: Forgot a detail to mention
|
|
|
|
11-01-2010, 09:39 AM
|
#2
|
|
Member
Registered: Aug 2009
Location: London North West
Distribution: x86_64 Slack 13.37 current : +others
Posts: 459
Rep:
|
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
|
|
|
|
11-01-2010, 09:57 AM
|
#3
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 12,226
|
Quote:
Originally Posted by hughetorrance
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 in terminal. Sometimes the command has to be repeated until Grub finds every OS on your system.
|
|
|
|
11-01-2010, 10:01 AM
|
#4
|
|
LQ Newbie
Registered: Nov 2010
Posts: 11
Original Poster
Rep:
|
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
|
|
|
|
11-01-2010, 10:03 AM
|
#5
|
|
LQ Newbie
Registered: Nov 2010
Posts: 11
Original Poster
Rep:
|
Thanks tobySGD,
I'll try this before!!
|
|
|
|
11-01-2010, 10:13 AM
|
#6
|
|
LQ Newbie
Registered: Nov 2010
Posts: 11
Original Poster
Rep:
|
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 ?
|
|
|
|
11-01-2010, 12:09 PM
|
#7
|
|
Senior Member
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Peppermint
Posts: 3,399
|
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
|
|
|
|
11-01-2010, 12:36 PM
|
#8
|
|
Senior Member
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,125
|
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.
|
|
|
|
11-01-2010, 01:09 PM
|
#9
|
|
LQ Newbie
Registered: Nov 2010
Posts: 11
Original Poster
Rep:
|
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,
|
|
|
|
11-01-2010, 01:51 PM
|
#10
|
|
Senior Member
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,125
|
Quote:
Originally Posted by lucid_dino
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
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:
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 01:53 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:23 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|