LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2016, 08:43 PM   #1
jet36
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Rep: Reputation: Disabled
Post Linux Homework Fat12 Partition File


Hey for my Linux homework I have to extract image data from various partitions on a disk.drive. I have extracted the partitions fine but I cannot read any of the data. When I used "file" it only read it as data. The partition type ID for my first partition is a FAT12 file. I am unsure how to open this or view the data. The instructor has given us access to 'mtools' to help us. Within the mtools I have tried using 'mshowfat 'partition1' but it returns with file does not reside on DOS file system. This may be a complicated question but any help would be appreciated.
 
Old 11-09-2016, 09:37 PM   #2
jet36
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Upon further investigation it seems that I am suppose to use 'mdir' to access DOS formatted floppy disks. But when I run it it says "Can't open udr1.part1.img: No such file or directory
Cannot initialize 'C:' "

Any ideas why? I am stumped.
 
Old 11-09-2016, 09:45 PM   #3
jet36
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
ANOTHER update, so it appears mdir should be automatic in the setup it's just that I named the partitions wrong. Fudge me.
 
Old 11-09-2016, 09:56 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,676

Rep: Reputation: Disabled
If you haven't read the man page for mtools yet do it now: https://linux.die.net/man/1/mtools
 
Old 11-09-2016, 10:21 PM   #5
jet36
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
If you haven't read the man page for mtools yet do it now: https://linux.die.net/man/1/mtools
Thanks, I have read them. Though now mdir does not recognize the partition as DOS media. Any ideas why?
 
Old 11-09-2016, 11:55 PM   #6
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,011

Rep: Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194Reputation: 3194
Might just be me, but if we could back up for a sec ... what does "I have to extract image data from various partitions on a disk.drive" exactly mean, ie. what commands have you run to make this happen?
 
Old 11-10-2016, 12:03 AM   #7
jet36
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by grail View Post
Might just be me, but if we could back up for a sec ... what does "I have to extract image data from various partitions on a disk.drive" exactly mean, ie. what commands have you run to make this happen?
Sure, though that part doesn't worry me much. There are parts of an image file on each part of various partitions. I need to grab each part and combine them. To do that I used dd to grab the specific partition sections that contain such data. Now that I have the four partitions as data files I need to be able to open them and read the data. Does that answer your question?

EDIT: I have not run any commands to get the image data as I can not access the data from the partitions yet. That is why I am trying to use mdir so i can access the data in the partitions.

Last edited by jet36; 11-10-2016 at 12:20 AM.
 
Old 11-10-2016, 02:16 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,628

Rep: Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652Reputation: 2652
FAT 12

are you using 8 inch floppies ?
have not seen them since the 80's

Last edited by John VV; 11-10-2016 at 02:19 PM.
 
Old 11-10-2016, 03:23 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,839

Rep: Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972Reputation: 5972
FAT12 is the common format for floppy disks although when mounting we use vfat for everything i.e. 12,16 or 32.

I admit I am somewhat confused... It would be nice if you posted the actual homework assignment.

I also admit that I have not played with mtools very much. mtools uses the devices (a: b: c: etc)as defined in the /etc/mtools.conf system-wide configuration file and ~/.mtoolsrc, the users configuration file. What do you mean by "grab the specific partition section"? If the file command does not recognize the image file as a filesystem then I do not know how you could use mtools.
 
Old 11-10-2016, 05:00 PM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
you got ntfs-3g installed ????
 
Old 11-11-2016, 12:37 PM   #11
jet36
LQ Newbie
 
Registered: Nov 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Well I figured it out. I was using dd to extract the partitions from the disk.drive file. My bit length and start point were correct however I did not realize that the sector size is 512 bytes where as when i was using dd I was using bs=1.
 
Old 11-11-2016, 02:08 PM   #12
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by jet36 View Post
Well I figured it out. I was using dd to extract the partitions from the disk.drive file. My bit length and start point were correct however I did not realize that the sector size is 512 bytes where as when i was using dd I was using bs=1.
good job, here get yourself a coffee and take the rest of the day off. but not before marking post as solved. cheers!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File written, under FreeDOS, on spi flash (formatted as FAT12) is not found in Linux Braiam Linux - Embedded & Single-board computer 2 01-18-2010 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration