Linux Partition on SD Card is "Read Only File System"

1,454 views
Skip to first unread message

Mark K.

unread,
Dec 2, 2008, 11:26:41 AM12/2/08
to Beagle Board
Last week I received my Beagle Board and the functional tests are OK.
So now I'd like to get Angstrom running on this board and made the
FAT32 and Linux partitions on a 2 GB SD card.
I have followed all the instructions on the LinuxBootFormat wiki and
everything looked fine.

I copied the necessary files onto the FAT32 (named Linux_Boot)
partition.

When I want to untar the Angstrom .tar.bz2 file onto the Linux
partition, it gives errors indicating that this partition is a Read
Only File System, so I can't copy anything to this partition.

I am a novice to Linux and use a laptop PC with the latest Knoppix on
DVD distribution and an external card reader.

Any help or suggestion is highly appreciated.

Kind regards,
Mark

beaglenewb

unread,
Dec 2, 2008, 12:31:49 PM12/2/08
to Beagle Board
I believe what your problem is, is that you got it set to read only.
The way to fix this is when you see the SD card mounted on the
desktop, right-click and change its settings. You should see that in
the menu when you right click it will show you that you can change
from read only to writable. Hope this works for you.

Sevey

Mark K.

unread,
Dec 2, 2008, 1:08:19 PM12/2/08
to Beagle Board
Thanks for your suggestion!

When I right-click on the mounted SD card it shows that it is
writeable.
I am also logged in as root, so I should have write permissions as
well.

Could it be a hardware problem?
With this hardware I managed to make and format the partitions...

Mark
> > Mark- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Tamer S. Mohamed

unread,
Dec 2, 2008, 1:57:12 PM12/2/08
to beagl...@googlegroups.com
Use
sudo tar

Robert Nelson

unread,
Dec 2, 2008, 2:01:47 PM12/2/08
to beagl...@googlegroups.com
>
> Thanks for your suggestion!
>
> When I right-click on the mounted SD card it shows that it is
> writeable.
> I am also logged in as root, so I should have write permissions as
> well.
>
> Could it be a hardware problem?
> With this hardware I managed to make and format the partitions...
>
> Mark

Did it automount the card? It may have mounted it with a nodev or
something. Type 'mount' from root and report the results.

then mount /dev/mmcb** /mnt etc..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Mark K.

unread,
Dec 2, 2008, 3:13:53 PM12/2/08
to Beagle Board
> Did it automount the card? It may have mounted it with a nodev or
> something. Type 'mount' from root and report the results.
>
> then mount /dev/mmcb** /mnt etc..
>
> Regards,
> --
> Robert Nelsonhttp://www.rcn-ee.com/

This time it didn't automount. So I followed your instructions and
typed "mount" and then I mounted both partitions. I also typed "df -h"
and then untarred with "sudo"

This is the output (Sorry it's very long, but I removed many lines
from the tar output):

root@Knoppix:/# mount
rootfs on / type rootfs (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
/dev/hda on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/dev/cloop2 on /KNOPPIX2 type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw)
/UNIONFS on /UNIONFS type aufs (rw,xino=/ramdisk/.aufs.xino,br:/
ramdisk=rw:/KNOPPIX=rr:/KNOPPIX2=rr)
/proc/bus/usb on /proc/bus/usb type usbfs (rw)
/dev/pts on /dev/pts type devpts (rw)
root@Knoppix:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda 4.2G 4.2G 0 100% /cdrom
/dev/cloop 7.4G 7.4G 0 100% /KNOPPIX
/dev/cloop2 3.4G 3.4G 0 100% /KNOPPIX2
/ramdisk 1.6G 9.8M 1.6G 1% /ramdisk
/UNIONFS 1.6G 9.8M 1.6G 1% /UNIONFS
root@Knoppix:/# mount /dev/sdb1
root@Knoppix:/# mount /dev/sdb2
root@Knoppix:/# mount
rootfs on / type rootfs (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
/dev/hda on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/dev/cloop2 on /KNOPPIX2 type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw)
/UNIONFS on /UNIONFS type aufs (rw,xino=/ramdisk/.aufs.xino,br:/
ramdisk=rw:/KNOPPIX=rr:/KNOPPIX2=rr)
/proc/bus/usb on /proc/bus/usb type usbfs (rw)
/dev/pts on /dev/pts type devpts (rw)
/dev/sdb1 on /media/sdb1 type vfat
(rw,nosuid,nodev,uid=1000,gid=1000,fmask=0000,dmask=0000,codepage=cp437,iocharset=iso8859-1,shortname=winnt)
/dev/sdb2 on /media/sdb2 type ext3 (rw,nosuid,nodev,data=ordered)
root@Knoppix:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda 4.2G 4.2G 0 100% /cdrom
/dev/cloop 7.4G 7.4G 0 100% /KNOPPIX
/dev/cloop2 3.4G 3.4G 0 100% /KNOPPIX2
/ramdisk 1.6G 10M 1.6G 1% /ramdisk
/UNIONFS 1.6G 10M 1.6G 1% /UNIONFS
/dev/sdb1 400M 94M 306M 24% /media/sdb1
/dev/sdb2 1.5G 35M 1.4G 3% /media/sdb2
root@Knoppix:/# cd /media/sdb2
root@Knoppix:/media/sdb2# sudo tar -xvjf /media/sdb1/Angstrom-
Beagleboard-demo-image-glibc-ipk-2008.1-test.20080920-
beagleboard.rootfs.tar.bz2

