LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Homework Fat12 Partition File (https://www.linuxquestions.org/questions/linux-newbie-8/linux-homework-fat12-partition-file-4175593250/)

jet36 11-09-2016 08:43 PM

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.

jet36 11-09-2016 09:37 PM

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.

jet36 11-09-2016 09:45 PM

ANOTHER update, so it appears mdir should be automatic in the setup it's just that I named the partitions wrong. Fudge me.

Emerson 11-09-2016 09:56 PM

If you haven't read the man page for mtools yet do it now: https://linux.die.net/man/1/mtools

jet36 11-09-2016 10:21 PM

Quote:

Originally Posted by Emerson (Post 5628906)
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?

grail 11-09-2016 11:55 PM

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?

jet36 11-10-2016 12:03 AM

Quote:

Originally Posted by grail (Post 5628922)
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.

John VV 11-10-2016 02:16 PM

FAT 12

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

michaelk 11-10-2016 03:23 PM

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.

BW-userx 11-10-2016 05:00 PM

you got ntfs-3g installed ????

jet36 11-11-2016 12:37 PM

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.

BW-userx 11-11-2016 02:08 PM

Quote:

Originally Posted by jet36 (Post 5629463)
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!


All times are GMT -5. The time now is 11:52 AM.