grub

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
seb7o

grub

Post by seb7o »

hi,

i need to make an entry to the grub menu for windows 7.
i got linux mint installed on my sdc hdd.
i got sda and sdb in raid0 where windows 7 is installed.
the "supergrub2disc" does recognize my windows 7 as windows vista, but that is also good.
booting in windows 7 works (only with my supergrub2disc)
so i did make an 40_windows7 terminal-script(?) with the nano editor.
(the prefix needs to be higher and then it should be listed automatically in the entries of grub, i hope this is right)

i wrote in the file:

Code: Select all

menuentry "windows 7 professional"{
set root=(hd0,0)
chainloader +1
}
then i wrote in terminal:

Code: Select all

sudo update-grub
my grub-menu doesnt show up. the explanation is most probably that grub doesnt recognize other OS, so he goes directly to the linux mint OS. i can go manually to the grub meny with holding shift while booting but there isnt the entry of windows. only 2 linux entries and 2 memtest entries.
has someone an idea what i did wrong or what i should do?

thanks in advance,
seb7o
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
hal8000
Level 4
Level 4
Posts: 436
Joined: Sun May 04, 2008 2:04 pm
Location: UK

Re: grub

Post by hal8000 »

You're almost right, but remember grub2 starts couting hard drives at 0 and partitions from1, so your custom stanza should be:

Code: Select all

    menuentry "windows 7 professional"{
    set root=(hd0,1)
    chainloader +1
    }
not (hd0,0) as you wrote earlier. (hd0,0) would be correct for grub-legacy.
Also after modifying check it is executable
sudo ls -l /etc/grub/d/40_windows7

and then do sudo update-grub

after rebooting it should appear in your grub2 menu.
seb7o

Re: grub

Post by seb7o »

ty but it didnt work

but i saw when i was in grub the title was
"GNU GRUB Version 1.99-12ubuntu5-1linuxmint1"

probably i dont got grub2?
but i dont got a menu.lst file ? i am new to linux

ps:

Code: Select all

menuentry "Windows 7 Professional"{
set root=(hd0,1)
chainloader +1
}

pps:

Code: Select all

minzig@menthol ~ $ sudo ls -l /etc/grub.d/40_windows7
-rw-r--r-- 1 root root 285 2012-04-28 23:20 /etc/grub.d/40_windows7
minzig@menthol ~ $ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.0.0-12-generic
Found initrd image: /boot/initrd.img-3.0.0-12-generic
Found memtest86+ image: /boot/memtest86+.bin
done
zerozero

Re: grub

Post by zerozero »

i'm not sure if the 40_custom entry in grub will work with the setup you have, but i know for sure that you can't rename the script to 40_windows7.
when you update grub it won't see it. and the script itself has to follow certain rules.
see this http://forums.linuxmint.com/viewtopic.php?f=46&t=72634
seb7o

Re: grub

Post by seb7o »

hi,

i tried
with msdos1:

Code: Select all

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 "Windows 7 Professional"{
set root=(hd0,msdos1)
chainloader +1
}
40_custom:

Code: Select all

minzig@menthol ~ $ sudo ls -l  /etc/grub.d/40_custom
[sudo] password for minzig: 
-rw-r--r-- 1 root root 290 2012-04-29 02:27 /etc/grub.d/40_custom
minzig@menthol ~ $ ^C
minzig@menthol ~ $ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.0.0-12-generic
Found initrd image: /boot/initrd.img-3.0.0-12-generic
Found memtest86+ image: /boot/memtest86+.bin
done
minzig@menthol ~ $ 
but no change.
do you have an idea?
wayne128

Re: grub

Post by wayne128 »

May be you can try to let grub2 do its job again.

Boot computer with Live DVD/CD
on terminal, type

sudo os-prober

copy and paste what it says on terminal
seb7o

Re: grub

Post by seb7o »

i did what you said with the mint live-cd

Code: Select all

mint@mint ~ $ sudo os-prober
/dev/sdc1:Linux Mint 12 Lisa (12):LinuxMint:linux
you mean copy and paste in this post, dont you?
or do you really mean paste into the terminal?
(if i do it says me syntax error because of the "(" )
Locked

Return to “Installation & Boot”