You are not logged in.

#1 2011-06-17 08:01:55

archer42
Member
Registered: 2011-06-10
Posts: 92

Grub2 problems

Hi, I want to add my Grub2 menue a Windows entry and give it the same theme like the archlinux inst. cd.

To do this I followed the wiki but now its more worse then before. I dont seen any kernel output anymore only "loading kernel.." and it is switched to use standard archlinux fallback.
Windows 7 still doesnt work:" Some error with Signature"


#!/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.
# (3) Windows 7
menuentry "Windows 7" {
insmod ntfs
set root=(hd0,2)
drivemap -s hd1 hd0
chainloader +1
}
/etc/grub.d/40_custom (END)

/etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch Linux"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
GRUB_HIDDEN_TIMEOUT=5
GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE="1024x768x32"

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-blue/black"
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/boot/grub/archlinux.tga"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

Offline

#2 2011-06-17 09:08:40

steve_v
Member
Registered: 2006-02-11
Posts: 80

Re: Grub2 problems

Please post /boot/grub/grub.cfg

Offline

#3 2011-06-17 11:33:06

archer42
Member
Registered: 2011-06-10
Posts: 92

Re: Grub2 problems

cat /boot/grub/grub.cfg
#
# 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="1"
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 load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue

insmod part_gpt
insmod ext2
set root='(hd1,gpt4)'
search --no-floppy --fs-uuid --set=root 1419bf09-6474-4344-809f-c76fb9af1901
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode="1024x768x32"
  set gfxpayload=keep
  insmod gfxterm
  insmod part_gpt
  insmod ext2
  set root='(hd1,gpt2)'
  search --no-floppy --fs-uuid --set=root 5dcee05a-2b61-4578-b0bb-456d32f5ffc3
  set locale_dir=($root)/grub/locale
  set lang=de_DE
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, mit Linux vmlinuz26' --class archlinux --class gnu-linux --class gnu --class os {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='(hd1,gpt2)'
    search --no-floppy --fs-uuid --set=root 5dcee05a-2b61-4578-b0bb-456d32f5ffc3
    echo    'Linux vmlinuz26 wird geladen …'
    linux    /vmlinuz26 root=/dev/disk/by-uuid/1419bf09-6474-4344-809f-c76fb9af1901 ro  quiet
    echo    'Initiale Ramdisk wird geladen …'
    initrd    /kernel26.img
}
menuentry 'Arch Linux, mit Linux vmlinuz26 Fallback' --class archlinux --class gnu-linux --class gnu --class os {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='(hd1,gpt2)'
    search --no-floppy --fs-uuid --set=root 5dcee05a-2b61-4578-b0bb-456d32f5ffc3
    echo    'Linux vmlinuz26 wird geladen …'
    linux    /vmlinuz26 root=/dev/disk/by-uuid/1419bf09-6474-4344-809f-c76fb9af1901 ro  quiet
    echo    'Initiale Ramdisk wird geladen …'
    initrd    /kernel26-fallback.img
}
### 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+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### 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.
# (3) Windows 7
menuentry "Windows 7" {
    insmod ntfs
    set root=(hd0,2)
    drivemap -s hd1 hd0
    chainloader 1
}
### 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 ###

Offline

#4 2011-06-17 12:06:16

James2k
Member
Registered: 2011-06-13
Posts: 19

Re: Grub2 problems

Why not install os-prober from AUR and let GRUB automatically create the entry for you when you generate a grub.cfg

Offline

#5 2011-06-19 16:55:37

archer42
Member
Registered: 2011-06-10
Posts: 92

Re: Grub2 problems

How can I do this?
I am quite new at Arch and don't now how to use AUR - I also can't find anything in the wiki to os-proper

Regards

Offline

#6 2011-06-19 17:30:00

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 454

Re: Grub2 problems

you can read the wiki about aur packages or

install one of the aur helpers.

eik

Offline

#7 2011-06-19 17:45:18

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Grub2 problems

archer42 wrote:

cat /boot/grub/grub.cfg

