Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fstab

0 views
Skip to first unread message

Jeff Moore

unread,
Jan 13, 2001, 10:29:57 PM1/13/01
to
I wanted to remove a hard drive from my linux server, so I moved the
filesystems to a different drive and tried to edit the fstab. There are
no partition names in the fstab for hard drives. Where are the partition
entries?

Jeff Moore

Anita Lewis

unread,
Jan 14, 2001, 7:00:49 AM1/14/01
to
You can't mount a drive, only a partition. Since you moved the files to a
different drive, they are no doubt on a particular (or the only) partition
on that drive. You need to find out what partition they are on and put the
entry for the partition in fstab. If the old partition for the files was
mounted then the entry for that partition will be in fstab. It is possible
that there was no entry in fstab, but then the partition with the files on
it would not have been mounted. There has got to be at least one partition
entry in fstab, and that is the root partition (like /dev/hda1 where 1 is
the partition number)


Anita

Jeff Moore

unread,
Jan 14, 2001, 3:17:09 AM1/14/01
to ajle...@intac.com
I use RH7 and there are no entries in the fstab for partitions, only labels.
Where are the labels?

Jeff Moore

kort...@inserttwcny.rr.com

unread,
Jan 14, 2001, 6:03:29 PM1/14/01
to
In article <3A616083...@mindspring.com>, Jeff Moore wrote:
>I use RH7 and there are no entries in the fstab for partitions, only labels.
>Where are the labels?
>
>Jeff Moore
<snip>

man fstab

Anita Lewis

unread,
Jan 14, 2001, 7:08:47 PM1/14/01
to
On Sun, 14 Jan 2001 08:17:09 +0000, Jeff Moore wrote:
>I use RH7 and there are no entries in the fstab for partitions, only labels.
>Where are the labels?
>
>Jeff Moore
This is my RH7 fstab. The LABEL= thnig is new to me; so I see what you
mean. I guess it is able to do the LABEL thing since that partition is also
indicated in LILO. I don't know. It used to be just /dev/hdwhatever like
the /home partition is. I am sure I could change that from LABEL=/ to
/dev/hdc7 which it is. I also see that it has /dev/cdrom which is a link to
/dev/hdb.

LABEL=/ / ext2 defaults 1 1
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/hda3 swap swap defaults 0 0
/dev/hda7 /home ext2 defaults 0 2

What is the partition you want to put in fstab and what is the directory you
want to use for a mount point? Just put it in like I did /home. I'm
assuming that it is ext2.

I'm curious what other labels you have in your fstab.

Anita

Paul Colquhoun

unread,
Jan 14, 2001, 8:17:29 PM1/14/01
to


The ext2 filesystem can have labels. Mount can look for these labels
and use them to identify partitions.

mke2fs can label a partition when it formats it (and maybe afterwards,
but I don't have a spare partition to experiment on).


--
Reverend Paul Colquhoun, postm...@andor.dropbear.id.au
Universal Life Church http://andor.dropbear.id.au/~paulcol
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
xenaphobia: The fear of being beaten to a pulp by
a leather-clad, New Zealand woman.

Jeff Moore

unread,
Jan 16, 2001, 8:01:47 AM1/16/01
to
fstab

David M. Cook

unread,
Jan 25, 2001, 9:27:13 PM1/25/01
to
On Mon, 15 Jan 2001 01:17:29 GMT, Paul Colquhoun
<postm...@andor.dropbear.id.au> wrote:

>The ext2 filesystem can have labels. Mount can look for these labels
>and use them to identify partitions.

>mke2fs can label a partition when it formats it (and maybe afterwards,
>but I don't have a spare partition to experiment on).

e2label will list the label of a partition and also set it. So one could
list out the partition table with fdisk -l and then run e2label on all the
ext2 partitions to see what they are. Here's a one liner for that:

fdisk -l | grep 'Linux$' | cut -c-10 | xargs -n1 e2label

Dave Cook

0 new messages