Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > Your Distro > Slackware Linux Help
Reload this Page Corrupted fstab
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Slackware Linux Help For help and Discussion about Slackware linux

Reply
 
Thread Tools Display Modes
Old 04-26-2008   #11 (permalink)
Jonathan183
Linux Engineer
 
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,359
Peter,

You should be able to boot from the Slax CD and make sure you have net access. Then open a terminal in the GUI and repeat the commands previously posted (repeated below). If you post all commands and output for the terminal we can have a look at both the commands you use and the output you get ... with any error codes. Hopefully we will be able to work out where things are going wrong.

The steps after you open the terminal are ...
1. gain root rights using either
Code:
su
or
Code:
sudo -s
2. create folder to mount hard drive root partition to (lets call it /manmount again) and mount the partition (I have assumed this is sda1)
Code:
mkdir /manmount
mount /dev/sda1 /manmount
3. edit fstab for the hard drive to give correct information using either vi or nano
Code:
vi /manmount/etc/fstab
or
Code:
nano /manmount/etc/fstab
save changes and exit vi or nano
4. then check the file contents are correct
Code:
cat /manmount/etc/fstab
5. unmount the hard drive partition using
Code:
umount /dev/sda1
6. Post the output you get for the above, then shutdown the system using
Code:
init 0
7. restart the system using the Slax cd and repeat steps 1,2,4,5 and check if the file contents.

Incase this does not work I also suggest you post the output of
Code:
fdisk -l
and
Code:
dmesg | grep mount
dmesg | grep error
Jonathan183 is offline   Reply With Quote
Old 04-26-2008   #12 (permalink)
pfeigl
Just Joined!
 
Join Date: Apr 2008
Location: Ontario
Posts: 76
Wink Thanks.

Thank you for the advice. I will try early tomorrow morning since I am not a Night Owl as yourself.

Peter
pfeigl is offline   Reply With Quote
Old 04-26-2008   #13 (permalink)
Freston
Linux User
 
Freston's Avatar
 
Join Date: Mar 2007
Posts: 476
Can you execute this command on the faulty system?
Code:
for i in `ls /etc/rc.d/` ; do ; grep -l fstab /etc/rc.d/$i 2> /dev/null && grep -C 2 fstab /etc/rc.d/$i ; done
And post the output here?

What it does is search through your init scripts for the pattern 'fstab' and post the lines containing it plus 2 lines of context around it. It also gives the filename and supremes error messages that might occur due to permission problems.
That should give us a good look at the boot process.


And also the outputs of:
Code:
mount
Code:
fdisk -l         # that's a small L, not a capital i
EDIT: Cross posted with Joonathan183, who has some very good advice. Try that first.

When you get to the dmesg part, also try
Code:
dmesg | grep not
__________________
Can't tell an OS by it's GUI
Freston is offline   Reply With Quote
Old 04-27-2008   #14 (permalink)
pfeigl
Just Joined!
 
Join Date: Apr 2008
Location: Ontario
Posts: 76
Test of boot

Hi Freston. Could you check that long command? I'm fairly certain it is typed in correctly but I always geta syntax error: ";" expected.

Peter
pfeigl is offline   Reply With Quote
Old 04-27-2008   #15 (permalink)
pfeigl
Just Joined!
 
Join Date: Apr 2008
Location: Ontario
Posts: 76
Diagnostics

