That 'sed' program is scary... :-)
More importantly, you had better keep a version of the kernel you know you can boot. The command line only keeps the most recent kernel and should only be used after spending a few days with the latest installed kernel and no problem with it.