Accessing Windows files from FreeBSD
Ion-Mihai Tetcu
itetcu at apropo.ro
Sat Feb 7 09:27:47 PST 2004
X-Mailer: Sylpheed version 0.9.8claws (GTK+ 1.2.10; i386-portbld-freebsd5.2)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
[please don't top-post, it makes hard to follow]
[cc'ed back to the list]
On Sat, 7 Feb 2004 20:59:16 +0400
"Mazen S. Alzogbi" <freebsd at mazenalzogbi.com> wrote:
> Hi Ion-Mihai,
>
> I appreciate your help (and Ads Serpe's too). The question now, how can
> I know the /dev/???? Part?
>
> I have many "devices" mapped under /dev/ and I have no clue which one
> maps to which!!
It goes like this:
- if there are ATA disks their name is ad
- if there are SCSI disks their name is da
- hard-disks are numbered from 0
- slices are numbered from 1
- bsd slices are denoted by letters a - the /, c - the hole slice, b -
swap, d-h normal partitions
So the root partition of the first slice of the first ata disk (the
firts ata disk is the primary master) will be: ad0s1.
Now if you do a fdisk you will get something like:
itetcu at it> /tmp [19:13:05] 1
# fdisk
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=238216 heads=16 sectors/track=63 (1008 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=238216 heads=16 sectors/track=63 (1008 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 20964762 (10236 Meg), flag 0
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 20964825, size 163573830 (79870 Meg), flag 0
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 184538655, size 20964825 (10236 Meg), flag 80 (active)
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63
The data for partition 4 is:
sysid 6 (0x06),(Primary 'big' DOS (>= 32MB))
start 205503480, size 34604010 (16896 Meg), flag 0
beg: cyl 1023/ head 255/ sector 63;
end: cyl 1023/ head 254/ sector 63
with no options fdisk default to print the configuration of the hdd I
have booted from. Let alone the physical parameters for now. What we are
after are is:
******* Working on device /dev/ad0 *******
--
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 20964762 (10236 Meg), flag 0
--
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 20964825, size 163573830 (79870 Meg), flag 0
--
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 184538655, size 20964825 (10236 Meg), flag 80 (active)
--
The data for partition 4 is:
sysid 6 (0x06),(Primary 'big' DOS (>= 32MB))
start 205503480, size 34604010 (16896 Meg), flag 0
This tells me I have 4 slices on the HDD I've booted from, three (1-3)
of which are FreeBSD slices and the 4th being a FAT32 one.
So the name of my win partition is ad0s4
the mount command will be:
mount_msdos /dev/ad0s4 /mnt
because I don't want to tape every time all this, i've added in my
/etc/fstab the following line:
/dev/ad0s4 /vol/it/xp msdosfs ro 0 0
^ ^ ^ ^
device mount_point type read_only
> You guessed it, a newbie here :)
The newbee out there should do himself a favor and read the handbook,
the FAQ and make extensive use of apropos(1) and man(1) commands.
--
IOnut
Unregistered ;) FreeBSD user
More information about the freebsd-questions
mailing list