I am trying to resize a windoze partition for my first installation
of linux. (ok, I did specify the disk-filling partition myself, but I
didn't know I was going to get into linux.) Using Parted 1.6.4 (I
d/l'd two disk images, partboot and partroot, from gnu)

Oh, that's odd...

I encountered the error message that Andrew Clausen and Juan Pedro
Vallejo were discussing here:

Mark Stone advises in the unofficial Debian Install guide
http://www.debian.org/releases/potato/installguide/ that "You may see
some warning messages appear when running parted [...] In our
experience, these warnings can safely be ignored." But I don't think
he was referring to warnings that say "Make sure you don't attempt to
resize..."

So, shall I go ahead and ignore the warning and resize the windoze
partition? (yes, I have backed up my stuff but I don't have a windoze
image :P )

Yes. Think of this partition mount check as a safety catch...
it just means you'll have to make your own judgement without
any hints from Parted.
Cheers,
Andrew
_______________________________________________
Bug-parted mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-parted

Hi all,

I have a function for determining if a partition mounted with specified
options or not in reiser4progs. Probably it can be adoppted to be used
in parted too. I mean, that there might be used /dev/root device and
probaly some hurd-specific way to determine is a partition mounted or
not. See bellow for details.

In the case this function cannot be adopted for using in hurd, probably
it may be used in linux only. Any way, I hope it will be useful for
parted :)

/*

Checking if specified partition is mounted. It is possible devfs is
used, and
all devices are links like hda1->ide/host0/bus0/target0/lun0/part1.
Therefore

we use stat function, rather than lstat: stat(2) follows links and return

stat information for link target. In this case it will return stat
info for

/dev/ide/host0/bus0/target0/lun0/part1 file. Then we compare its st_rdev

field with st_rdev filed of every device from /proc/mounts. If match
occurs
then we have device existing in /proc/mounts file, which is therefore
mounted

at the moment.
Also this function checks whether passed device mounted with specified
options. Options string may look like "ro,noatime".
We are using stating of every mount entry instead of just name comparing,
because file /proc/mounts may contain as devices like /dev/hda1 as
ide/host0/bus0/targ...

Also we use /proc/mounts, not /etc/mtab because the using of
/rtc/mtab is not
reliable enough, as its updating may be turned off by using -n mount
option.