lkml.org 
[lkml]   [2019]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RESEND] initramfs: cleanup incomplete rootfs
From
Date
On 12.02.19 at 01:56, Andrew Morton wrote:
> On Sat, 9 Feb 2019 12:35:03 +0200 Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
>> On Sat, Feb 9, 2019 at 12:08 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>>> On Fri, 8 Feb 2019 21:45:21 +0200 Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>>>> On Tue, Oct 30, 2018 at 5:22 PM David Engraf <david.engraf@sysgo.com> wrote:
>>>>>
>>>>> Unpacking an external initrd may fail e.g. not enough memory. This leads
>>>>> to an incomplete rootfs because some files might be extracted already.
>>>>> Fixed by cleaning the rootfs so the kernel is not using an incomplete
>>>>> rootfs.
>>>>
>>>> This breaks my setup where I have U-boot provided more size of
>>>> initramfs than needed. This allows a bit of flexibility to increase or
>>>> decrease initramfs compressed image without taking care of bootloader.
>>>> The proper solution is to do this if we sure that we didn't get enough
>>>> memory, otherwise I can't consider the error fatal to clean up rootfs.
>>>
>>> OK, thanks. Maybe David can suggest a fix - I'll queue up a revert
>>> meanwhile.
>>>
>>> I don't really understand the failure. Why does an oversized initramfs
>>> cause unpack_to_rootfs() to fail?
>>
>> In my case I have got "Junk in compressed archive". I don't know (I
>> would check if needed) which exact condition I got since there are
>> three places with this message.
>
> Well that's a plain irritating screwup right there. Could someone
> please cook up a patch to give us three distinct (and hopefully more
> informative) error messages?

Done. BTW "invalid magic at start of compressed archive" is the error we
get with the patch.

Best regards
- David


\
 
 \ /
  Last update: 2019-02-12 09:05    [W:0.094 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site