Code:
rootroot@slax:~# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa92a25c2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       30073   241561341   83  Linux
/dev/sda2           30074       30401     2634660    5  Extended
/dev/sda5           30074       30401     2634628+  82  Linux swap
root@slax:~# @slax:~# mount
Code:
aufs on / type aufs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /mnt/sda1 type ext3 (rw,noatime)
root@slax:~#
Code:
oot@slax:~# dmesg | grep not
..MP-BIOS bug: 8254 timer not connected to IO-APIC
system 00:0d: iomem range 0xe0000000-0xefffffff could not be reserved
system 00:0e: iomem range 0xf0000-0xfffff could not be reserved
system 00:0e: iomem range 0xfed00000-0xfed000ff could not be reserved
system 00:0e: iomem range 0xfed30000-0xfed300ff could not be reserved
system 00:0e: iomem range 0x37ff0000-0x37ffffff could not be reserved
system 00:0e: iomem range 0xffff0000-0xffffffff could not be reserved
system 00:0e: iomem range 0x0-0x9ffff could not be reserved
system 00:0e: iomem range 0x100000-0x37feffff could not be reserved
system 00:0e: iomem range 0xffee0000-0xffefffff could not be reserved
system 00:0e: iomem range 0xfffe0000-0xfffeffff could not be reserved
system 00:0e: iomem range 0xfec00000-0xfecfffff could not be reserved
system 00:0e: iomem range 0xfee00000-0xfeefffff could not be reserved
apm: disabled - APM is not SMP safe.
ACPI Exception (processor_core-0816): AE_NOT_FOUND, Processor Device is not present [20070126]
ACPI Exception (processor_core-0816): AE_NOT_FOUND, Processor Device is not present [20070126]
SIS5513: not 100% native mode: will probe irqs later
seagate: ST0x/TMC-8xx not detected.
usbmon: debugfs is not available
Intel ISA PCIC probe: not found.
Databook TCIC-2 PCMCIA probe: not found.
root@slax:~#
Those are the other diagnostics. I couldn't get the first command to work.

Peter (Welcome back BTW)
pfeigl is offline   Reply With Quote
Old 04-27-2008   #16 (permalink)
pfeigl
Just Joined!
 
Join Date: Apr 2008
Location: Ontario
Posts: 76
Note that the HDD is NOT detected...

Peter
pfeigl is offline   Reply With Quote
Old 04-27-2008   #17 (permalink)
pfeigl
Just Joined!
 
Join Date: Apr 2008
Location: Ontario
Posts: 76
Diagnostics

Here is the output after I reboot and repeat 1,2,4,5:
Code:
root@slax:~# cat /manmount/etc/fstab
/dev/sda1        / ext3                      defaults,user     0   1
/dev/cdrom      /mnt/cdrom       auto        noauto,user   ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
/dev/sdg1       /mnt/usbdev     auto            noauto,user     0  0
/dev/hda5        swap             swap        defaults         0   0
root@slax:~# dmesg | grep mount
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3-fs: mounted filesystem with ordered data mode.
root@slax:~#
the command dmesg | grep error returns nothing. It looks like we have an issue though...
pfeigl is offline   Reply With Quote
Old 04-27-2008   #18 (permalink)
Freston
Linux User
 
Freston's Avatar
 
Join Date: Mar 2007
Posts: 476
Oops! One ';' to many, it had no place after 'do'.
Code:
for i in `ls /etc/rc.d/` ; do grep -l fstab /etc/rc.d/$i 2> /dev/null && grep -C 2 fstab /etc/rc.d/$i; done
Remember to do this on your Slackware system.
__________________
Can't tell an OS by it's GUI
Freston is offline   Reply With Quote
Old 04-27-2008   #19 (permalink)
Jonathan183
Linux Engineer
 
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,359
Quote:
Originally Posted by pfeigl View Post
Here is the output after I reboot and repeat 1,2,4,5:
Code:
root@slax:~# cat /manmount/etc/fstab
/dev/sda1        / ext3                      defaults,user     0   1
/dev/cdrom      /mnt/cdrom       auto        noauto,user   ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
/dev/sdg1       /mnt/usbdev     auto            noauto,user     0  0
/dev/hda5        swap             swap        defaults         0   0
root@slax:~# dmesg | grep mount
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3-fs: mounted filesystem with ordered data mode.
root@slax:~#
the command dmesg | grep error returns nothing. It looks like we have an issue though...
It looks as though the changes have been saved ... fstab still has an error which you should correct and then try booting from the hard drive. The bold entry /dev/hda5 should be /dev/sda5.

Let us know how it goes.
Jonathan183 is offline   Reply With Quote
Old 04-27-2008   #20 (permalink)
pfeigl
Just Joined!
 
Join Date: Apr 2008
Location: Ontario
Posts: 76
Exclamation Diagnostics

Hi Freston. I tried that lengthy command (making several errors in the process) and it returns nothing. I just get the bash prompt back.

Any more ideas.? What is that maximal count and running e2fsck all about?

Peter
pfeigl is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 08:18 PM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0