You are not logged in.
Whenever I use pacman to update the linux package, it creates an initramfs image based on the running kernel version instead of the updated kernel version. Since pacman also deletes the modules directory of the old/running kernel version, this breaks my boot.
I can fix this by running mkinitcpio and manually specifying the new kernel version with the -k flag, but it seems like the builtin pacman linux hook is supposed to be doing this.
Here's the relevant output from pacman when updating linux:
# pacman -Syu linux
[...]
==> Building image from preset: /etc/mkinitcpio.d/linux.present: 'default'
-> Starting build: 4.14.15-1-ARCH
[running build hooks]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successfulThere are no error messages and it looks like pacman has successfully running mkinitcpio but this breaks my boot and probably isn't the intended behavior of pacman.
It seems like this is just an issue with my pacman config, but just in case here's some more info about my system. My boot partition is mounted and writable when I run the pacman update. mkinitcpio does write to /boot/initramfs-linux.img and changes the mtime and ctime. My boot partition is on a separate disk than my root partition. Here's it's fstab entry:
UUID=5ADA-42D7 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2Besides the UUID, those options have simply been grandfathered over in their original state (probably an old Arch install).
If I boot from a live media, chroot into my system root, and run pacman, it updates my initramfs properly.
mkinitcpio -p itself also fails but it correctly errors out and reports that it couldn't find the modules directory for the kernel it was trying to create an image for.
Thanks.
Last edited by khouli (2018-02-01 22:55:48)
Offline
We'll need full logs.
Offline
Here's an install of linux from the system after manually fixing the initramfs:
$ sudo pacman -S -v linux > loglog:
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Hook Dirs : /usr/share/libalpm/hooks/ /etc/pacman.d/hooks/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
GPG Dir : /etc/pacman.d/gnupg/
Targets : linux
resolving dependencies...
looking for conflicting packages...
Packages (1) linux-4.14.15-1
Total Installed Size: 101.19 MiB
Net Upgrade Size: 0.00 MiB
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Running pre-transaction hooks...
(1/1) Remove DKMS modules
==> dkms remove vboxhost/5.2.6_OSE -k 4.14.15-1-ARCH
:: Processing package changes...
reinstalling linux...
:: Running post-transaction hooks...
(1/5) Updating linux module dependencies...
(2/5) Install DKMS modules
==> dkms install vboxhost/5.2.6_OSE -k 4.14.15-1-ARCH
(3/5) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 4.14.15-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [mdadm_udev]
Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays.
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 4.14.15-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
-> Running build hook: [mdadm_udev]
Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays.
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
(4/5) cleaning up old packages
==> no candidate packages found for pruning
(5/5) Arming ConditionNeedsUpdate...Would anything else be helpful? I could break things again and get more logs by reinstalling the cached version of the previous linux package if that would help.
Last edited by khouli (2018-02-01 18:39:36)
Offline
Yes please downgrade linux to the last version from the cache and post the output from that command and after that the output of
bsdcpio -it < /boot/initramfs-linux.imgOffline
That log shows it building the initramfs for the correct kernel, so no problems there.
Offline
I downgraded back to Linux 4.14-10-1. This actually also broke my system and I had to manually create the 4.14-10-1 initramfs. After getting back to a bootable 4.14-10-1 system, there's a log of using pacman to upgrade linux that broke my boot:
$ uname -r
4.14.10-1-ARCH
$ pacman -Qi linux
Name : linux
Version : 4.14.10-1
Description : The Linux kernel and modules
Architecture : x86_64
URL : https://www.kernel.org/
Licenses : GPL2
Groups : base
Provides : None
Depends On : coreutils linux-firmware kmod mkinitcpio>=0.7
Optional Deps : crda: to set the correct wireless channels of your country
Required By : nvidia
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 96.53 MiB
Packager : Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Build Date : Fri 29 Dec 2017 02:21:13 PM CST
Install Date : Thu 01 Feb 2018 12:50:36 PM CST
Install Reason : Explicitly installed
Install Script : Yes
Validated By : None
$ sudo pacman -Syu --noconfirm linux
:: Synchronizing package databases...
core is up to date
extra is up to date
downloading community.db...
multilib is up to date
:: Starting full system upgrade...
warning: checkbashisms: local (20141116-1) is newer than community (2.17.12-1)
resolving dependencies...
looking for conflicting packages...
Packages (2) linux-headers-4.14.15-1 linux-4.14.15-1
Total Installed Size: 142.03 MiB
Net Upgrade Size: 4.68 MiB
:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Running pre-transaction hooks...
(1/1) Remove DKMS modules
==> dkms remove vboxhost/5.2.6_OSE -k 4.14.10-1-ARCH
:: Processing package changes...
upgrading linux...
upgrading linux-headers...
:: Running post-transaction hooks...
(1/5) Updating linux module dependencies...
(2/5) Install DKMS modules
==> dkms install vboxhost/5.2.6_OSE -k 4.14.15-1-ARCH
(3/5) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 4.14.15-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [mdadm_udev]
Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays.
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 4.14.15-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
-> Running build hook: [mdadm_udev]
Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays.
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
(4/5) cleaning up old packages
==> no candidate packages found for pruning
(5/5) Arming ConditionNeedsUpdate...Boot breaks because the system can't mount /boot because it couldn't load the vfat kernel module. Some commands from emergency mode (transcribed by hand so small chance of typos):
# uname -r
4.14.10-1-ARCH
# ls /lib/modules
4.14.15-1-ARCH extramodules-4.14-ARCHpacman reports the installed linux package is 4.14.15-1.
I saved the output of bsdcpio -it < /boot/initramfs-linux.img from emergency mode, but somehow while going back and forth I've borked my system fairly heavily so I can't post that just yet.
Offline
Whenever I use pacman to update the linux package, it creates an initramfs image based on the running kernel version instead of the updated kernel version. Since pacman also deletes the modules directory of the old/running kernel version, this breaks my boot.
I can fix this by running mkinitcpio and manually specifying the new kernel version with the -k flag, but it seems like the builtin pacman linux hook is supposed to be doing this.
[...]
mkinitcpio -p itself also fails but it correctly errors out and reports that it couldn't find the modules directory for the kernel it was trying to create an image for.
Thanks.
Packages (1) linux-4.14.15-1
This *should* be categorically impossible, as that is precisely what pacman itself does.
$ cat /usr/share/libalpm/hooks/90-linux.hook
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/vmlinuz-linux
Target = usr/lib/initcpio/*
[Action]
Description = Updating linux initcpios...
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p linuxSo I don't understand how the same mkinitcpio command when run as a PostTransaction hook in pacman, can successfully complete, report that it is building against the correct kernel in the process, and end up with the wrong kernel inside the cpio image, while immediately running the same command after pacman, cannot detect the modules directory. This is rather odd!
What is the exact mkinitcpio error? Also loqs' suggestion would help.
EDIT: Okay, thanks. So somehow, mkinitcpio is proceeding as expected, writing a new initcpio to /boot, which you then boot from, but somehow /boot also still has the vmlinuz from linux 4.14.10-1???
It sounds almost like something is *copying the old vmlinuz back* after the pacman hook runs, but before you try running mkinitcpio by hand or rebooting.
Last edited by eschwartz (2018-02-01 19:23:32)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Since it's actually booting the old kernel, that tells me your bootloader configuration is messed up. It's somehow still finding the old kernel even after it's been updated.
Offline
I've unborked things. First, here's that log of bsdcpio -it < /boot/initramfs-linux.img from emergency mode after upgrading to linux-4.14.15-1 from a system running Linux 4.14.10-1 and rebooting:
buildconfig
config
hooks
hooks/udev
init
init_functions
VERSION
lib64
sbin
bin
lib
usr
usr/lib64
usr/sbin
usr/bin
usr/bin/fsck
usr/bin/fsck.ext3
usr/bin/fsck.ext2
usr/bin/fsck.ext4
usr/bin/mdadm
usr/bin/systemd-tmpfiles
usr/bin/udevadm
usr/bin/switch_root
usr/bin/mount
usr/bin/blkid
usr/bin/modinfo
usr/bin/modprobe
usr/bin/lsmod
usr/bin/rmmod
usr/bin/insmod
usr/bin/depmod
usr/bin/kmod
usr/bin/yes
usr/bin/xxd
usr/bin/wget
usr/bin/wc
usr/bin/vi
usr/bin/uptime
usr/bin/unshare
usr/bin/unlink
usr/bin/uniq
usr/bin/uname
usr/bin/umount
usr/bin/truncate
usr/bin/true
usr/bin/touch
usr/bin/tftp
usr/bin/test
usr/bin/telnet
usr/bin/tail
usr/bin/tac
usr/bin/sync
usr/bin/strings
usr/bin/stat
usr/bin/sort
usr/bin/sleep
usr/bin/shuf
usr/bin/sha512sum
usr/bin/sha256sum
usr/bin/sha1sum
usr/bin/sh
usr/bin/setfont
usr/bin/seq
usr/bin/sed
usr/bin/route
usr/bin/rmdir
usr/bin/rm
usr/bin/reboot
usr/bin/readlink
usr/bin/pwd
usr/bin/ps
usr/bin/printf
usr/bin/poweroff
usr/bin/ping6
usr/bin/ping
usr/bin/pidof
usr/bin/pgrep
usr/bin/paste
usr/bin/partprobe
usr/bin/openvt
usr/bin/nslookup
usr/bin/nsenter
usr/bin/nproc
usr/bin/netstat
usr/bin/nc
usr/bin/mv
usr/bin/mountpoint
usr/bin/mktemp
usr/bin/mkpasswd
usr/bin/mknod
usr/bin/mkfifo
usr/bin/mkdir
usr/bin/md5sum
usr/bin/lsscsi
usr/bin/ls
usr/bin/losetup
usr/bin/loadkmap
usr/bin/loadfont
usr/bin/ln
usr/bin/link
usr/bin/less
usr/bin/killall
usr/bin/kill
usr/bin/kbd_mode
usr/bin/iptunnel
usr/bin/iprule
usr/bin/iproute
usr/bin/ipneigh
usr/bin/iplink
usr/bin/ipaddr
usr/bin/ip
usr/bin/install
usr/bin/init
usr/bin/ifconfig
usr/bin/hexdump
usr/bin/head
usr/bin/halt
usr/bin/grep
usr/bin/getopt
usr/bin/fstrim
usr/bin/fsfreeze
usr/bin/free
usr/bin/fatattr
usr/bin/false
usr/bin/fallocate
usr/bin/expr
usr/bin/env
usr/bin/echo
usr/bin/du
usr/bin/dmesg
usr/bin/dirname
usr/bin/df
usr/bin/dd
usr/bin/cut
usr/bin/cttyhack
usr/bin/cp
usr/bin/clear
usr/bin/chroot
usr/bin/chown
usr/bin/chmod
usr/bin/chgrp
usr/bin/cat
usr/bin/blkdiscard
usr/bin/basename
usr/bin/awk
usr/bin/ash
usr/bin/[
usr/bin/busybox
usr/lib
usr/lib/libe2p.so.2
usr/lib/libcom_err.so.2
usr/lib/libext2fs.so.2
usr/lib/modprobe.d
usr/lib/modprobe.d/systemd.conf
usr/lib/modprobe.d/nvidia.conf
usr/lib/modprobe.d/bluetooth-usb.conf
usr/lib/udev
usr/lib/udev/scsi_id
usr/lib/udev/ata_id
usr/lib/udev/rules.d
usr/lib/udev/rules.d/64-md-raid-assembly.rules
usr/lib/udev/rules.d/63-md-raid-arrays.rules
usr/lib/udev/rules.d/80-drivers.rules
usr/lib/udev/rules.d/64-btrfs.rules
usr/lib/udev/rules.d/60-persistent-storage.rules
usr/lib/udev/rules.d/50-udev-default.rules
usr/lib/libsystemd.so.0
usr/lib/libdbus-1.so.3
usr/lib/libnl-3.so.200
usr/lib/libnl-genl-3.so.200
usr/lib/libm.so.6
usr/lib/libudev.so.1
usr/lib/libpcap.so.1
usr/lib/libjson-c.so.3
usr/lib/libdl.so.2
usr/lib/libargon2.so.1
usr/lib/libgpg-error.so.0
usr/lib/libdevmapper.so.1.02
usr/lib/libattr.so.1
usr/lib/liblz4.so.1
usr/lib/libidn.so.11
usr/lib/libseccomp.so.2
usr/lib/libip4tc.so.0
usr/lib/libgcrypt.so.20
usr/lib/libcryptsetup.so.12
usr/lib/libcap.so.2
usr/lib/libacl.so.1
usr/lib/libkmod.so.2
usr/lib/systemd
usr/lib/systemd/libsystemd-shared-236.so
usr/lib/systemd/systemd-udevd
usr/lib/librt.so.1
usr/lib/libmount.so.1
usr/lib/libuuid.so.1
usr/lib/libblkid.so.1
usr/lib/libpthread.so.0
usr/lib/libz.so.1
usr/lib/liblzma.so.5
usr/lib/ld-linux-x86-64.so.2
usr/lib/libc.so.6
usr/lib/libcrypt.so.1
usr/lib/modules
usr/lib/modules/4.14.10-1-ARCH
usr/lib/modules/4.14.10-1-ARCH/modules.devname
usr/lib/modules/4.14.10-1-ARCH/modules.builtin.bin
usr/lib/modules/4.14.10-1-ARCH/modules.symbols.bin
usr/lib/modules/4.14.10-1-ARCH/modules.softdep
usr/lib/modules/4.14.10-1-ARCH/modules.alias.bin
usr/lib/modules/4.14.10-1-ARCH/modules.dep.bin
usr/lib/modules/4.14.10-1-ARCH/kernel
usr/lib/modules/4.14.10-1-ARCH/kernel/async_memcpy.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/xhci-hcd.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/hid.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/md-mod.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/usb-storage.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/raid0.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/scsi_mod.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/async_raid6_recov.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/ahci.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/ehci-pci.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/ehci-hcd.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/i8042.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/crc16.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/async_xor.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/sr_mod.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/libata.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/raid6_pq.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/serio.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/async_tx.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/jbd2.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/xhci-pci.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/libahci.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/usbhid.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/sd_mod.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/mbcache.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/crc32c_generic.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/ext4.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/libcrc32c.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/hid-generic.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/fscrypto.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/async_pq.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/xor.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/usb-common.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/crc32c-intel.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/usbcore.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/cdrom.ko
usr/lib/modules/4.14.10-1-ARCH/kernel/raid456.ko
usr/local
usr/local/sbin
usr/local/bin
usr/local/lib
etc
etc/ld.so.cache
etc/mdadm.conf
etc/modprobe.d
etc/modprobe.d/udb.conf
etc/modprobe.d/qemu-system-x86.conf
etc/modprobe.d/kvm.conf
etc/modprobe.d/firewalld-sysctls.conf
etc/ld.so.conf
etc/initrd-release
etc/fstab
etc/mtab
tmp
run
dev
sys
proc
new_rootOffline
Right now I'm at a working 4.14.15-1.
It sounds like a log of mkinitcpio -p linux from 4.14.10-1 after a pacman -Su linux would be useful. Anything else?
Installing the cached linux 4.14.10-1 from a running 4.14.15-1 does also break my initramfs btw.
Offline
Your initramfs is fine. Your bootloader and/or partition mounting is the problem. Look there.
Offline
The config for the bootloader the system uses and the output of `cat /proc/cmdline` If you unmount /boot is there a kernel in the /boot directory or the root filesystem?
Offline
Using bsdcpio some more, I've found that /boot/initramfs-linux.img is being changed between pacman finishing and reboot failing.
What I said earlier about mkinitcpio -p linux failing was misleading by the way. It only fails after I'm in emergency mode and already have a mismatching kernel and modules directory.
EDIT: Nevermind, I think that's wrong. I was comparing the output of bsdcpio from a working system and a system that failed to mount /boot.
Last edited by khouli (2018-02-01 21:20:24)
Offline
Are you going to start responding to posts or are we just done here?
Offline
It looks like I've been writing to /boot when /dev/sda2 is mounted there (intentional) and also when nothing is mounted there and it's just a directory under / (not intentional) and that's a big part of my confusion.
Sorry Scimmia, I'm not trying to ignore anyone. I'm trying to get back to a bootable system so I can get the info about my boot config. I was just trying to post what might be a useful observation in the meantime.
Last edited by khouli (2018-02-01 21:46:38)
Offline
(I got stuck fighting with an unbootable system for a while. Thanks for bearing with me.)
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=45c23bf3-c43c-454a-8acb-362bc2aa5557 rw quietI use GRUB. This is the contents of /boot/grub/grub.cfg. (That's the only relevant config once it's generated, right?)
#
# 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_gpt
insmod part_gpt
insmod diskfilter
insmod mdraid1x
insmod ext2
set root='mduuid/973814a655ea19f26e3c90040bd6fa4d'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/973814a655ea19f26e3c90040bd6fa4d' 45c23bf3-c43c-454a-8acb-362bc2aa5557
else
search --no-floppy --fs-uuid --set=root 45c23bf3-c43c-454a-8acb-362bc2aa5557
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-45c23bf3-c43c-454a-8acb-362bc2aa5557' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
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 5ADA-42D7
else
search --no-floppy --fs-uuid --set=root 5ADA-42D7
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=45c23bf3-c43c-454a-8acb-362bc2aa5557 rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-45c23bf3-c43c-454a-8acb-362bc2aa5557' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-45c23bf3-c43c-454a-8acb-362bc2aa5557' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
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 5ADA-42D7
else
search --no-floppy --fs-uuid --set=root 5ADA-42D7
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=45c23bf3-c43c-454a-8acb-362bc2aa5557 rw quiet
echo 'Loading initial ramdisk ...'
initrd /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-45c23bf3-c43c-454a-8acb-362bc2aa5557' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
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 5ADA-42D7
else
search --no-floppy --fs-uuid --set=root 5ADA-42D7
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=45c23bf3-c43c-454a-8acb-362bc2aa5557 rw quiet
echo 'Loading initial ramdisk ...'
initrd /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 'Windows Boot Manager (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-5ADA-42D7' {
insmod part_gpt
insmod fat
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 5ADA-42D7
else
search --no-floppy --fs-uuid --set=root 5ADA-42D7
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### 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 "System shutdown" {
echo "System shutting down..."
halt
}
menuentry "System restart" {
echo "System rebooting..."
reboot
}
### 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 ###
### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###There are indeed separate kernels in the properly mounted /boot and the unmounted /boot and they've both been written to today. Hmmm... It looks like loqs nailed it. I've been writing into more than one /boot and I just need to figure out how to aim grub at the initramfs-linux.img in intended location which is /dev/sda2.
Anything else I forgot to respond with? Thanks again.
EDIT: Here's my fstab to help make sense of the UUIDs
# Static information about the filesystems.
# See fstab(5) for details.
#
# <file system> <dir> <type> <options> <dump> <pass>
UUID=45c23bf3-c43c-454a-8acb-362bc2aa5557 / ext4 rw,relatime,discard,data=ordered 0 2
UUID=5ADA-42D7 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
/mnt/bigarray/swap none swap sw 0 0
UUID=c17c7067-831d-4116-8e49-dcce13a4162c /mnt/bigarray ext4 defaults 0 2Last edited by khouli (2018-02-01 22:19:13)
Offline
I haven't quite figured out how to tell grub to do the right thing, but I understand the problem now and I should be able to take it from here. Thanks.
Offline