View topic - Mounting a hard disk extracted from an infotainment system

Mounting a hard disk extracted from an infotainment system

For discussion of realtime and/or embedded programming.

Mounting a hard disk extracted from an infotainment system

Postby komakino13 » Fri Jul 13, 2018 8:09 am

Hi and good day.
I'm trying to mount a 2tb hard disk containing files that I want from an infotainment of a car.
I've mounted it using mount -t qnx6 /dev/umass0 /fs/hd1
And all that I get was "Corrupted file system"
Do take note that I don't really know the os version of the ones in the hdd, i'm currently using Neutrino 6 booted on a VMware which I obtained from http://www.qnx.com/download/feature.htm ... amid=20725.
Am i doing something wrong? The df shows that the hdd have 0 allocated space and 0 used space.
Pls send halp
Thank you
komakino13
New Member
 
Posts: 7
Joined: Fri Jul 13, 2018 2:41 am

Re: Mounting a hard disk extracted from an infotainment syst

Postby nico04 » Fri Jul 13, 2018 8:26 am

Are you sure the filesystem is qnx6 ?
nico04
Senior Member
 
Posts: 104
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Re: Mounting a hard disk extracted from an infotainment syst

Postby komakino13 » Fri Jul 13, 2018 8:47 am

nico04 wrote:Are you sure the filesystem is qnx6 ?


No but I have tried mounting both qnx4 and qnx6.
When i try to
Code: Select all
 ls /fs/hd1
on qnx4 it returns "No directory found" while on qnx6 it returns "Corrupted file system"
komakino13
New Member
 
Posts: 7
Joined: Fri Jul 13, 2018 2:41 am

Re: Mounting a hard disk extracted from an infotainment syst

Postby nico04 » Fri Jul 13, 2018 8:52 am

What is sector 0 content ?
nico04
Senior Member
 
Posts: 104
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Re: Mounting a hard disk extracted from an infotainment syst

Postby komakino13 » Fri Jul 13, 2018 9:09 am

nico04 wrote:What is sector 0 content ?


When i df it shows all the drives in the VM including the hdd, but all the other drive have values or content in it but the hdd only returns 0 on all three values

Image
komakino13
New Member
 
Posts: 7
Joined: Fri Jul 13, 2018 2:41 am

Re: Mounting a hard disk extracted from an infotainment syst

Postby nico04 » Fri Jul 13, 2018 9:48 am

can you try :
fdisk /dev/umass0 show
nico04
Senior Member
 
Posts: 104
Joined: Wed Sep 29, 2010 9:59 am
Location: France

Re: Mounting a hard disk extracted from an infotainment syst

Postby maschoen » Sat Jul 14, 2018 3:55 am

I see two possibilities.

1) The device has a partition table. You could try mounting the partitions:

# mount -e /dev/umass0

Then see what happened

# ls /dev/umass0

If it's a QNX partition it might be

/dev/umass0t7
or
/dev/umass0t77

or something similar. There's nothing real about those numbers, a QNX partition could have any number so you could also try mounting the way you did, trying both qnx4 and qnx6.

2) The manufacturer is a little smarter than you think. They could very well encrypt the drive. There are lots of ways to do this. it could be in software or hardware. If that is the case, you can read the sectors, but you won't be able to make heads or tails of the data.
maschoen
QNX Master
 
Posts: 2682
Joined: Wed Jun 25, 2003 5:18 pm

Re: Mounting a hard disk extracted from an infotainment syst

Postby komakino13 » Mon Jul 16, 2018 7:03 am

nico04 wrote:can you try :
fdisk /dev/umass0 show


It returns a blank table with a message "Floating point exception (core dumped)"
Sorry for the late reply left the hdd at my office
komakino13
New Member
 
Posts: 7
Joined: Fri Jul 13, 2018 2:41 am

Re: Mounting a hard disk extracted from an infotainment syst

Postby komakino13 » Mon Jul 16, 2018 7:08 am

maschoen wrote:I see two possibilities.

1) The device has a partition table. You could try mounting the partitions:

# mount -e /dev/umass0

Then see what happened

# ls /dev/umass0

If it's a QNX partition it might be

/dev/umass0t7
or
/dev/umass0t77

or something similar. There's nothing real about those numbers, a QNX partition could have any number so you could also try mounting the way you did, trying both qnx4 and qnx6.

2) The manufacturer is a little smarter than you think. They could very well encrypt the drive. There are lots of ways to do this. it could be in software or hardware. If that is the case, you can read the sectors, but you won't be able to make heads or tails of the data.



Did it and it returns
"Cant mount /dev/hd10(type default)"
"Possible reason : invalid argument"

When i did without specifying the os version
Code: Select all
mount -e /dev/umass0

it returns
"Can't mount (type default) "
"Possible reason : input/output error"

