[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Use of e2fsck



On Mon, May 19, 2003 at 09:43:55AM +1000, Michael Pless wrote:
> Hi Steve (and others who've offered help on this),
> 
> my error  for not picking up that the info was referring to partitions on 
> the HD - for some reason I took them to sub-directories. Put it down to 
> either brain fade or newness to Linux... <vbg>
> 
> At 08:35 AM 17/05/2003 -0400, you wrote:
> ><snip>
> >So you want to check hdc1, hdc2,
> >
> >e2fsck /dev/hdc1
> >e2fsck /dev/hdc2
> 
> Okay, I feel I've got the syntax worked-out now, but... when I tried to 
> execute the command - even from rescue mode, I got a dire warning about the 
> consequences of running this tool on a mounted file system.

And rightly so.  Rescue mode brings up your system all mounted on
/mnt/sysimage.  You need to umount the partitions before you e2fsck
them.

> How do I ensure the two file systems - hdc1 and hdc2 are not mounted? I 
> tried using my boot floppy, thinking it might serve a similar purpose as 
> the rescue disks of Win95/98/Me, but this took me straight into Linux.

Run the command

  mount

to see what's mounted where.  Then unmount them in the correct order.
I say that because I don't know your partition setup.  Suppose
/dev/hdc1 mounts on /boot and /dev/hdc2 mounts on /.  You will need to
umount /dev/hdc1 first because it is mounted on a subdirectory
belonging to /dev/hdc2.  Then you can umount /dev/hdc2.

> I am finding this to be quite hard going, as the documentation on the RH 
> site gives me the information that I need to employ the following syntax:
> 
> int umount(const char *dir);
> 
> - however, the "constant char" aspect of the command is not explained. 
> Google brought up several (thousand!) pages on the command, but none were 
> enlightening.

You stumbled onto the man page for the system library function (for C
progammers), section 2 of the man pages.  umount is a sysadmin command
and is in section 8.  You get that by

  man 8 umount

> Can you, or someone please put things clearly, without any omitted steps, 
> as I only have the RH documentation to go on, and it is very general - I 
> have not found anything on the documentation CD that refers to "unmount". 
> It is some time I think before books on RH 9 will be stocked, and if I 
> continue with Linux, I'd like to get something that's up to date.

umount (and most system admin tools) have been around since the dawn
of UNIX, so most of them will be covered in even the oldest of Linux
books.  Go ahead and get one of the older books, and then rely on the
Red Hat manuals

http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/

for the fine points.

> Cheers,
> 
> Michael Pless

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure earthlink net  http://www.cumbytel.com/~bobcatos/
The New York Times: All the news that fits in print.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]