CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Lounge

correction of Grub after installing Windows XP and 8

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree6Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2013, 14:54
Default correction of Grub after installing Windows XP and 8
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
Hi all after a while!
I've read many instructions about correcting boot list after installing Windows after Linux(here Ubuntu 12.04) like this link:http://www.dedoimedo.com/computers/grub.html
but in doing this command:
Code:
find /boot/grub/stage1
it syas that this file doesn't exist and really it isn't there a file with name stage1 in the folder.
I want to know where boot loader file is on the hard disk(whats the number of partition exactly)
this is the error:
Code:
grub> find /boot/grub/stage1
find /boot/grub/stage1

Error 15: File not found
grub>
and does it recognize the Windows's after correction(of Grub)?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by wyldckat; December 8, 2013 at 14:56. Reason: removed text format of whited-out code
immortality is offline   Reply With Quote

Old   December 8, 2013, 15:15
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ehsan,

Why didn't you install Windows XP and 8 first and Ubuntu as the last one? It would have avoided having this problem. Anyway, I guess it's too late now.

OK, so lets try and fix this. In theory, since you are using Ubuntu 12.04, you are no longer using Grub version 1, you are using Grub version 2. Therefore, that page is not the correct one to follow, it's the other one that it refers to at the beginning.

Problem is that the other page is really complex to follow.
Therefore, you should follow these instructions: http://howtoubuntu.org/how-to-repair...ubuntu-live-cd

Best regards,
Bruno
immortality likes this.
wyldckat is offline   Reply With Quote

Old   December 12, 2013, 08:17
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
Quote:
If you are not sure which it is, launch GParted (included in the Live CD) and find out
Hi dear Bruno,
in the site a software is mentioned as above,but has not described how to use it.I'm worry about choosing an incorrect partition and some problems originate again.
--------------------
I installed Grarted and used all the directions, but now only Ubuntu boots not the windows's,how to correct grub now?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   December 15, 2013, 09:59
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ehsan,

What does the file "/boot/grub/grub.cfg" contain?

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   December 15, 2013, 10:03
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
Hi Bruno,
its the content of the file grub.cfg
Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
  set have_grubenv=true
  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
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos11)'
search --no-floppy --fs-uuid --set=root caa220a7-7659-4617-abd8-5ee58b348d10
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos11)'
  search --no-floppy --fs-uuid --set=root caa220a7-7659-4617-abd8-5ee58b348d10
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
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
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.2.0-54-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos11)'
	search --no-floppy --fs-uuid --set=root caa220a7-7659-4617-abd8-5ee58b348d10
	linux	/boot/vmlinuz-3.2.0-54-generic root=UUID=caa220a7-7659-4617-abd8-5ee58b348d10 ro   quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.2.0-54-generic
}
menuentry 'Ubuntu, with Linux 3.2.0-54-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos11)'
	search --no-floppy --fs-uuid --set=root caa220a7-7659-4617-abd8-5ee58b348d10
	echo	'Loading Linux 3.2.0-54-generic ...'
	linux	/boot/vmlinuz-3.2.0-54-generic root=UUID=caa220a7-7659-4617-abd8-5ee58b348d10 ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.2.0-54-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos11)'
	search --no-floppy --fs-uuid --set=root caa220a7-7659-4617-abd8-5ee58b348d10
	linux	/boot/vmlinuz-3.2.0-23-generic root=UUID=caa220a7-7659-4617-abd8-5ee58b348d10 ro   quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.2.0-23-generic
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos11)'
	search --no-floppy --fs-uuid --set=root caa220a7-7659-4617-abd8-5ee58b348d10
	echo	'Loading Linux 3.2.0-23-generic ...'
	linux	/boot/vmlinuz-3.2.0-23-generic root=UUID=caa220a7-7659-4617-abd8-5ee58b348d10 ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.2.0-23-generic
}
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos11)'
	search --no-floppy --fs-uuid --set=root caa220a7-7659-4617-abd8-5ee58b348d10
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos11)'
	search --no-floppy --fs-uuid --set=root caa220a7-7659-4617-abd8-5ee58b348d10
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 8 (loader) (on /dev/sda1)" --class windows --class os {
	insmod part_msdos
	insmod ntfs
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5000034600033310
	drivemap -s (hd0) ${root}
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

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

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
how I have to change it?I tried adding some lines before but didn't have any effect.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   December 15, 2013, 11:02
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
You should at least be able to see an option in the boot menu, called "Windows 8 (loader) (on /dev/sda1)". That option should be able to boot Windows 8.

