-
Junior Member
registered user
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?
-
Senior Member
registered user
Re: Unable to write persistant files to HDD

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.
-
Junior Member
registered user
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
-
Senior Member
registered user

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.

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.)

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
-
By mikeadams in forum Hardware & Booting
Replies: 2
Last Post: 01-23-2006, 06:30 PM
-
By dcohen in forum General Support
Replies: 2
Last Post: 04-28-2005, 11:15 PM
-
By JPsDad in forum MS Windows & New to Linux
Replies: 5
Last Post: 02-20-2005, 11:25 AM
-
Replies: 2
Last Post: 11-19-2004, 04:18 PM
-
By orsonjones in forum Ideas
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
-
Forum Rules

🔀 Juniper Networks EX2300-C-12P 12× Gigabit PoE+ • 2× 10G SFP+ Compact Switch ⚡
$119.00

Juniper EX2300 12-Port Gigabit PoE+ Managed Network Switch P/N: EX2300-C-12P
$149.99

JUNIPER NETWORKS MIST AI AP63-US HIGH PERFORMANCE OUTDOOR ACCESS POINT - WHITE
$59.99

Juniper QFX5100-48S-3AFI 48-Port SFP+ 6 QSFP+ 2x SFP/RJ-45 Management
$249.97

Juniper Networks JNP204/MX204 Universal Edge Router
$8500.00

Juniper JPSU-1600-C-AC-AFO 1600W AC Power Supply EX4400 AFO Airflow
$155.00

Juniper AP47 Mist Wi-Fi 7 802.11 6GHz 4x4 Wireless Access Point (NEW)
$999.99

Juniper EX4600-40F-AFO 24-Port Dual PSU Network Switch
$164.99

New Juniper Networks EX3400-48P 48-Port PoE+ 4-Port SFP+ Ethernet Switch Sealed
$466.65

Juniper Networks EX2300-48P 48-Port PoE Gigabit Switch (Renewed)
$345.97