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

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

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

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

Use
sudo tar

Behalf Of Mark K.

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,

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

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

Regards,

Opps,

replace

sudo mount /media/sdb2 /tmp/disk1

with
sudo /dev/sdb2 /tmp/disk1

too much coffee...

sudo mount /dev/sdb2 /tmp/disk1

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...

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

Have you checked if the write protect switch on the card is in the
correct position?

Mine is lid toward the connection end.

Philip

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. :wink:

Mark

Mark K. wrote:

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.

have you tried another card?

I'll try a different card tomorrow. Thanks for the suggestion!

Mark

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

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

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

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

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,