Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669232 - sys-kernel/genkernel-next-68 fails to create grub.conf in gen_bootlader.sh when fstab is tab delimited.
Summary: sys-kernel/genkernel-next-68 fails to create grub.conf in gen_bootlader.sh wh...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ettore Di Giacinto (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-10-21 19:42 UTC by Donald R. Gray Jr
Modified: 2020-08-20 12:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to change cut to awk. (gen_bootloader_awk_fstab.diff,435 bytes, patch)
2018-10-21 19:49 UTC, Donald R. Gray Jr
Details | Diff
gen_bootloader_awk_fstab_v2.diff (gen_bootloader_awk_fstab.diff,435 bytes, patch)
2018-10-28 16:13 UTC, Donald R. Gray Jr
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Donald R. Gray Jr 2018-10-21 19:42:51 UTC
The offending code is the script is expecting fstab to be space delimited:
GRUB_BOOTFS=$(set_bootloader_read_fstab | cut -d' ' -f2)

Using awk will work for both space and tab delimited fstab entries:
GRUB_BOOTFS=$(set_bootloader_read_fstab | awk '{print $2}')


Reproducible: Always

Steps to Reproduce:
1.genkernel all with a new kernel and tab delimited fstab.
2.
3.
Comment 1 Donald R. Gray Jr 2018-10-21 19:49:34 UTC
Created attachment 552172 [details, diff]
patch to change cut to awk.

Patches cleanly on my local install.
Comment 2 Donald R. Gray Jr 2018-10-22 20:33:46 UTC
Error output:

awk: fatal: cannot open file `/var/tmp/genkernel/19937.521.11369.21055/grub.map' for reading (No such file or directory)
/usr/share/genkernel/gen_bootloader.sh: line 75: UUID="1b0b578b-a164-41b2-8c1c-61f1a37eecd6" - 1: syntax error: operand expected (error token is ""1b0b578b-a164-41b2-8c1c-61f1a37eecd6" - 1")
Comment 3 Donald R. Gray Jr 2018-10-28 16:13:17 UTC
Created attachment 553522 [details, diff]
gen_bootloader_awk_fstab_v2.diff

Previous path was selecting the mountpoint, not the filesystem type.
Comment 4 Alessandro Barbieri 2020-03-08 07:39:41 UTC
Ping?
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-08-20 12:51:03 UTC
Package removed.