linux tips

Tips and ticks for linux

&
 
  • Cool sites



Dec 30 2008

Booting into a read-only environment

Published by dipinkrishna at 10:04 pm under Uncategorized Edit This

This situation presents itself infrequently, but when it does you cannot modify any files.
Here is an example of an occurrence…

A linux box wouldn’t boot properly and reported a problem with an ext2 filesystem on one of the partitions it was trying to mount.
The only option was to drop into a ‘repair shell’ to run e2fsck/fsck on the various partitions to see which one was having trouble.
As it so happens there were other problems that prompted this to happen: the only listings in /etc/fstab were for the cdrom and floppy drives.
Nothing else was being mounted, with the exception of the root partition / .It was impossible to mount filesystems or edit files (like /etc/fstab) in the read-only environment, but there is a way around it…

#> mount -o remount,rw /dev/hdb# / , where hdb# is the logical mount point of the root (/) partition. For instance, if your root partition (/) is actually /dev/hdb1 then hdb# is hdb1.

This mounts the root partition / as a read-write filesystem and by doing so you should be able to edit files and mount other filesystems…ugh!

Possibly-related Articles:                                        (auto-generated)

One Response to “Booting into a read-only environment”

  1. jayapdon 12 Jan 2009 at 10:09 pm edit this

    Thanks. I was searching for this…

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.
Not A Member? Register for Free!

Some Today.com contributors may have received a fee or a promotional product or service from a manufacturer for promotional consideration, while others receive no consideration at all. Each contributor is responsible for disclosing any such promotional consideration.