Перемещение swapfile.sys из Linux

528
topherg

У меня установлены две операционные системы (windows 8 и mint), и я пытаюсь сжать исходный раздел Windows, но на этом пути есть постоянный файл swapfile.sys. Поэтому мне было интересно, возможно ли войти в систему на стороне Linux, затем получить доступ к swapfile.sys и переместить его, когда он не открыт?

0

2 ответа на вопрос

2
ostappus

You can moveswapfile.sys by disabling paging file and then creating a symbolic link at C:\swapfile.sys (assuming C: is your system drive). Whole procedure can be performed in Windows environment.

The following steps will disable swapfile.sys (tested on Windows 8 and Windows 8.1 Preview):

  1. Disable page files on all drives (through Control Panel -> System and Security -> System -> Advanced system setting -> Advanced -> Performance Options -> Advanced -> Virtual memory).
  2. Restart your computer.
  3. swapfile.sys should be gone now. If it's still present, it may be deleted manually.

Afterwards enter following command in command line (requires administrative privileges):

mklink C:\swapfile.sys "<NEW LOCATION>:\swapfile.sys"

If new location path doesn't contain spaces, quotes can be omitted. Note that in Windows PowerShell (which is promoted in Windows 8.1) mklink command is not accessible. You should call regular command line by typing cmd and then proceed in the same window.

After that you can enable pagefile and newly created swapfile.sys will be located wherever the symbolic link points to. The symbolic link itself occupies minimal possible disk space.

1
magicandre1981

This is the new pagefile for "Windows Store Apps". I've searched for a way to move it for, but never found a way. You can only stop the creation if you disable the pagefile completely.

Файл подкачки был полностью удален и не накладывается на мой диск. Я вошел в систему в Linux и просматривал раздел Windows. Если я переместить / удалить файл с этой стороны, он сломает Windows? topherg 11 лет назад 0
При выключении файла подкачки и перезагрузке файл должен исчезнуть. Так что я понятия не имею, почему вы все еще видите это из Linux. magicandre1981 11 лет назад 0
Так что это кеш, который должен быть удален. Так что я могу удалить его, и когда я зайду в Windows, будет ли он возражать, что файл отсутствует, и если он создаст новый файл, будет ли он в том же месте? topherg 11 лет назад 0
Я понятия не имею, будет ли он создан снова. Я так думаю, потому что нормальный pagefile.sys создается снова. magicandre1981 11 лет назад 0
ах, круто, я пойду попозже, и я дам вам знать, если это нормально или нет, если у кого-то еще есть подобная проблема topherg 11 лет назад 0

Похожие вопросы