Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a ubuntu 12.04 live USB which is used to boot my machine and try linux features.

Question> Is it possible that I can disallow the ubuntu to access my hard drives?

For now, after the reboot, I can access my local hard drives through the ubuntu interface.

Thank you

share|improve this question
Do you want to persistently disallow access to the hard drives across reboots? Or do you want to disallow them right now after you're "inside" linux? – Tillman32 Jun 14 '13 at 2:48
I think you may need to unmount the drives if drives are mounted. – David Jun 14 '13 at 6:29

You can unmount any filesystem using these commands. Unmounting is done through the "umount" command, which can be given a device or a mount point so:

 sudo umount /mnt
 sudo umount /dev/hda1

Would both unmount the filesystem on /dev/hda1 if it is mounted on /mnt.

Remember that a filesystem cannot be in use when it is unmounted, otherwise umount will give an error. If you know it is safe to unmount a filesystem you can use:

    sudo umount -l /mountpoint

to do a "lazy" unmount

share|improve this answer

This really depends on what you are trying to do. One (relatively drastic) step to do this would be to recompile support for the CDRom but not SATA drives (assuming your drives are SATA, which is most likely). Anything short of rebuilding the kernel or creating a loadable module for it will prevent [practical] access to the drive.

On the other extreme, modify your /etc/fstab file to stop the drive being moounted automatically, for example /dev/sda1 auto noauto 0 0
This can easily be worked around by manually mounting the drive.

Another possibility might be to modify udev (/etc/udev/rules.d/60-persistent-storage.rules) and add a line like - KERNEL=="sda*", GOTO="persistent_storage_end"

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.