Bug 138328

Summary: Alpha4: Error writing grub
Product: [openSUSE] SUSE Linux 10.1 Reporter: Andreas Jaeger <aj>
Component: InstallationAssignee: Olaf Dabrunz <odabrunz>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Blocker    
Priority: P5 - None CC: jplack, jsrain, lars.vogdt, mvidner
Version: Alpha 3plus   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: logs
logs from installed system
/var/log/YaST2/*

Description Andreas Jaeger 2005-12-13 16:52:50 UTC
I get an error during installation, the grub installation fails, scr gets 
a segmentation fault.
Comment 1 Andreas Jaeger 2005-12-13 16:53:22 UTC
Created attachment 60444 [details]
logs
Comment 2 Andreas Jaeger 2005-12-13 16:54:06 UTC
error is "Bad file descriptor"
Comment 3 Andreas Jaeger 2005-12-13 16:57:17 UTC
This is reproduceable on another machine!
Comment 4 Stanislav Visnovsky 2005-12-13 17:01:42 UTC
We need logs from the target system.

Seems like lib-Perl-Bootloader dies on the target.
Comment 5 Stefan Hundhammer 2005-12-13 17:05:57 UTC
BTW I invoked grub-install manually (after chroot to the new system) and it worked fine.
Comment 6 Stanislav Visnovsky 2005-12-13 17:07:26 UTC
you never know... ;-) We need the logs.
Comment 7 Andreas Jaeger 2005-12-13 17:11:19 UTC
Created attachment 60446 [details]
logs from installed system
Comment 8 Stanislav Visnovsky 2005-12-13 17:16:39 UTC
Syntax error:

2005-12-13 16:35:22 <3> linux(9721) [Parser] <stdin>:34 Parameters don't match any declaration:
2005-12-13 16:35:22 <3> linux(9721) [Parser] <stdin>:34 Bootloader_API::setPartitions ([["/dev/hda1", "/dev/hda", "1", "130", "Linux swap", "`primary", 0, 131], ["/dev/hda2", "/dev/hda", "2", "131", "Linux native", "`primary", 131, 2611], ["/dev/hda3", "/dev/hda", "3", "131", "Linux native", "`primary", 2742, 765], ["/dev/hda4", "/dev/hda", "4", "131", "Linux native", "`primary", 3507, 1358]])
2005-12-13 16:35:22 <3> linux(9721) [Parser] <stdin>:34 Candidates are:
2005-12-13 16:35:22 <3> linux(9721) [Parser] <stdin>:34 global boolean Bootloader_API::setPartitions (list <list <string>>)
Comment 9 Stanislav Visnovsky 2005-12-13 17:21:07 UTC
But the validation is done also  inside inst-sys,
so it seems to be a mismatch between inst-sys and the target system.
Comment 10 Stanislav Visnovsky 2005-12-13 17:27:16 UTC
I assume the value passed to setPartition is created somewhere, were the code
does not check the validity of the type information regarding the real value.

I suspect Perl code, but I'm not familiar with perl-Bootloader.
Comment 11 Martin Vidner 2005-12-13 18:37:46 UTC
I have submitted yast2-bootloader-2.13.3 with this fix. I did not test but it should fix the problem in the y2log.

--- trunk/bootloader/src/routines/lib_iface.ycp (original)
+++ trunk/bootloader/src/routines/lib_iface.ycp Tue Dec 13 19:25:21 2005
@@ -95,7 +95,7 @@

            return [ device, disk, nr_str, tostring(p["fsid"]:0),
                p["fstype"]:"unknown", tostring(p["type"]:nil),
-               p["region", 0]:0, p["region", 1]:0
+               tostring(p["region", 0]:0), tostring(p["region", 1]:0)
            ];
        });
        return parts;
Comment 12 Lars Vogdt 2005-12-13 20:00:32 UTC
Created attachment 60459 [details]
/var/log/YaST2/*

logfiles from a thinkpad T40p
- textmode installation
- bootloader location: mbr of hda
Comment 13 Lars Vogdt 2005-12-13 20:01:46 UTC
Seems that the fix doesn't work. See #12 for more details
Comment 14 Lars Vogdt 2005-12-13 20:02:35 UTC
Reopend for new trial...
Comment 15 Lars Vogdt 2005-12-13 20:09:46 UTC
FYI: the CD with new yast2-bootfloppy-2.13.3-2.i586.rpm and yast2-bootloader-2.13.3-2.i586.rpm is temporary on 
/mounts/machcd2/CDs/SUSE-10.1-CD-OSS-i386-Alpha4/SUSE-10.1-CD-OSS-i386-Alpha4-CD1.iso
Comment 16 Jiri Srain 2005-12-13 20:27:23 UTC
Lars, you need to update the inst-sys with the fixed yast2-bootloader package. Otherwise, the old version is still used (and according to #12 it is obvious that Martin's patch wasn't used).
Comment 17 Lars Vogdt 2005-12-13 20:30:48 UTC
Oh, sorry. So the best seems to wait for the end of the autobuild run and try again.
Comment 18 Stanislav Visnovsky 2005-12-14 08:06:29 UTC
Seems to work.
Comment 19 Andreas Jaeger 2005-12-14 08:15:52 UTC
Seems to work for me as well!

Now I have a different problem: The bootloader does not work for me.  Time for another PR :-(