As for Windows XP, the grub updater was not able to pick it up. More specifically "/etc/grub.d/30_os-prober" was not able to see Windows XP. This seems to be related to the other situation you mentioned before: http://www.cfd-online.com/Forums/lou...-boundary.html

Problem is that I'm too tired to search and imagine which solution will work best. All I know is that this kind of problem is not something completely new.
immortality likes this.
wyldckat is offline   Reply With Quote

Old   December 19, 2013, 08:46
Default
  #7
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
Hi Bruno,
It hasn't resolved yet
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   January 1, 2014, 16:01
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ehsan,

Let's see if this will work:
  1. Boot into your working Ubuntu 12.04 installation.
  2. Start a new terminal.
  3. Switch to root mode:
    Code:
    sudo -s
    Be very careful with the commands you run in this terminal!!
  4. Install gparted:
    Code:
    apt-get install gparted
  5. Use gparted to help better see the partition numbers and to what each one corresponds to:
    Code:
    gparted /dev/sda
    If you're unable to figure it out on your own, send me a picture of what you are seeing in gparted.
  6. Exit gparted.
  7. Now, for each partition number you've identified, get the output given by the following two commands:
    Code:
    grub-probe --device /dev/sda1 --target=drive
    grub-probe --device /dev/sda1 --target=fs_uuid
    The first partition is "sda1", the second is "sda2" and so on. Some numbers might not be present, due to how the partitions were created. In your case, only number 3 is not present.
  8. Edit the file "/etc/grub.d/40_custom" and append this code twice:
    Code:
    menuentry "MYOSNAME (on /dev/sda1)" --class windows --class os {
            insmod part_msdos
            insmod fat
            set root='(hd0,DRIVENAMENUMBER)'
            search --no-floppy --fs-uuid --set=root DRIVEUUID
            drivemap -s (hd0) ${root}
            chainloader +1
    }
    You'll notice 3 upper case variables, which you will have to manually change accordingly:
    • MYOSNAME - This is the description of the Windows version for this partition, which will be shown in the boot menu. For the Windows XP one, you can name it:
      Code:
      Windows XP 32-bit
    • DRIVENAMENUMBER - This is the name+number given by the first command from the previous step. Usually it's "msdosX", where "X" is the number of the partition.
    • DRIVEUUID - This is the alphanumeric name given by the second command from the previous step. For Windows, it's either something like 1234-ABCD or 123456789ABCDEF0.
    • sda1 - This can change to the number you have, for example, sda5.
    For example:
    Code:
    menuentry "Windows XP 32-bit (on /dev/sda5)" --class windows --class os {
            insmod part_msdos
            insmod fat
            set root='(hd0,msdos5)'
            search --no-floppy --fs-uuid --set=root ABFE-1132
            drivemap -s (hd0) ${root}
            chainloader +1
    }
  9. Save and close the file.
  10. Now, to update grub:
    Code:
    update-grub
  11. Exit from root mode.
    Code:
    exit
Reboot the machine. It should give you several boot options now, among them the old "Windows 8 (loader)" which is automatically identified, as well as the references to the 2 entries you added. Choose one of them to try and boot the Windows version in question.


Now, since there is a very high probability that either one of the Windows versions might not boot, here's what I've done to get the Windows 8 installation up and running again. Partial reference: http://askubuntu.com/a/263931
  1. Insert the Windows 8 DVD into the drive and boot into it.
  2. Select the language, time and currency and keyboard settings and click "Next".
  3. Now click on the lower left, in the text "Repair your computer".
  4. Choose "Troubleshoot".
  5. Choose "Advanced options".
  6. Choose "Automatic Repair".
    • If this works, it should reboot automatically, after doing some repairs. When it reboots, it should show you the grub boot menu, so be sure to choose the entry for Windows 8.
    • Do not remove the DVD until you are safely in Windows 8 and everything seems to be working.
    • If this automatic repair step worked, then ignore the next steps.
  7. If the automatic repair failed, then it's because the Windows boot system got broken somehow. So, in the "Advanced options", choose "Command Prompt"
  8. Run this command:
    Code:
    bootrec /fixboot
  9. Run:
    Code:
    exit
  10. Go back to step #4 and redo the steps from there.
