PDA

View Full Version : Unable to create swap file during boot from CD



Ham13
09-08-2006, 12:43 AM
:( Running Knoppix Live CD on Packard Bell 200 MHz Pentiun with 65M memory. Knoppix 3.8 - 2.7.11 kernel boots OK until requested to make swap file. Clicking on OK does not create the file it only brings me back to the "Create Swap File screen". Alt + O or Cancel are the only options that exit this routine. No swap file is created. Booting then continues. But then fails when loading KDE due to limited memory. How do I create the swap file? Why do I keep going back to that particular screen? A check of the Windows/DOS environment shows that the swap file was not created.

Thanks

Harry Kuhman
09-08-2006, 01:01 AM
What Windows OS are you running? If it's XP with NFTS partitions then I don't believe Knoppix will be able to creator write to a swap file, although it would seem extrenely unlikely that anyone with a 200 meg system with 64 meg could run xp. Otherwise I can't account for the problem, Knoppix made the swap file as expected when I tried it. But it's been years since I actually tried Knoppix on anything that small, maybe the feature has become broken.

Ham13
09-08-2006, 02:51 PM
The OS in Windows 95. The swap file routine appears to be a DOS like application. I have two choices to click on. One is OK the other is Cancel. If I click on OK I just come right back to the swap file creation screen. I can not click on anything else. If I use a hot key (ALT + O) I exit the routine and booting continues but no swap file is created.

Ham13
09-08-2006, 05:42 PM
This time I loaded a later version of Knoppix. Here I got this error message when creating the swap file "No partition available for swap file". I have the bios set to boot from the CD then the floppy then the hard disk. When I try to boot from the CD alone this message appears "Isolonux: failed to locate CD-ROM device load spec packet failed... Boot failed. See //syslinux.ztpr.com/sbm

Using Smart Boot Manager to boot the CD-ROM Knoppix loads with only the error on creation of the swap file. Could the swap file problem be related to Smart Boot Manager?

Harry Kuhman
09-08-2006, 06:48 PM
... Here I got this error message when creating the swap file "No partition available for swap file". ...Using Smart Boot Manager to boot the CD-ROM Knoppix loads with only the error on creation of the swap file. Could the swap file problem be related to Smart Boot Manager?
I don't see how it can be sbm related.

There should basically be two options: (1) If you have (or if you create) a Linux Swap partition on your drive then Knoppix can and will use it when it boots and finds it. This isn't a good option for most people because they usually already have all of the disk space taken up by Windows partitions. And (2) If you don't have a swap partition you can let Knoppix create a swap file on a FAT partition for you when it complains of too little space and offers to do this for you. This space, in a file on the FAT partition, is used for swap space just like a swap partition. I am not clear on why this is not working for you, it worked for me. Is there enough space on you disk to make a swap file? You might want to try defragging your hard disk partitions and trying again.

If you still can't get Knoppix t0o make a swap file for you, you might want to try to manually create one. But I consider this risky and I think you should be able to get Knoppix to do it automatically if there is space for a swap file. If you want to do it manually, see the last entry in the Rescue Faq (http://www.knoppix.net/wiki/Rescue_FAQ#Q:_How_do_I_setup_swap.3F).

If your system has space and an interface available for an additional hard drive and you have one that you can add that your old hardware supports (this box likely has hardware and/or bios limitations that keep you from running modern large drives), you could add it and create a swap partition on it. I don't know your status there and I certainly would not spend any money at all on this, but if you have a spare old drive it would get you past this.

Understand that with that old of a system and with a swap file that when you do get it working your system will be expending a lot of resources swapping stuff too and from the hard disk and will be very slow. You might be putting a lot of work into what will become a disapointment if you don't expect that. As I say, I have not run Knoppix on a 64 meg system fro quite some time and this is the reason,. but the swap file feature always worked for me when I did.

Harry Kuhman
09-08-2006, 06:57 PM
This time I loaded a later version of Knoppix.....
Also, doing a Google search I find reports that Knoppix 5.0.1 is believed to be buggy in this area. That would not surprise me, it's bugging in many areas. The best suggestion is to stick with 3.8 or some other version before Knoppix 5.x to make the swap file. Once you have the file created then you should be able to run Knoppix 5.0.1 and use that swap file if you wish.

Ham13
09-09-2006, 02:22 AM
Harry, Thnks for all your comments. Tried version 3.8.1. Same result. Have a 2 gig drive with about 98 MB free. How much disk space do I need to set up a swap file? Maybe I'm not entering the proper data. It seems all I can do is click on OK when asked to create the swap file. Is there any other data I should be entering and if so haow do I do it? I cannot get the cursor into any other field than OK or Cancel.

I do not want to load it on my larger Win 2000 machine until I'm sure it will not cause problems there. I know that Knoppix has problems writing to other than fat32 file systems. If it is buggy I cannot risk my work PC.

Harry Kuhman
09-09-2006, 03:21 AM
...How much disk space do I need to set up a swap file?...

I do not want to load it on my larger Win 2000 machine until I'm sure it will not cause problems there. I know that Knoppix has problems writing to other than fat32 file systems. If it is buggy I cannot risk my work PC.

I honestly don't remember how large the swap file is created; I would think that 98 meg would be OK but it may be cutting it close. More important may be that it be contigious, I'm not sure of that but it seems likely. Defragging may be helpful; if you can afford to free up 40 or 50 more meg (or obviously more) before you do, all the better and the defrag will go faster. If you do and it works, please post back how big of a swap file was created.

And again, don't expect the system to run well when thrashing the hard disk this way. About all I can say for Knoppix on a P166 and 64 megs of memory and a swap file is that it eventually booted and I was able to do things like start a browser and surf the web, but there is absolutely no way that I can justify the performance as acceptable.

I consider Knoppix perfectly safe to run on a 2000 or XP system, just as long as you do not change write permissions and tell it to write to an NTFS partition. On a few rare cases some users have had to completely power down their systems after running Knoppix, not just do a warm reboot, but that generally is the worst of it. Of course, there are people who may do awful things and then not want to admit it even to themselves, and since there's always a chance that Windows may screw up it's partitions (It's got mine twice when I was not running KNoppix), there is also the chance that someone might experience that problem just before or just after running Knoppix and unjustly blame Knoppix, but I know of no confirmed cases of Knoppix unexpectedly harming Windows on a system (which is more than I can say for Windows and their approach to Linux). Since your 2000 system presumably has enough memory to not need a swap file I don't think you will have any problem. Of course, you can't sue me if something awful happens and I always advise people to have good backups.

If you really want to play it safe, power down completely and unplug your hard drives. Knoppix doesn't need them. Plug them back in when you are ready to run Windows again. It's ugly and unnecessary, but it may give you an extra feeling of safety.

Ham13
09-10-2006, 03:55 PM
On a Windows 2000 system how do I tell Knoppix to use an ntfs partition when writing to the disk?

On the swap file issue I think it might be related to the file size. Knppoix wants to create a 2012 MB file. The avalible space is 1 Gig. I can not change the size of the file in the creation routine. I can not get into that field only OK and cancel.

I do not see any other choice but to try to create the file manually as the swap file routine can not accept a new file size.

If I create the file manually I think I shold be logged in as root. The Live CD shows a user of Knoppx0...$ not root. How can I change user to root? I'm assuming the name of the swap file shoud be knoppix.swp and the /etc/fstab must be edited to include the new file. I will try the sets outlined in the FAQ mentioned above. Last effot to get this running.

Capricorny
09-10-2006, 10:59 PM
If you want to run KDE in 65MB RAM, you should probably have at least 256MB swap, in a contiguous file. Best is to prepare for that in Windows, deleting files and defragmenting. Then you can boot Knoppix with cheatcode knoppix 2, to avoid the attempt at starting KDE. Then become root (type su), mount the harddisk (probably something like mount /media/hda1) enter the Windows root directory (cd /media/hda1) and create a swap file (eg by dd if=/dev/zero of=swapfile bs=1M count=256) then preparing and using it (mkswap swapfile ; swapon swapfile) before starting KDE with startx. It may also be possible to use the Windows swapfile (nowadays it's often called pagefile.sys, don't know about Win95) I can't find swap specification among the cheatcodes: http://www.knoppix.net/wiki/Cheat_Codes, but if you save your configuration, it may be mounted automatically, or you can modify the knoppix.sh script that is among the saved conf. files.

I would have tried fluxbox or icewm, they use far less resources than KDE, try startx /usr/bin/fluxbox after booting with knoppix 2.

Ham13
09-18-2006, 01:10 AM
:( Well I followed Capricorny's advice and tried to create the swapfile manually. I was able to cd to /mnt/hda1 and run the command dd if=/dev/zero of=swapfile -bs=1M count =256. Note: there is 1 gigabyte of free space on the disk (hda1). The command returns 'No more space left on device 3526656 records' When I ls -l the file it has been created and is 3526656 blocks. The swap file does appear in the /proc/swap file. My understanding is that dd creates a DOS file and that it should be persistant after Knoppix is halted. The routine in Knoppix that should create the swap file also states that the file remains and can be removed using Windows. I can not locate the swapfile on the root of the C: (hda1) drive with Windows. The Knoppix FAQ states that the /etc/fstab should be edited to include the new swap file. Is this correct? Must it be edited each time the system is booted as I'm using a Live-CD?

If I ever get this swap file created... How do I load KDE? startx /etc/bin/kde causes multiple errors. By the way Fluxbox works but, its a mater of principle now. I want to get KDE running however slow.

Thanks fo the replies guys!

Ham13
09-19-2006, 01:07 AM
My problem is with the mkdosswapfile command. It does not appear to work even from root. How should the permissions be set on /mnt/hda1? Could it be that mkdosswapfile or dd can not write to a fat32 file system?

Ham13
09-25-2006, 09:46 PM
:D Looks like the solution was to mount HDA1. The boot up routine did not mount the disk. After mount /dev/hda1 /mnt/hda1 the file system on the HDD was accessable and the swap file could be created. The boot up routine should mount any dos partitions it finds. This would save a lot of effort and time on the users part to diagnose the problem. Hope this info will be of help to others with the same problem.

newer2knoppix
09-27-2006, 11:01 AM
Seems this is my exact same problem "no partition available for swapfile"

Using this system:

OS Name Microsoft Windows XP Professional
Version 5.1.2600 Service Pack 1 Build 2600
OS Manufacturer Microsoft Corporation
System Name
System Manufacturer VIA Technologies, Inc.
System Model KM266A-8235
System Type X86-based PC
Processor x86 Family 6 Model 8 Stepping 1 AuthenticAMD ~1494 Mhz
BIOS Version/Date Phoenix Technologies, LTD 6.00 PG, 9/16/2004
SMBIOS Version 2.2
Windows Directory C:\WINDOWS
System Directory C:\WINDOWS\System32
Boot Device \Device\HarddiskVolume1
Locale United States
Hardware Abstraction Layer
User Name
Time Zone Taipei Standard Time
Total Physical Memory 128.00 MB
Available Physical Memory 9.64 MB
Total Virtual Memory 324.17 MB
Available Virtual Memory 61.70 MB
Page File Space 228.68 MB
Page File C:\pagefile.sys

What should I do? I posted this in another thread but this thread seems to be getting to where I want to go since it is exactly the same problem as with the thread-starter's.

How do I create a partition so that the "no partition available for swapfile" does not appear?

Thanks!

Ham13
09-29-2006, 01:04 AM
My problem was that the /dev/hda1 was not mounted and therefore the system could not see or write to it. Suggest you do the following:

Cd /mnt/hda1 (Your hard disk partition)

ls -l to display a list of files. You should be able to see all the files on your HDD. If you can see the files then the file system is mounted and this IS not your problem.

If you need instructions see the FAQ or the rest of the replies on this topic.

Sorry I can not be of more help this is new to me also and my unix is very rusty.

loclarkey
01-20-2007, 07:31 PM
Hey, just wanted to say thanks for the help for a beginner. I was trying to recover some files from a really old IBM Thinkpad Windows 98 partition that was totally screwed up and ran into this problem. I couldn't figure out how to access the Windows files, or how to transfer them into Linux since I am a bit of a noob. The option to create a swapfile kept repeating when I pressed enter. Here was my step-by-step (combines tips from previous posts). Forgive me if this is really really dumbed down, but I want it to be do-able to absolute beginners like myself.


Select Cancel from the endlessly repeating swapfile dialogue and let Knoppix boot up with a simpler interface.
Open a terminal (will probably open by default) and type the following, pressing enter after each line:


su
cd /mnt/hda1
ls

At this point, if you see a bunch of filenames pop up, skip this step. If nothing happens, type:


mount /media/hda1
cd /mnt/hda1
ls

Now those files should pop up, which you'll recognize as some stuff on your old crappy Windows partition.
Next type


mkdosswapfile

A dialogue should pop up. Select your hard drive, and then pick a file size for the swap. I set it at the maximum recommended size.

Once that's finished, go into the menu structure (by left- or right- clicking on the desktop) and there should be an option in the menu to restart/switch the Knoppix desktop. Select fluxbox (or KDE or whatever).

Be warned that everything works R E A L L Y S L O W L Y in KDE. For me anyway. Also, read the rest of these posts because I Am Not An Expert; I'm just telling you what worked for me. Thanks for your help, guys!

loclarkey