|
Bugzilla – Full Text Bug Listing |
| Summary: | yast2 bootloader aborts when /proc is not mounted | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.1 | Reporter: | Andi N Kleen <andi-nbz> |
| Component: | YaST2 | Assignee: | Jiri Srain <jsrain> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | ||
| Version: | RC 1 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Andi N Kleen
2008-12-01 21:11:39 UTC
Unmounted /proc is fatal error and really not expected. Lot of program fail if it doesn't have it. If you want work in chroot you must bind it. so mount /dev/... /chroot mount --bind /proc /chroot/proc mount --bind /dev /chroot/dev mount --bind /sys /chroot/sys chroot /chroot this is expected and without /proc a lot of programs doesn't work. Yes I know about mount --bind. No I don't type in all of this on a rescue cd session. Sorry, abort() on missing /proc is not expected and just wrong. At least give a proper error message like the proc utils. But really aborting on missing /proc/meminfo (or any missing file) is just bad programming and there's no excuse at all for doing that. Also not reading the available memory is clearly not a fatal error for yast. Just return 128MB in this case. Hmm, perl-Bootloader nor yast2-bootloader doesn't read directly /proc/meminfo. So problem is in yast, here is direct usage of /proc/meminfo:
gtk/integrate/YaST2.call:MEM_TOTAL=`awk '/^MemTotal:/{ print $2 }' /proc/meminfo`
installation/startup/YaST2.call:MEM_TOTAL=`awk '/^MemTotal:/{ print $2 }' /proc/meminfo`
installation/startup/First-Stage/F08-logging: USE=`awk '/^MemFree:/{ n=2 ; printf "%d\n", $n/3 }' /proc/meminfo`
repair/data/filenames:/proc/meminfo
yast2/library/agents/proc_meminfo.scr: (`File("/proc/meminfo")), // real file name
So I reassign it to yast-maintainers and also decrease severity to low, as this is not much expected scenario without /proc.
But the problem does not seem to be directly reading /proc/meminfo. Neither YaST2.call nor proc_meminfo.scr abort if the file is not there. Scr read will just return an empty map. YaST2.call will disable qt/gtk if there is to less memory. If bootloader has to abort due to missing input data, maybe there is a message to improve? Otherwise we should close this unless someone is able to reproduce it, or provides some log that reveals what's actually happening. Forget about my previous comment. Given that without /proc not just meminfo, but also partitions, mounts, devices and various others are not available, we could also consider not to start at all. Josef is right, there's proably not much working without /proc. We could test for /proc in the startup script, and if it's missing print Josef's advice from comment #1 and exit. I added checks that those three directories mentioned in comment #1 are non-empty and YaST refuses to start if they are (with reasonable message). Since chroot cannot be really detected, it prints a more generic message. |