----- Now many lines with errors follow. I'll show just a few of these
lines...

tar: ./media: Cannot mkdir: Read-only file system
./media/card/
tar: ./media/card: Cannot mkdir: No such file or directory
./media/cf/
tar: ./media/cf: Cannot mkdir: No such file or directory
./media/net/
tar: ./media/net: Cannot mkdir: No such file or directory
./media/ram/
tar: ./media/ram: Cannot mkdir: No such file or directory

----- and now the last lines with errors:

tar: ./media/mmc1: Cannot mkdir: No such file or directory
tar: .: Cannot utime: Read-only file system
tar: .: Cannot change ownership to uid 0, gid 0: Read-only file system
tar: .: Cannot change mode to rwxr-xr-x: Read-only file system
tar: Error exit delayed from previous errors
root@Knoppix:/media/sdb2#


Regards,
Mark

Robert Nelson

unread,
Dec 2, 2008, 3:56:43 PM12/2/08
to beagl...@googlegroups.com
> root@Knoppix:/# mount
> rootfs on / type rootfs (rw)
> /proc on /proc type proc (rw)
> /sys on /sys type sysfs (rw)
> /dev/hda on /cdrom type iso9660 (ro)
> /dev/cloop on /KNOPPIX type iso9660 (ro)
> /dev/cloop2 on /KNOPPIX2 type iso9660 (ro)
> /ramdisk on /ramdisk type tmpfs (rw)
> /UNIONFS on /UNIONFS type aufs (rw,xino=/ramdisk/.aufs.xino,br:/
> ramdisk=rw:/KNOPPIX=rr:/KNOPPIX2=rr)
> /proc/bus/usb on /proc/bus/usb type usbfs (rw)
> /dev/pts on /dev/pts type devpts (rw)
> /dev/sdb1 on /media/sdb1 type vfat
> (rw,nosuid,nodev,uid=1000,gid=1000,fmask=0000,dmask=0000,codepage=cp437,iocharset=iso8859-1,shortname=winnt)
> /dev/sdb2 on /media/sdb2 type ext3 (rw,nosuid,nodev,data=ordered)
---------------------------------------------------------------^^^^-----^^^^^^
(evil) should be (rw) only....

Okay, with the mmc card umounted,

sudo mkdir -p /tmp/disk1
sudo mount /media/sdb2 /tmp/disk1

"mount" to verify it isn't mounted with nodev

then

sudo su (switch to superuser)

tar xpjf Angstrom-Beagleboard-demo-image-glibc-ipk-2008.1-test.20080920-beagleboard.rootfs.tar.bz2
-C /tmp/disk1/

exit (out of supersuser)

sudo umount /tmp/disk1

Robert Nelson

unread,
Dec 2, 2008, 3:59:10 PM12/2/08
to beagl...@googlegroups.com
Opps,

replace
> sudo mount /media/sdb2 /tmp/disk1

with
sudo /dev/sdb2 /tmp/disk1

Robert Nelson

unread,
Dec 2, 2008, 4:00:04 PM12/2/08
to beagl...@googlegroups.com
too much coffee...

sudo mount /dev/sdb2 /tmp/disk1

Mark K.

unread,
Dec 2, 2008, 4:13:57 PM12/2/08
to Beagle Board
Robert, thanks for your help so far. I appreciate it very much.
I'll try this tomorrow as it is getting late here now in Holland...

Mark K.