With any luck, this solves the problem. If not, let me know what error messages it gives you. And please provide details!

Best regards,
Bruno

Last edited by wyldckat; January 1, 2014 at 16:26. Reason: Done writing down what I know and tested.
wyldckat is offline   Reply With Quote

Old   January 2, 2014, 12:12
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
dear Bruno thanks for your valuable effort and help,but I think it be better to work as this way and manage to correct the boot list without need to super grub CD after my work finished.I don't need another bad chance again.:|
I'll test those later.
thanks a lot.
wyldckat likes this.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   January 3, 2014, 11:35
Default
  #10
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
Dear Bruno, I like to correct the boot menu now. but a little question.I have forgotten how to open the text files like 40_custom for editing in sudo mode
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   January 4, 2014, 19:27
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ehsan,

You can use nano:
Code:
nano /etc/grub.d/40_custom
It's a terminal based text editor, therefore the cursor will not work with the mouse; but you can copy-paste text with the mouse, the same way you can on the terminal!

Then use Ctrl+X to exit, which it will ask if you want to save or not, to which you use the "y" key for Yes and "n" key for No.
If "y", it will ask to which file, where you simply have to press the Enter key for it to save to the current file.

Best regards,
Bruno
immortality likes this.
wyldckat is offline   Reply With Quote

Old   January 5, 2014, 06:16
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
dear bruno,
is this OK?
Code:
#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry "Microsoft Windows XP 32-bit (on /dev/sda1)" --class windows --class $
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root F84026334025F8D0
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Microsoft Windows 8 (on /dev/sda4)" --class windows --class $
insmod part_msdos
insmod ntfs
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set=root 4E4C5FC94C5FAA8B
drivemap -s (hd0) ${root}
chainloader +1
}
there is no need to add Linux partition too?
-----------------------------------------------------------
dear Bruno,I did it and boot from hard disk,but only linux booted automatically and the list for boot didn't displayed at all.what may be wrong?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   January 5, 2014, 07:52
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ehsan,

