Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In the event that a user wants to make modifications to the kernel commandline how would I do so? Can I "cat /proc/cmdline" to view the bootargs??

share|improve this question
add comment

1 Answer

/proc/cmdline will give you the current boot arguments but also reveal a lot of data that's not technically modifiable.

I would recommend using: sudo abootimg -i /dev/mmcblk0p2

Which should give you similar output:

ubuntu@nexus7-265143b8:~$ sudo abootimg -i /dev/mmcblk0p2 

Android Boot Image Info:

* file name = /dev/mmcblk0p2 [block device]

* image size = 8388608 bytes (8.00 MB)
  page size  = 2048 bytes

* Boot Name = ""

* kernel size       = 4522232 bytes (4.31 MB)
  ramdisk size      = 2182999 bytes (2.08 MB)

* load addresses:
  kernel:       0x10008000
  ramdisk:      0x11000000
  tags:         0x10000100

* cmdline = root=/dev/mmcblk0p9 ro console=tty1 fbcon=rotate:1 quiet

* id = 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000  

To modify your cmdline arguments issue the following command:

sudo abootimg -u /dev/mmcblk0p2 -c cmdline ='foo bar baz'
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.