[Bug 779534] New: /usr/sbin/grub2-install failed with code 256 and output: source_dir doesn't exist
https://bugzilla.novell.com/show_bug.cgi?id=779534 https://bugzilla.novell.com/show_bug.cgi?id=779534#c0 Summary: /usr/sbin/grub2-install failed with code 256 and output: source_dir doesn't exist Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: x86-64 OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: alinm.elena@gmail.com QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.8 (KHTML, like Gecko) Chrome/23.0.1255.0 Safari/537.8 SUSE/23.0.1255.0 I have installed grub2 on a 12.2 system then updated to a factory... The error I get is de facto on the factory system... though it may be possible it is present on 12.2 too... [root@abbaton:/home/alin]: mkinitrd Kernel image: /boot/vmlinuz-3.6.0-rc4-3-desktop Initrd image: /boot/initrd-3.6.0-rc4-3-desktop Root device: UUID=2348b6ab-f8ea-486c-8556-f40036e1eae4 (/dev/sda5) (mounted on / as btrfs) Kernel Modules: thermal_sys thermal processor fan ata_generic scsi_dh scsi_dh_alua scsi_dh_emc scsi_dh_hp_sw scsi_dh_rdac libcrc32c zlib_deflate btrfs xhci-hcd hid-logitech-dj crc32c-intel Features: acpi plymouth block usb btrfs resume.userspace resume.kernel Perl-Bootloader: 2012-09-10 12:51:09 ERROR: Command '/usr/sbin/grub2-install --force --skip-fs-probe /dev/sda3 >/var/log/YaST2/y2log_bootloader 2>&1' failed with code 256 and output: source_dir doesn't exist. Please specify --target or --directory There was an error generating the initrd (1) [root@abbaton:/home/alin]: zypper se -is grub2 Retrieving repository 'localRPMs' metadata .............................................................................................................[done] Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository --+-------------------------+---------+----------------------------+--------+---------------------------------------------------------------------------- i | grub2 | package | 2.00-7.1 | x86_64 | openSUSE-12.3-1.9 i | grub2-branding-openSUSE | package | 12.2-136.1 | noarch | home:rwooninck:UNSTABLE_KDE4 (KDE_Qt48_openSUSE_Factory) i | grub2-efi | package | 2.00-7.1 | x86_64 | openSUSE-12.3-1.9 i | kcm-grub2 | package | 0.5.60git.1343231658-111.1 | x86_64 | home:rwooninck:UNSTABLE_KDE4:Playground (home_rwooninck_UNSTABLE_KDE4_Qt48) [root@abbaton:/home/alin]: zypper se -is mkinitrd Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository --+------------------+---------+-------------+--------+------------------ i | mkinitrd | package | 2.7.1-1.5 | x86_64 | openSUSE-12.3-1.9 i | splashy-mkinitrd | package | 0.3.13-37.1 | x86_64 | openSUSE-12.3-1.9 I have installed grub2-efi later but the error was present before too... Alin Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c
Lukas Ocilka
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c
Philipp Thomas
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c1
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c2
--- Comment #2 from Alin M Elena
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c3
--- Comment #3 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c4
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c5
Erik Sorenson
/var/log/YaST2/y2log_bootloader 2>&1' failed with code 256 and output: /usr/sbin/grub2-bios-setup: error: no such partition. There was an error generating the initrd (1)
Used "try again" button, same message. On reboot, Grub hung without message/prompt, there was nothing in the PBR. So I rebooted using live DVD to desktop then, in a super-terminal did the following, which worked: 1. mount /dev/sda5 /mnt 2. grub2-install --force --root-directory=/mnt /dev/sda5 I then tried a straight-up install to the same partition using the M2 X64 DVD (i.e., not live). It did the same thing ... bootloader step crapped out with same message, same place. This time I copied the whole /var/log directory before I rebooted and fixed the PBR, so I have all the "pure" install-created files if anyone wants them. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c6
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c7
--- Comment #7 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c8
--- Comment #8 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c9
--- Comment #9 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c10
--- Comment #10 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c11
--- Comment #11 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c12
--- Comment #12 from Michael Chang
bash: /usr/bin/grub2-install: No such file or directory
Is it typo? It is "sbin" not "bin". :) Just downloaded 12.3 M2 DVD, will try to reproduce on my side .. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c13
--- Comment #13 from Michael Chang
Just downloaded 12.3 M2 DVD, will try to reproduce on my side ..
I mimic your partition layout and follow your procedure in Comment #9, not see the problem you have. The installation finished and rebooted. (The result is not bootable system, but that's expected ..) Btw I used virtual machince to test (qemu-kvm and virtual disk, no virtio driver). Another question. Is this a regression for you, I meant that is 12.2 Grub2 ever worked for you ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c14
--- Comment #14 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c16
--- Comment #16 from Michael Chang
Created an attachment (id=518483) --> (http://bugzilla.novell.com/attachment.cgi?id=518483) [details] Output Requested
Sorry, the "/usr/bin" was my error. A few minutes ago I re-did the Minimal-X install again, hit the error in the same place, and then issued the correct command in a terminal. Output attached, but it's a one line similar to the other.
Maybe my mistake .. will verify the correct command you have to type in terminal tomorrow ..
I have been using Suse/openSuse since v7 or so, and as my "production" daily machine since v9. This is the first time I have hit this problem. Even 12.3M1, which I installed from an x86 DVD, was flawless. See #8 (mine) forum comments here: http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/...
Weird .. there's almost no code changes wrt bootloader(GRUB2) from 12.3M1 to 12.3M2 afaics, but this is good information as something wrong during the time frame.
When you say you tried it, got no error, but it didn't boot properly on the reboot, is this just because you specified suing the PBR like I did? I have
YES. As I un-tick the "Write Generic Boot Code to MBR", no boot code in MBR (but stage1 (boot.img) in the PBR of course ..).
never had that but, then again, I'm using OSL2000 as a bootloader, so it automatically re-scans the partitions on boot and offers the new one as a choice to boot from.
IMHO OSL2000 shouldn't be the problem .. (Although I never used it) Today I blocked by some stuff and will resume working on this issue tomorrow .. sorry for the delay. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c17
--- Comment #17 from Michael Chang
Maybe my mistake .. will verify the correct command you have to type in terminal tomorrow ..
Ok. I forgot the command is on installed system, so you have to chroot to it before issuing commnads. $ chroot /mnt $ /usr/sbin/grub2-install --force --debug --skip-fs-probe "(hd0,5)" > /var/log/YaST2/grub2-install-force-skip-fs-probe.log 2>&1 Btw, I recheck your log again, seems everything's fine there. It could be bugs withing grub2 utilities rather than perl|yast2 bootloader. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c18
--- Comment #18 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c19
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c20
--- Comment #20 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c21
Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c22
--- Comment #22 from Andrey Borzenkov
s122k3prod:~ # fdisk -l omitting empty partition (5) Partition 5 is deleted
That's the reason. GRUB2 uses different logic to skip partitions. Erik, please attach additionally first EMBR: dd if=/dev/sda4 of=/tmp/embr count=1 (In reply to comment #19)
And this is a *regression* from M1 to M2
Quite unlikely. The code in question did not change, nor is upstream GRUB2 free of this bug. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c23
--- Comment #23 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c24
--- Comment #24 from Andrey Borzenkov
embr appended, as per request.
This looks already not quite standard, but nothing suspicious. Let's try more simple way - please download attached script walkpart.sh, execute ./walkpart.sh /dev/sda and paste output. It should dump all EBR records. (In reply to comment #19)
++ echo '(hd0,msdos6)'
/dev/sda5 should be grub device (hd0,msdos5). The (hd0,msdos6) is nonsensical as that is your Windows NTFS partition.
That does not really explain the the problem in this bug report. Yes, grub2 will count partitions differently, but it will do it consistently everywhere, so as long as you use only grub2 tools to create configuration it will work. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c
Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c25
--- Comment #25 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c26
--- Comment #26 from Andrey Borzenkov
Did this, after loop in script apparent (bash buffer too small): It loops :(
Do you have 32 bit system? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c27
--- Comment #27 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c28
Andrey Borzenkov
My production partition, from which I ran your script, is 32-bit
OK, I modified script to avoid exceedingly large offsets (that probably caused overflow). Could you try once more? Thank you! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c29
--- Comment #29 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c30
--- Comment #30 from Andrey Borzenkov
walk2.txt output from #28 script.
OK, could you please test updated GRUB2 (this is repo for 12.2): zypper ar obs://home:arvidjaar:bnc:779534/openSUSE_12.2_Update bnc779534 zypper refresh bnc779534 zypper dup -r bnc779534 It at least did not break partition enumeration here :) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c31
--- Comment #31 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c31
Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c33
Andrey Borzenkov
Andrey, it's not clear what you want me to do after I add the new rep and update grub2.
1. On 12.2 - revert to original GRUB2 and test grub2-probe -t drive -d /dev/sda5 I expect it to return hd0,msdos6 2. Now update grub2 from test repo and do the same. I expect it to return hd0,msdos5 @mchang - michael, I also have Factory patch in obs://home:arvidjaar:bnc:779534/openSUSE_Factory_standard. I think you used DUD to provide updated package during installation. May be you could instruct Erik how to test it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c34
--- Comment #34 from Michael Chang
That does not really explain the the problem in this bug report. Yes, grub2 will count partitions differently, but it will do it consistently everywhere, so as long as you use only grub2 tools to create configuration it will work.
No anymore consistent in the case of device.map .. as now YaST (or any other system tools relies on running kernel to figure our partition number) counts differently with grub2. (hd0,5) is supposed to be /dev/sda5. And it's unfortunately be mapped to that omitted empty partition (of type extended). In function grub_partition_map_probe (), and within it's iteration hook, the partnum 5 is never matched as it's the omitted partition (number 5) which falls into the a wrong if condition check that you fixed in your updated grub2 package. That said I agree with your fix is an adequate solution for this problem (Although we don't have it's test result so far, but I'm quite optimistic). :) THANKs. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c35
--- Comment #35 from Michael Chang
@mchang - michael, I also have Factory patch in obs://home:arvidjaar:bnc:779534/openSUSE_Factory_standard. I think you used DUD to provide updated package during installation. May be you could instruct Erik how to test it.
Ok. Give me some time. I'll try to make a dud for test and verification on M2. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c36
--- Comment #36 from Michael Chang
Ok. Give me some time. I'll try to make a dud for test and verification on M2.
Darn! More fun with this. Linuxrc crashed when specify to use driver update disk on 12.3 M2. I'll report another bug with the log for it. :( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c37
Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c38
--- Comment #38 from Andrey Borzenkov
Re: #33, quote "I expect it to return hd0,msdos6" and "I expect it to return hd0,msdos5".
OK. @mchang: I submitted SR#147406 Factory. Should I submit maintenance request for 12.2?
The two tests performed exactly as expected. Can we consider this fixed/closed?
I'm still not convinced this was the reason for the problem you had. I would wait until patch is included in Factory and test installation once more. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c39
--- Comment #39 from Michael Chang
OK. @mchang: I submitted SR#147406 Factory. Should I submit maintenance request for 12.2?
Accepted SR#147406. The maintenance request is nice to have to me so it's your call.
The two tests performed exactly as expected. Can we consider this fixed/closed?
I'm still not convinced this was the reason for the problem you had. I would wait until patch is included in Factory and test installation once more.
Erik, please do us a favor to verify this issue again next milestone? thanks a lot and really appreciate for your time and help. :) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c40
--- Comment #40 from Erik Sorenson
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c41
--- Comment #41 from Andrey Borzenkov
The maintenance request is nice to have to me so it's your call.
12.2: SR#147481 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c42
--- Comment #42 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c43
Benjamin Brunner
https://bugzilla.novell.com/show_bug.cgi?id=779534
https://bugzilla.novell.com/show_bug.cgi?id=779534#c44
--- Comment #44 from Erik Sorenson
participants (1)
-
bugzilla_noreply@novell.com