delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/24/18:34:27

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <3.0.5.32.20030224173520.00e758c0@mail.earthlink.net>
X-Sender: rwcitek AT mail DOT earthlink DOT net (Unverified)
Date: Mon, 24 Feb 2003 17:35:20 -0600
To: cygwin AT cygwin DOT com
From: Robert Citek <rwcitek AT alum DOT calberkeley DOT org>
Subject: partition devices
Mime-Version: 1.0

Hello all,

On a dual boot Windows/Linux system, how can I determine which device
corresponds to /dev/hda5?

From the docs, each /dev/sdaX is supposed to map to a partition.  For example,
  /dev/sda1 --> partition 1 on first disk (drive C:\)

When I use fdisk under linux, it tells me my disk has seven partitions: 1
primary (hda1), 1 extended (hda4) and 5 logical (hda5-9).  hda1 is a FAT32
partition.  hda5 is ext2, a 40 MB /boot partition.  hda9 is an NTFS
partition.  However, when I boot into Windows, /dev/hda9 is not /dev/sda9.
Instead, /dev/hda9 is now /dev/sda4.

So which /dev/sda? partition is /dev/hda5?

Below is script I used to figure out that /dev/hda9 <> /dev/sda9.  What do
/dev/sda2 and /dev/sda3 corespond to?

Regards,
- Robert

-----

#!/bin/bash
for i in $(seq 1 10) ; do
  echo == /dev/sda$i
  dd if=/dev/sda$i bs=16 count=1 | od -bc
done

#### Output:

== /dev/sda1
0000000 353 130 220 115 123 127 111 116 064 056 061 000 002 001 041 000
        353   X 220   M   S   W   I   N   4   .   1  \0 002 001   !  \0
0000020
== /dev/sda2
0000000 001 330 334 243 305 220 022 002 231 037 155 034 275 350 265 326
        001 330 334 243 305 220 022 002 231 037   m 034 275 350 265 326
0000020
== /dev/sda3
0000000 001 356 017 021 305 176 362 331 231 105 217 165 275 046 015 153
        001 356 017 021 305   ~ 362 331 231   E 217   u 275   &  \r   k
0000020
== /dev/sda4
\
0000000 353 122 220 116 124 106 123 040 040 040 040 000 002 010 000 000
        353   R 220   N   T   F   S                  \0 002  \b  \0  \0
0000020
== /dev/sda5
dd: opening `/dev/sda5': No such file or directory
0000000
== /dev/sda6
dd: opening `/dev/sda6': No such file or directory
0000000
== /dev/sda7
dd: opening `/dev/sda7': No such file or directory
0000000
== /dev/sda8
dd: opening `/dev/sda8': No such file or directory
0000000
== /dev/sda9
dd: opening `/dev/sda9': No such file or directory
0000000
== /dev/sda10
dd: opening `/dev/sda10': No such file or directory
0000000


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019