Skip to contentSkip to conversation

readonly rootfs problem

Buildroot Ed Sutter 2 participants 4 messages Mar 3, 2014 – Mar 4, 2014

lore
Share & tools
lore

Ed Sutter

author
#0 lore raw

Hi,
I've been using buildroot to create my rootfs for a few months. I build my kernel directly out of freescale.git.
I had been running with my rootfs nfs mounted, and all was well. Recently I had spent some time with a ramdisk-based rootfs because i was working on some kernel stuff.
Now I'm going back to running rootfs/nfs and I'm finding that it "insists" on coming up in read-only mode.

I was initially using buildroot-2013.08, and recently I updated to buildroot-2013.11; however, I don't think that has anything to do with this. As far as I can tell I have everything set up properly...

####On NFS host /etc/exports has...
/full_path_to_my_rootfs *(rw,no_root_squash)

####On target...
/etc/inittab...
null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW

/etc/fstab...
# /etc/fstab: static file system information.
#

# <file system> <mount pt>     <type> <options>         <dump> <pass>
/dev/root       /              ext2     rw,noauto         0      1
proc            /proc          proc     defaults          0      0
devpts          /dev/pts       devpts   defaults,gid=5,mode=620 0      0
tmpfs           /dev/shm       tmpfs    mode=0777         0      0
tmpfs           /tmp           tmpfs    defaults          0      0
sysfs           /sys           sysfs    defaults          0 0

Output from mount:

# mount
rootfs on / type rootfs (rw)
1.2.3.4:/full_path_to_my_rootfs on / type nfs 
(ro,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=1.2.3.4,mountvers=3,mountproto=tcp,local_lock=all,addr=135.222.138.108)
devtmpfs on /dev type devtmpfs 
(rw,relatime,size=110708k,nr_inodes=27677,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)

I actually think the problem is in the kernel, not the rootfs. I say this because even some of my older rootfs copies (still on my host) are now
showing up as read only. The bootlog always ends up with this message:
VFS: Mounted root (nfs filesystem) readonly on device 0:11.

Any idea what I might be doing wrong here?
Thanks,
Ed

#1 lore raw

Hi Ed,

Quoted 43 lines · Ed Sutter

I've been using buildroot to create my rootfs for a few months. I build my kernel directly out of freescale.git.
I had been running with my rootfs nfs mounted, and all was well. Recently I had spent some time with a ramdisk-based rootfs because i was working on some kernel stuff.
Now I'm going back to running rootfs/nfs and I'm finding that it "insists" on coming up in read-only mode.

I was initially using buildroot-2013.08, and recently I updated to buildroot-2013.11; however, I don't think that has anything to do with this. As far as I can tell I have everything set up properly...

####On NFS host /etc/exports has...
/full_path_to_my_rootfs *(rw,no_root_squash)

####On target...
/etc/inittab...
null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW

/etc/fstab...
# /etc/fstab: static file system information.
#

# <file system> <mount pt>     <type> <options>         <dump> <pass>
/dev/root       /              ext2     rw,noauto         0      1
proc            /proc          proc     defaults          0      0
devpts          /dev/pts       devpts   defaults,gid=5,mode=620 0      0
tmpfs           /dev/shm       tmpfs    mode=0777         0      0
tmpfs           /tmp           tmpfs    defaults          0      0
sysfs           /sys           sysfs    defaults          0 0

Output from mount:

# mount
rootfs on / type rootfs (rw)
1.2.3.4:/full_path_to_my_rootfs on / type nfs (ro,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=1.2.3.4,mountvers=3,mountproto=tcp,local_lock=all,addr=135.222.138.108)
devtmpfs on /dev type devtmpfs
(rw,relatime,size=110708k,nr_inodes=27677,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
Quoted 7 lines

I actually think the problem is in the kernel, not the rootfs. I say this because even some of my older rootfs copies (still on my host) are now
showing up as read only. The bootlog always ends up with this message:
VFS: Mounted root (nfs filesystem) readonly on device 0:11.

Any idea what I might be doing wrong here?

What happens if you manually run:

mount -o remount,rw /

Do you see any error message?

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
author
#2 lore raw
Quoted 52 lines · Baruch Siach

Hi Ed,

Quoted 49 lines · Ed Sutter

I've been using buildroot to create my rootfs for a few months. I build my kernel directly out of freescale.git.
I had been running with my rootfs nfs mounted, and all was well. Recently I had spent some time with a ramdisk-based rootfs because i was working on some kernel stuff.
Now I'm going back to running rootfs/nfs and I'm finding that it "insists" on coming up in read-only mode.

I was initially using buildroot-2013.08, and recently I updated to buildroot-2013.11; however, I don't think that has anything to do with this. As far as I can tell I have everything set up properly...

####On NFS host /etc/exports has...
/full_path_to_my_rootfs *(rw,no_root_squash)

####On target...
/etc/inittab...
null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW

/etc/fstab...
# /etc/fstab: static file system information.
#

# <file system> <mount pt>     <type> <options>         <dump> <pass>
/dev/root       /              ext2     rw,noauto         0      1
proc            /proc          proc     defaults          0      0
devpts          /dev/pts       devpts   defaults,gid=5,mode=620 0      0
tmpfs           /dev/shm       tmpfs    mode=0777         0      0
tmpfs           /tmp           tmpfs    defaults          0      0
sysfs           /sys           sysfs    defaults          0 0

Output from mount:

# mount
rootfs on / type rootfs (rw)
1.2.3.4:/full_path_to_my_rootfs on / type nfs (ro,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=1.2.3.4,mountvers=3,mountproto=tcp,local_lock=all,addr=135.222.138.108)
devtmpfs on /dev type devtmpfs
(rw,relatime,size=110708k,nr_inodes=27677,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)

I actually think the problem is in the kernel, not the rootfs. I say this because even some of my older rootfs copies (still on my host) are now
showing up as read only. The bootlog always ends up with this message:
VFS: Mounted root (nfs filesystem) readonly on device 0:11.

Quoted 9 lines
Quoted 1 line

Any idea what I might be doing wrong here?

What happens if you manually run:

mount -o remount,rw /

Do you see any error message?

baruch

Thanks for responding, yea I've tried that (it fails). Here's the output:

# mount -o remount,rw /
mount: mounting 1.2.3.4:/full_path_to_my_rootfs on / failed: Invalid 
argument
author
#3 lore raw
In reply to Baruch Siach
Quoted 52 lines · Baruch Siach

Hi Ed,

Quoted 49 lines · Ed Sutter

I've been using buildroot to create my rootfs for a few months. I build my kernel directly out of freescale.git.
I had been running with my rootfs nfs mounted, and all was well. Recently I had spent some time with a ramdisk-based rootfs because i was working on some kernel stuff.
Now I'm going back to running rootfs/nfs and I'm finding that it "insists" on coming up in read-only mode.

I was initially using buildroot-2013.08, and recently I updated to buildroot-2013.11; however, I don't think that has anything to do with this. As far as I can tell I have everything set up properly...

####On NFS host /etc/exports has...
/full_path_to_my_rootfs *(rw,no_root_squash)

####On target...
/etc/inittab...
null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW

/etc/fstab...
# /etc/fstab: static file system information.
#

# <file system> <mount pt>     <type> <options>         <dump> <pass>
/dev/root       /              ext2     rw,noauto         0      1
proc            /proc          proc     defaults          0      0
devpts          /dev/pts       devpts   defaults,gid=5,mode=620 0      0
tmpfs           /dev/shm       tmpfs    mode=0777         0      0
tmpfs           /tmp           tmpfs    defaults          0      0
sysfs           /sys           sysfs    defaults          0 0

Output from mount:

# mount
rootfs on / type rootfs (rw)
1.2.3.4:/full_path_to_my_rootfs on / type nfs (ro,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=1.2.3.4,mountvers=3,mountproto=tcp,local_lock=all,addr=135.222.138.108)
devtmpfs on /dev type devtmpfs
(rw,relatime,size=110708k,nr_inodes=27677,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)

I actually think the problem is in the kernel, not the rootfs. I say this because even some of my older rootfs copies (still on my host) are now
showing up as read only. The bootlog always ends up with this message:
VFS: Mounted root (nfs filesystem) readonly on device 0:11.

Quoted 9 lines
Quoted 1 line

Any idea what I might be doing wrong here?

What happens if you manually run:

mount -o remount,rw /

Do you see any error message?

baruch

Just got it...
This error started after I updated my kernel, and apparently the new kernel does not default to a rw nfs-mounted rootfs, so I had to add "rw" to the kernel command line.
Thanks,
Ed