You are not logged in.
Hi all. Thanks for taking time to look at my troubles.
I have installed from latest Arch into sda2 (only got one drive) following the Arch Beginners Guide. Everything is good, i'm on Firefox writing this now.
I also have several other Arch installs on other partitions on the same disk which I would like to be able to boot as I used to with Grub1 before.
The problem is I can't work out how to get it working on Grub2.
I been reading all I can, and from what I've learned, and since one of the Arch's boots fine, I must have...
grub installed
a file on the mbr of sda
a core.img installed (somewhere, just after the mbr maybe?)
grub's files in /etc/grub.d /etc/default/grub /boot/grub
linux kernel and initrd in /boot
The problem is I can't get it to boot the other Arch from sda12
The os-prober has found the other Arch and written to the grub.cfg, and when I reboot it appears in the list.
But if I select it the screen goes blank and nothing happens, silence, no disk noise, nothing.
I guess this means that the kernel and initrd are not getting found or something.
Does it matter that grub's stuff is on sda2 /boot/grub, but I'm using it to point to sda12 /boot/(the Arch files)?
I know that is two different 'roots', but doesn't the grub.cfg allow for that with two different root=... lines?
Struggling to understand.
Any ideas.
Last edited by Midnight Sun (2013-01-16 04:19:55)
Offline
...By the way a very good resource for anyone with Grub2 troubles I found is:
http://moi.vonos.net/linux/Booting_Linu … ith_Grub2/
A good overview of the boot process and grub.
Or, I could RTFM : https://www.gnu.org/software/grub/manual/grub.html
Last edited by Midnight Sun (2013-01-16 02:21:09)
Offline
If you are still having trouble, post your config. Please use [code ] [/code ] tags. e.g. from /etc/default or /etc/grub.d and, especially, grub.cfg (even though it is generated).
Last edited by cfr (2013-01-16 02:22:36)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
HI, thanks for looking. I'm wading through the Grub manual trying to get my head round things.
Here's my /boot/grub/grub.cfg , I'm afraid it looks like a bit of a mess.
#
# 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="0"
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 64b15d8f-85f1-412a-8fa9-fd054849176e
else
search --no-floppy --fs-uuid --set=root 64b15d8f-85f1-412a-8fa9-fd054849176e
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_GB
insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=120
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch GNU/Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-64b15d8f-85f1-412a-8fa9-fd054849176e' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 64b15d8f-85f1-412a-8fa9-fd054849176e
else
search --no-floppy --fs-uuid --set=root 64b15d8f-85f1-412a-8fa9-fd054849176e
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=64b15d8f-85f1-412a-8fa9-fd054849176e ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
}
menuentry 'Arch GNU/Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-64b15d8f-85f1-412a-8fa9-fd054849176e' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 64b15d8f-85f1-412a-8fa9-fd054849176e
else
search --no-floppy --fs-uuid --set=root 64b15d8f-85f1-412a-8fa9-fd054849176e
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=64b15d8f-85f1-412a-8fa9-fd054849176e ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-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 ###
menuentry 'Arch' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-75bc8965-beb0-4ae6-98e1-62c8a6ff65fd' {
insmod part_msdos
insmod ext2
set root='hd0,msdos11'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos11 --hint-efi=hd0,msdos11 --hint-baremetal=ahci0,msdos11 9575e331-14a8-494e-ab9b-d915d178f9f0
else
search --no-floppy --fs-uuid --set=root 9575e331-14a8-494e-ab9b-d915d178f9f0
fi
linux /vmlinuz26 root=/dev/sda12
}
submenu 'Advanced options for Arch' $menuentry_id_option 'osprober-gnulinux-advanced-75bc8965-beb0-4ae6-98e1-62c8a6ff65fd' {
menuentry 'Arch (on /dev/sda12)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz26--75bc8965-beb0-4ae6-98e1-62c8a6ff65fd' {
insmod part_msdos
insmod ext2
set root='hd0,msdos11'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos11 --hint-efi=hd0,msdos11 --hint-baremetal=ahci0,msdos11 9575e331-14a8-494e-ab9b-d915d178f9f0
else
search --no-floppy --fs-uuid --set=root 9575e331-14a8-494e-ab9b-d915d178f9f0
fi
linux /vmlinuz26 root=/dev/sda12
}
}
menuentry 'Arch1' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-c0c0c7d6-e4a5-48f2-bcbf-24257526600a' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 c069505a-31f3-487a-8ebc-923d6ee9a200
else
search --no-floppy --fs-uuid --set=root c069505a-31f3-487a-8ebc-923d6ee9a200
fi
linux /vmlinuz26 root=/dev/disk/by-uuid/7ede646d-2b81-4989-9ba1-a9720d81f736 ro vga=773
initrd /kernel26.img
}
submenu 'Advanced options for Arch1' $menuentry_id_option 'osprober-gnulinux-advanced-c0c0c7d6-e4a5-48f2-bcbf-24257526600a' {
menuentry 'Arch Linux STABLE (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz26--c0c0c7d6-e4a5-48f2-bcbf-24257526600a' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 c069505a-31f3-487a-8ebc-923d6ee9a200
else
search --no-floppy --fs-uuid --set=root c069505a-31f3-487a-8ebc-923d6ee9a200
fi
linux /vmlinuz26 root=/dev/disk/by-uuid/7ede646d-2b81-4989-9ba1-a9720d81f736 ro vga=773
initrd /kernel26.img
}
menuentry 'Arch Linux (Old) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz26--c0c0c7d6-e4a5-48f2-bcbf-24257526600a' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 c069505a-31f3-487a-8ebc-923d6ee9a200
else
search --no-floppy --fs-uuid --set=root c069505a-31f3-487a-8ebc-923d6ee9a200
fi
linux /vmlinuz26 root=/dev/disk/by-uuid/75bc8965-beb0-4ae6-98e1-62c8a6ff65fd ro vga=773
initrd /kernel26.img
}
menuentry 'Arch Linux TEST (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz26--c0c0c7d6-e4a5-48f2-bcbf-24257526600a' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 c069505a-31f3-487a-8ebc-923d6ee9a200
else
search --no-floppy --fs-uuid --set=root c069505a-31f3-487a-8ebc-923d6ee9a200
fi
linux /vmlinuz26 root=/dev/disk/by-uuid/c0c0c7d6-e4a5-48f2-bcbf-24257526600a ro vga=773
initrd /kernel26.img
}
}
### 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.
menuentry "OLD LINUX" {
set root='hd0,msdos2'
linux /boot/vmlinuz26 root='hd0,msdos12'
initrd /boot/kernel26.img
}
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Offline
Solved! RTFM
Lesson learned...err Again!
There were three problems:
1 The way the kernel files were being pointed to was the wrong syntax. /boot/... would point to 'grub root'/boot/...
but that would be on sda2. It should have been (hd0,msdos12)/boot/... then it points to sda12.
2 The way the kernel options were specified was wrong. I had copied the syntax from the other menuenrtys in the config.
But I don't think they are right for the old kernel I was booting. vmlinuz26 root=UUID=... should hve been
vmlinuz26 root=/dev/disk/by-uuid/...
3 This is the stupid one: when I used mv to move the kernel files at some point I accidentally renamed it kenel!
Below is the (now corrected) custom config file used by grub-mkconfig to create the grub.cfg file I pasted above:
Thanks cfr for your interest
#!/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 "OLD LINUX" {
set root='hd0,msdos2'
linux (hd0,msdos12)/boot/vmlinuz26 root=/dev/disk/by-uuid/75bc8965-beb0-4ae6-98e1-62c8a6ff65fd ro quiet
initrd (hd0,msdos12)/boot/kernel26.img
}
Offline