LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-04-2009, 05:11 PM   #1
Cams
LQ Newbie
 
Registered: Sep 2009
Location: Isle of Arran, Scotland
Distribution: ClarkConnect
Posts: 9

Rep: Reputation: 0
Messed up mount points with rescue


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
 
Old 09-04-2009, 07:10 PM   #2
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
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.
 
Old 09-05-2009, 04:56 AM   #3
Cams
LQ Newbie
 
Registered: Sep 2009
Location: Isle of Arran, Scotland
Distribution: ClarkConnect
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TITiAN View Post
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:
  1. 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.
  1. 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]

Code:
LABEL=/1				/			ext3		defaults
1 1
LABEL=/boot1			/boot			ext3		defaults	                     1 2
none					/dev/pts		devpts	gid=5, mode=620        0 0
none					/dev/shm		tmpfs	defaults                          0 0
LABEL=/home1		/home		ext3		defaults                          1 2
LABEL=/mnt/backup		/mnt/FLAC2	ext3		suid,dev,exec                0 2
none					/proc			proc		defaults	                     0 0
none					/sys			sysfs		defaults	                     0 0
LABEL=/tmp			/tmp			ext3		defaults                         1 2
LABEL=SWAP-hdc2		swap		swap	defaults	                     0 0 
/dev/hdb1				/home/mydocs	ext2		suid,dev,exec               0 0

Last edited by Cams; 09-05-2009 at 07:55 AM. Reason: fix tags
 
Old 09-05-2009, 05:31 AM   #4
Cams
LQ Newbie
 
Registered: Sep 2009
Location: Isle of Arran, Scotland
Distribution: ClarkConnect
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TITiAN View Post
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

mount: you must specify the filesystem

Linux is hard!
 
Old 09-05-2009, 09:36 AM   #5
Cams
LQ Newbie
 
Registered: Sep 2009
Location: Isle of Arran, Scotland
Distribution: ClarkConnect
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 09-05-2009, 09:54 AM   #6
Cams
LQ Newbie
 
Registered: Sep 2009
Location: Isle of Arran, Scotland
Distribution: ClarkConnect
Posts: 9

Original Poster
Rep: Reputation: 0
I figured out how to get into the shell. Here is my fstab:

Code:
LABEL=/1	/	ext3	defaults	1 1

LABEL=/boot1	/boot	ext3	defaults	1 2
none	/dev/pts	devpts	gid=5, mode=620	0 0
none	/dev/shm	tmpfs	defaults	0 0
LABEL=/home1	/home	ext3	defaults	1 2
LABEL=/mnt/ /mnt/FLAC2 ext3 suid,dev,exec 0 0				
none	/proc	proc	defaults	0 0
none	/sys	sysfs	defaults	0 0
LABEL=/tmp	/tmp	ext3	defaults	1 2
LABEL=SWAP-hdc2	swap	swap	defaults	0 0 
/dev/hdb1 /home/mydocs ext2 suid,dev,exec 0 0
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.
 
Old 09-05-2009, 10:15 AM   #7
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
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:
Code:
ls /dev/hd??*
The output should/could look similar to this:
Code:
/dev/hda1 /dev/hda5 /dev/hda6 /dev/hdb1 /dev/hdb2 /dev/hdb3
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

Hope this goes well
all the best
 
Old 09-06-2009, 09:53 AM   #8
Cams
LQ Newbie
 
Registered: Sep 2009
Location: Isle of Arran, Scotland
Distribution: ClarkConnect
Posts: 9

Original Poster
Rep: Reputation: 0
It worked!

My fstab now looks like this:

Code:
LABEL=/1	/	ext3	defaults	1 1

LABEL=/boot1	/boot	ext3	defaults	1 2
none	/dev/pts	devpts	gid=5, mode=620	0 0
none	/dev/shm	tmpfs	defaults	0 0
LABEL=/home1	/home	ext3	defaults	1 2
none	/proc	proc	defaults	0 0
none	/sys	sysfs	defaults	0 0
LABEL=/tmp	/tmp	ext3	defaults	1 2
LABEL=SWAP-hdc2	swap	swap	defaults	0 0 
/dev/hdb1 /home/mydocs ext2 suid,dev,exec 0 0				
dev/hdb1 /mnt/ /mnt/FLAC2 ext3 suid,dev,exec 0 1
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.

Thanks a lot for the help.
 
Old 09-06-2009, 10:08 AM   #9
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
The last line looks messy, as if you copied it incorrectly... well nevermind if it is just working =D
 
Old 09-06-2009, 08:17 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Quote:
/dev/hdb1 /home/mydocs ext2 suid,dev,exec 0 0
dev/hdb1 /mnt/ /mnt/FLAC2 ext3 suid,dev,exec 0 1
You can only have 1 entry for /dev/hdb1, and it must start with a '/', unless it starts with 'LABEL='
 
Old 09-07-2009, 10:45 AM   #11
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
Quote:
Originally Posted by chrism01 View Post
You can only have 1 entry for /dev/hdb1, and it must start with a '/', unless it starts with 'LABEL='
That's why I said that it looks messed (or incorrectly copied).
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount one device to two mount points secretlydead Linux - General 3 03-28-2007 05:30 AM
MBR Messed Up; How to use rescue? KarlT Linux - Software 2 12-23-2003 03:14 PM
need help with mount points! rmanocha Linux - Hardware 2 10-26-2003 03:23 PM
SCRIPT: check if auto-mount mount-points are still mounted markus1982 Linux - Software 0 05-25-2003 05:48 AM
mount points... Jeffrey Linux - General 6 02-24-2001 12:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration