View Full Version : Unable to write persistant files to HDD
Ham13
09-23-2006, 01:40 AM
:( 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?
malaire
09-23-2006, 11:21 AM
:( 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:
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.
Ham13
09-25-2006, 01:42 PM
:D 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
malaire
09-25-2006, 04:54 PM
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.
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.)
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.