unread,
Dec 3, 2008, 8:41:56 AM12/3/08
to Beagle Board
It still doesn't work, but it's getting better!
Although the ext3 partition is now mounted as only (rw), only a few
folders and files are untarred into this partition.
After a few seconds it starts giving the "Read-only file system"
errors again.
It's very strange, because when I type "mount" afterwards, it says
(rw) again.

I have tried it now on Knoppix and on VMWare/Ubuntu (after formatting
the SD card), with similar results.

Mark

Philip Balister

unread,
Dec 3, 2008, 8:45:10 AM12/3/08
to beagl...@googlegroups.com
Have you checked if the write protect switch on the card is in the
correct position?

Mine is lid toward the connection end.

Philip

Mark K.

unread,
Dec 3, 2008, 9:55:25 AM12/3/08
to Beagle Board
Yes, I checked that. It is in the correct position. I guess otherwise
I couldn't write files to the FAT partition on this card. ;-)

Mark

Vladimir Pantelic

unread,
Dec 3, 2008, 11:47:44 AM12/3/08
to beagl...@googlegroups.com

have you tried another card?


____________________________________________________________________________

This email and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to which they are
addressed. Access to this e-mail by anyone else is unauthorised. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken or omitted to be taken in reliance on it, is prohibited. E-mail
messages are not necessarily secure. Archos does not accept responsibility
for any changes made to this message after it was sent.

Mark K.

unread,
Dec 3, 2008, 12:18:37 PM12/3/08
to Beagle Board
I'll try a different card tomorrow. Thanks for the suggestion!

Mark

Mark K.

unread,
Dec 3, 2008, 2:24:55 PM12/3/08
to Beagle Board
I couldn't wait and tried a different card. This time a 1GB card from
Transcend instead of a 2GB from Sandisk.
Unfortunately the same results...

When I type "mount" I see the following line:
gvfs-fuse-daemon on /root/./gvfs type fuse.gvfs-fuse-daemon
(rw,nosuid,nodev,user=jars)
Could this have anything to do with my problem?

Mark

Robert Nelson

unread,
Dec 3, 2008, 2:27:15 PM12/3/08
to beagl...@googlegroups.com

and this is still with the Knoppix (live-dvd) and knoppix thru vmware?

Mark K.

unread,
Dec 3, 2008, 2:43:14 PM12/3/08
to Beagle Board
This was with Ubuntu thru vmware.
I could try it one more time with Knoppix and the new card.
I'll give the results in about 15 minutes.

Mark

Mark K.

unread,
Dec 3, 2008, 3:22:11 PM12/3/08
to Beagle Board
Now I've tried it with the Knoppix live DVD and a new card.
/dev/sdb1 is a USB flash memory stick
/dev/sdc1 is the FAT32 partition with the boot files
/dev/sdc2 is the ext3 partition where I would like to untar the
Angstrom demo image to.

Here are the results:

knoppix@Knoppix:~$ sudo mkdir -p /tmp/disk1
knoppix@Knoppix:~$ sudo mount /dev/sdc2 /tmp/disk1
knoppix@Knoppix:~$ mount
rootfs on / type rootfs (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
/dev/hda on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/dev/cloop2 on /KNOPPIX2 type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw)
/UNIONFS on /UNIONFS type aufs (rw,xino=/ramdisk/.aufs.xino,br:/
ramdisk=rw:/KNOPPIX=rr:/KNOPPIX2=rr)
/proc/bus/usb on /proc/bus/usb type usbfs (rw)
/dev/pts on /dev/pts type devpts (rw)
/dev/sdb1 on /media/sdb1 type vfat
(ro,nosuid,nodev,uid=1000,gid=1000,fmask=0000,dmask=0000,codepage=cp437,iocharset=iso8859-1,shortname=winnt)
/dev/sdc2 on /ramdisk/tmp/disk1 type ext3 (rw,data=ordered)
knoppix@Knoppix:~$ sudo su
root@Knoppix:/ramdisk/home/knoppix# tar xpjf /media/sdb1/Angstrom-
Beagleboard-demo-image-glibc-ipk-2008.1-test-20080920-
beagleboard.rootfs.tar.bz2 -C /tmp/disk1/

And now come all the error lines. The last lines are:

