/[smeserver]/rpms/e-smith-grub/sme10/e-smith-grub-2.6.1-bz11365-unabletobootext4rootfs.patch
ViewVC logotype

Annotation of /rpms/e-smith-grub/sme10/e-smith-grub-2.6.1-bz11365-unabletobootext4rootfs.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Feb 20 17:15:00 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: e-smith-grub-2_6_1-10_el7_sme, e-smith-grub-2_6_1-11_el7_sme, HEAD
* Sat Feb 20 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.1-10.sme
- fix unable to boot on a non xfs root filesystem [SME: 11365]

1 jpp 1.1 diff -Nur e-smith-grub-2.6.1.old/root/etc/e-smith/templates/etc/default/grub/GrubCmdLineLinux e-smith-grub-2.6.1/root/etc/e-smith/templates/etc/default/grub/GrubCmdLineLinux
2     --- e-smith-grub-2.6.1.old/root/etc/e-smith/templates/etc/default/grub/GrubCmdLineLinux 2021-02-20 12:10:34.255000000 -0500
3     +++ e-smith-grub-2.6.1/root/etc/e-smith/templates/etc/default/grub/GrubCmdLineLinux 2021-02-20 12:12:07.926000000 -0500
4     @@ -1,12 +1,35 @@
5     {
6     - #GRUB_CMDLINE_LINUX="rd.lvm.lv=main/root rd.lvm.lv=main/swap rhgb quiet"
7     - # to GRUB_CMDLINE_LINUX="rd.lvm.lv=main/root rd.lvm.lv=main/swap rhgb quiet rootflags=uquota,pquota"
8     - # also remove noquota
9     - @lines = map {
10     - /^GRUB_CMDLINE_LINUX/ && s/noquota//;
11     - /^GRUB_CMDLINE_LINUX/ && ! /rootflags=uquota,pquota/ && s/"$/ rootflags=uquota,pquota"/;
12     - $_
13     - } @lines;
14     + # parse fstab to know what fstype is root partition
15     + my $fstype = "ext4";
16     + my @patterns = ( qr/\s\/\s+xfs\s+/, qr/^\/dev\/main\/.*\s+xfs\s+/ );
17     + open (RD, "</etc/fstab")
18     + || warn "Cannot open input file /etc/fstab: $!\n";
19     + while (<RD>)
20     + {
21     + chop;
22     + $fstype="xfs" if ( $_ ~~ @patterns );
23     + }
24     + close(RD);
25     +
26     + if ( $fstype eq "xfs" ) {
27     + # GRUB_CMDLINE_LINUX="rd.lvm.lv=main/root rd.lvm.lv=main/swap rhgb quiet"
28     + # to GRUB_CMDLINE_LINUX="rd.lvm.lv=main/root rd.lvm.lv=main/swap rhgb quiet rootflags=uquota,pquota"
29     + # also remove noquota
30     + @lines = map {
31     + /^GRUB_CMDLINE_LINUX/ && s/noquota//;
32     + /^GRUB_CMDLINE_LINUX/ && ! /rootflags=uquota,pquota/ && s/"$/ rootflags=uquota,pquota"/;
33     + $_
34     + } @lines;
35     + } else {
36     + # if we are using ext[234] or any other fs type let's default to ...
37     + @lines = map {
38     + /^GRUB_CMDLINE_LINUX/ && s/noquota//;
39     + /^GRUB_CMDLINE_LINUX/ && /rootflags=uquota,pquota/ && s/rootflags=uquota,pquota//;
40     + $_
41     + } @lines;
42     +
43     +
44     + }
45     "";
46     }
47    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed