I'm using a SD-card with raspian (with /boot-partition + the rootfs). I compiled my own kernel and now I would like to boot with nfsroot.

I've added the following line into the cmdline.txt:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 
kgdboc=ttyAMA0,115200 root=/dev/nfs rootfstype=nfs 
ip= elevator=deadline rootwait

(line-breaks are only there for readability - I have it all in one line)

however the system seems to ignore my line completely and boots with a default cmdline. After having booted I check with cat /proc/cmdline - completely different. During boot I don't see any error message regarding a cmdline.txt-problem.

What could be wrong?

  • Did you use the Raspberry Pi to modify cmdline.txt?
    – Vincent P
    Commented Mar 26, 2013 at 5:36
  • I tried it on a (Linux) Host and on the RPI.
    – Patrick B.
    Commented Mar 26, 2013 at 6:35

3 Answers 3


Well, I think I found the problem: the one who parses cmdline.txt does not like empty lines before the valid cmdline: I have that:

# comment
# <previous cmmdline line commented out>

# comment
<new cmdline>

changing it to:

# comment
# <previous cmmdline line commented out>
# comment
<new cmdline>

makes it work.

  • Your saying that if you add a new line, it reverts the whole file back to original?
    – Vincent P
    Commented Mar 26, 2013 at 6:40
  • No, if there is a newline it seems to use the one which is built-in (in the kernel) or uses a default one. The default one seems to use rootfs=/dev/mmcblkp1.
    – Patrick B.
    Commented Mar 26, 2013 at 6:43
  • The one who parses cmdline.txt is bootloader run by GPU. And according to all descriptions that I know, it should contain a string that will be passed to kernel. Do you have any reference where it says that comments are actually supported? Commented Mar 26, 2013 at 12:47
  • 1
    No, I simply tried.
    – Patrick B.
    Commented Mar 26, 2013 at 13:29

Well if you get the issue on the RPi itslef then, it seems that you might be the victim of the SD card corruption saga.

Run the following commands on the RPi itself.

After modifying the cmdline.txt file. Run the following command.

sync && sudo sync

Then run the following command and see if there are any issues at the end


An issue would be a message about MMC0. Report any of these issues.

  • I had this problem as well - but I always unmount (which does the sync) and I checked on my host - it was OK. But corruption could have been an issue at least in one of my tries.
    – Patrick B.
    Commented Mar 26, 2013 at 6:41
  • Well just in case. One of the known ways to prevent corruption is to under clock the RPi. Do note that this is not guaranteed.
    – Vincent P
    Commented Mar 26, 2013 at 7:37

Another cause of changes to /boot/cmdline.txt being ignored is that for some SD cards the wrong partition is mounted as /boot in /etc/fstab.

As this is a bug that's been fixed, rather than changing /etc/fstab manually, the simplest option is to update your Raspberry Pi:

$ sudo apt-get update
$ sudo apt-get upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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