Author Topic: Replace Contents of the Kernel...  (Read 464 times)

0 Members and 1 Guest are viewing this topic.

Offline rayquaza

  • Jr. Member
  • **
  • Posts: 1
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Replace Contents of the Kernel...
« on: May 10, 2013, 08:25:48 pm »
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.......

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14048
  • Karma: 348
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Replace Contents of the Kernel...
« Reply #1 on: May 10, 2013, 10:50:23 pm »
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

Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
cat kernel_debug.cfg

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

--
« Last Edit: May 10, 2013, 11:06:21 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal