bugGNU GRUB - Bugs: bug #50280, legacy_initrd should have only one...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #50280: legacy_initrd should have only one filename

Submitter:  Andy Smith <grifferz>
Submitted:  Sat 11 Feb 2017 09:16:26 PM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Git master
Release:  Reproducibility:  Every Time
Planned Release:  None

Sat 11 Feb 2017 09:32:06 PM UTC, comment #3: 

Yes, Vladimir's patch leads to producing the same config:


set root='(hd0,1)'; set legacy_hdbias='0'
legacy_kernel   '/boot/vmlinuz-3.16.0-4-amd64' '/boot/vmlinuz-3.16.0-4-amd64' 'root=UUID=38420e46-6123-477d-ba23-baeba8ac0d59' 'ro'
legacy_initrd '/boot/initrd.img-3.16.0-4-amd64' '/boot/initrd.img-3.16.0-4-amd64'


but it does actually boot correctly now.

Andy Smith <grifferz>
Sat 11 Feb 2017 09:21:12 PM UTC, comment #2: 

Ah, I've just seen Vladimir's patch. I will try that now.

Andy Smith <grifferz>
Sat 11 Feb 2017 09:19:07 PM UTC, comment #1: 

Here's a patch that fixes it for me; no idea if it is the correct thing to do.

(file #39728)

Andy Smith <grifferz>
Sat 11 Feb 2017 09:16:26 PM UTC, original submission:  

When attempting to boot a Xen guest using legacy_configfile /boot/grub/menu.lst the following config is generated:


set root='(hd0,1)'; set legacy_hdbias='0'
legacy_kernel   '/boot/vmlinuz-3.16.0-4-amd64' '/boot/vmlinuz-3.16.0-4-amd64'
'root=UUID=38420e46-6123-477d-ba23-baeba8ac0d59' 'ro'
legacy_initrd '/boot/initrd.img-3.16.0-4-amd64' '/boot/initrd.img-3.16.0-4-amd64'


That comes from the following menu.lst:


default         0
timeout         5
color cyan/blue white/blue
title           Debian GNU/Linux, kernel 3.16.0-4-amd64
root            (hd0,0)
kernel          /boot/vmlinuz-3.16.0-4-amd64 root=UUID=38420e46-6123-477d-ba23-baeba8ac0d59 ro
initrd          /boot/initrd.img-3.16.0-4-amd64


The guest fails to boot with the following output:


[    1.470403] Freeing unused kernel memory: 216K (ffff8800017ca000 - ffff880001800000)
[    1.471934] Failed to execute /init (error -8)
[    1.472673] Starting init: /sbin/init exists but couldn't execute it (error -8)
[    1.473359] Starting init: /bin/sh exists but couldn't execute it (error -8)
[    1.473365] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See
Linux Documentation/init.txt for guidance.
[    1.473369] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.16.0-4-amd64 #1 Debian 3.16.39-1
[    1.473372]  0000000000000000 ffffffff81514c11 ffffffff81705310 ffff88003e23bf40
[    1.473377]  ffffffff8151195e ffffffff00000008 ffff88003e23bf50 ffff88003e23bef0
[    1.473380]  ffff88003e23bef8 0000000000000000 0000000000000495 0000000000000495
[    1.473384] Call Trace:


The problem seems to be the repeated file name on the "legacy_initrd" line. Editing the generated config and removing that second file name allows for a normal boot.

This has been discussed on grub-devel in this thread

Andy Smith <grifferz>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Updated the item)
  • -email is unavailable- added by grifferz (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-05 phcoder StatusNone Fixed
        Open/ClosedOpen Closed
    2017-02-11 grifferz Attached File- Added legacy_initrd_one_file.patch, #39728

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code