6

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 
nfsroot=192.168.2.1:/[..]/rootfs_rpi 
ip=192.168.2.2:::::eth0:off 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?

Lekensteyn
  • 1,521
  • 1
  • 15
  • 24
Patrick B.
  • 312
  • 1
  • 8
  • 23

3 Answers3

5

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.

Patrick B.
  • 312
  • 1
  • 8
  • 23
1

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

dmesg

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

Vincent P
  • 2,210
  • 15
  • 24
0

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
Mircea Baja
  • 171
  • 6