tar: ./usr/lib/firefox-devel-3.1a2/sdk: Cannot change ownership to uid
0, gid 0: Read-only file system
tar: ./usr/lib/firefox-devel-3.1a2/sdk: Cannot change mode to rwxr-xr-
x: Read-only file system
tar: ./usr/lib/firefox-devel-3.1a2: Cannot utime: Read-only file
system
tar: ./usr/lib/firefox-devel-3.1a2: Cannot change ownership to uid 0,
gid 0: Read-only file system
tar: ./usr/lib/firefox-devel-3.1a2: Cannot change mode to rwxr-xr-x:
Read-only file system
tar: ./usr/lib/X11: Cannot utime: Read-only file system
tar: ./usr/lib/X11: Cannot change ownership to uid 0, gid 0: Read-only
file system
tar: ./usr/lib/X11: Cannot change mode to rwxr-xr-x: Read-only file
system
tar: ./usr/lib: Cannot utime: Read-only file system
tar: ./usr/lib: Cannot change ownership to uid 0, gid 0: Read-only
file system
tar: ./usr/lib: Cannot change mode to rwxr-xr-x: Read-only file system
tar: ./usr: Cannot utime: Read-only file system
tar: ./usr: Cannot change ownership to uid 0, gid 0: Read-only file
system
tar: ./usr: Cannot change mode to rwxr-xr-x: Read-only file system
tar: .: Cannot utime: Read-only file system
tar: .: Cannot change ownership to uid 0, gid 0: Read-only file system
tar: .: Cannot change mode to rwxr-xr-x: Read-only file system
tar: Error exit delayed from previous errors
root@Knoppix:/ramdisk/home/knoppix# mount
rootfs on / type rootfs (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
/dev/hda on /cdrom type iso9660 (ro)
/dev/cloop on /KNOPPIX type iso9660 (ro)
/dev/cloop2 on /KNOPPIX2 type iso9660 (ro)
/ramdisk on /ramdisk type tmpfs (rw)
/UNIONFS on /UNIONFS type aufs (rw,xino=/ramdisk/.aufs.xino,br:/
ramdisk=rw:/KNOPPIX=rr:/KNOPPIX2=rr)
/proc/bus/usb on /proc/bus/usb type usbfs (rw)
/dev/pts on /dev/pts type devpts (rw)
/dev/sdb1 on /media/sdb1 type vfat
(ro,nosuid,nodev,uid=1000,gid=1000,fmask=0000,dmask=0000,codepage=cp437,iocharset=iso8859-1,shortname=winnt)
/dev/sdc2 on /ramdisk/tmp/disk1 type ext3 (ro,data=ordered)
root@Knoppix:/ramdisk/home/knoppix#

It shows that "rw" is changed into "ro".
Only 2 folders named "dev" and "usr" have been untarred to sdc2.

Mark

Robert Nelson

unread,
Dec 3, 2008, 3:56:10 PM12/3/08
to beagl...@googlegroups.com
> root@Knoppix:/ramdisk/home/knoppix#
>
> It shows that "rw" is changed into "ro".
> Only 2 folders named "dev" and "usr" have been untarred to sdc2.
>

Mark -

That's very strange it switched between rw & ro, I've attached a line
by line console log of what i did in ubuntu to get it correctly untar
onto the SD card.

Regards,

--
Robert Nelson
http://www.rcn-ee.com/


****************************
SD card is
Fat32 : /dev/sdd1
ext3 : /dev/sdd2

Insert Card Ubuntu auto mounts..

voodoo@voodoo-desktop:~$ mount
/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
/dev/sdd2 on /media/disk type ext3 (rw,nosuid,nodev,uhelper=hal)
/dev/sdd1 on /media/disk-1 type vfat
(rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush)
voodoo@voodoo-desktop:~$

We need to remove nosuid,nodev.. so let's umount it.

voodoo@voodoo-desktop:~$ sudo umount /media/disk/ (ext3)

voodoo@voodoo-desktop:~$ mount
/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
/dev/sdd1 on /media/disk-1 type vfat
(rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush)
voodoo@voodoo-desktop:~$

Create tmp directory

voodoo@voodoo-desktop:~$ sudo mkdir -p /tmp/disk1/

Mount ext3 partition

voodoo@voodoo-desktop:~$ sudo mount /dev/sdd2 /tmp/disk1/

voodoo@voodoo-desktop:~$ mount
/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
/dev/sdd1 on /media/disk-1 type vfat
(rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush)
/dev/sdd2 on /tmp/disk1 type ext3 (rw)
voodoo@voodoo-desktop:~$

Switch to Superuser

voodoo@voodoo-desktop:~$ sudo su

untar to mounted drive

root@voodoo-desktop:/home/voodoo# tar xpjf
/home/voodoo/Angstrom-Beagleboard-demo-image-glibc-ipk-2008.1-test-20080920-beagleboard.rootfs.tar.bz2
-C /tmp/disk1/

root@voodoo-desktop:/home/voodoo# mount
/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
/dev/sdd1 on /media/disk-1 type vfat
(rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush)
/dev/sdd2 on /tmp/disk1 type ext3 (rw)
root@voodoo-desktop:/home/voodoo#

exit superuser, sync and umount,

root@voodoo-desktop:/home/voodoo# exit
voodoo@voodoo-desktop:~$ sync
voodoo@voodoo-desktop:~$ sudo umount /tmp/disk1/

Mark K.

unread,
Dec 3, 2008, 4:19:52 PM12/3/08
to Beagle Board
It looks like my laptop, perhaps in combination with my card reader,
for some reason is not the right hardware.
What I will do is try to find another laptop PC and install a Linux
distribution on the hard drive and try it again.
It will be next week though.

Regards and thanks for your help!

Mark

John (USP)

unread,
Dec 4, 2008, 12:51:55 AM12/4/08
to beagl...@googlegroups.com
I had a similar problem on my Dell Laptops. The integrated SD card reader
wasn't SDHC compliant. I purchased a small USB/SDHC reader and now
everything works fine. The one I used is:

http://shop3.frys.com/product/5448039?site=sr:SEARCH:MAIN_RSLT_PG

Regards,

> -----Original Message-----
> From: beagl...@googlegroups.com
> [mailto:beagl...@googlegroups.com] On Behalf Of Mark K.
> Sent: Wednesday, December 03, 2008 1:20 PM
> To: Beagle Board
> Subject: [beagleboard] Re: Linux Partition on SD Card is "Read Only File
System"
>
>

Mark K.

unread,
Dec 4, 2008, 1:29:24 AM12/4/08
to Beagle Board
But does it have to be HC compliant when using only 1GB or 2GB SD
cards?
You write that you had a similar problem. Were you also able to write
to the FAT partition on the SD card and not to the ext3 (Linux)
partition on the SD card?

Mark
> > Regards and thanks for your help!- Tekst uit oorspronkelijk bericht niet weergeven -

John (USP)

unread,
Dec 4, 2008, 2:11:23 AM12/4/08
to beagl...@googlegroups.com
I was using a 4G card and from what I recall, I could partition and
formation some parts, but not others. I remember that the card seemed really
flaky at the time. I would start by using a newer card reader.

Mark K.

unread,
Dec 4, 2008, 2:32:05 AM12/4/08
to Beagle Board
Okay, thanks for the suggestion. Next week I get a laptop here and I
will install Linux on it and use it only for Beagle Board projects.
I will also look for a new card reader that is fully compatible with
Linux.

Regards,

Mark

Preston Wilson

unread,
Dec 4, 2008, 9:01:30 AM12/4/08
to Beagle Board
I get a different result when trying to use an SDHC card in a USB SD
only reader. The partitions on the card do not show up, and the
messages coming out of the kernel look like this:
usb 3-6: reset high speed USB device using ehci_hcd and address 13

as viewed with dmesg

When using an SD card in the SD reader, and an SD or SDHC card in an
SDHC reader I do see the partitions, and the following are printed
into the kernel ring buffer (this is from a 4GB SDHC card):
sd 15:0:0:0: [sdf] 7864320 512-byte hardware sectors (4027 MB)
sd 15:0:0:0: [sdf] Write Protect is off
sd 15:0:0:0: [sdf] Mode Sense: 03 00 00 00
sd 15:0:0:0: [sdf] Assuming drive cache: write through
sd 15:0:0:0: [sdf] 7864320 512-byte hardware sectors (4027 MB)
sd 15:0:0:0: [sdf] Write Protect is off
sd 15:0:0:0: [sdf] Mode Sense: 03 00 00 00
sd 15:0:0:0: [sdf] Assuming drive cache: write through
sdf: sdf1 sdf2
again as viewed with dmesg.

Both my SD and SDHC readers are USB based and made by Targus. The SD
only version is model number: TGR-SD20. Unfortunately, the SDHC
reader does not have a model number on it, but I do remember the
packaging stating that the reader supports SDHC.

-Preston

Mark K.

unread,
Dec 10, 2008, 3:04:50 PM12/10/08
to Beagle Board
Today I installed Ubuntu on a laptop PC with a new card reader.
The whole procedure worked!!!
I think that the method described by Robert Nelson in this thread
should be integrated in the LinuxBootDiskFormat wiki, because when the
partitions are automounted, they are mounted with nodev.

Thanks everybody for your help! Now I can really start playing with
my Beagle Board.

Regards,
Mark
Reply all
Reply to author
Forward
0 new messages