LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2007, 01:54 PM   #1
mmluv
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Rep: Reputation: 0
Question Read-only file system after dd


Hi all-

I have a major issue. I have been using dd to duplicate server drives and have a copy on the second drive for backup. Just installed fedora 5 and CentOS 4.4 and have the following error:

After I run the following dd

"/bin/dd if=/dev/sda of=/dev/sdb bs=32768"

I get write error all over the place after a reboot. This is on my main drive /dev/sda and will work fine if the second drive /dev/sdb is disconnected.

": Read-only file system"


Any ideas?
 
Old 01-17-2007, 02:25 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,559

Rep: Reputation: 213Reputation: 213Reputation: 213
Post your /etc/fstab file and the output of:

$ ls -l /mnt

with the sdb partition(s) you are having trouble with mounted.
 
Old 01-17-2007, 02:46 PM   #3
mmluv
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Original Poster
Rep: Reputation: 0
This is all before a reboot.....

[root@vsclient201 mmoghadas]# cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
/dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0


[root@vsclient201 mmoghadas]# mount
/dev/sda2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)


[root@vsclient201 mmoghadas]# ls -l /mnt/
total 0


Thanks for your help!
 
Old 01-17-2007, 02:56 PM   #4
mmluv
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Machine came up after the reboot... here's what I have...

[root@vsclient201 ~]# fdisk -l

Disk /dev/sda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 456 3558397+ 83 Linux
/dev/sda3 457 521 522112+ 82 Linux swap

Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 456 3558397+ 83 Linux
/dev/sdb3 457 521 522112+ 82 Linux swap
[root@vsclient201 ~]#
[root@vsclient201 ~]#
[root@vsclient201 ~]#
[root@vsclient201 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 3.4G 901M 2.3G 28% /
[root@vsclient201 ~]#
[root@vsclient201 ~]# mount
/dev/sda2 on / type ext3 (rw)
none on /proc type proc (rw)
[root@vsclient201 ~]#
[root@vsclient201 ~]#
[root@vsclient201 ~]# touch xxx
touch: cannot touch `xxx': Read-only file system
 
Old 01-17-2007, 07:31 PM   #5
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,559

Rep: Reputation: 213Reputation: 213Reputation: 213
Get the permissions on / with:

$ ls -l /

and post the output here. By way of example, here's mine:

Code:
$ ls -l /
total 100812
drwxr-xr-x    2 root root      2560 Jul 16  2006 bin/
drwxr-xr-x    3 root root       904 Jan 15 21:22 boot/
drwxr-xr-x   26 root root     15020 Jan 16 14:25 dev/
drwxr-xr-x   89 root root      7024 Jan 17 15:34 etc/
drwxr-xr-x    3 root root        72 May  5  2005 home/
drwxr-xr-x    2 root root        80 May  5  2005 initrd/
drwxr-xr-x   11 root root      3984 Jan 15 21:21 lib/
drwxr-xr-x   29 root root       696 Jan  6 12:59 mnt/
-rw-------    1 root root       110 May  6  2005 nohup.out
dr-xr-xr-x    9 root bin        256 Jan 16 03:50 opt/
-rw-r--r--    1 root root 103104512 Oct  9 02:29 p
dr-xr-xr-x  127 root root         0 Jan 15 15:20 proc/
drwx------   32 root root      1824 Jan 16 20:54 root/
drwxr-xr-x    2 root root      6224 Jan  7 00:09 sbin/
drwxr-xr-x   10 root root         0 Jan 15 15:20 sys/
drwxrwxrwt   16 root root       624 Jan 17 13:35 tmp/
dr-xr-xr-x   14 root root       384 Dec 29 02:36 usr/
drwxr-xr-x   21 root root       528 Jan 16 03:53 var/
-rw-r--r--    1 root root         0 May  5  2005 xorg.conf
Do you have any security daemon or service running capable of changing permissions on /? Also, if I understand correctly, the permission problem goes away if you take sdb out, right? That is very weird.
I'm wondering about your boot order in your bios. sda and sdb are exact clones of each other. I'm wondering if you may be booting off your sdb drive instead of your sda drive and not know it. This might happen if your bios is set to boot off of the drive recognized as "sdb" in linux first and then "sda" second. I think that may be what is going on. Check your bios setup for the boot order.
 
Old 01-17-2007, 11:51 PM   #6
mmluv
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Original Poster
Rep: Reputation: 0
I'm actually emulating the problem with a fresh install of CentOS on a vm session. Same problem when drives are duplicated vi dd.

Boot order is correct!



Here's the output for ls -l /

[root@localhost ~]# ls -l /
total 160
drwxr-xr-x 2 root root 4096 Jan 17 10:33 bin
drwxr-xr-x 2 root root 4096 Jan 10 05:32 boot
drwxr-xr-x 10 root root 5500 Jan 17 20:40 dev
drwxr-xr-x 61 root root 4096 Jan 17 11:45 etc
-rw-r--r-- 1 root root 0 Jan 17 11:45 halt
drwxr-xr-x 3 root root 4096 Jan 17 09:10 home
drwxr-xr-x 2 root root 4096 Feb 21 2005 initrd
drwxr-xr-x 11 root root 4096 Jan 17 10:33 lib
drwx------ 2 root root 16384 Jan 10 05:32 lost+found
drwxr-xr-x 4 root root 4096 Jan 17 11:22 media
drwxr-xr-x 2 root root 4096 Aug 13 03:46 misc
drwxr-xr-x 2 root root 4096 Feb 21 2005 mnt
drwxr-xr-x 2 root root 4096 Feb 21 2005 opt
dr-xr-xr-x 52 root root 0 Jan 17 12:33 proc
drwxr-x--- 3 root root 4096 Jan 10 13:42 root
drwxr-xr-x 2 root root 12288 Jan 17 10:33 sbin
drwxr-xr-x 2 root root 4096 Jan 10 13:32 selinux
drwxr-xr-x 2 root root 4096 Feb 21 2005 srv
drwxr-xr-x 9 root root 0 Jan 17 12:33 sys
drwxrwxrwt 3 root root 4096 Jan 17 11:22 tmp
drwxr-xr-x 14 root root 4096 Jan 10 13:34 usr
drwxr-xr-x 18 root root 4096 Jan 10 13:36 var
 
Old 01-18-2007, 06:30 PM   #7
mmluv
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Thumbs up

I figured out the problem myself. All I had to do was to change the /etc/fstab to used the device instead of the label.


OLD Setup
============
LABEL=/1 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2



Net Setup
============
/dev/sda2 / ext3 defaults 1 1
/dev/sda1 /boot ext3 defaults 1 2


All is good now. Thanks for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read .chm file in fedora, can't mount ntfs file system ishti_du Linux - Newbie 12 03-06-2007 03:27 AM
'Read-only file system' when untar a tar.bz2 file yinglcs Linux - General 1 02-18-2006 09:12 PM
Read Only File System ptreves Linux - Newbie 1 10-24-2004 02:21 PM
read-only file system djoverho Linux - General 6 05-24-2004 04:54 AM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration