Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#38660 - [grub] generate relative path on btrfs, without subvolume name

Attached to Project: Arch Linux
Opened by Timofey (nefelim4ag) - Saturday, 25 January 2014, 20:13 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 24 April 2014, 14:08 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

On archlinux installed on btrfs with subvolumes, this script not see subvolumes.
Example
10_linux create menuentry
linux /@root/boot/vmlinuz-linux
but 10_archlinux
linux /boot/vmlinuz-linux
and archlinux missing fallow kernel boot options "rootflags=subvol=@root"
This bug causes what, system can't boot after update grub script

Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:
have arch installed in subvolume on btrfs, root subvolume @root.
1. grub-mkconfig -o /boot/grub/grub.cfg
2. cat /boot/grub/grub.cfg | grep @root
see one line linux /@root/boot/vmlinuz-linux

must see multiple line (2 per menuentry) and kernel boot option rootflags=subvol=@root
This task depends upon

Closed by  Dave Reisner (falconindy)
Thursday, 24 April 2014, 14:08 GMT
Reason for closing:  Fixed
Additional comments about closing:  grub 1:2.02.beta2-3
Comment by Keshav Amburay (the.ridikulus.rat) - Sunday, 09 February 2014, 01:06 GMT
Please test updated 10_archlinux script at http://ix.io/ap6 .
Comment by Timofey (nefelim4ag) - Sunday, 09 February 2014, 02:04 GMT
> Please test updated 10_archlinux script at http://ix.io/ap6 .
path is good, but missing rootflags "rootflags=subvol=@root"
Comment by Tobias Powalowski (tpowa) - Tuesday, 25 February 2014, 11:35 GMT
Please try 2.02.beta2-2 package from testing repository.
Comment by Timofey (nefelim4ag) - Tuesday, 25 February 2014, 15:47 GMT
### BEGIN /etc/grub.d/10_archlinux ###
Found linux image: /boot/vmlinuz-linux
Found initramfs image: /boot/initramfs-linux.img

menuentry "Arch Linux pkg-linux kernel" --class arch-linux --class arch --class gnu-linux --class gnu --class os {

if [ x$feature_all_video_module = xy ]; then
insmod all_video
fi
set gfxpayload=keep
insmod btrfs
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 9ecbd1f4-40ac-4047-be67-59c4afea9d29
else
search --no-floppy --fs-uuid --set=root 9ecbd1f4-40ac-4047-be67-59c4afea9d29
fi
echo 'Loading Arch Linux pkg-linux kernel ...'
linux /@root/boot/vmlinuz-linux root=UUID=9ecbd1f4-40ac-4047-be67-59c4afea9d29 rw quiet
echo 'Loading Arch Linux pkg-linux kernel initramfs ...'
initrd /@root/boot/initramfs-linux.img
}

Found fallback initramfs image: /boot/initramfs-linux-fallback.img

menuentry "Arch Linux pkg-linux kernel (fallback initramfs)" --class arch-linux --class arch --class gnu-linux --class gnu --class os {

if [ x$feature_all_video_module = xy ]; then
insmod all_video
fi
set gfxpayload=keep
insmod btrfs
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 9ecbd1f4-40ac-4047-be67-59c4afea9d29
else
search --no-floppy --fs-uuid --set=root 9ecbd1f4-40ac-4047-be67-59c4afea9d29
fi
echo 'Loading Arch Linux pkg-linux kernel ...'
linux /@root/boot/vmlinuz-linux root=UUID=9ecbd1f4-40ac-4047-be67-59c4afea9d29 rw quiet
echo 'Loading Arch Linux pkg-linux kernel fallback initramfs ...'
initrd /@root/boot/initramfs-linux-fallback.img
}

### END /etc/grub.d/10_archlinux ###

### BEGIN /etc/grub.d/10_linux ###
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9ecbd1f4-40ac-4047-be67-59c4afea9d29' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod btrfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 9ecbd1f4-40ac-4047-be67-59c4afea9d29
else
search --no-floppy --fs-uuid --set=root 9ecbd1f4-40ac-4047-be67-59c4afea9d29
fi
echo 'Loading Linux linux ...'
linux /@root/boot/vmlinuz-linux root=UUID=9ecbd1f4-40ac-4047-be67-59c4afea9d29 rw rootflags=subvol=@root quiet
echo 'Loading initial ramdisk ...'
initrd /@root/boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-9ecbd1f4-40ac-4047-be67-59c4afea9d29' {
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-9ecbd1f4-40ac-4047-be67-59c4afea9d29' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod btrfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 9ecbd1f4-40ac-4047-be67-59c4afea9d29
else
search --no-floppy --fs-uuid --set=root 9ecbd1f4-40ac-4047-be67-59c4afea9d29
fi
echo 'Loading Linux linux ...'
linux /@root/boot/vmlinuz-linux root=UUID=9ecbd1f4-40ac-4047-be67-59c4afea9d29 rw rootflags=subvol=@root quiet
echo 'Loading initial ramdisk ...'
initrd /@root/boot/initramfs-linux.img
}
}
For general and fallback boot entry missing rootflags=subvol=@root
Comment by Luis Agostinho (luismagostinho) - Friday, 21 March 2014, 20:08 GMT
I also have this problem.

I think you need to change the parameters and not the device to add rootflags=subvol=...
In the upstream script they change the GRUB_CMDLINE_LINUX variable to add this.

And the order between the case "${ROOT_PART_FS}" and the next if needs to be changed, because that if will set the variable GRUB_LINUX_ROOT_DEVICE no mater what removing the zfs config.
This is what is done in the upstream script.
Comment by Keshav Amburay (the.ridikulus.rat) - Wednesday, 26 March 2014, 22:51 GMT
Please try 10_archlinux from https://aur.archlinux.org/packages/grub-git/ .
Comment by Timofey (nefelim4ag) - Thursday, 27 March 2014, 21:55 GMT
echo 'Loading Arch Linux pkg-linux kernel ...'
linux /@root/boot/vmlinuz-linux root=UUID=9ecbd1f4-40ac-4047-be67-59c4afea9d29 rw quiet
echo 'Loading Arch Linux pkg-linux kernel initramfs ...'
initrd /@root/boot/initramfs-linux.img

same, not fixed
Comment by Keshav Amburay (the.ridikulus.rat) - Monday, 07 April 2014, 23:55 GMT
@Timofey: Try the latest grub pkg from [testing].
Comment by Timofey (nefelim4ag) - Sunday, 20 April 2014, 19:45 GMT
Fixed, thanks for your work. =)

Loading...