Replace Contents of the Kernel...

Hey guys
so I’m trying somthin out…

rootdev -s
/dev/sda5
dd if=/dev/sda4 of=kernel_2.blob
dump_kernel_config kernel_2.blob > kernel_2.cfg
cp kernel_2.cfg kernel_debug.cfg

Now, replace the contents of kernel_debug.cfg with the following:

CODE: SELECT ALL
add_efi_memmap
boot=local
console=tty1
disablevmx=off
i915.modeset=1
init=/sbin/init
kern_guid=%U
loglevel=7
lsm.module_locking=0
ro
root=PARTUUID=%U/PARTNROFF=1
rootwait
tpm_tis.force=1
tpm_tis.interrupts=0

Essentially how do I replace the “CONTENTS OF THE KERNEL_DEBUG.CFG” do I use Bash >>>>>> OR is their some other way…

If you’re following this:
http://forums.debian.net/viewtopic.php?f=30&t=103827#p496002

Then according to that, you don’t want those on seperate lines … you just want spaces between them … as in

add_efi_memmap boot=local console=tty1 disablevmx=off i915.modeset=1 init=/sbin/init kern_guid=%U loglevel=7 lsm.module_locking=0 ro root=PARTUUID=%U/PARTNROFF=1 rootwait tpm_tis.force=1 tpm_tis.interrupts=0"

So if you want to REPLACE the WHOLE contents of kernel_debug.cfg with JUST that line above … you could just run:

echo "add_efi_memmap boot=local console=tty1 disablevmx=off i915.modeset=1 init=/sbin/init kern_guid=%U loglevel=7 lsm.module_locking=0 ro root=PARTUUID=%U/PARTNROFF=1 rootwait tpm_tis.force=1 tpm_tis.interrupts=0" > kernel_debug.cfg

Which will overwrite EVERYTHING in kernel_debug.cfg with what’s between the quotation marks.

You can check the contents with:

cat kernel_debug.cfg

Or you could simply open kernel_debug.cfg in a text editor.