Two details:
  1. Why are you using:
    Code:
    insmod ntfs
    When my example stated:
    Code:
    insmod fat
  2. The code you copy-pasted to here seems to be incomplete. Check if the first lines of each block end with:
    Code:
    --class os {
    Example:
    Code:
    menuentry "Microsoft Windows XP 32-bit (on /dev/sda1)" --class windows --class os {
Note: The reason why you only see "--class $" is probably because you did not maximize the window for the terminal.


Then check the content of the file "/boot/grub/grub.cfg" and search for the block of code that starts with:
Code:
### BEGIN /etc/grub.d/40_custom ###
Somewhere below it should be the code you have written. If it doesn't appear, then step #10 did not work correctly.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   January 5, 2014, 13:05
Default
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
dear Bruno its a part of grub.cfg contains the line you said,it seems that grub isn't updated:
Code:
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

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

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
about
--class os { you are right.I copied it from the terminal.

this is the output of update-grub
Code:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-3.2.0-54-generic
Found kernel: /boot/vmlinuz-3.2.0-23-generic
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
in 40_custom there was a block that used ntfs in return of fat,I edited it with lines you said and copied for Windows 8 too,have I to change it to fat? and there isn't any need to add some lines for Linux too?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by wyldckat; January 5, 2014 at 14:28.
immortality is offline   Reply With Quote

Old   January 5, 2014, 14:36
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ehsan,

It took me some considerable time to test the steps I wrote on the other post and to review them to ensure that everything was correctly tested and written.
Please do not make unnecessary adjustments to the instructions I carefully wrote
  • Use "insmod fat" as I wrote in the instructions. It worked fine for me, so only change to "ntfs" if and only if I tell you to use it
  • If I did not tell you to add and entry for Ubuntu, then it's because it is not necessary.


Check the contents of the file "/boot/grub/menu.lst", as indicated by update-grub. It might be different from the file I told you to look at, namely "/boot/grub/grub.cfg", even though they should be identical.


In addition, double-check what those two files are, by running as root:
Code:
ls -l /boot/grub/grub.cfg
ls -l /boot/grub/menu.lst
Let me know what the two commands gave you.


Best regards,
Bruno
immortality likes this.
wyldckat is offline   Reply With Quote

Old   January 5, 2014, 15:46
Default
  #16
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
dear Bruno,its the contents of menu.lst file:
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-legacy-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 use 'savedefault' 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        3

## 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=caa220a7-7659-4617-abd8-5ee58b348d10 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=caa220a7-7659-4617-abd8-5ee58b348d10

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

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

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

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title        Ubuntu 12.04.3 LTS, kernel 3.2.0-54-generic
uuid        caa220a7-7659-4617-abd8-5ee58b348d10
kernel        /boot/vmlinuz-3.2.0-54-generic root=UUID=caa220a7-7659-4617-abd8-5ee58b348d10 ro quiet splash 
initrd        /boot/initrd.img-3.2.0-54-generic
quiet

title        Ubuntu 12.04.3 LTS, kernel 3.2.0-54-generic (recovery mode)
uuid        caa220a7-7659-4617-abd8-5ee58b348d10
kernel        /boot/vmlinuz-3.2.0-54-generic root=UUID=caa220a7-7659-4617-abd8-5ee58b348d10 ro  single
initrd        /boot/initrd.img-3.2.0-54-generic

title        Ubuntu 12.04.3 LTS, kernel 3.2.0-23-generic
uuid        caa220a7-7659-4617-abd8-5ee58b348d10
kernel        /boot/vmlinuz-3.2.0-23-generic root=UUID=caa220a7-7659-4617-abd8-5ee58b348d10 ro quiet splash 
initrd        /boot/initrd.img-3.2.0-23-generic
quiet

title        Ubuntu 12.04.3 LTS, kernel 3.2.0-23-generic (recovery mode)
uuid        caa220a7-7659-4617-abd8-5ee58b348d10
kernel        /boot/vmlinuz-3.2.0-23-generic root=UUID=caa220a7-7659-4617-abd8-5ee58b348d10 ro  single
initrd        /boot/initrd.img-3.2.0-23-generic

title        Chainload into GRUB 2
root        caa220a7-7659-4617-abd8-5ee58b348d10
kernel        /boot/grub/core.img

title        Ubuntu 12.04.3 LTS, memtest86+
uuid        caa220a7-7659-4617-abd8-5ee58b348d10
kernel        /boot/memtest86+.bin

title Windows Xp
rootnoverify (hd0,0)
makeactive
chainloader +1

quiet


### END DEBIAN AUTOMAGIC KERNELS LIST
seems there is no entry for Windows's.
I corrected ntfs to fat and did update-grub.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   January 5, 2014, 16:26
Default
  #17
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Oh no, I completely forgot that you might have changed the grub version installed in the system.
I thought that you had the default version, which is 1.99 or 2.0... but it's very likely that you have got grub 1.5 installed instead...

OK, if I'm not mistaken:
  1. What does this command give you:
    Code:
    grub-install -v
  2. If it gives you version 1.5 or similar, then you've got the old stable release of grub. If this is the case, then:
    1. Edit the file "/boot/grub/menu.lst".
    2. Find this line:
      Code:
      hiddenmenu
      And change it to this:
      Code:
      #hiddenmenu
    3. Find this block of code:
      Code:
      title Windows Xp
      rootnoverify (hd0,0)
      makeactive
      chainloader +1
    4. To this:
      Code:
      title Windows XP
      rootnoverify (hd0,0)
      makeactive
      chainloader +1
      
      title Windows 8
      rootnoverify (hd0,3)
      makeactive
      chainloader +1
    5. Save the file.
    6. Restart the machine and check if the boot menu now shows you the Windows XP and 8 boot options.
wyldckat is offline   Reply With Quote

Old   January 5, 2014, 16:42
Default
  #18
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
dear Bruno I didn't change the default grub,but it seems is very old (0.97 ??)
Code:
ehsan@Ehsan:/media/Education/WR_kOmegaSST$ grub-install -v
grub-install (GNU GRUB 0.97)
I have to install new version of grub?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   January 5, 2014, 16:44
Default
  #19
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
No, no need to install a new one. I probably got confused with the version numbers. 0.97 pretty much refers to Grub 1.0 and 1.99 refers to 2.0.

Simply follow the steps that I wrote for 1.5, from the previous post.
wyldckat is offline   Reply With Quote

Old   January 5, 2014, 17:16
Default
  #20
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
Hi Bruno, it worked fine in showing the list but the time is very low about 1 or 2 seconds when showing the list,how can increase it.
and I want to have grub 2,how can upgrade to it?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 08:15.