ArchThis Forum is for the discussion of Arch 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi: Im running Arch and Debian at present. I got to boot any of them by running grub-mkconfig from Debian. I want to install a different Linux OS in the Debian partition and hence should run grub-mkconfig from Arch (grub-mkconfig -o /boot/grub/grub.cfg).
Ay, there's the rub! The OS-prober does not get the Debian OS. The os-prober section in /boot/grub/grub.cfg is empty. This file is, maybe, important:
Code:
root@darkstar/etc/default# cat grub
# GRUB boot loader configuration
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
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 booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y
# 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=auto
# 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="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
# Uncomment to make GRUB remember the last selection. This requires to
# set 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"
root@darkstar/etc/default#
However it is essentially the same as the one in the debian partition. Any suggestion? This is irrelevant, but somebody may ask: I always boot in legacy (BIOS compatible) mode and the boot sector is the MBR type. To summarize, Debian and Arch installed on the hard disk up and running, grub-mkconfig run from Debian leaves both OS's ready to use, run from Arch it fails to do so.
This maybe useful:
Code:
root@darkstar/etc/grub.d# v
total 60K
-rwxr-xr-x 1 root root 8.7K Jun 24 19:22 00_header
-rwxr-xr-x 1 root root 11K Jun 24 19:22 10_linux
-rwxr-xr-x 1 root root 11K Jun 24 19:22 20_linux_xen
-rwxr-xr-x 1 root root 12K Jun 24 19:22 30_os-prober
-rwxr-xr-x 1 root root 214 Jun 24 19:22 40_custom
-rwxr-xr-x 1 root root 216 Jun 24 19:22 41_custom
-rw-r--r-- 1 root root 483 Jun 24 19:22 README
root@darkstar/etc/grub.d#
can you run os-prober manually? what does it find?
did you change any of the files in /etc/grub.d? 30_os-prober is owned by grub, and there should be no need to change it.
strange, i thought os-prober would spit out the whole menu section that would then go into grub.cfg in the end.
i can't test, since i'm not dual booting (anymore).
you can alos try to run /etc/grub.d/30_os-prober manually, but i'm not sure it will work, or help with the problem.
just re-run "grub-mkconfig -o /boot/grub/grub.cfg", show us what it spits out in the terminal, and show us the resulting grub.cfg.
you can also "mv /etc/default/grub /etc/default/grub.bak" and retry the above. the config looks pretty normal to me, but maybe there's something off in there.
root@darkstar~# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Found Debian GNU/Linux 9 (stretch) on /dev/mmcblk0p3
done
root@darkstar~#
Code:
root@darkstar/boot/grub# cat 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
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
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
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 738add7f-692c-4b17-a25c-0028d618e22b
else
search --no-floppy --fs-uuid --set=root 738add7f-692c-4b17-a25c-0028d618e22b
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_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-738add7f-692c-4b17-a25c-0028d618e22b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 738add7f-692c-4b17-a25c-0028d618e22b
else
search --no-floppy --fs-uuid --set=root 738add7f-692c-4b17-a25c-0028d618e22b
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=738add7f-692c-4b17-a25c-0028d618e22b rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-738add7f-692c-4b17-a25c-0028d618e22b' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-738add7f-692c-4b17-a25c-0028d618e22b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 738add7f-692c-4b17-a25c-0028d618e22b
else
search --no-floppy --fs-uuid --set=root 738add7f-692c-4b17-a25c-0028d618e22b
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=738add7f-692c-4b17-a25c-0028d618e22b rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-738add7f-692c-4b17-a25c-0028d618e22b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 738add7f-692c-4b17-a25c-0028d618e22b
else
search --no-floppy --fs-uuid --set=root 738add7f-692c-4b17-a25c-0028d618e22b
fi
echo 'Loading Linux linux ...'
linux /boot/vmlinuz-linux root=UUID=738add7f-692c-4b17-a25c-0028d618e22b rw 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/30_os-prober ###
menuentry 'Debian GNU/Linux 9 (stretch) (on /dev/mmcblk0p3)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-62468dca-d143-4a69-92ce-584eabcfb4da' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
else
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
fi
linux /boot/vmlinuz-4.9.0-6-686-pae root=UUID=62468dca-d143-4a69-92ce-584eabcfb4da ro noapic edd=off quiet
initrd /boot/initrd.img-4.9.0-6-686-pae
}
submenu 'Advanced options for Debian GNU/Linux 9 (stretch) (on /dev/mmcblk0p3)' $menuentry_id_option 'osprober-gnulinux-advanced-62468dca-d143-4a69-92ce-584eabcfb4da' {
menuentry 'Debian GNU/Linux (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-6-686-pae--62468dca-d143-4a69-92ce-584eabcfb4da' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
else
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
fi
linux /boot/vmlinuz-4.9.0-6-686-pae root=UUID=62468dca-d143-4a69-92ce-584eabcfb4da ro noapic edd=off quiet
initrd /boot/initrd.img-4.9.0-6-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 4.9.0-6-686-pae (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-6-686-pae--62468dca-d143-4a69-92ce-584eabcfb4da' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
else
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
fi
linux /boot/vmlinuz-4.9.0-6-686-pae root=UUID=62468dca-d143-4a69-92ce-584eabcfb4da ro noapic edd=off quiet
initrd /boot/initrd.img-4.9.0-6-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 4.9.0-6-686-pae (recovery mode) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-6-686-pae-root=UUID=62468dca-d143-4a69-92ce-584eabcfb4da ro single noapic edd=off-62468dca-d143-4a69-92ce-584eabcfb4da' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
else
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
fi
linux /boot/vmlinuz-4.9.0-6-686-pae root=UUID=62468dca-d143-4a69-92ce-584eabcfb4da ro single noapic edd=off
initrd /boot/initrd.img-4.9.0-6-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 4.9.0-6-686 (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-6-686--62468dca-d143-4a69-92ce-584eabcfb4da' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
else
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
fi
linux /boot/vmlinuz-4.9.0-6-686 root=UUID=62468dca-d143-4a69-92ce-584eabcfb4da ro noapic edd=off quiet
initrd /boot/initrd.img-4.9.0-6-686
}
menuentry 'Debian GNU/Linux, with Linux 4.9.0-6-686 (recovery mode) (on /dev/mmcblk0p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-6-686-root=UUID=62468dca-d143-4a69-92ce-584eabcfb4da ro single noapic edd=off-62468dca-d143-4a69-92ce-584eabcfb4da' {
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
else
search --no-floppy --fs-uuid --set=root 62468dca-d143-4a69-92ce-584eabcfb4da
fi
linux /boot/vmlinuz-4.9.0-6-686 root=UUID=62468dca-d143-4a69-92ce-584eabcfb4da ro single noapic edd=off
initrd /boot/initrd.img-4.9.0-6-686
}
}
### 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 ###
### 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 ###
root@darkstar/boot/grub#
When I tried to run os-prober directly, as you had suggested, I had to install it first (pacman -S). Then I ran it. And this has quite changed things! Perhaps grub-mkconfig needed the os-prober program.
Alright. Now I have two grub.cfg's. One in the Debian partition, which is the one the bootloader used up until now and one in the Arch partition, the one just created. Which one will be the boot loader use the next time I boot? I can rename the grub.cfg in the Debian partition and see what happens.
EDIT: I renamed the Debian partition grub.cfg so now the bootloader could only see the one recently created. But when I booted I was presented with only a grub prompt!
When I tried to run os-prober directly, as you had suggested, I had to install it first (pacman -S). Then I ran it. And this has quite changed things! Perhaps grub-mkconfig needed the os-prober program.
not just perhaps.
Quote:
Now I have two grub.cfg's. One in the Debian partition, which is the one the bootloader used up until now and one in the Arch partition, the one just created. Which one will be the boot loader use the next time I boot?
that is entirely dependent on where you last ran the "grub-install" command.
renaming grub.cfg is totally useless and even potentially harmful.
Thanks a lot. Now I don't see in the wiki an answer to these questions: I boot in the BIOS compatibility (legacy) mood (BIOS menu). And I want an MBR type boot sector. Though I read the grub-install man page, I'm unable to find the options to accomplish those goals.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.