Results 1 to 4 of 4

Thread: Unable to write persistant files to HDD

  1. #1
    Junior Member registered user
    Join Date
    Sep 2006
    Posts
    12

    Unable to write persistant files to HDD

    I'm running Knoppix 3.8 Live CD on a Win95 Pentium 200MHz pc. I have only 64 meg of ram.
    I'm running in text mode to conserve memory. Trying to make a swapfile. The mkdosswap will not create it. See posting in Boot/Hardware problems - Unable to create swapfile. I've tried all recomendations and nothing works.

    This is the sequence:

    dd if=/dev/zero of=/mnt/hda1/swap bs=1M count=65

    ls -l shows the swap file was created on /mnt/dev/hda1
    it appears as though the file was created but I did not see any action on the HDD led.

    When I reboot Knoppix in text mode the file is gone. ls -l now shows Total 0.

    Why can't I write a file to the hard drive? /mnt/had1 is the fat32 partition is it not?

    The docs with knoppix indicate that the knoppix.swp file can be deleted after terminating knoppix. Why can I not see this file under Windows? Where are the files I'm creating written if not to the HDD?

  2. #2
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205

    Re: Unable to write persistant files to HDD

    Quote Originally Posted by Ham13
    I'm running Knoppix 3.8 Live CD on a Win95 Pentium 200MHz pc. I have only 64 meg of ram.
    I'm running in text mode to conserve memory. Trying to make a swapfile. The mkdosswap will not create it. See posting in Boot/Hardware problems - Unable to create swapfile. I've tried all recomendations and nothing works.

    This is the sequence:

    dd if=/dev/zero of=/mnt/hda1/swap bs=1M count=65

    ls -l shows the swap file was created on /mnt/dev/hda1
    it appears as though the file was created but I did not see any action on the HDD led.

    When I reboot Knoppix in text mode the file is gone. ls -l now shows Total 0.

    Why can't I write a file to the hard drive? /mnt/hda1 is the fat32 partition is it not?

    The docs with knoppix indicate that the knoppix.swp file can be deleted after terminating knoppix. Why can I not see this file under Windows? Where are the files I'm creating written if not to the HDD?
    /mnt/hda1 "is" the fat32 partition only after you have mounted the partition. Before that it's just a normal directory and everything you put there will disappear when you reboot.

    So what you need to do is:
    Code:
    mount /dev/hda1 /mnt/hda1
    dd if=/dev/zero of=/mnt/hda1/knoppix.swp bs=1M count=65
    sync
    umount /mnt/hda1
    Explanation:
    1. mount-command makes the hda1-partition available at /mnt/hda1 directory
    2. dd creates the swapfile.
    3. sync-command waits until that file has been fully written to the HD.
    4. umount-command "unmounts" the hda1-partition so that you can reboot safely.

  3. #3
    Junior Member registered user
    Join Date
    Sep 2006
    Posts
    12
    Thanks for the reply malaire. I have succeded in writing to the HDD. The Knoppix boot routine must not mount /dev/hda1. This may be why mkdosswap failed.


    Now I have a 256M file named knoppix.swp. From the FAQ the folling commands will make the swap file accessable:

    mkswap /mnt/hda1/knoppix.swp

    edit /etc/fstab to include /mnt/hda1/knoppix.swp swap swap defaults 0 0

    swapon -a

    Is this correct. The file should show up in /proc/swaps.

    Should I use swapoff or reboot after this sequence?

    As /etc/fstab is rebuilt on boot up any edits will be lost. Should I edit this file anyway?

    Any other hints?

    Thanks

  4. #4
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205
    Quote Originally Posted by Ham13
    Now I have a 256M file named knoppix.swp. From the FAQ the folling commands will make the swap file accessable:

    mkswap /mnt/hda1/knoppix.swp
    edit /etc/fstab to include /mnt/hda1/knoppix.swp swap swap defaults 0 0
    swapon -a

    Is this correct. The file should show up in /proc/swaps.
    Might be OK, but I'm not 100% sure as I don't usually edit /etc/fstab at all.

    Instead of editing /etc/fstab and using swapon -a you can use swapon /mnt/hda1/knoppix.swp without editing /etc/fstab.

    Quote Originally Posted by Ham13
    Should I use swapoff or reboot after this sequence?
    It might be nice to use swapoff, but I don't know if that is strictly needed.
    It you don't use it, and the swapfile somehow gets corrupted, you can allways run mkswap again to fix that. (But I don't know if such corruption is possible at all.)

    Quote Originally Posted by Ham13
    As /etc/fstab is rebuilt on boot up any edits will be lost. Should I edit this file anyway?
    I'd recommend using swapon /mnt/hda1/knoppix.swp so you don't need to edit /etc/fstab.

Similar Threads

  1. Unable to write to /mnt/hda1
    By mikeadams in forum Hardware & Booting
    Replies: 2
    Last Post: 01-23-2006, 06:30 PM
  2. Unable to write to USB Drive
    By dcohen in forum General Support
    Replies: 2
    Last Post: 04-28-2005, 11:15 PM
  3. Persistant freezes in Mozilla, corrupted files?
    By JPsDad in forum MS Windows & New to Linux
    Replies: 5
    Last Post: 02-20-2005, 11:25 AM
  4. Replies: 2
    Last Post: 11-19-2004, 04:18 PM
  5. Replies: 1
    Last Post: 09-18-2004, 11:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN picture

OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN

$145.00



KTN-STL3 EMC VNX 15-slot Disk Array Expansion, full 15 x 2tb drives 100% health picture

KTN-STL3 EMC VNX 15-slot Disk Array Expansion, full 15 x 2tb drives 100% health

$360.00



Ubiquiti UniFi Gateway Max Router - 5x 2.5GbE - IDS/IPS 2.3 Gbps - UXG-Max picture

Ubiquiti UniFi Gateway Max Router - 5x 2.5GbE - IDS/IPS 2.3 Gbps - UXG-Max

$180.00



ULTIMATE ARCH LINUX BOOTABLE USB/DVD INSTALLER 64-BIT - CHOOSE BUILD - PC/MAC picture

ULTIMATE ARCH LINUX BOOTABLE USB/DVD INSTALLER 64-BIT - CHOOSE BUILD - PC/MAC

$4.99



Ubuntu Server 26.04.1 LTS Bootable USB Flash Drive – Latest September 2026 picture

Ubuntu Server 26.04.1 LTS Bootable USB Flash Drive – Latest September 2026

$13.99



CHEECENT CR202 WiFi USB Print Server 2-Port for Windows, Mac, Linux picture

CHEECENT CR202 WiFi USB Print Server 2-Port for Windows, Mac, Linux

$64.99



Microsoft SQL Server 2025 Standard 32 Core Unlimited CAL Retail License Package picture

Microsoft SQL Server 2025 Standard 32 Core Unlimited CAL Retail License Package

$299.00



Start9 Server Pure 32GB 4TB Intel i7 Node StartOS — Box + PSU picture

Start9 Server Pure 32GB 4TB Intel i7 Node StartOS — Box + PSU

$649.00



Microsoft SQL Server 2025 Standard 16-Core Perpetual License | Factory Sealed picture

Microsoft SQL Server 2025 Standard 16-Core Perpetual License | Factory Sealed

$724.63



SQL Server 2025 Enterprise 40 Core Unlimited CAL Retail License Package Per-Core picture

SQL Server 2025 Enterprise 40 Core Unlimited CAL Retail License Package Per-Core

$389.00