drakkar-lig / debootstick

Generate a bootable live image from any Debian/Ubuntu filesystem tree.
62 stars 18 forks source link

Allow stripping no quiet kernel parameter #9

Closed unki closed 7 years ago

unki commented 7 years ago

Perhaps this might be also useful to others. I've added a --config-kernel-strip-quiet-from-cmdline parameter that removes the "quiet" parameter from the kernel boot arguments, if it exists.

Actually it modifies /etc/default/grub in the chroot environment and removes "quiet" from the "GRUB_CMDLINE_LINUX"-beginning lines, it is present there.

eduble commented 7 years ago

I understand your point. However, I prefer not to add many config-<xxx> options. These options are made to alter the chroot environment, and such alterations could actually be performed before calling debootstick. Thus we could well consider that this is not really the job of debootstick, and keep it simple. Still, debootstick provides a few options of this kind, but I prefer if we limit them to very commonly used ones. However your pull request made me think about it, and I would propose something else for your case. We could change the existing --config-kernel-bootargs option, and allow to remove a given option by prepending a minus sign. For example: $ debootstick --config-kernel-bootargs "+console=ttyS0 -quiet" rootfs usb.img This would add option console=ttyS0 and remove option quiet. For backward compatibility, the + sign would be optional. What do you think?

eduble commented 7 years ago

Hi, I implemented my proposal: with the current version, you can now remove a bootarg by using --config-kernel-bootargs "-<bootarg>".