WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Disable HDD Detection ?  (Read 4885 times)

Offline mbzadegan

  • Newbie
  • *
  • Posts: 33
Disable HDD Detection ?
« on: October 17, 2012, 01:47:59 AM »
Hi,
Is any way to disable HDD Drive detection while booting tinycore ?
I want to detect only my TinyCore USB Flash memory when i boot tiny core and don't want to detect MY HDD drives .


Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Disable HDD Detection ?
« Reply #1 on: October 17, 2012, 06:40:59 AM »
bootcode for this is nofstab

Offline mbzadegan

  • Newbie
  • *
  • Posts: 33
Re: Disable HDD Detection ?
« Reply #2 on: October 17, 2012, 07:27:02 AM »
i tested nofstab on booting kernel append line but nothing changed !
with ( or without ) nofstab , I could access to my HDD while i booting from USB Flash Memory.
« Last Edit: October 17, 2012, 07:31:52 AM by mbzadegan »

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Disable HDD Detection ?
« Reply #3 on: October 17, 2012, 08:45:25 AM »
Could be because of these udev rules. I would say this makes it a bug.
Perhaps rebuildfstab should also check if NOFSTAB is set.

/etc/udev/rules.d/98-tc.rules:ACTION=="add",      SUBSYSTEM=="block",   RUN+="/bin/sh -c '/usr/sbin/rebuildfstab'"
/etc/udev/rules.d/98-tc.rules:ACTION=="remove",   SUBSYSTEM=="block",   RUN+="/bin/sh -c '/usr/sbin/rebuildfstab'"

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Disable HDD Detection ?
« Reply #4 on: October 17, 2012, 10:09:54 AM »
No such thing. Even if nofstab skips the convenience filters, you can still access the device yourself.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: Disable HDD Detection ?
« Reply #5 on: October 17, 2012, 10:15:17 AM »
Hi mbzadegan
Maybe if you explain why you are trying to do this, someone could suggest a suitable solution.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Disable HDD Detection ?
« Reply #6 on: October 17, 2012, 03:09:59 PM »
@hiro: Those rules aren't there if you boot with nofstab.
The only barriers that can stop you are the ones you create yourself.

Offline mbzadegan

  • Newbie
  • *
  • Posts: 33
Re: Disable HDD Detection ?
« Reply #7 on: October 31, 2012, 03:31:59 AM »
Is any way to solve my problem ?
For security , i want to disable HDD detection while i booting from tinycore USB PenDrive and access to Internet . 8)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Disable HDD Detection ?
« Reply #8 on: October 31, 2012, 04:39:17 AM »
still not clear how this could ever work in a really "secure" way.
best solution is to take out all HDDs.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: Disable HDD Detection ?
« Reply #9 on: October 31, 2012, 08:35:00 AM »
Hi mbzadegan
So, you want browser access only in a GUI with no access to HDD.
You could have your bootlocal replace  /usr/bin/mnttool  and  /usr/bin/aterm  with empty scripts to disable them.
That should prevent the drives from being mounted by a user which would prevent them from being accessed.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Disable HDD Detection ?
« Reply #10 on: October 31, 2012, 08:45:57 AM »
That should prevent the drives from being mounted by a user which would prevent them from being accessed.

There are various ways to access drives without ever invoking mount ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Disable HDD Detection ?
« Reply #11 on: October 31, 2012, 08:47:07 AM »
Short from disconnecting hardware, recompiling the kernel so it lacks the hardware support seems like an option.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline mbzadegan

  • Newbie
  • *
  • Posts: 33
Re: Disable HDD Detection ?
« Reply #12 on: October 31, 2012, 09:13:45 AM »
You could have your bootlocal replace  /usr/bin/mnttool  and  /usr/bin/aterm  with empty scripts to disable them.
OK , But i don't find /usr/bin/mnttool and when I removed /usr/bin/aterm , still i could mount /dev/sda1 as my first HDD partition !!
I want to users could not mount HDD Partitions when they boot tinycore and access to internet ( such as light web kiosk ) 8)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: Disable HDD Detection ?
« Reply #13 on: October 31, 2012, 09:55:30 PM »
Hi mbzadegan
Quote
still i could mount /dev/sda1 as my first HDD partition !!
How? Using the Mount icon? Replacing  /usr/bin/mnttool  should disable that.
Through the Terminal icon? Was it still functional? Some other method?

Offline mbzadegan

  • Newbie
  • *
  • Posts: 33
Re: Disable HDD Detection ?
« Reply #14 on: November 01, 2012, 11:37:43 AM »
i could not find /usr/bin/mnttool and only i remove /usr/bin/aterm but still i could mount with general mount command !!
#mount /dev/sda1 /hdd
Maybe it's a BUG ? :-[