Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.

Set internal hard drives unaccessible to imager

Thread Tools Search this Thread
# 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 03: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
# 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

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Hard Drives and MBR
Lost in Cyberia
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...... Hardware
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"...... UNIX for Dummies Questions & Answers
UNIX for Dummies Questions & Answers
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?... Filesystems, Disks and Memory
Filesystems, Disks and Memory
Opinions on Internal SCSI Tape Drives for FreeBSD home server?
Aaron Van
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...... Filesystems, Disks and Memory
Filesystems, Disks and Memory
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.... UNIX for Dummies Questions & Answers
UNIX for Dummies Questions & Answers

Featured Tech Videos