You are not logged in.

#1 2013-10-15 15:17:03

kodiak
Member
Registered: 2012-04-26
Posts: 59

[solved] normal.mod not found: BTRFS and GRUB2 issue

With todays update I crashed two machines saying:
GRUB loading..
Welcome to GRUB!
error: file /__active/boot/grub/i386-pc/normal.mod not found.
Entering rescue mode...
grub rescue>

I even do not see available images or can choose one to load. One machine is an old 32bit thinkpad, the other a new htpc from saphire. Both have been setup following the official installation guide with btrfs, including btrfs_advanced hook, with grub2. Todays update included kernel and btrfs-mkinitcpio update.


GPT-partitions:
sda1: 2mib bios boot partition
sda2_ xgib linux file system

mbr protective

btrfs-layout htpc:
id      top-level    path
257   5                __active
258  257             home
259  257             var
260  257             usr

btrfs-layout thinkpad:
id      top-level    path
257   5                __active
258   5               __active/home
259   5               __active/var
260   5               __active/usr
261   5               __snapshot/somesnapthot1
262   5               __snapshot/somesnapthot2

#
# 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 btrfs
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  81410cb0-62ba-408b-a5b2-a8a6354fb090
else
  search --no-floppy --fs-uuid --set=root 81410cb0-62ba-408b-a5b2-a8a6354fb090
fi
    font="/__active/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
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-81410cb0-62ba-408b-a5b2-a8a6354fb090' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	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  81410cb0-62ba-408b-a5b2-a8a6354fb090
	else
	  search --no-floppy --fs-uuid --set=root 81410cb0-62ba-408b-a5b2-a8a6354fb090
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/__active/boot/vmlinuz-linux root=UUID=81410cb0-62ba-408b-a5b2-a8a6354fb090 rw rootflags=subvol=__active  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/__active/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-81410cb0-62ba-408b-a5b2-a8a6354fb090' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	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  81410cb0-62ba-408b-a5b2-a8a6354fb090
	else
	  search --no-floppy --fs-uuid --set=root 81410cb0-62ba-408b-a5b2-a8a6354fb090
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/__active/boot/vmlinuz-linux root=UUID=81410cb0-62ba-408b-a5b2-a8a6354fb090 rw rootflags=subvol=__active  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/__active/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 ###
### 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 ###

### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
tmpfs		/tmp	tmpfs	nodev,nosuid,size=2G	0	0
UUID=81410cb0-62ba-408b-a5b2-a8a6354fb090	/	btrfs	defaults,noatime,subvol=__active	0	0

shm   /dev/shm   tmpfs   nodev,nosuid   0   0

fstab points to uuid of __active=sda2, and normal.mod is present. I have tried to reinstall grub in and grub-config on both machines, no change.

Last edited by kodiak (2013-10-16 09:27:07)

Offline

#2 2013-10-16 06:58:11

kodiak
Member
Registered: 2012-04-26
Posts: 59

Re: [solved] normal.mod not found: BTRFS and GRUB2 issue

grub rescue> set
prefix=(hd0,gpt2)/__active/boot/grub

grub rescue> ls
(hd0) (hd0,gpt2) (hd0,gpt1) (cd)

grub rescue> ls /
dev/ run/ boot/ lib sbin srv/ media/ usr/ opt/ bin home/ etc/ var/ tmp/ sys/ mnt/ proc/ root/

grub rescue> ls /boot
vmlinuz-linux grub/ inittramfs-linux.img initramfs-linuxfallback.img

when I set prefix to just /boot/grub I am able to insmod normal.mod, linux.mod etc. So is the entry in grub.cfg just incorrect? Maybe somebody can tell me how it would look like on a btrfs filesystem?

I have been following the guide on https://wiki.archlinux.org/index.php/In … Btrfs_root. Installation on thinkpad worked for over a year!! Suddenly broken?

Installing grub in chroot does not show any problems. I have tried to remove mkinitcpio-btrfs (pacman -R, removing the hook from the config, rebuild the image), without success. And reinstalling the hook did not change anything sad

Last edited by kodiak (2013-10-16 08:21:08)

Offline

#3 2013-10-16 07:02:30

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,577
Website

Re: [solved] normal.mod not found: BTRFS and GRUB2 issue

Not an Installation issue, moving to Kernel and Hardware...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#4 2013-10-16 09:26:23

kodiak
Member
Registered: 2012-04-26
Posts: 59

Re: [solved] normal.mod not found: BTRFS and GRUB2 issue

got it working - I am very very happy!

What I did: in rescue mode, set prefix to (hd0,gpt2)/boot/grub, then insmod linux,normal, then did normal, and had grub menu back. Here I had again to alter the path for the kernel, edit and drop __active from the path, and voila - it booted the normal way. Once up, I ran mkinitcpio, and reinstalled grub and grub.cfg. Again rebooting, and all fine now smile

Offline

Board footer

Powered by FluxBB