From 2f191307cfda60c1a4ebb9b15a3aed794c15b68d Mon Sep 17 00:00:00 2001 From: Curtis Gedak Date: Mon, 30 Jan 2012 15:45:50 -0700 Subject: [PATCH] Restructure and word-smith UUID translatable text Restructure and word-smith translatable text associated with the enhancement to add ability for setting UUID in an effort to better align with the Gnome Documentation Style Guide. See Bug #667278 - Add support for setting UUID --- help/C/gparted.xml | 200 ++++++------------------------------- src/OperationChangeUUID.cc | 8 +- src/fat16.cc | 29 +++--- src/ntfs.cc | 35 +++---- 4 files changed, 66 insertions(+), 206 deletions(-) diff --git a/help/C/gparted.xml b/help/C/gparted.xml index 1ed67dec..6cbde56e 100644 --- a/help/C/gparted.xml +++ b/help/C/gparted.xml @@ -1044,11 +1044,6 @@ the partition when mounting the partition. - Note that using UUIDs is not a panacea. See - for - more information. - - Changes in a device name might adversely affect the following files: @@ -1153,180 +1148,43 @@ - Changing the UUID of an existing filesystem may affect the ability of a - Linux system to boot. On Windows, it may affect the validity of the - Windows Product Activation key. + Changing the UUID might invalidate the Windows Product + Activation key (WPA). - Please read (one of) the following sections for more information - if this may be a concern. + On FAT and NTFS file systems, the Volume Serial Number + is treated as the UUID. Changing the Volume Serial + Number on the Windows system partition, such as C:, + might invalidate the WPA key. An invalid WPA key will + prevent login until you reactivate Windows. + + + In an attempt to avoid invalidating the WPA key, on + NTFS file systems only half of the UUID is set to a + new random value. + + + If the WPA key is invalidated you will need to + reactivate Windows before you can login. + + + The WPA key should not be affected by changing the + UUID of data partitions or removable media partitions. - + - For FAT and NTFS filesystems, what GParted names, and treats as, the - UUID, is in fact its Volume Serial Number. + Changing the UUID might cause a GNU/Linux system to + fail to boot, or to fail to mount a file system. - An NTFS filesystem also has a real UUID, but that is a different number, - which cannot and should not be changed - at all. + If boot or mount problems occur you might need to edit + configuration files, such as /etc/fstab, to ensure + that the correct UUID is specified. - + - - UUIDs in Linux - - Modern Linux systems are usually configured to use UUIDs to locate - and identify the different filesystems or partitions when booting. Some - partition types, like LVM physical volumes, are only - identified using their UUID. Making changes to partitions may therefore - affect the Linux boot process in different ways: - - - - - When copying a partition - - - When a copy was made of a partition, and both the original - and the copy are ever present on the same machine at the same - time, Linux may (will) - not be able to predictably identify which is which. This is caused - by the fact that the UUID is used for identification, and - both partitions, being copies, have the same UUID. - - - If such confusion happens at boot time, the results will be - unpredictable. One or the other will essentially be selected at random, - and possibly a different one at each boot. Over time, this random - nature of partition selection might make files seem to mysteriously - appear or disappear depending upon which partition is selected. It may - also cause severe data corruption or loss. - - - This can, and should, be avoided by changing the UUID of the copy. It - is safest to change the UUID of a copied partition at all times, as both - partitions, or other copies of it, may meet again on the same computer, - with unexpected and unpredictable - results. - - - - - When changing the UUID of a partition - - - When changing he UUID of a partition, Linux may no longer be able to - correctly identify the partition. If the partition is needed when - booting, this may result in a failure to boot. - - - Do not change a partition's UUID if that partition is not intended to be - a copy of an existing partition, unless you know what you are doing, - and prepared to deal with the consequences. - - - Before changing UUIDs of Windows partitions, please be sure to - read . - - - - - - - - UUIDs in Windows - - On NTFS and FAT filesystems, the number that GParted names, and treats as - UUID, is in fact the Volume Serial Number. - - - - When changing the UUID / Volume Serial Number on a partition that will - (continue to) be used on the same hardware, using the same Windows licence, - please read this section carefully. - - - The information in this section is provided as is. - It is believed to be accurate, but it might in fact be incorrect, or subtly - misleading. Use GParted at your own risk. If you cannot afford to take - the risk of making Windows unbootable and/or loosing your data, then do - not use GParted. - - - - Changing the Volume Serial Number of an NTFS or FAT partition that is used by Windows, may - have different consequences depending on the kind of partition in question. - - - - - UUIDs on Windows system partitions - - - On Windows, the Volume Serial Number of the System partition is - usually used - - In atypical cases, the Volume Serial Number of another partition might - be the one that is used instead. - - - for Windows Product Activation (WPA). The first modification of this number will - count as a change for WPA. Subsequent modifications are 'free'. - - - Too many such WPA-affecting changes, like replacing the primary harddisk - or the processor, or adding memory, will invalidate the WPA key. In that - case, windows needs to be re-activated. - - - For NTFS filesystems only, GParted can, and will, attempt to avoid making a - change that could be WPA-affecting, by changing only half of the NTFS Volume - Serial Number. Such a half-change should also be safe, in principle. - Nevertheless, no guarantees can be given. - - - As there is no easy way to revert a Volume Serial Number change (it will not, - for instance, be included in a regular backup), it should not be changed - casually, and not unless one is prepared to take the risk, and re-activate - Windows when the change proved to be one too many for WPA. - - - As long as a partition having the original Volume Serial - Number is present at Windows boot time, WPA requirements should normally be - satisfied, and no WPA change should be noted by Windows. - - - - - - - UUIDs on data partitions - - - The NTFS or FAT Volume Serial Number on a data partition is not normally used - for WPA, although there may be exceptions. Changing it should therefore not - affect WPA. - - - - - - - UUIDs on external storage media - - - On external storage media that are not permanently attached, and not present - at Windows boot time, the Volume Serial Number is not (cannot be) used for - WPA, and therefore the validity of the WPA key should not be affected when - the Volume Serial Number is changed. - - - - - - @@ -1865,7 +1723,9 @@ the copy of the partition might be mounted. Over time this random nature of partition mounting might make files seem to mysteriously appear or disappear depending upon which - partition is mounted. + partition is mounted. Random mounting of the source or the + copy of the partition might also cause severe data + corruption or loss. To avoid the problem you are advised to do one of the diff --git a/src/OperationChangeUUID.cc b/src/OperationChangeUUID.cc index 270852a8..51781ee2 100644 --- a/src/OperationChangeUUID.cc +++ b/src/OperationChangeUUID.cc @@ -56,14 +56,14 @@ void OperationChangeUUID::apply_to_visual( std::vector & partitions ) void OperationChangeUUID::create_description() { if ( partition_new .uuid == UUID_RANDOM_NTFS_HALF ) { - /*TO TRANSLATORS: looks like Set half the UUID to a new, random value on ntfs filesystem on /dev/sda1 */ - description = String::ucompose( _("Set half the UUID to a new, random value on %1 filesystem on %2") + /*TO TRANSLATORS: looks like Set half the UUID to a new random value on ntfs file system on /dev/sda1 */ + description = String::ucompose( _("Set half the UUID to a new random value on %1 file system on %2") , Utils::get_filesystem_string( partition_new .filesystem ) , partition_new .get_path() ) ; } else { - /*TO TRANSLATORS: looks like Set a new random UUID on ext4 filesystem on /dev/sda1 */ - description = String::ucompose( _("Set a new random UUID on %1 filesystem on %2") + /*TO TRANSLATORS: looks like Set a new random UUID on ext4 file system on /dev/sda1 */ + description = String::ucompose( _("Set a new random UUID on %1 file system on %2") , Utils::get_filesystem_string( partition_new .filesystem ) , partition_new .get_path() ) ; diff --git a/src/fat16.cc b/src/fat16.cc index 6e4ba441..79f24a64 100644 --- a/src/fat16.cc +++ b/src/fat16.cc @@ -29,21 +29,20 @@ namespace GParted { -const Glib::ustring fat16::Change_UUID_Warning [] = { _( "This may invalidate your Windows Activation key." - ) - , _( "On FAT and NTFS filesystems, GParted" - " uses the Volume Serial Number as UUID." - " Changing the Volume Serial Number on the Windows" - " system partition may invalidate the Windows Activation key." - ) - , _( "External storage media and non-system partitions are normally safe," - " but guarantees cannot be given." - ) - , _( "Please read the manual for more information, and do not apply" - " this change if you are not prepared to re-activate Windows" - ) - , "" - } ; +const Glib::ustring fat16::Change_UUID_Warning [] = + { _( "Changing the UUID might invalidate the Windows Product Activation (WPA) key." + ) + , _( "On FAT and NTFS file systems, the" + " Volume Serial Number is treated as the UUID." + " Changing the Volume Serial Number on the Windows system" + " partition, such as C:, might invalidate the WPA key." + " An invalid WPA key will prevent login until you reactivate Windows." + ) + , _( "Changing the UUID on external storage media and non-system partitions" + " is usually safe, but guarantees cannot be given." + ) + , "" + } ; const Glib::ustring fat16::get_custom_text( CUSTOM_TEXT ttype, int index ) { diff --git a/src/ntfs.cc b/src/ntfs.cc index 3d93c257..0687fbe7 100644 --- a/src/ntfs.cc +++ b/src/ntfs.cc @@ -22,23 +22,24 @@ namespace GParted { -const Glib::ustring ntfs::Change_UUID_Warning [] = { _( "This may invalidate your Windows Activation key." - ) - , _( "On FAT and NTFS filesystems, GParted" - " uses the Volume Serial Number as UUID." - " Changing the Volume Serial Number on the Windows" - " system partition may invalidate the Windows Activation key." - ) - , _( "External storage media and non-system partitions are normally safe." - " GParted also attempts to avoid the problem by changing only" - " half of the serial number, which should be safe as well." - " Nevertheless, guarantees cannot be given." - ) - , _( "Please read the manual for more information, and do not apply" - " this change if you are not prepared to re-activate Windows" - ) - , "" - } ; +const Glib::ustring ntfs::Change_UUID_Warning [] = + { _( "Changing the UUID might invalidate the Windows Product Activation (WPA) key." + ) + , _( "On FAT and NTFS file systems, the" + " Volume Serial Number is treated as the UUID." + " Changing the Volume Serial Number on the Windows system" + " partition, such as C:, might invalidate the WPA key." + " An invalid WPA key will prevent login until you reactivate Windows." + ) + , _( "In an attempt to avoid invalidating the WPA key, on" + " NTFS file systems only half of the UUID is set to a" + " new random value." + ) + , _( "Changing the UUID on external storage media and non-system partitions" + " is usually safe, but guarantees cannot be given." + ) + , "" + } ; const Glib::ustring ntfs::get_custom_text( CUSTOM_TEXT ttype, int index ) {