Does my my qnx os have something to do about this? Should I find another os image for this matter?
Last edited by komakino13 on Mon Jul 16, 2018 7:22 am, edited 1 time in total.
komakino13
New Member
 
Posts: 7
Joined: Fri Jul 13, 2018 2:41 am

Re: Mounting a hard disk extracted from an infotainment syst

Postby maschoen » Mon Jul 16, 2018 7:17 am

Your QNX is not the problem. It really looks like the manufacturer has done at least a minimum of work to protect against what you are doing. There's a nice utility spatch

# spatch /dev/umass0

Which will allow you to scan through the disk manually. This could get tedious as disks are quite large these days. You might count on something interesting being at the front of the disk, but since we are dealing with intentional digital obfuscation, it's just as like that the beginning is in the middle or at the end. If you think you know some text that is part of a file name or something, spatch has a search feature. If something that should be there isn't, think encryption.
maschoen
QNX Master
 
Posts: 2682
Joined: Wed Jun 25, 2003 5:18 pm

Re: Mounting a hard disk extracted from an infotainment syst

Postby komakino13 » Mon Jul 16, 2018 7:33 am

maschoen wrote:Your QNX is not the problem. It really looks like the manufacturer has done at least a minimum of work to protect against what you are doing. There's a nice utility spatch

# spatch /dev/umass0

Which will allow you to scan through the disk manually. This could get tedious as disks are quite large these days. You might count on something interesting being at the front of the disk, but since we are dealing with intentional digital obfuscation, it's just as like that the beginning is in the middle or at the end. If you think you know some text that is part of a file name or something, spatch has a search feature. If something that should be there isn't, think encryption.


Done it and it shows this

Image
Image

Is this considered as encrypted data? Or it means that this disk is actually empty?
komakino13
New Member
 
Posts: 7
Joined: Fri Jul 13, 2018 2:41 am

Re: Mounting a hard disk extracted from an infotainment syst

Postby maschoen » Mon Jul 16, 2018 5:16 pm

Input/Output error means you are getting I/O errors when reading the disk. i don't know how you got the Invalid Argument.

If you were were reading the disk and saw zeros, I would look further. A disk will sometimes have sectors with zeros, sectors that haven't been written on since formatted.
maschoen
QNX Master
 
Posts: 2682
Joined: Wed Jun 25, 2003 5:18 pm

Re: Mounting a hard disk extracted from an infotainment syst

Postby komakino13 » Tue Jul 17, 2018 1:54 am

maschoen wrote:Input/Output error means you are getting I/O errors when reading the disk. i don't know how you got the Invalid Argument.

If you were were reading the disk and saw zeros, I would look further. A disk will sometimes have sectors with zeros, sectors that haven't been written on since formatted.


This hdd is cloned from the original source of hdd to preserve its original state, and I am using a portable sata to usb connector to connect this cloned hdd to my laptop, should i try to connect the hdd normally using sata directly to my pc? Does that have something to do with the I/O error perhaps? That is probably the last option that i have, other than that I might have to reimage this hdd from the original ones just in case some data have been corrupted by plugging in and out the hdd when Im working on it.
komakino13
New Member
 
Posts: 7
Joined: Fri Jul 13, 2018 2:41 am

Re: Mounting a hard disk extracted from an infotainment syst

Postby maschoen » Tue Jul 17, 2018 5:36 am

Let's assume that the disk cloning worked and that the drive is OK.

That means something you are doing isn't working. Maybe the drive isn't inserted in the USB enclosure properly. Maybe the enclosure electronics are fried. I don't know. A good simple test is to use the "dcheck" program:

# dcheck /dev/umass0

If it works, you should see an incrementing sector count. As you suggest you could try to connect the SATA drive directly. dcheck should work whether you cloned the disk or not.
maschoen
QNX Master
 
Posts: 2682
Joined: Wed Jun 25, 2003 5:18 pm

Re: Mounting a hard disk extracted from an infotainment syst

Postby nico04 » Mon Jul 30, 2018 9:20 am

maschoen wrote:I see two possibilities.

1) The device has a partition table. You could try mounting the partitions:

2) The manufacturer is a little smarter than you think. They could very well encrypt the drive. There are lots of ways to do this. it could be in software or hardware. If that is the case, you can read the sectors, but you won't be able to make heads or tails of the data.


A third one is : No partition table, partition directly at sector 0.
I already seen this with UDF formatted HDDs and FAT32 formatted DVD-RAMs.

A forth possibility is a custom format.

Can you show us the sector 0 content ?

The I/O errors you have is not disk format related. This is hardware related and is not good news.
Either connect you original disk directly on your computer or use another disk and re-clone the original disk.
Till you fix the I/O errors, don't try to work on the HDD format, you'll waste your time.
nico04
Senior Member
 
Posts: 104
Joined: Wed Sep 29, 2010 9:59 am
Location: France


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 5 guests