Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I use ClarkConnect 3.2 Home edition as a server for my FLAC files. It came with SlimServer so it seemed like a good choice. A couple of weeks ago it stopped working, so I plugged in a monitor and saw there was a problem with eth0, as well as the following error messages during boot:
Bad format on line 2 of /etc/fstab
Mounting local filesystems: mount point 1 does not exist [failed]
Determining IP info for eth0 [failed]
I put in the boot disk and entered 'rescue'
I copied all the messages as I went along. Here they are:
The rescue environment will now attempt to find your 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'.
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.
The following file systems for your Linux system were not unmounted cleanly. Would you like to mount them anyway? /dev/hdb1
Your system has been mounted under /mnt/sysimage.
Press <return> to get a shell. If you would like to make your system the root environment, run the command chroot /mnt/sysimage.
I then typed EXIT and the system did a reboot and I got these messages:
fsck.ext3: Unable to resolve 'LABEL=/mnt/backup'
fsck.ext3: Unable to resolve 'LABEL=/tmp'
After that I can enter the root password for maintenance. Upon so doing, I get the message:
(Repair filesystem) 1 # and a flashing cursor
I did some google searching on that, which is how I found this forum, however I am afraid to do anything in case I make it worse. I did find a thread that had some interesting info about editing /etc/fstab, but I'm not sure how to do that or what to do to fix the error.
I need some instructions on how to edit fstab and what to edit it to. Can anyone help?
thanks in advance
Cams
Last edited by Cams; 09-04-2009 at 05:16 PM.
Reason: Additional information
You should post your file /etc/fstab here, preferably in 'CODE'-tags.
If you are lazy and want to do copy+paste, try the following:
Insert some USB storage (like a flash drive or something).
Mount it (e.g. with the command: mount /dev/sda1 /mnt/floppy)
Copy your fstab file onto it (cp /etc/fstab /mnt/floppy/messed_fstab.txt)
Go here, plug in the drive and copy+paste the content of the .txt file on that drive.
You should post your file /etc/fstab here, preferably in 'CODE'-tags.
If you are lazy and want to do copy+paste, try the following:
Insert some USB storage (like a flash drive or something).
Mount it (e.g. with the command: mount /dev/sda1 /mnt/floppy)
Copy your fstab file onto it (cp /etc/fstab /mnt/floppy/messed_fstab.txt)
Go here, plug in the drive and copy+paste the content of the .txt file on that drive.
I rebooted, typed vi /etc/fstab and got the following messages:
Another program may be editing the same file. If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution.
An edit session for this file crashed. If this is the case, use ":recover" or "vim -r /etc/fstab" to recover the changes (see ":help recovery"). If you did this already, delete the swap file "/etc/.fstab.swp" to avoid this mesage. "/etc/fstab" 12L, 794C
This is probably because the first time I looked at /etc/fstab in vi, I didn't know how to exit so switched it off at the power.
After that I got the following (which is still displayed on my screen and shall remain so until I get some much-needed help!)
[Sorry, I don't know how to edit this to make it look nice]
You should post your file /etc/fstab here, preferably in 'CODE'-tags.
If you are lazy and want to do copy+paste, try the following:
Insert some USB storage (like a flash drive or something).
Mount it (e.g. with the command: mount /dev/sda1 /mnt/floppy)
Copy your fstab file onto it (cp /etc/fstab /mnt/floppy/messed_fstab.txt)
Go here, plug in the drive and copy+paste the content of the .txt file on that drive.
I tried the mount thing with a USB stick and it said
Right, I managed to delete the /etc/.fstab.swp file so I'm no longer getting the scary message. I also unplugged the CD ROM, which I was using temporarily and, as such, had unplugged the third hard disk (hdc). I guess this isn't Windows and one can't just start removing hard disks at a whim!
After that, the only error message I was getting was this:
fsck.ext3: Unable to resolve 'LABEL=/mnt/backup'
After which I'd get dropped back to the shell (after entering the root password) and I'd get this:
(Repair filesystem) 1 # and a flashing cursor
I did vi /etc/fstab and changed the 0 2 to 0 0 as follows:
Code:
LABEL=/mnt/ /mnt/FLAC2 ext3 suid,dev,exec 0 2
Code:
LABEL=/mnt/ /mnt/FLAC2 ext3 suid,dev,exec 0 0
After that the system booted, but I'm still getting a [FAILED] message as follows:
Mounting local filesystems: special device LABEL=/mnt/ does not exist [FAILED]
My fstab now looks like this:
Ah, now that the OS is booting with errors, I'm not getting dropped to the shell and I don't know how to get to the shell! I'll post back if I can figure out how to get the shell, but the problem line is as above.
It's not a copy/paste job, I typed it into Excel and saved as tab delimited. The blank line really is there on the 2nd line and the /mnt/ and /dev/hdb1 lines are all bunched up; I've tried to replicate that.
Now we know that the problem is that your system doesn't recognize the "LABEL=..." partitions. A way to fix this is to find out what the actual file names for the partitions (yes, Linux accesses partitions as files) are, and replacing the "LABEL=..." expressions with the partition file names.
According to your fstab file, one partition is already set up that way: The partition file /dev/hdb1, mounted on /home/mydocs.
I hope you get the idea how to relate the partition files (usually called "device files"):
Enter this command to list all available (and unavailable) hard drive partitions:
How to interprete the device names (this could help relating them to their mount points):
- "/dev/hd" is kind of the prefix for a partition
- The letter (here: a or b) means which drive it is from
- The number is the partition number on that drive, while it can be tricky like the second partition being number 5 and the third number 6 etc.
How to check them (I hope you know what files are on each partition):
- Mount a partition on e.g. /mnt/floppy (like: mount /dev/hda1 /mnt/floppy)
- List the files that are in there (ls /mnt/floppy)
- If you want to list files that are in a directory in your partition, do ls "/mnt/floppy/some directory on the partition"
- Writing down the partition file and the mount point is a good idea here if you want to go through several partitions
- Unmount your partition: umount /mnt/floppy
(the umount command really "misses" an N)
- Repeat the above 4-5 steps for all partitions
There are still some LABELs there, so I'm not sure why the /mnt/ one wasn't working, but it's working now so I'm leaving well alone! Just running SpinRite on my disks to check them before putting the server back into service again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.