Skip to contentSkip to conversation

hiding an partition and preventing to get automounted

DISCUSSION Thomas B. Rücker 2 participants 2 messages Nov 10, 2006

lore
Share & tools
lore
#0 lore raw

Short description of the situation:
- embedded linux device running 2.4.19 montavista (Archos PMA430)
- redesigning the firmware to as open source as possible
- moved system partition from an loop mounted ext3 image on a fat32 partition to a real partition.
- device supports usb-mass-storage mode (complete hdd gets handed over to a usb-bridge)

Now we're trying to avoid unmounting that ext3 partition because we use it with unionfs to have a writeable root filesystem.
The problem is that when the hdd is accessed via usb the operating system of that desktop PC might mount that ext3 partition and change it. What would be a clean way to hide the partition from systems accessing it? What would be a clean way of making it ReadOnly to those systems?

We had some ideas like using a different magic for the filesystem or a high and unique revision number we could patch our kernel for, but I'm not sure if there would be bad side effects to that. Marking the partition as e.g. hidden FAT16 (0x16) won't keep a linux system from recognizing and automounting it.

Any ideas or pointers?

TIA & Cheers

Thomas B. Rücker

www.openpma.org

#1 lore raw
Quoted 15 lines · Thomas B. Rücker

Short description of the situation:
- embedded linux device running 2.4.19 montavista (Archos PMA430)
- redesigning the firmware to as open source as possible
- moved system partition from an loop mounted ext3 image on a fat32 partition to a real partition.
- device supports usb-mass-storage mode (complete hdd gets handed over to a usb-bridge)

Now we're trying to avoid unmounting that ext3 partition because we use it with unionfs to have a writeable root filesystem.
The problem is that when the hdd is accessed via usb the operating system of that desktop PC might mount that ext3 partition and change it. What would be a clean way to hide the partition from systems accessing it? What would be a clean way of making it ReadOnly to those systems?

Quoted 7 lines

We had some ideas like using a different magic for the filesystem or a high and unique revision number we could patch our kernel for, but I'm not sure if there would be bad side effects to that. Marking the partition as e.g. hidden FAT16 (0x16) won't keep a linux system from recognizing and automounting it.

Any ideas or pointers?

Using a unique superblock magic sounds simple and is probably as foolproof as anything.

Shaggy

Signature · 2 lines
David Kleikamp
IBM Linux Technology Center