[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Not really a bug...
From: |
Andrew Clausen |
Subject: |
Re: Not really a bug... |
Date: |
Fri, 23 Mar 2001 09:43:09 +1100 |
address@hidden wrote:
> Note, that I really don't know, whether /windows/C was mounted,
> so / might well have been the only mounted filesystem on the
> harddrive.
Interesting.
> > Can you reproduce the problem? Or does reproducing it involve
> > destroying stuff?
>
> Well, it would involve messing with filesytems I use and need. Of
> course it's half as bad, since I can write down the exact partition
> data before attempting to reproduce the problem, but I'll wait to
> see, whether the problem is with the real-root-dev-stuff.
Actually, it's possible to test this stuff in gdb, without doing
writing to disk. Steps:
(1) build Parted from the source:
$ cd ~/parted-1.4.10
$ CFLAGS=-g ./configure && make
(2) as root, start gdb
# cd ~/parted-1.4.10/parted
# libtool gdb parted
(gdb) set args /dev/hda
(gdb) run
(3) set a break point (inside the check command):
(parted) ctrl-c
(gdb) list do_check
(gdb) break 137
(gdb) cont
(4) at this stage, it's up to you what to test. You can test if
the entire disk is busy with:
(parted) check 1 [or number]
(gdb) print ped_disk_is_busy (disk)
It will say 1 if it is busy, and 0 if it isn't. If you want to check
if parted thinks an individual partition is busy, use:
(gdb) print ped_partition_is_busy (part)
(the partition number supplied to check is used to determine which
partition to check)
> > # cat /proc/sys/kernel/real-root-dev
>
> It says
> 773
> which doesn't mean much to me...
affable:~$ echo $[773 / 256], $[773 % 256]
3, 5
affable:~$ ls -l /dev | grep ' 3, \+5 ' | grep '^b'
brw-rw---- 1 root disk 3, 5 May 6 1998 hda5
This is correct, isn't it? (BTW: 3,5 means major=3, minor=5... it's
just the way Linux addresses devices... see
/usr/src/linux/Documentation/devices.txt)
> I can imagine. I'd offer you some help, too, but I really don't know
> anything about partition-tables, filesystems and the like. You'll be
> my hero, though.
The learning curve isn't very big, IMHO. The most important thing is
being able to write nice code :-) /me never turns back volunteers...
Andrew Clausen