Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backing up current initrd can fill up partitions #2

Closed
scaronni opened this issue May 24, 2016 · 10 comments
Closed

Backing up current initrd can fill up partitions #2

scaronni opened this issue May 24, 2016 · 10 comments

Comments

@scaronni
Copy link
Collaborator

According to: https://github.com/dell-oss/dkms/blob/master/dkms#L267-L283

An old initrd is saved with the "old-dkms" suffix at every rebuild, to revert to the previous initrd in case of problems. This is fine, but it can lead to a full /boot partition after a few update, as old initrd images are never deleted (ref: https://bugzilla.redhat.com/show_bug.cgi?id=1251602).

What is the best approach here? Is it ok if I create a patch that deletes all "old-dkms" images prior to starting a new initird build? If a new initird build is triggered, this basically means that the user is updating the kernel or the module, and in both cases it ensures us that the "current boot" is fine and there is no need to revert.

What do you think?

Thanks,
--Simone

@jared-dominguez
Copy link

Ideally old initrds for still installed kernels should be kept around. I'm fine accepting a cleanup patch that saves those.

@jarnos
Copy link
Contributor

jarnos commented Apr 13, 2017

#22

@jarnos
Copy link
Contributor

jarnos commented Apr 14, 2017

Backup files could be cleared in update-initramfs's delete function, too.

@GoPerry
Copy link
Contributor

GoPerry commented Apr 17, 2017

@scaronni Thanks your code work.

@superm1 superm1 closed this as completed Apr 17, 2017
@murraybd
Copy link
Contributor

murraybd commented Oct 5, 2017

This is actually incorrect as the remove_initrd_backup command runs before the dkms remove command which actually makes the .old-dkms file.

@jarnos
Copy link
Contributor

jarnos commented Oct 5, 2017

Why does it make a .old-dkms file when it runs dkms remove?

@murraybd
Copy link
Contributor

murraybd commented Oct 5, 2017

Because do_uninstall calls make_initrd and dkms, as far as I can tell, doesn't know the kernel is scheduled for removal just that the module is being removed so it remakes the initrd even though its getting removed.

@jarnos
Copy link
Contributor

jarnos commented Oct 6, 2017

Well, wouldn't it be better to tell make_initrd that kernel is being removed so there is no need to create a backup?

@nwf
Copy link

nwf commented Jun 4, 2018

In light of the above comments and the fact that this still plagues my Linux boxen, can we get this issue re-opened until a more full patch is in place? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants