Results 1 to 4 of 4

Thread: Unable to write persistant files to HDD

Hybrid View

  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
  •  


Dell Poweredge R720 8SFF 2.5

Dell Poweredge R720 8SFF 2.5" x Xeon E5-2680 v2 2.8GHz 20-Cores 128gb 4x Trays

$349.99



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



Microsoft Windows Server 2022 Standard 64-bit License & DVD 16 Core US Shipping picture

Microsoft Windows Server 2022 Standard 64-bit License & DVD 16 Core US Shipping

$34.99



Broadcom 9600-24i Tri-Mode RAID Controller 4.0 NVMe SAS SATA NEW 05-50111-01003 picture

Broadcom 9600-24i Tri-Mode RAID Controller 4.0 NVMe SAS SATA NEW 05-50111-01003

$639.69



Dell Poweredge R720 8SFF 2.5

Dell Poweredge R720 8SFF 2.5" 2x Xeon E5-2680 v2 2.8GHz 20-Cores 64gb 4x Trays

$259.99



Supermicro 1027GR-TSF 1U Rackmount Server 2x Xeon 2.3GHz 128GB DDR3 picture

Supermicro 1027GR-TSF 1U Rackmount Server 2x Xeon 2.3GHz 128GB DDR3

$219.99



Dell PowerEdge R620 2x Xeon E5-2630 v2 3.1GHz 2.5

Dell PowerEdge R620 2x Xeon E5-2630 v2 3.1GHz 2.5" 4-BAY 32GB RAM No OS 2x 495w

$174.95



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W

$409.99



WINDOWS SERVER 2025 [REMOTE DESKTOP SERVICES] 50 USER  RDS CAL SEALED picture

WINDOWS SERVER 2025 [REMOTE DESKTOP SERVICES] 50 USER RDS CAL SEALED

$119.18



Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD picture

Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD

$99.99