LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Default Mount Point (https://www.linuxquestions.org/questions/fedora-35/default-mount-point-295978/)

ece30675 02-28-2005 04:05 PM

Default Mount Point
 
I've killed my /etc/fstab file. I wanna copy a new /etc/fstab from fd0 onto my Fedora Core 3 system.

I cannot edit my existing /etc/fstab from linux rescue, because the root filesystem is not mounted.

What is the command to mount the root filesystem??


# mount /whatismyrootfscalled? /whereismyrootfsmounted?

# cd /dev/fd0 /media/floppy

# cp fstab /etc/fstab


Thanks people =)

michaelk 02-28-2005 05:03 PM

Rescue mode will mount the / partition at /mnt/sysimage. Type in the command:
chroot /mnt/sysimage

Now you can copy the fstab file to the /etc.

If the root partition is not being mounted then you will need to figure out which one it is. Post the output of the command
fdisk -l (that is a small L)

The e2label command will display the label of a partition. Use this to identify the partitions assuming your using ext3 partitions. example:

e2label /dev/hda1

ece30675 03-01-2005 03:08 AM

Thankyou. I'll give that a try!

=)

ece30675 03-01-2005 03:44 AM

Code:

The rescue environment will now attempt to find you linux installation and mount it under the directory /mnt/sysimage.  You can then make any changes required to your system.  If you want to proceed with this step choose 'Continue'.  You can also choose to mount your file systems read-only instead of read-write by choosing 'Read-Only'.
Code:

If for some reason this process fails you can choose 'Skip' and this step will be skipped and you will go directly to a command shell.
Code:

Searching for Fedora Core 3 installations....
Code:

Rescue

An error occurred trying to mount some or all of your system.  Some of it may be mounted under /mnt/sysimage.

Press <return> to get to shell.  The system will reboot automatically when you exit from the shell.

Here's what I tried in the shell:

Code:

# chroot /mnt/sysimage
chroot: cannnot execute /bin/sh: No such file or directory

There is no /media directory present? Where can I mount fd0 to copy my 'new and improved' fstab file?

Thanks again =)

ece30675 03-01-2005 03:45 AM

What's with the scroll bars? :mad: (Sorry)

michaelk 03-01-2005 06:36 AM

It appears that rescue is not mounting the root partition. To determine roots partition list the output of the command:
fdisk -l

You can mount the floppy to any directory.
mkdir /mnt/floppy
mount -t vfat /dev/fd0 /mnt/floppy

ece30675 03-01-2005 08:31 AM

OK, here's what happened:

Code:

Checking root filesystem
fsck.ext3: Is a directory while trying to open /
                                                [FAILED]

*** An error occurred doing the filesystem check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
*** Warning -- SELinux is active.
*** Disabling security enforcement for system recovery.
*** Run 'Systemforce 1' to re-enable.
Give rootpassword for maintenance
(or type Control-D to continue): rtpasswd
(Repair filesystem) 1 # mount -t vfat /dev/fd0 /media/floppy
(Repair filesystem) 2 # cd /media/floppy
(Repair filesystem) 3 # cp fstab /etc
cp: overwrite '/etc/fstab', overriding mode 0644? yes
cp: cannot create regular file '/etc/fstab': Read-only filesystem


equinox 03-03-2005 05:53 AM

mount it rw manually


All times are GMT -5. The time now is 01:12 PM.