0

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

2
  • 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, 2013 at 2:48
  • I think you may need to unmount the drives if drives are mounted.
    – mumair
    Jun 14, 2013 at 6:29

2 Answers 2

1

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

0

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"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .