Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20th February 2011, 08:01 PM
aldikraja Offline
Registered User
 
Join Date: Feb 2011
Posts: 3
windows_7ie
fstab change:

Hi,

I am working with a server at home: installed fedora 14 and the installation had created a fstab file that did not have all my harddrives, I have 4 of them each with 250GB.

Reading onine, I found that I can establish automatic recognition of other partitions:
sdb1
sdc1
add1

by adding them in the fstab file present in /etc/ dir.

So I did the following:
a) created three directories
/stor1
/stor2
/stor3

and then
b) using vi I /etc/fstab edited fstab by adding three new lines

/dev/sdb1 /stor1 ext4 defaults 1 2
/dev/sdc1 /stor2 ext4 defaults 1 2
/dev/sdd1 /stor3 ext4 defaults 1 2

After reboot the system does not start in full but hangs reporting that error accorded with sdb1.
It permits to enter root passwd and I can see the fstab with vi, but it does not permit me to delete three added lines, although I am using w!.

Any help or solution before I reboot fresh from a CD?

Thank you indvance,

Aldi
Reply With Quote
  #2  
Old 20th February 2011, 08:52 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfedorafirefox
Re: fstab change:

Boot in single user mode.

One thing I have noticed is that disk named (the /dev/sd*) are not necessarily consistent across boots. This means that any filesystem on those names will not necessarily show up where expected. You can use either UUID=s or LABEL= in the /etc/fstab to identify the filesystems to associate with the mount point.

You can identify the UUID using the blkid utility, which can also list any labels found.

You can assign a specific label to ext<x> filesystems using:

tune2fs -L <label> /dev/<name>

The <label> is limited to 16 characters.
Reply With Quote
  #3  
Old 20th February 2011, 09:51 PM
aldikraja Offline
Registered User
 
Join Date: Feb 2011
Posts: 3
windows_7ie
Re: fstab change:

Thank you JPollard for great suggestions,
I think I did not explain exact where the system is stopping. Maybe I gave the impression that the reboot finishes completely.
The reboot starts, but in the moment that is working with a horizontal blue bar showing Fedora 14 it stops abruptly by saying that an error has happened. This error is related with the first additional drive I defined in fstab.
I have two choices from Fed14: a) Ctrl-D which reboots again; b) provide my root passwd which brings me to a command line which does not change anything (although my attempts to mess-up with fstab, by bringing it to its original version).
In this command line I tried also:
single
or
emergency
and both are not executable in this special env.
During the reboot I have a choice to enter in Ctrl-s which brings me to a MBA configuration, which does not have much to do with fstab.
So how do you enter in single user mode in Fed 14, genopteron 64 bit, to correct fstab?
Again thank you for your time,
Aldi
Reply With Quote
  #4  
Old 20th February 2011, 10:28 PM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930
linuxchrome
Re: fstab change:

I remember having a similar problem when I thought I'd be smart and save some data files and use them for a new Fedora installation. The saved files included the fstab file. This file turned out to be totally wrong for the new installation and the system wouldn't boot. It got stuck in the same way yours does. I also ran into the same read/write issues that you're experiencing. The solution, for me at least, was to figure out how to gain write access to fstab so I could make the needed changes. Do I remember how I did that? No. I wish I did, but I think that this may be what you need to do. No solution unfortunately but at least a valid hint.
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #5  
Old 20th February 2011, 10:32 PM
motnahp00
Guest
 
Posts: n/a
linuxfedorafirefox
Re: fstab change:

When I screwed up my fstab file, I booted into a live distro and changed the file accordingly.
Reply With Quote
  #6  
Old 20th February 2011, 10:34 PM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,930
linuxchrome
Re: fstab change:

Yep. I think that's what I did too.
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #7  
Old 20th February 2011, 10:49 PM
motnahp00
Guest
 
Posts: n/a
linuxfedorafirefox
Re: fstab change:

I don't recall if I figured out the write error while in safe mode, but the alternative should work. Good luck aldikraja.
Reply With Quote
  #8  
Old 21st February 2011, 01:00 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfedorafirefox
Re: fstab change:

What is in your fstab?

It sounds like the new disks (even if not mounted) have altered the device order. If you have entries like /dev/sda<n>, in there, that the filesystems can't be mounted because they are no longer where the fstab file expects them.

