home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,933 of 4,255   
   Grant Taylor to muta...@gmail.com   
   Re: MBR and sector size   
   30 Oct 21 11:00:28   
   
   From: gtaylor@tnetconsulting.net   
      
   On 10/30/21 6:46 AM, muta...@gmail.com wrote:   
   > When the hard disk data is extracted into a flat file of sectors,   
   > how do I know how many bytes to skip to go to a particular LBA address?   
      
   I don't know the technical answer to that.   
      
   But I do know that I've never had to worry about that in 20+ years of   
   doing a lot of drive / file system imaging.   
      
   I either image a file system (contents of a partition) or I image the   
   entire drive (including partition information).  I access the former as   
   a raw file system.  I access the latter via Linux kernel's ability to   
   see partitions on a loopback and then access the contents of a partition   
   therein.   
      
   The only time that I've needed to access something independently is when   
   I'm needing to wipe the first sector for some reason.  And that's   
   inherently the first sector.  So I don't need to find out where an LBA   
   address is in an image.   
      
   > I have an expectation that data can be copied to and from devices   
   > and still be accessible.   
      
   My experience is that as long as the source and destinations are the   
   same type (partition contents / file system -or- whole drive) I don't   
   have any problems doing this.   
      
   > I need to either distinguish devices based on sector size or I need   
   > to introduce a dummy sector. If I have a dummy sector I would have   
   > an expectation that the firmware would maintain that sector as if it   
   > was real.   
      
   You should be able to extract the information from any standard file   
   system / partition data in the image.  I'd expect a quick analysis /   
   pattern match on the first 4kB of data would clearly give you   
   information to know what things are.  Either it will have a standard   
   partition table (indicating it's a whole drive image) or it will have   
   standard file system information (indicating it's a partition image) or   
   it will not have either of those (indicating that it's likely an   
   atypical use) which can probably be accessed as a raw device.   
      
   I seriously doubt that you need to create a dummy sector or burn a   
   sector as a dummy sector.  I would bet dollars to doughnuts that you can   
   look for a different pattern and find it exists in almost all existing   
   drives / images thereof.   
      
   > Or maybe I am looking at things incorrectly.   
      
   -)   
      
      
      
   --   
   Grant. . . .   
   unix || die   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca