Instalacja pakietu:
apt-get install ntfsprogs
Backup danych:
idefix:/# ntfsclone -o /windows.img /dev/hda1 ntfsclone v1.9.2 NTFS volume version: 3.1 Cluster size : 2048 bytes Current volume size: 2097412096 bytes (2098 MB) Current device size: 2097414144 bytes (2098 MB) Scanning volume ... 100.00 percent completed Accounting clusters ... Space in use : 2017 MB (96.2%) Cloning NTFS ... 100.00 percent completed Syncing ...
Odzyskanie danych:
ntfsclone --overwrite /dev/hda1 ntfs.img ntfsclone v1.9.2 ERROR(2): ntfs_mount failed: No such file or directory idefix:/opt/8/winxplaptop# ntfsclone --overwrite /dev/hda1 xplaptop.hda1 ntfsclone v1.9.2 NTFS volume version: 3.1 Cluster size : 2048 bytes Current volume size: 5000935424 bytes (5001 MB) Current device size: 5000937984 bytes (5001 MB) Scanning volume ... 100.00 percent completed Accounting clusters ... Space in use : 4592 MB (91.8%) Cloning NTFS ... 100.00 percent completed Syncing ...
Partycje przed zmianami (planujemy połączenie partycji /dev/hda1 i /dev/hda2):
idefix:/# fdisk -l /dev/hda Disk /dev/hda: 40.0 GB, 40007761920 bytes 255 heads, 63 sectors/track, 4864 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 255 2048256 7 HPFS/NTFS /dev/hda2 256 608 2835472+ 7 HPFS/NTFS /dev/hda3 609 1216 4883760 f W95 Ext'd (LBA) /dev/hda5 609 1216 4883728+ 83 Linux
usunięcie partycji /dev/hda1 i /dev/hda2, utworzenie /dev/hda1 o wielkości 5GB, zmiana typu partycji na 7, ustawienie flagi bootable
Po zmianach:
idefix:/# fdisk -l /dev/hda Disk /dev/hda: 40.0 GB, 40007761920 bytes 255 heads, 63 sectors/track, 4864 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 608 4883728+ 7 HPFS/NTFS /dev/hda3 609 1216 4883760 f W95 Ext'd (LBA) /dev/hda5 609 1216 4883728+ 83 Linux
Teraz należy zrestartować system, po restarcie lecimy dalej:
idefix:~# ntfsresize /dev/hda1 ntfsresize v1.9.2 NTFS volume version: 3.1 Cluster size : 2048 bytes Current volume size: 2097412608 bytes (2098 MB) Current device size: 5000937984 bytes (5001 MB) New volume size : 5000935936 bytes (5001 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Space in use : 2017 MB (96.2%) Collecting shrinkage constrains ... WARNING: Every sanity check passed and only the DANGEROUS operations left. Please make sure all your important data had been backed up in case of an unexpected failure! Are you sure you want to proceed (y/[n])? y Schedule chkdsk for NTFS consistency check at Windows boot time ... Resetting $LogFile ... (this might take a while) Updating $BadClust file ... Updating $Bitmap file ... Updating Boot record ... Syncing device ... Successfully resized NTFS on device '/dev/hda1'.
Restart.
Po uruchomienie windowsa pojawi się skanowanie dysku, po którym, tradycyjnie, musi nastąpić reboot - teraz możemy się cieszyć (nie za długo) większą ilością dostępnego miejsca ;)
2005.01.05 LiNiO
|
![]() |
|