You are not logged in.
I am trying to setup grub to skip the initial menu, but I cannot find the file in the standard location. I made the switch from ubuntu to arch a while ago, and at the time, to get arch on the grub menu I ran boot-repair, and I keep the ubuntu partition for emergencies (i.e. when I modify a file so that arch won't boot .
Unfortunately, the file of my ubuntu partition is not the one governing grub's behavior (I booted in ubuntu and run update-grub after setting the two timeout counter to 0).
ubuntu/etc/default/grub
I have also verified that the grub.cfg file had all timeout=0.
There is no grub file in
/etc/default/grub
in my arch partition and I tried to scan the whole partition with
# find . -name grub
which returned empty.
I have a EFI boot partition, which I also inspected, to no avail. Where else could I look? (PS if it were in the ubuntu partition, suggestion on using chroot to make all the changes etc. would be appreciated, I had a look on the wiki page, but didn't want to mess with it without having experience).
Thanks
PS (after reading the forum section rules): I wasn't sure this was the right section of the forum, but I've seen other grub related topics. Please, move it if you think it is misplace (or let me know which is the more appropriate section).
Last edited by navi_se (2016-01-07 01:17:42)
Offline
If your grub is installed under Ubuntu - you need to to hit up the Ubuntu forum for support... If you wish to have Arch control your grub you will have to install and configure it for UEFI
https://wiki.archlinux.org/index.php/GRUB
https://wiki.archlinux.org/index.php/Be … oot_loader
If your goal is to have as few clicks as possible you may want to consider systemd-boot
Last edited by satanselbow (2016-01-04 12:20:11)
Offline
press "c" on grub menu to get into grub shell, then run
probe -u $root
echo $prefix
Then you'll know what drive/path the grub is reading config file and loading modules from (match the UUID with output in `lsblk -f`).
Offline
As a sanity check, What are the output of
sudo fdisk -l /dev/sda
and
lsblk
?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I have investigated the grub config file path. It is located in the ubuntu partition.
If I inspect
/mnt/ubuntu/boot/grub/grub.cfg
I can see that the options I have passed by running
sudo update-grub
after editing
/etc/default/grub
are present. E.g. :
8 ### BEGIN /etc/grub.d/00_header ###
9 if [ -s $prefix/grubenv ]; then
10 set have_grubenv=true
11 load_env
12 fi
13 if [ "${next_entry}" ] ; then
14 set default="${next_entry}"
15 set next_entry=
16 save_env next_entry
17 set boot_once=true
18 else
19 set default="7"
20 fi
on line 19 the number 7 is the number denoting my arch partition in the grub menu (so arch should be selected automatically, it doesn't). Also, for some reason now my ubuntu partition is giving me a "misaligned pointer" error (but I can boot it with one of the older kernel, from which I also attempted to run boot-repair to no avail).
$ sudo fdisk -l /dev/sda
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: F843B23F-E555-441B-8AA0-EFDBA8D3C232
Device Start End Sectors Size Type
/dev/sda1 2048 6143 4096 2M BIOS boot
/dev/sda2 1626488832 1920208895 293720064 140.1G Linux filesystem
/dev/sda3 477184 580061183 579584000 276.4G Linux filesystem
/dev/sda4 6144 477183 471040 230M EFI System
/dev/sda5 580061184 820004863 239943680 114.4G Linux filesystem
/dev/sda6 820004864 1626488831 806483968 384.6G Microsoft basic data
/dev/sda11 1920208896 1953523711 33314816 15.9G Linux swap
Partition table entries are not in disk order.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 2M 0 part
├─sda2 8:2 0 140.1G 0 part /mnt/ubuntu
├─sda3 8:3 0 276.4G 0 part /media/home_partition
├─sda4 8:4 0 230M 0 part
├─sda5 8:5 0 114.4G 0 part /
├─sda6 8:6 0 384.6G 0 part /media/Data
└─sda11 8:11 0 15.9G 0 part [SWAP]
Offline
Assuming you are indeed booting from EFI, the only possible volume is /dev/sda4. I note that that is not mounted at /boot. Had you mounted it when you looked at it?
Also, I note that /dev/sda1 is called "BIOS Boot". What is that, and is it possible that you are booting in legacy mode through that partition?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
You mind pasting the full grub.cfg instead?
Also by "investigated" do you mean you did what I mentioned in my last post? or were you referring to your `find` scan or so?
Last edited by tom.ty89 (2016-01-04 16:37:43)
Offline
Sorry, I am not very well versed with boot as I am a beginner (first linux and then arch less then one year ago). My boot should be EFI (and I believe I am not booting in legacy mode). I set up the boot via boot repair, as at the time repartitioning the disk corrupted the boot partition. When I migrated from ubuntu to arch, removing my old windows partition, I repartitioned the disk as follow.
/dev/sda1 # If I remember correctly this was required because of the partition table being GPT
/dev/sda4 # This is the proper EFI partition, I had to mount it to explore it, under a temporary folder under /mnt/
/dev/sda5 # This is hosting the arch install
/dev/sda2 # Hosting a ubuntu install, which I browse by mounting to /mnt/ubuntu when I am under arch
/dev/sda3,6,11 # Data and swap
Also, again mounting /dev/sda4 under
/mnt/temp/EFI/ubuntu
I can find another grub.cfg
which points to /dev/sda2 (checked against lsblk -f)
search.fs_uuid a3852ddb-8525-44e4-aab3-19c8d703513b root hd0,gpt2
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
Offline
Sure, here's the full grub.cfg on sda2. Also, by investigated I meant that I did what you suggested (previous draft had your name in it) to check where the file was located.
#
# 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
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="7"
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 recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; 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_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
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_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 0 ; then
set timeout=0
fi
fi
play 480 440 1
### 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,0; 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
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
linux /vmlinuz-linux root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro quiet splash $vt_handoff
initrd /initramfs-linux.img
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-a3852ddb-8525-44e4-aab3-19c8d703513b' {
menuentry 'Ubuntu, with Linux linux' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
}
menuentry 'Ubuntu, with Linux linux (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-recovery-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
}
menuentry 'Ubuntu, with Linux 3.16.0-45-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-45-generic-advanced-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.16.0-45-generic ...'
linux /boot/vmlinuz-3.16.0-45-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-45-generic
}
menuentry 'Ubuntu, with Linux 3.16.0-45-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-45-generic-recovery-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.16.0-45-generic ...'
linux /boot/vmlinuz-3.16.0-45-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-45-generic
}
menuentry 'Ubuntu, with Linux 3.16.0-44-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-44-generic-advanced-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.16.0-44-generic ...'
linux /boot/vmlinuz-3.16.0-44-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-44-generic
}
menuentry 'Ubuntu, with Linux 3.16.0-44-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-44-generic-recovery-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.16.0-44-generic ...'
linux /boot/vmlinuz-3.16.0-44-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-44-generic
}
menuentry 'Ubuntu, with Linux 3.16.0-41-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-41-generic-advanced-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.16.0-41-generic ...'
linux /boot/vmlinuz-3.16.0-41-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-41-generic
}
menuentry 'Ubuntu, with Linux 3.16.0-41-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-41-generic-recovery-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.16.0-41-generic ...'
linux /boot/vmlinuz-3.16.0-41-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-41-generic
}
menuentry 'Ubuntu, with Linux 3.16.0-30-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-30-generic-advanced-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.16.0-30-generic ...'
linux /boot/vmlinuz-3.16.0-30-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-30-generic
}
menuentry 'Ubuntu, with Linux 3.16.0-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-30-generic-recovery-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.16.0-30-generic ...'
linux /boot/vmlinuz-3.16.0-30-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.16.0-30-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-74-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-74-generic-advanced-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.13.0-74-generic ...'
linux /boot/vmlinuz-3.13.0-74-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.13.0-74-generic
}
menuentry 'Ubuntu, with Linux 3.13.0-74-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-74-generic-recovery-a3852ddb-8525-44e4-aab3-19c8d703513b' {
recordfail
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 a3852ddb-8525-44e4-aab3-19c8d703513b
else
search --no-floppy --fs-uuid --set=root a3852ddb-8525-44e4-aab3-19c8d703513b
fi
echo 'Loading Linux 3.13.0-74-generic ...'
linux /boot/vmlinuz-3.13.0-74-generic root=UUID=a3852ddb-8525-44e4-aab3-19c8d703513b ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.13.0-74-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/30_os-prober ###
menuentry 'Arch (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-9ec7a070-3a65-47c6-abb3-8487aa3dac70' {
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 9ec7a070-3a65-47c6-abb3-8487aa3dac70
else
search --no-floppy --fs-uuid --set=root 9ec7a070-3a65-47c6-abb3-8487aa3dac70
fi
linux /boot/vmlinuz-linux root=/dev/sda5
initrd /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch (on /dev/sda5)' $menuentry_id_option 'osprober-gnulinux-advanced-9ec7a070-3a65-47c6-abb3-8487aa3dac70' {
menuentry 'Arch (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--9ec7a070-3a65-47c6-abb3-8487aa3dac70' {
insmod part_gpt
insmod ext2
set root='hd0,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5 9ec7a070-3a65-47c6-abb3-8487aa3dac70
else
search --no-floppy --fs-uuid --set=root 9ec7a070-3a65-47c6-abb3-8487aa3dac70
fi
linux /boot/vmlinuz-linux root=/dev/sda5
initrd /boot/initramfs-linux.img
}
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
### 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 ${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
That is the configuration that is controlling your system.
You should configure your system have /dev/sda2 /dev/sda4 mounted on /boot. This way, the EFI partition will be visible from Arch as well as from Ubuntu. I think you missed mounting the boot partition in this step of the installation therefore when you ran genfstab it missed it. You should fix your /etc/fstab.
Edit: Fixed reference to EFI partition
Last edited by ewaller (2016-01-04 17:28:21)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
That is the configuration that is controlling your system.
You should configure your system have /dev/sda2 mounted on /boot. This way, the EFI partition will be visible from Arch as well as from Ubuntu. I think you missed mounting the boot partition in this step of the installation therefore when you ran genfstab it missed it. You should fix your /etc/fstab.
Basically I agree, though /dev/sda2 is the Ubuntu root partition, according to navi_se.
So the posted configuration is probably located at /boot/grub/grub.cfg on the partition, so mounting the partition at /boot does not seem like a good option to me.
If you, navi_se, plan to use Arch as your primary OS, I would recommend to
mount the EFI partition at /boot and edit /etc/fstab accordingly
copy over the grub.cfg
`grub-install --efi-directory=/boot ...'
If you want to update the grub.cfg using grub-mkconfig, you might also want to copy over /etc/default/grub and install os-prober.
By the way, 'set default=7' does not seem correct to me.
I never used this setting, so I can't tell whether the submenu entries count also, though in any case Arch is not the seventh entry.
Offline
No, I screwed up. I meant /dev/sda4.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
If you, navi_se, plan to use Arch as your primary OS, I would recommend to
mount the EFI partition at /boot and edit /etc/fstab accordingly
copy over the grub.cfg
`grub-install --efi-directory=/boot ...'
If you want to update the grub.cfg using grub-mkconfig, you might also want to copy over /etc/default/grub and install os-prober.
As I understand, the whole thing amounts to properly configuring grub starting from arch, which is the right thing to do, as I only keep ubuntu as spare backup, and I will do as soon as possible.
I don't understand if the first step is sufficient to fix the unresponsiveness of grub to the changes in the ubuntu/etc/default/grub. How can my arch fstab affect the working of grub located on ubuntu root?
By the way, 'set default=7' does not seem correct to me.
I never used this setting, so I can't tell whether the submenu entries count also, though in any case Arch is not the seventh entry.
I had this option set before, now it's screwed, but it worked, and 7 was the right number (there is a bunch of menu item for the recovery mode which should not be counted).
Offline
I don't understand if the first step is sufficient to fix the unresponsiveness of grub to the changes in the ubuntu/etc/default/grub. How can my arch fstab affect the working of grub located on ubuntu root?
It's grub-install that will change the game. When you re-run grub-install, it "register" where it should load the grub.cfg and modules (--boot-directory option, default is /boot when unspecified) in core.img or grub.efi. Not to confuse with --efi-directory though, that's where the efi binary is installed to (so it has to be an FAT-formatted ESP).
Last edited by tom.ty89 (2016-01-04 18:12:55)
Offline
I don't understand if the first step is sufficient to fix the unresponsiveness of grub to the changes in the ubuntu/etc/default/grub. How can my arch fstab affect the working of grub located on ubuntu root?
It can not. That is why I recommended to "properly configur[e] grub starting from arch" as you interpreted me correctly.
The only purpose of mounting the EFI partition at /boot is to be able to easily access it from within Arch.
Offline
The only purpose of mounting the EFI partition at /boot is to be able to easily access it from within Arch.
Which is rather important when you upgrade the kernel.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
grub doesn't really need the ESP as /boot though, it can load kernels and initramfs from anywhere. it's just a shared /boot partition can be convenient for dual-booting multi distro, especially if you rely on grub-mkconfig and so.
Last edited by tom.ty89 (2016-01-04 18:19:03)
Offline
respiranto wrote:The only purpose of mounting the EFI partition at /boot is to be able to easily access it from within Arch.
Which is rather important when you upgrade the kernel.
By 'easily' I meant, that it does not require manual fiddling as proposed on the EFISTUB wiki page.
Offline
I see. I am a bit wary of moving grub, as I learned the hard way that managing boot is always a delicate operation that requires a bit of time and effort (since restoring unbootable computer is always lots of fun and easy). Hence, I will set some time aside to do it in the future, and suck on to the suboptimal grub menu for a little longer.
If you, navi_se, plan to use Arch as your primary OS, I would recommend to
mount the EFI partition at /boot and edit /etc/fstab accordingly
copy over the grub.cfg
`grub-install --efi-directory=/boot ...'
If you want to update the grub.cfg using grub-mkconfig, you might also want to copy over /etc/default/grub and install os-prober.
By copying over you mean (abusing notation)
cp /mnt/ubuntu/boot/grub/grub.cfg /boot/grub/
wouldn't procure proper menu entry in grub also be part of the install process? Is this to avoid some problem (e.g. at some point a missing grub.cfg)?
If you don't mind holding my hand a little longer I believe that step one should be done by adding this to fstab
# Mount the boot partition
# UUID=3638-7E2A /mnt/boot/ vfat defaults,noatime 0 0
given the UUID of /dev/sda2
$ lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1
├─sda2 ext4 a3852ddb-8525-44e4-aab3-19c8d703513b /mnt/ubuntu
├─sda3 ext4 3ce81e05-0811-414a-843a-17008cc7cac8 /media/home_partition
├─sda4 vfat 3638-7E2A /mnt/usb
├─sda5 ext4 arch_root 9ec7a070-3a65-47c6-abb3-8487aa3dac70 /
├─sda6 ext4 11dd288f-d5c4-458f-9686-b396b558928f /media/Data
└─sda11 swap 487d15bd-288f-445d-9085-7bfc2d501c4b [SWAP]
Last edited by navi_se (2016-01-04 18:26:17)
Offline
By copying over you mean (abusing notation)
cp /mnt/ubuntu/boot/grub/grub.cfg /boot/grub/
Yes.
wouldn't procure proper menu entry in grub also be part of the install process? Is this to avoid some problem (e.g. at some point a missing grub.cfg)?
If the present grub.cfg is actually the one you are unhappy with, as ewaller said, you can also skip this step and simply regenerate the grub.cfg by running `grub-mkconfig -o /boot/grub/grub.cfg' from within Arch, having the ESP mounted at /boot.
If you don't mind holding my hand a little longer I believe that step one should be done by adding this to fstab
# Mount the boot partition # UUID=3638-7E2A /mnt/boot/ vfat defaults,noatime 0 0
You will have to remove the commenting '#' character and the mountpoint should be /boot instead of /mnt/boot.
Some further notes:
It is advisable to copy the contents of /boot somewhere else and to subsequently empty /boot before mounting the ESP there.
Then you can copy back the kernel, the initramfs and possibly other needed files (e.g. intel-ucode).
Offline
Thanks all of you for your suggestions, it worked like a charm! Since I didn't know that kernel and so on resided on /boot, mounting /dev/sda4 over /boot would hide them for me. Last line and a check of grub.cfg before rebooting made me recover them and copy them on the appropriate partition, polished boot partition with grub. Anoter round of grub-mkconfig and it was ready to go.
Another tricky thing, the wiki was unclear on where to place my grub.cfg file, in the end my commands were
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub --recheck
# grub-mkconfig -o /boot/grub/grub.cfg
also, it looks like it boots way faster now, peraphs placebo. Thanks again!
Last edited by navi_se (2016-01-07 01:23:17)
Offline
also, it looks like it boots way faster now, peraphs placebo. Thanks again!
GRUB now does not have to access anymore another partition to load its configuration and the kernel.
This does justify a shorter boot time, though I don't know, wehther it is actually notable.
Probably not more than 1 or 2 seconds, assuming an HDD.
Offline