Hiding ntfs partition in linux
I need to hide a ntfs partition in linux (from boot dvd opensuse if it matters). Is it possible?
And another question: when i used fdisk from linux boot dvd, and divided my hdd space into partitions, counting the exact space each partition will have, i allocated 10GB to one of them. But when i booted from windows boot cd it show 9.3, why is that?? Have i done something wrong allocating using fdisk? |
Quote:
If you mean to disable it for a given installation you just need to make sure that the ntfs driver is not loaded in your concrete linux distribution. Note that even without a driver, the partition and the device node will be accessible by tools like fdisk, and the device node will be present in /dev/, you just won't be able to mount the volume and access its contents with normal methods. What you ask for would required some kind of unification between the firmware of your hardware and the multiple OSes you use. There's currently no way that your hardware will present a certain info to a given OS and a completely different info to another given OS... To start with, your hardware doesn't even know what an OS is. Quote:
Someone thought one day that just because it's convenient for computers, a Giga for us would better be 1024, and so on. So your disk is perfectly fine, it just depends on how you count the bytes. To avoid confusion people seem to use "GB", "MB" and so on for 1024 multiples, and "GiB", "MiB" for international system units, multiples of 1000. |
Re MB vs MiB etc; actually, its the other way around: http://en.wikipedia.org/wiki/Gibibyte
|
Thanks for the correction ;)
|
Quote:
You just need to delete the partition (make sure you backup the original record). It can be re-created with the same boundaries and just spring back to life. That said: this only hides it from the higher level tools, with dd or other low-level tools (or a utility that restores partition tables) anyone can still get to it. And the risk of course is that one accidentally *reclaims* the free space with a new partition and/or file-system. ;} Cheers, Tink |
Well, that's certainly possible.
However, it would help to know what exactly the purpose of this is. If what he wants is to hide the ntfs so it's not harmed accidentally while installing or testing linux distros, then this will definitely not help (in fact, it can only be worse unless you know exactly what portion of the unallocated space can or can't be used. If what he wants is to avoid the windows partition being automounted, then either fstab or udev are the places to look into, that, or disable ntfs completely at kernel level as I said. |
Wonder if gdisk would suit your requirement. As above anyone with access and or admin can un-hide.
|
Quote:
Cloaking a partition, physically, is just impossible. The hardware doesn't understand about partitions at all in first place. It's just some arbitrary layout that has been established by convention and most OSes agree with, but not necessarily (linux can work on an unpartitioned disk, and bsd's and other unixes use different schemes with slices and whatever else). You can change, that silly byte, you can erase it, you can be creative and use all kind of tricks, but you can't say your hardware not to show a given partition because the hardware doesn't even know what a partition is, and since the hardware shows it, your OS sees it, there's no way around that, that is, unless your OS chooses to ignore partitions of a given type. Even in windows, any partitioning tool will show you all what there's to see, even the so-called hidden partitions. In linux, you will see the device nodes under /dev/ regardless of how your partition is marked. |
No, sorry all for misunderstanding, i meant booting from opensuse dvd, using the rescue system option(i just thought some options may not work from there), i need to create a ntfs partition as sda1, hide it before installing windows, then install windows on sda2. I have formatted my hdd, and destroyed the recovery partition used by samsung recovery solution, so I want to somehow recreate it, though I've read its not possible this way, but i want to try. Also, about the capacity question, i have formatted the partition in linux using fdisk, selecting exactly +10Gb(not G which means gigibyte) so why would windows show 9.3Gb or it showa it in Gib??
|
Quote:
I know for sure that windows *will* break if the ordering of the partitions change (i.e. you install it in sda1 but then sda1 becomes sda2 for some obscure game you played with partitions). So beware of that. Quote:
Also, strictly speaking, you "created" it with fdisk, you "formatted" it with anything else (the windows installer, mkfs or whatever). |
1)Alright, if you want to understand the purpose, I'll start over. I have samsung notebook q310 that has program called samsung recovery solution 3. It uses a special hidden ntfs partition to store backup image that later can be used to fully recover drive C: with all programs and windows vista itself, that was /dev/sda1 before i zeroed my hdd. Now i want to recreate it on my blank hdd and hide it before installing windows on sda2. Will this gdisk help me? Or is it sufficient enough to just enter fdisk in linux, and change sda1 id to hidden ntfs/hpfs??
2) Quote: "That you used a given unit to create the drive doesn't mean that all the programs you are using to get its capacity are going to use that same unit. The total amount of bytes should always be the same though." Alright I found out that windows really shows capacity in GiB, but i still don't understand something, if I have 250GB=250000mb, even if it's ~250GB, and i divide it by 1024, it will be ~244, and windows shows 232.9, Can someone explain my this trivial :(. |
Quote:
What escapes me still is why do you need (or why do you think you need) sda1 to have any special "hidden" status. However, I am no specialist in Windows, maybe something basic is escaping my understanding. Quote:
250,000,000,000/1,024/1,024/1,024 |
Quote:
I'm trying to format my hdd using fdisk now. So to make sure everything works fine a found a manual at http://www.ehow.com/how_1000631_hard-drive-linux.html. It is made for ext file system so i have little troubles. I want to install windows first, make sure everything works, then install linux. So using fdisk i made few ntfs partitions using this manual, formatted them using mkntfs command, now it says i need to check those partitions and write them into fstab so they would mount, all of these can be done with fsck command, but it doesn't work for ntfs. I found out that i can check my ntfs using ntfsresize -fi /dev/sdaXY (check this please so i wont do anything wrong). But how do i mount them? And do i really need that for ntfs?? |
Quote:
Quote:
So I have no idea what the correct way to check an ntfs volume on linux would be. So, are you using ntfs or ntfs-3g? Quote:
|
Quote:
"Note: To prevent damage to file system, the NTFS partition that has errors will be always mounted as read only. To correct this you should boot Windows® and run file system repair program. Repair is not yet possible from Linux. Seems like the ntfsresize will only check for errors but wont repair anything. I wonder if i have to check at all? I have just formatted, is there any chance of error?(guess yes :( ) Version: 11.0 For openSUSE 11.0, ntfs-3g is installed by default and write support is enabled for root only.. By default, only root user can write on NTFS partition. Modify /etc/fstab to reflect dmask=002 to enable user writing." So now i only need to know how to mount, as it seems anyway I will have to boot from windows bootdvd. *About ntfsresize, it is said to use options -fi, and that goes as -i, --info By using this option ntfsresize will determine the theoretically smallest shrunken filesystem size supported. Most of the time the result is the space already used on the filesystem. Ntfsresize will refuse shrinking to a smaller size than what you got by this option and depending on several factors it might be unable to shrink very close to this theoretical size. Although the integrity of your data should be never in risk, it's still strongly recommended to make a test run by using the --no-action option before real resizing. Practically the smallest shrunken size generally is at around "used space" + (20-200 MB). Please also take into account that Windows might need about 50-100 MB free space left to boot safely. This option never causes any changes to the filesystem, the partition is opened read-only. -f, --force Forces ntfsresize to proceed with the resize operation even if the filesystem is marked for consistency check. Please note, ntfsresize always marks the filesystem for consistency check before a real resize operation and it leaves that way for extra safety. Thus if NTFS was marked by ntfsresize then it's safe to use this option. If you need to resize several times without booting into Windows between each resizing steps then you must use this option. Resizing this way is the same as error repair? =/ What is actually being repaired? bad blocks? Can i use bad blocks command instead? |
All times are GMT -5. The time now is 10:07 AM. |