To fix that (I had to redo mine), you have to remove the disk(s) and reboot, then change the fstab (and /boot/grub/grub.conf) files to use either lable or UUID to mount the filesystems. When the base is working
again you can then reinstall the new disk(s) and have a successful reboot.
Reply With Quote
  #9  
Old 21st February 2011, 01:47 PM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
linuxfedorafirefox
Re: fstab change:

Quote:
Originally Posted by glennzo View Post
The solution, for me at least, was to figure out how to gain write access to fstab so I could make the needed changes. Do I remember how I did that? No. I wish I did, but I think that this may be what you need to do. No solution unfortunately but at least a valid hint.
You probably had to remount the root partition read+write:
Code:
mount -o remount,rw /
Reply With Quote
  #10  
Old 21st February 2011, 03:28 PM
scott32746 Offline
Registered User
 
Join Date: Jun 2007
Location: Lake Mary, Florida
Age: 48
Posts: 1,082
windows_xp_2003firefox
Re: fstab change:

Hello,

After creating the partitions did you run mkfs.ext4 on each ?
I would boot into rescue mode and #ed out the FS from fstab
Check/redo your steps
fdisk /dev/sdb
mkfs.ext4 /dev/sdb1
add to fstab ( remove # )
check mount point
mount -a ( this is going to mount all )
Reply With Quote
  #11  
Old 21st February 2011, 04:54 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfedorafirefox
Re: fstab change:

well, to me what looks like happened is that he has in his fstab to check the filesystems on boot.

Now if ANY of the drives he has it check on boot fail, then it dumps him to a shell with the filesystems mounted read-only.

It's nice to have it check the fielsystems on boot a lot of the time, but when one gets errors, it's a pain in the butt

You have to boot from a cd, (I use Hiren's boot cd and just boot up the recovery linux on there)

Since you say it gives you an error with sdb1, you can either run a full fsck on sdb1 fro, the shell it drops you to and fix the errors, or boot from a cd and edit your /etc/fstab and change the 2 on the end of the line for /dev/sdb1 from a 2 to a 0 like this:

/dev/sdb1 /stor1 ext4 defaults 0 0
/dev/sdc1 /stor2 ext4 defaults 1 2
/dev/sdd1 /stor3 ext4 defaults 1 2

That way, it won't check the filesystem on boot, and if there is a problem with it finding the device it will just give an error and the mount will fail but continue booting.
Reply With Quote
  #12  
Old 21st February 2011, 06:02 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfedorafirefox
Re: fstab change:

It will always check the filesystem on boot. There is a flag that is used to detect if the filesystem was dismounted. If the flag is set, then the filesystem will be checked. Most of the time, the check is only flushes journals.

The last field only defines HOW the scheduled fsck is done. 0 only means when courrupted. Non-zero numbers define the action of parallel fsck. Those filesystems with the same value will be done in parallel. The numeric value simply defines the order each group is done.

The fifth field has nothing to do with filesystem checks, but how often the filesystem should be backed up when using dump.

see the man page on fstab.
Reply With Quote
  #13  
Old 21st February 2011, 07:27 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfedorafirefox
Re: fstab change:

you are correct that non-zero numbers define the order that the filesystems are checked, however, if the number is zero, then the filesystem is not checked.

from the fstab man page:

Quote:
The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.
Reply With Quote
  #14  
Old 21st February 2011, 07:43 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfedorafirefox
Re: fstab change:

A corrupted filesystem will still have fsck run on it before it is mounted. Now the correction may be trivial, as a journaling filesystem will have its journal flushed during mount, but if it cannot do that, it won't mount until the dirty flag is cleared by an fsck. If the mount is in the /etc/fstab (and not marked "noauto"), then an fsck will be done as the filesystem has been marked as required for normal operation.
Reply With Quote
  #15  
Old 21st February 2011, 07:51 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfedorafirefox
Re: fstab change:

but.. if you use journalling on your filesystem, then it will NEVER be marked dirty. However, a fielsystem error detected by the kernel will force a check on the next reboot.
Reply With Quote
Reply

Tags
change, fstab

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab error, can't boot, can't edit fstab FruitOLife Using Fedora 4 17th January 2010 02:16 PM
Change ntfs line in fstab jo3 Using Fedora 4 17th June 2006 01:03 AM
Change /etc/fstab and /media directorys stresscrash Using Fedora 2 1st October 2004 08:26 AM


Current GMT-time: 03:40 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat