Goal: Protect against the FROST side-channel attack by keeping the Origin Private File System (OPFS) in RAM while leaving the rest of the Chrome profile on disk.
- Move the entire Chrome
User Datafolder (or just the profile) to your mechanical HDD. - Create a symbolic link back to the original location.
- Pros: Zero RAM usage, very simple, excellent FROST protection (no SSD contention).
- Cons: Slower browser performance (HDD I/O).
- How-to:
- Copy
C:\Users\YourName\AppData\Local\Google\Chrome\User Datato HDD (e.g.D:\ChromeProfile). - Delete the original folder.
- Run as Admin:
mklink /J "C:\Users\YourName\AppData\Local\Google\Chrome\User Data" "D:\ChromeProfile"
- Launch Chrome normally.
- Copy
This is often the easiest "set and forget" option if you have a mechanical drive.
Features
- Minimal RAM usage (~1 GB)
- Full protection against FROST
- Works with your workstation lock / PIN login workflow
- Automatic setup on login + save on logoff
-
Download ImDisk Toolkit β https://sourceforge.net/projects/imdisk-toolkit/
-
Install it (Run as Administrator).
-
Download ImDisk Toolkit from the official source:
https://sourceforge.net/projects/imdisk-toolkit/ -
Install it (recommended: Run as Administrator during install).
-
After installation, verify
imdisk.exeis available in your PATH or inC:\Program Files\ImDisk\.
- Run all batches as Administrator
mkdir C:\RAMBackups\ChromeOPFS@echo off
:: Setup OPFS symlink to RAM
:: Run as Administrator
set RAMDRIVE=R:
set RAMSIZE=1024M
set PROFILE_PATH=%LOCALAPPDATA%\Google\Chrome\User Data\Default
set OPFS_TARGET=%RAMDRIVE%\OPFS
set BACKING=C:\RAMBackups\ChromeOPFS
echo === Chrome OPFS RAM Setup ===
:: Create RAM drive if needed
if not exist %RAMDRIVE%\ (
echo Creating RAM drive...
imdisk -a -s %RAMSIZE% -m %RAMDRIVE% -p "/fs:ntfs /q /y"
)
:: Ensure target folders
if not exist "%BACKING%" mkdir "%BACKING%"
if not exist "%OPFS_TARGET%" mkdir "%OPFS_TARGET%"
:: Check for existing symlink first
if exist "%PROFILE_PATH%\File System" (
echo Symlink or folder already exists.
if not exist "%PROFILE_PATH%\File System\*" (
echo Existing symlink detected.
) else (
echo Real folder detected - moving to RAM...
xcopy "%BACKING%\" "%OPFS_TARGET%\" /E /H /C /I /Y
rd /s /q "%PROFILE_PATH%\File System"
mklink /J "%PROFILE_PATH%\File System" "%OPFS_TARGET%"
echo Symlink created.
)
) else (
echo Creating new symlink...
mklink /J "%PROFILE_PATH%\File System" "%OPFS_TARGET%"
echo Symlink created.
)
echo Setup complete.
pause@echo off
:: Save Chrome RAM profile back to disk
set RAMDRIVE=R:
set BACKING=C:\RAMBackups\ChromeProfile
echo Saving Chrome profile from RAM to %BACKING%...
if exist %RAMDRIVE%\ChromeProfile\ (
xcopy "%RAMDRIVE%\ChromeProfile\*" "%BACKING%\" /E /H /C /I /Y /D
echo Sync completed successfully.
) else (
echo RAM profile not found!
)
pause- Open Task Scheduler β Create Task.
- General tab: Name it "Setup Chrome OPFS RAM", check Run with highest privileges.
- Triggers tab:
- New β At log on
- Specific user: Select your username
- Enabled: Checked
- Actions tab:
- New β Start a program
- Program/script:
C:\Windows\System32\cmd.exe - Add arguments:
/c start "" "C:\Path\To\Your\Setup_Chrome_OPFS_RAM.bat"
- Save the task.
- Create another task named "Save Chrome OPFS".
- General tab: Run with highest privileges.
- Triggers tab:
- New β On an event
- Basic
- Log: Security
- Source: Microsoft-Windows-Eventlog
- Event ID: 4647
- Actions tab:
- Program/script:
C:\Windows\System32\cmd.exe - Add arguments:
/c start "" "C:\Path\To\Your\Save_Chrome_OPFS.bat"
- Program/script:
- The login task will auto-mount the RAM disk + symlink.
- The logoff task will save OPFS data.
- Use Chrome normally.
- Run
Setup_Chrome_OPFS_RAM.batonce (or add to startup). - Use Chrome normally.
- Before long inactivity/shutdown β run the Save batch (or rely on volatility for OPFS).
- Open https://jchu634.github.io/opfs-test/
- Add Random files
- Lock workstation (or press Windows key and type logoff and press enter)
- Login to Windows
- Check if OPFS data persists.
- After disabling Gemini Nano (via
chrome://flags), your profile should be much smaller. - OPFS data is volatile by nature β losing it on reboot is usually harmless.
- If issues arise after Chrome updates, re-run the setup batch.
On macOS you can do a similar targeted OPFS mitigation using a RAM disk:
# 1. Create a 1GB RAM disk
diskutil erasevolume HFS+ "OPFS_RAM" `hdiutil attach -nomount ram://2097152`
# 2. Move existing OPFS (close Chrome first)
mv ~/Library/Application\ Support/Google/Chrome/Default/File\ System /Volumes/OPFS_RAM/OPFS
# 3. Create symlink
ln -s /Volumes/OPFS_RAM/OPFS ~/Library/Application\ Support/Google/Chrome/Default/File\ System- Use
LaunchAgentsor a simple script in~/.zshrc/ Login items. - To save:
cp -a /Volumes/OPFS_RAM/OPFS ~/Backups/ChromeOPFS/
Note: macOS /tmp is also tmpfs-backed on modern versions and can be used for even simpler cowboy mode.
- /dev/shm is your friend!