menuentry "Windows 7" {
    insmod ntfs
    set root=(hd0,2)
    drivemap -s hd1 hd0
    chainloader 1
}

It should be

menuentry "Windows 7" {
    insmod ntfs
    set root=(hd0,msdos2)   ---> note
    drivemap -s hd1 hd0
    chainloader (hd0,msdos2)+1   ---> note
}

Also please use code tags in the post.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#8 2011-06-19 17:49:02

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Grub2 problems

archer42 wrote:
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode="1024x768x32"
  set gfxpayload=keep
  insmod gfxterm
  insmod part_gpt
  insmod ext2
  set root='(hd1,gpt2)'
  search --no-floppy --fs-uuid --set=root 5dcee05a-2b61-4578-b0bb-456d32f5ffc3
  set locale_dir=($root)/grub/locale
  set lang=de_DE
  insmod gettext
fi

It should be

if loadfont ${prefix}/unicode.pf2 ; then
  insmod gfxterm
  set gfxmode="auto"
  set gfxpayload="keep"
  terminal_input console
  terminal_output gfxterm
  insmod part_gpt
  insmod ext2
  set root='(hd1,gpt2)'
  search --no-floppy --fs-uuid --set=root 5dcee05a-2b61-4578-b0bb-456d32f5ffc3
  set locale_dir=($root)/grub/locale
  set lang=de_DE
  insmod gettext
fi

The order of the commands is important. Copy the /usr/share/grub/unicode.pf2 to /boot/grub and use "if loadfont ${prefix}/unicode.pf2" .

Last edited by skodabenz (2011-06-19 17:50:26)


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#9 2011-06-19 19:15:56

archer42
Member
Registered: 2011-06-10
Posts: 92

Re: Grub2 problems

Ok I did what you written.
When I now want to boot I am getting: "No such partition" before I got "Invalid signature"

>Regards

Offline

#10 2011-06-20 09:31:47

James2k
Member
Registered: 2011-06-13
Posts: 19

Re: Grub2 problems

The Wiki has a nice entry on AUR and how to build and install packages from it: https://wiki.archlinux.org/index.php/Ar … Repository

It was a bit confusing to me at first so here's a breakdown of the steps:

To install os-proper:

1. Got to https://aur.archlinux.org/packages.php?ID=35572 and download the tarball
2. Save the tarball somewhere on your computer. (I have a AUR directory inside my home directory)
3. Extract it with tar -zxf /path/to/tarball (Replace path with the saved location)
4. cd into the extracted folder
5. Run makepkg -s (This will scan for any dependencies required)
6. If the dependencies are satisfied and it builds with no errors run pacman -U packagename.tar.zx (Replace package name with the actual name of the package)
7. Pacman will then install the package.
8. Now remove your custom Windows entry that you added to your GRUB2 config and then run grub-mkconfig -o /boot/grub/grub.cfg

os-prober should then be able to detect your Windows 7 Partition.

Last edited by James2k (2011-06-20 09:43:45)

Offline

#11 2011-06-20 20:33:07

archer42
Member
Registered: 2011-06-10
Posts: 92

Re: Grub2 problems

Ah, this worked now with os-prober von AUR thank you wink
os proper has added this to grub.cfg:

menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 1A98ECB998EC9513
    chainloader +1
}

Unforunatly grub uses another theme/interface (?) which causes a black screen for 3-5sec after DMI Loads (BIOS load is finished) how can I disable this

Regards

Offline

#12 2011-06-20 21:35:09

James2k
Member
Registered: 2011-06-13
Posts: 19

Re: Grub2 problems

Glad you can boot into Windows 7!

From my experience I think the higher screen resolution the GRUB_GFXMODE setting is in /etc/default/grub, the longer it will take to load the menu. Try setting a lower resolution like 800x600

Offline

#13 2011-06-21 14:29:29

archer42
Member
Registered: 2011-06-10
Posts: 92

Re: Grub2 problems

Hmm i tried 800x600 640x320 320x180 all have the same symptoms.

Could it be that grub tries to load an advanced interface?
Regards

Offline

Board footer

Powered by FluxBB