LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   i can not boot linux it show can not open fstab (https://www.linuxquestions.org/questions/linux-general-1/i-can-not-boot-linux-it-show-can-not-open-fstab-454619/)

anurak 06-14-2006 05:18 AM

i can not boot linux it show can not open fstab
 
Dear sir,
After i close computer (run linux) by accident.
not shutdown properly.
after that i reboot
after it reboot for a while .
it show that can not open /etc/fstab
and ask for e2fsck.

i try to login by mantainance.
and open /etc/fstab i found out that in the file no
content at all.
do i need to edit it mannually ?
or i have to do e2fsck?

i don't know e2fsck?
how to use?
please help.

Anurak

nadroj 06-15-2006 02:15 PM

if you have a liveCD boot it up and use 'e2fsck /dev/deviceFileName' on the root partition that was not shut down properly. if you dont have one download a very simple one such as DSL. 50mb download.

if you can log in on the computer and view the /etc/fstab file but its empty, can u just edit it and add your entries manually? if you dont know how then let us know how your hard drive(s) partitions are layed out and what partition is for what (ie /dev/hdb2 is /boot, etc)

hope this helps

aerojazz 06-19-2006 07:55 PM

Hello,

I got the same problem booting up linux.Can somebody help me? The error messages goes like this:

Your /etc/fstab does not contain the fsck passno field.

The superblock could be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem, then the superblock is corrupt.

fsck.ext2: Is a directory while trying to open [FAILED]

nadroj 06-19-2006 08:36 PM

aero, use a live CD to edit your /etc/fstab file. search distrowatch.com or wherever to find a live distro to suit your needs (any will do however). check out 'man mount', specifically the paragraph that talks about the 6th field for a mount command or fstab entry (fs_passno section). read this section and edit the /etc/fstab file accordingly, or if you dont know then just add a ' 0' (zero) to the line in your /etc/fstab file that doesnt contain 6 fields.

aerojazz 06-19-2006 08:51 PM

Hi,

how should i edit the fstab?

aerojazz 06-19-2006 11:51 PM

Hi I just viewed my fstab and it seems that its empty and it shows something like this:

~
~
~
~
"fstab" [readonly] 0L, 0C


**by the way i got this when i typed "fdisk -l"

Device Boot Start End Blocks Id System

/dev/hda1 * 1 1275 10241406 83 Linux
/dev/hda2 1276 3825 20482875 83 Linux
/dev/hda3 3826 3863 305235 82 Linux swap
/dev/hda4 3864 4998 9116887+ c Win95 FAT32 (LBA)

can somebody help me fixing my fstab?pls....Thanks in advance

anurak 06-20-2006 02:17 AM

it might help
 
thank you for naroj I can fix my problem.

for the one who have the same problem like me.
just follow the naroj help.

use live CD to boot the computer (in my case use damn small linux).
after finish booting. open terminal
type sudo su press enter to log in as root.
after that you go to /mnt and ls.
you will see all the mount point for the harddisk.
just mount your drive the hold the root file system by

#mount /dev/hda6 /mnt/hda6
(in my case i use hda6 becuase it hold root file system here)

after you mount you edit fstab by vi /mnt/hda6/etc/fstab

after you finish editing fstab. then try to reboot.
the content inside the fstab just search internet for suggestion.

Anurak

nadroj 06-20-2006 07:40 AM

good work, and thanks for posting back the solution and whether it worked or not

aerojazz 06-21-2006 09:05 PM

Hi

Thanks for the help. I Can now edit fstab.

aero


All times are GMT -5. The time now is 11:58 AM.