Bug 60203
| Summary: | exit code of mkinitrd is not reliable | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Paul Clements <paul.clements> |
| Component: | mkinitrd | Assignee: | Matt Wilson <msw> |
| Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | Keywords: | FutureFeature |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2002-02-21 21:55:34 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
should be better in 3.3.11 -- probably more work needs to be done though |
From Bugzilla Helper: User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.7-2.24mlsmp i686) Description of problem: mkinitrd 3.2.6-1: It would be very helpful if the exit code of mkinitrd could be relied upon to determine whether an error occurred during the making of an initrd image. There are several cases where mkinitrd fails to create a usable initrd but still exits with a 0 value. If mkinitrd is used in a script, this can cause unwanted failures and kernel panics. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: For example, given a shell script that performs an automated kernel upgrade: mkinitrd /boot/initrd 2.4.9-21 [ $? -ne 0 ] && echo "ERROR" && exit 1 {...append entry to lilo.conf...} lilo [ $? -ne 0 ] && echo "ERROR" && exit 1 Now, fill /boot almost full. When the "gzip -9" command at the bottom of the mkinitrd script fails, an incomplete initrd image is produced. However, the exit value of mkinitrd is 0. If the system is rebooted after lilo is run, the kernel will panic. Actual Results: exit value of 0 when errors occurred during mkinitrd Expected Results: exit value of 1 if errors occur Additional info: