Re: Reading the BSD partition table from Linux/Intel

From: Maciej W. Rozycki (macro@ds2.pg.gda.pl)
Date: Thu Apr 27 2000 - 07:04:32 EST


On Wed, 26 Apr 2000 Andries.Brouwer@cwi.nl wrote:

> > UP2000 has an on-board Adaptec AIC7896. Recently, the motherboard
> > itself got screwed. I now need to access the data in the hard disk
> > attached to that system. The hard disk has the BSD disklabel
>
> It seems you are not quite sure what type of disklabel and what type
> of filesystem this disk has (perhaps BSD / perhaps ufs or ext2).

 If using 2.3.x kernels you need to enable CONFIG_OSF_PARTITION to access
SRM-compatible disks prepared on Alpha. The kernel will be able to mount
these partitions then.

 For 2.2.x kernels the option is exactly the same but it is not
user-settable -- it's set unconditionally in linux/genhd.h when compiling
for Alpha. I suppose you may just change the "#ifdef __alpha__" that
precedes it to "#if 1" to set it unconditionally for every architecture.

> Once your disklabel is read correctly you find the filesystemtype
> just by trying to mount (mount -t ext2 ... or mount -t ufs ...).
> Note that there are many flavours of ufs. Read mount(8) and
> linux/Documentation/filesystems/ufs.txt .

 If the disk was used for Linux it almost surely has the ext2 filesystem.
If it was used for OSF/1 then it has the ufs filesystem (or an advfs
filesystem Linux cannot handle).

> If you want to use fdisk to look at the disklabel, use the latest one
> (from util-linux 2.10l).

 Looking at bselect() from the current fdisk it will not handle OSF/1
disklabels unless on Alpha so you cannot look at these on an i386/Linux
machine. You may try to compile minlabel -- not sure if it will work for
i386/Linux straight out of the box, though.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:12 EST