Set internal hard drives unaccessible to imager

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Set internal hard drives unaccessible to imager
# 1  
Set internal hard drives unaccessible to imager

Looking for some clues on how to set my internal hard drives inaccessible/busy to clonezilla. Noprobe doesn't work in startup and the drive is still found.

I know I can find all hard drives using the following:

sudo fdisk -l | grep GB | awk '{print $2}' | grep -Po "^[^:]+(?=:?)"

I tried mounting the drive to make it busy and inaccessible to clonezilla but the fs can't be determined. It is a windows xp install but it is also encrypted on bootup. I tried vfat, ntfs, ntfs-3, etc with no luck.

So another option is how do I make clonezilla not probe internal hard drives? I'm unfamiliar with recompiling source code and hope it doesn't come to that to disable hdd controllers.
# 2  
You can rule out a lot of internal hard disk controllers by preventing ahci.ko from loading, if that's built as a module and not built-in. This also rules out a lot of internal cdroms though.

You could try disabling your hard-drive controller in the BIOS.

If you're able to run any commands on the clonezilla disk before clonezilla starts doing things, how about chmod 000 /dev/sda* ? Might fail if clonezilla runs everything as root, but worth a shot.

You could also use a machine with no internal hard drives!
# 3  
thanks corona - I'll take a look at it after lunch.

Basically I have no issue showing the hard drives to myself but I worry about people overwriting their hard drive when using a usb stick I'll distribute to them. I need to make it as dummyproof as possible.
# 4  
Hmmm. Does the liveusb use udev? You could configure udev to prevent it from creating certain kinds of device nodes. Without those, clonezilla would be unable to use the disk.

For example there's a default rule on my system for USB devices:

KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p"

You could flip that a bit:
KERNEL=="sd*[!0-9]|sr*", SUBSYSTEMS!="usb", NAME="skipme/%k"

Make sure that rule runs really early, naming the new rule file lower than everything else. 00-customrules perhaps.

I think that would create any non-USB disk or CDROM devices inside /dev/skipme/sd... and cause it to not create the ordinary /dev/sd... device nodes. If clonezilla uses them to detect disks, it won't find non-USB devices.

Last edited by Corona688; 01-20-2012 at 04:02 PM..
# 5  
found it under /etc/udev/rules.d/z60_hdparm.rules

this file is extracted on startup of live cd so I would have to change the source image to reflect changes
# 6  
I don't think you can change the CD without changing the CD.
# 7  
I unsquashed the file and am looking at it:

ACTION==="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", RUN+=/etc/init.d/hdparm hotplug

would I just replace

KERNEL=="sd*[!0-9]|sr*", SUBSYSTEMS!="usb", NAME="skipme/%k"

not sure never messed with custom udev rules

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #976
Difficulty: Medium
In April 2014, Linus Torvalds banned Kay Sievers from submitting patches to the Linux kernel for failing to deal with bugs that caused systemd to negatively interact with the kernel.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Understanding volumes and hard drives

Ok so i thought i was smart but i can tell I need some help. I am playing around with understanding lvm and adding disks to a linux box. I added a disk and then ran what i thought were commands to add this disk to the box but I think I messed up and would like some help. My question is did i... (5 Replies)
Discussion started by: cptkirkh
5 Replies

2. Solaris

Solaris 8 - Accessing Hard Drives

Hi, I have two SCSI Hard Drives in a Sun Solaris 8 server as shown below. I would like to access Disk1 and look at its contents, directory structure and files. How do I change my default directory from Disk 0 to Disk 1 and vice versa? Thank you. (5 Replies)
Discussion started by: ssabet
5 Replies

3. Solaris

Trying to boot Solaris without hard drives in T5220

I have three Sun Oracle Netra T5220s. I am trying to just get the processor information psrinfo or prtdiag -v from the # prompt in single user mode. I am needing to know the commands to get to boot the CD/DVD of the Solaris OS. I am using it via Serial Port Management. Tinkering around I... (4 Replies)
Discussion started by: nerdboy
4 Replies

4. Hardware

Hard Drives and MBR

Hello everyone. I have a question which I may know the answer to, I'm just looking for a confirmation. When it comes to the MBR of a hard drive, i've read in multiple sources that it's always located in the first sector of the hard drive. Is the MBR there from the factory? When I buy a new blank... (3 Replies)
Discussion started by: Lost in Cyberia
3 Replies

5. Solaris

Reinstall old hard drives

I have a T2000 Sun-Fire server. I have 2 sets of drives in a raid 1. Lets call them Set A and Set B. I had Set A installed and working. I needed a new install so I so build up Set B. After some time I wanted to put Set A back in the server. Now the system will not boot off of Set A. I tried to boot... (7 Replies)
Discussion started by: stu1811
7 Replies

6. UNIX for Dummies Questions & Answers

How to set server's ip address, router, network mask and set if it is an internal or external ip?

Hello, I need to write a program which sets server's ip address, router, network mask. Program also should set if it is an internal or external ip. Maybe someone can help me ? Any information from u is very useful :b: I stopped at .. :( #!/bin/sh A=`hostname -i` echo "server ip address is $A"... (4 Replies)
Discussion started by: zagaruika
4 Replies

7. Filesystems, Disks and Memory

Help adding new hard drives

Folks; I just added 2 physical new hard drives to my SUSE server. My server is already running SUSE 10.3 version. Is there a command i can use to add the new space or even see if the system can sees them? (3 Replies)
Discussion started by: Katkota
3 Replies

8. Filesystems, Disks and Memory

Opinions on Internal SCSI Tape Drives for FreeBSD home server?

Any recommend manufacturers for an internal SCSI tape drive in my FreeBSD 7.0 home server? Besides RAID-1, Iím not backing-up, but man, are they expensive! What makes a tape drive so darn pricy? There is no way I can afford a new drive so Iíll start looking on eBay and craigslist to see if there... (3 Replies)
Discussion started by: Aaron Van
3 Replies

9. Linux

No Hard Drives Have Been Found

I am using an Acer Aspire 4720Z with two partitions C and D. Windows is installed on C and I decided to install Red Hat Linux 9 in partition D. The two partitions are in NTFS file system. During my installation of the the Linux, a prompt was displayed on screen with the message: "No hard drives... (2 Replies)
Discussion started by: tamcomng
2 Replies

10. UNIX for Dummies Questions & Answers

Hard drives

Will some one tell me what this means. "warning: ida 0 <slot 6> : command timed out on dev 1/42 blk 4824290 logical unit=0 blocks=5512102, size 2, cmd=0x20." I'm running SCO 505 on a proliant 1600r. Thnank you in advance. (3 Replies)
Discussion started by: franruiz
3 Replies

Featured Tech Videos