You are not logged in.
I think this happened with the update to grub2, at least I never realized that behavior before:
after the update my system wouldn't boot, complaining that it couldn't find kernel or initramfs. I booted an arch cd, mounted the boot partition (/dev/sda1) and checked, both files were there, the names were correct, too.
After copying the two files to the 'boot' folder on the root partition (/dev/sda5) the system booted just fine.
What puzzles me is that apparently the boot partition is accessed to read the grub config file but not to load kernel and initramfs. So far neither reinstalling the kernel nor fiddling around with mkinitcpio fixed the issue.
Last edited by hugin84 (2013-07-30 18:51:17)
Offline
I think that grub2 is just far too complex for its own good... so I cannot help you with grub2 specifically. But in terms of the necessity of a separate /boot, I can offer a couple cents worth of opinion here (note that this is definitely opinion, not law).
I think that unless you have a good reason to have a separate /boot, you should really just avoid it, as it is another small addition of complexity that is probably not at all needed. That is, if you have a standard system layout in which you don't use LVM2 or mdadm or Luks/dmcrypt, then you should just incorporate your /boot into your rootfs. Though I think (not certain) that grub2 also has support for reading the /boot off of LVM2 as well as mdadm, so if you preferred bootloader is grub2, then even that might not be necessary. Then the other good reason why you might want to have /boot separate is because you use a filesystem for rootfs that is not supported by most bootloaders (or your bootloader). But then, again if you preferred bootloader is grub2, then it has support for just about any filesystem you can think of.
I keep a separate /boot because my /boot is my EFI System Partition, so I don't have much of a choice in that regard. But it is far too often that people come to these forums complaining that they machine isn't working right, and that it is reporting that all kinds of kernel modules are not found or failing to load, etc. These issues are almost always because people forget to mount their /boot during a kernel upgrade, so their initramfs and kernel get written to the wrong place.
Anyway... just my two cents.
Offline
Without more detail, like your partition table, grub config file etc., anything more than WW's general observations is not possible...
Moving to NC.
Offline
apologies for the missing info, I was hoping I just made some obvious mistake and did not want to bloat my post with an almost unchanged grub.cfg.
I agree with WonderWoofy, at least as far as grub2's complexity is concerned. I've been using grub for years and apparently I'm no longer supposed to touch /boot/grub/grub.cfg (which, of course, I did as I didn't know how else to get my system up and running again in a timely manner and I admit I have been too lazy to change the correct config files afterwards).
Anyway, I didn't want to whine about grub2 and say how much better (or at least easier) I think good old grub was, complaining doesn't help I guess. grub2 seems to be here to stay, at least for now, so just making it work seems like a better idea.
If I were to install a new system I'd probably get rid of the boot partition but I don't want to go that far unless I have to (and its just a workaround for the issue, not a fix)
as to the requested info:
partition table:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xa5425a8dDevice Boot Start End Blocks Id System
/dev/sda1 63 128519 64228+ 83 Linux
/dev/sda2 * 128520 58717574 29294527+ 7 HPFS/NTFS/exFAT
/dev/sda3 58717575 74718314 8000370 82 Linux swap / Solaris
/dev/sda4 74718315 1953520001 939400843+ f W95 Ext'd (LBA)
/dev/sda5 74718378 133307369 29294496 83 Linux
/dev/sda6 133307433 1109866589 488279578+ 7 HPFS/NTFS/exFAT
/dev/sda7 1109866653 1953520001 421826674+ 83 Linux
/dev/sda1 -> /boot
/dev/sda2 -> Windows C:
/dev/sda3 -> swap
/dev/sda5 -> /
/dev/sda6 -> Windows D:
/dev/sda7 -> /mnt/foo
and here's my grub.cfg:
### 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=""
fiexport 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
fifunction 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,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 dac07213-50d3-4811-85c8-d3b6c83e5a02
else
search --no-floppy --fs-uuid --set=root dac07213-50d3-4811-85c8-d3b6c83e5a02
fi
font="/usr/share/grub/unicode.pf2"
fiif 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
set timeout=5
### END /etc/grub.d/00_header ###### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-dac07213-50d3-4811-85c8-d3b6c83e5a02' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 dac07213-50d3-4811-85c8-d3b6c83e5a02
else
search --no-floppy --fs-uuid --set=root dac07213-50d3-4811-85c8-d3b6c83e5a02
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=dac07213-50d3-4811-85c8-d3b6c83e5a02 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
}
menuentry 'Arch 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-ad4103fa-d940-47ca-8506-301d8071d467' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 ad4103fa-d940-47ca-8506-301d8071d467
else
search --no-floppy --fs-uuid --set=root ad4103fa-d940-47ca-8506-301d8071d467
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=ad4103fa-d940-47ca-8506-301d8071d467 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}### END /etc/grub.d/10_linux ###
### 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 "Microsoft Windows 7" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-baremetal=ahci0,msdos2 E6B0C9F2B0C9C8EF
ntldr /bootmgr
}
### 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 ###
I have no idea where the UUID in the fallback entry comes from, I had to fix it for the regular option, not sure if that's related. That UUID does not show up in '/dev/disk/by-uuid/'
need any other info?
reading the config I wonder, would changing this line:
linux /boot/vmlinuz-linux root=UUID=dac07213-50d3-4811-85c8-d3b6c83e5a02 ro quiet
to this:
linux vmlinuz-linux root=UUID=<UUID of /dev/sda1> ro quiet
work?
Offline
just a friendly tip, try to use [ code ] tags instead of [ quote ] tags, it helps people read through things a little better.
Offline
reading the config I wonder, would changing this line:
linux /boot/vmlinuz-linux root=UUID=dac07213-50d3-4811-85c8-d3b6c83e5a02 ro quietto this:
linux vmlinuz-linux root=UUID=<UUID of /dev/sda1> ro quietwork?
Here is my entry:
menuentry "Arch Linux Kernel with systemd" --class arch --class gnu-linux --class gnu --class os {
savedefault
set gfxpayload="keep"
set root="${_arch64_boot}"
echo 'Llwytho Linux vmlinuz ar MyComputer ...'
linux /vmlinuz-linux root=${_root_lvol} ro rootfstype=${_rootfstype} ${_kernel_params}
echo 'Llwytho initial ramdisk ...'
initrd /initramfs-linux.img
}Note that I maintain grub.cfg by hand!
In the "set root" line, you would specify your /boot partition using UUID or whatever. -> should correspond to sda1 in your case.
In the "linux /vmlinuz-linux" line, root=<specification of partition for /> in your case this would be e.g. the UUID spec for sda5.
And I specify the initrd without /boot because it is at the root of the partition I set in the "set root" line. -> so if you are using sda1 as /boot, you would have an identical line to mine here.
EDIT: In case it isn't obvious, ${_arch64_boot}, ${_root_lvol} etc. are variables I set at the beginning of grub.cfg so I can easily change them for multiple entries in one place. For now, at least, specify yours directly using the UUID syntax, for example.
Last edited by cfr (2013-07-29 23:24:18)
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
that actually did the trick, thanks!
Offline