linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux Mounting problem
@ 2001-08-30 15:11 Venkatesh Ramachandran
  2001-08-30 15:37 ` Richard B. Johnson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Venkatesh Ramachandran @ 2001-08-30 15:11 UTC (permalink / raw)
  To: linux-users, rvenky, linux-kernel, linux-alpha, brussels-linux
  Cc: Mathangi Kuppusamy

Hello,
   I am using Redhat Linux 7.1
   During reboot, i get the message " Mounting / as readonly"
   And, it enters into maintenance mode...( & all other steps fail -
/proc not mounted, swap not mounted, fsck fails)
   I did the following :
   mount -t proc proc /proc
   fsck /dev/hda1
   The following error messages : ERROR : Couldn't open /dev/null
(Read-only file system)

   It goes into a never-ending loop, and never i am able to recover from
this problem.

   Has anyone come across such a problem? How to tackle it?
   Do we need to use a bootdisk, to get into the read-write mode of root
filesystem ?
   How to change root filesystem from read-only to read-write?

   This will be of very great help to me and my team.

Thanks in advance,
Venkatesh.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux Mounting problem
  2001-08-30 15:11 Linux Mounting problem Venkatesh Ramachandran
@ 2001-08-30 15:37 ` Richard B. Johnson
  2001-08-30 21:23   ` Jim Roland
  2001-08-30 21:19 ` Jim Roland
  2001-08-30 21:50 ` Mike Fedyk
  2 siblings, 1 reply; 6+ messages in thread
From: Richard B. Johnson @ 2001-08-30 15:37 UTC (permalink / raw)
  To: Venkatesh Ramachandran
  Cc: linux-users, linux-kernel, linux-alpha, brussels-linux,
	Mathangi Kuppusamy

On Thu, 30 Aug 2001, Venkatesh Ramachandran wrote:

> Hello,
>    I am using Redhat Linux 7.1
>    During reboot, i get the message " Mounting / as readonly"
>    And, it enters into maintenance mode...( & all other steps fail -
> /proc not mounted, swap not mounted, fsck fails)
>    I did the following :
>    mount -t proc proc /proc
>    fsck /dev/hda1
>    The following error messages : ERROR : Couldn't open /dev/null
> (Read-only file system)
> 

First, verify that /dev/null is a character device, major=1, minor=3.
`file /dev/null`.
It may have gotten changed to some real file because of some errors.

In maintenance mode do:

/sbin/mount -n -o remount /dev/hda1 # Mount r/w, no write to /etc/mtab
/bin/rm /dev/null             # Delete it
/bin/mknod /dev/null c 1 3    # Make a new one
/bin/chmod 777 /dev/null      # Accessible by everyone in all modes
/bin/chown root.sys /dev/null # Standard ownership
/sbin/umount /dev/hda1        # Now unmount it
/sbin/mount /proc /proc -t proc # You can mount it if you want
/sbin/e2fsck -f /dev/hda1     # Fix the disk
... After you fix the errors ...
`exec /sbin/init auto`  (or exit if from a startup script)

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

    I was going to compile a list of innovations that could be
    attributed to Microsoft. Once I realized that Ctrl-Alt-Del
    was handled in the BIOS, I found that there aren't any.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux Mounting problem
  2001-08-30 15:11 Linux Mounting problem Venkatesh Ramachandran
  2001-08-30 15:37 ` Richard B. Johnson
@ 2001-08-30 21:19 ` Jim Roland
  2001-08-30 21:50 ` Mike Fedyk
  2 siblings, 0 replies; 6+ messages in thread
From: Jim Roland @ 2001-08-30 21:19 UTC (permalink / raw)
  To: Venkatesh Ramachandran
  Cc: linux-users, linux-kernel, linux-alpha, brussels-linux,
	Mathangi Kuppusamy

It will enter maintenance mode if fsck was unable to fix errors as a 
previous boot-up.  Boot with your RH71 cd, enter "linux rescue" at the 
"boot:" prompt, and your system will be mounted under /mnt/sysimage.  It 
may delay for a little while while coming up if it's re-running fsck. 
 After you have a prompt (navigate throught the text dialog boxes 
first), run fsck and you can fix the partition or inode errors.

Regards,
Jim Roland, RHCE


Venkatesh Ramachandran wrote:

>Hello,
>   I am using Redhat Linux 7.1
>   During reboot, i get the message " Mounting / as readonly"
>   And, it enters into maintenance mode...( & all other steps fail -
>/proc not mounted, swap not mounted, fsck fails)
>   I did the following :
>   mount -t proc proc /proc
>   fsck /dev/hda1
>   The following error messages : ERROR : Couldn't open /dev/null
>(Read-only file system)
>
>   It goes into a never-ending loop, and never i am able to recover from
>this problem.
>
>   Has anyone come across such a problem? How to tackle it?
>   Do we need to use a bootdisk, to get into the read-write mode of root
>filesystem ?
>   How to change root filesystem from read-only to read-write?
>
>   This will be of very great help to me and my team.
>
>Thanks in advance,
>Venkatesh.
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux Mounting problem
  2001-08-30 15:37 ` Richard B. Johnson
@ 2001-08-30 21:23   ` Jim Roland
  2001-08-31 12:08     ` Richard B. Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Jim Roland @ 2001-08-30 21:23 UTC (permalink / raw)
  To: root
  Cc: Venkatesh Ramachandran, linux-users, linux-kernel, linux-alpha,
	brussels-linux, Mathangi Kuppusamy

He is getting these errors because his /etc/rc.d/rc.sysinit is shuttling 
all output from the commands in the script to be written to /dev/null 
and his FS is mounted as read-only.  It never gets mounted as read-write 
because of fsck failing to approve the check with an OK status.  If 1-2 
boots in rescue mode (or as "linux single") don't fix the errors, the 
last step (e2fsck) should be run and should fix the error, unless there 
is serious drive corruption.

Regards,
Jim Roland, RHCE


Richard B. Johnson wrote:

>On Thu, 30 Aug 2001, Venkatesh Ramachandran wrote:
>
>>Hello,
>>   I am using Redhat Linux 7.1
>>   During reboot, i get the message " Mounting / as readonly"
>>   And, it enters into maintenance mode...( & all other steps fail -
>>/proc not mounted, swap not mounted, fsck fails)
>>   I did the following :
>>   mount -t proc proc /proc
>>   fsck /dev/hda1
>>   The following error messages : ERROR : Couldn't open /dev/null
>>(Read-only file system)
>>
>
>First, verify that /dev/null is a character device, major=1, minor=3.
>`file /dev/null`.
>It may have gotten changed to some real file because of some errors.
>
>In maintenance mode do:
>
>/sbin/mount -n -o remount /dev/hda1 # Mount r/w, no write to /etc/mtab
>/bin/rm /dev/null             # Delete it
>/bin/mknod /dev/null c 1 3    # Make a new one
>/bin/chmod 777 /dev/null      # Accessible by everyone in all modes
>/bin/chown root.sys /dev/null # Standard ownership
>/sbin/umount /dev/hda1        # Now unmount it
>/sbin/mount /proc /proc -t proc # You can mount it if you want
>/sbin/e2fsck -f /dev/hda1     # Fix the disk
>... After you fix the errors ...
>`exec /sbin/init auto`  (or exit if from a startup script)
>
>Cheers,
>Dick Johnson
>
>Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
>
>    I was going to compile a list of innovations that could be
>    attributed to Microsoft. Once I realized that Ctrl-Alt-Del
>    was handled in the BIOS, I found that there aren't any.
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux Mounting problem
  2001-08-30 15:11 Linux Mounting problem Venkatesh Ramachandran
  2001-08-30 15:37 ` Richard B. Johnson
  2001-08-30 21:19 ` Jim Roland
@ 2001-08-30 21:50 ` Mike Fedyk
  2 siblings, 0 replies; 6+ messages in thread
From: Mike Fedyk @ 2001-08-30 21:50 UTC (permalink / raw)
  To: linux-users, linux-kernel, linux-alpha

On Thu, Aug 30, 2001 at 08:41:13PM +0530, Venkatesh Ramachandran wrote:
>    The following error messages : ERROR : Couldn't open /dev/null
> (Read-only file system)
> 

Sounds like devfs is compiled in, but not mounted.  Can you verify? 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux Mounting problem
  2001-08-30 21:23   ` Jim Roland
@ 2001-08-31 12:08     ` Richard B. Johnson
  0 siblings, 0 replies; 6+ messages in thread
From: Richard B. Johnson @ 2001-08-31 12:08 UTC (permalink / raw)
  To: Jim Roland
  Cc: Venkatesh Ramachandran, linux-users, linux-kernel, linux-alpha,
	brussels-linux, Mathangi Kuppusamy

On Thu, 30 Aug 2001, Jim Roland wrote:

> He is getting these errors because his /etc/rc.d/rc.sysinit is shuttling 
> all output from the commands in the script to be written to /dev/null 
> and his FS is mounted as read-only.  It never gets mounted as read-write 
> because of fsck failing to approve the check with an OK status.  If 1-2 
> boots in rescue mode (or as "linux single") don't fix the errors, the 
> last step (e2fsck) should be run and should fix the error, unless there 
> is serious drive corruption.
> 
> Regards,
> Jim Roland, RHCE
> 
[SNIPPED...]

But you can write to a device that exists on a R/O disk! If the write
is not allowed, then the device-file has become corrupt and "seems to be"
a file, instead of a device..

Script started on Fri Aug 31 08:04:09 2001
# mount -o ro /dev/sdc1 /alt
# cd /alt
# ls
System.old  boot   dos	   exports  initrd  lost+found	proc  tmp  vmlinuz
alt	    cdrom  etc	   guru     laptop  mnt		root  usr  vmlinuz.old
bin	    dev    export  home     lib     opt		sbin  var
# >foo
bash: foo: Read-only file system
# cd dev
# >null
# ls -a >null
# file null
null: character special (1/3)
# pwd
/alt/dev
# cd ~
# umount /alt
# exit
exit
Script done on Fri Aug 31 08:05:25 2001

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

    I was going to compile a list of innovations that could be
    attributed to Microsoft. Once I realized that Ctrl-Alt-Del
    was handled in the BIOS, I found that there aren't any.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-08-31 12:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-30 15:11 Linux Mounting problem Venkatesh Ramachandran
2001-08-30 15:37 ` Richard B. Johnson
2001-08-30 21:23   ` Jim Roland
2001-08-31 12:08     ` Richard B. Johnson
2001-08-30 21:19 ` Jim Roland
2001-08-30 21:50 ` Mike Fedyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).