Swap memory auto-detection

Please post any bugs you have found
Post Reply
Message
Author
keenerd
Posts: 176
Joined: Sat 20 Aug 2005, 19:24

Swap memory auto-detection

#1 Post by keenerd »

The live-CD will use any swap space it finds. However, it doesn't check if the swap is valid and formatted.

Here's what happened: I booted the live CD on a computer with 64Mb ram and an ntfs hard drive. I used boot option 3, just to be safe. Puppy said it didn't have enough RAM, and so it mounted usr_cram.fs from the CD. The CD is non-removable and slow, but it works. I fdisked a few linux partitions and a swap.

Common knowledge says to reboot after messing with partitions. I rebooted the computer with the live-CD.

Puppy noticed there was a big swap partition. 256Mb swap + 64Mb RAM = more than enough to run Puppy in RAM. So it starts copying usr_cram.fs to /.. (ram disk). But the swap isn't formatted (there is only 64Mb ram) and I get a million mallock errors. There is also a request to enter the root password.

Best fix: integrate a swap-check into the boot script.

Workaround: I did get around the constant mallock errors, with some effort. I booted with option 5 (multisession) and then rapidly pressed Ctrl+Z, Ctrl+X, and Ctrl+C. This exited the boot sequence just before loading the multisession script. I got dropped off at a Bash prompt with no /usr. I was able to run mkswap from this crippled console. Then Puppy could boot perfectly.

To consider: There have been several problems on the forum where a person complains of mallock errors and asks what the root password is. The usual advice is "You need to burn the CD slower." Which is wrong and usless advice in this case.

Cerberus
Posts: 57
Joined: Thu 13 Oct 2005, 07:29

#2 Post by Cerberus »

The problem i had was that i did have a type 82 hard drive which i wanted to installto, but i did not have enough ram. So it would use th type 82 drive as a swap partition, making it impossible to format.

I woul drecomendmaking an ultra low ram puppy thats only purpose is to load into bash and be able to reformat the disks and make a swap file so that you could then boot puppy and install it onto the hard drive as it is now using a swap partiton as a ram disk

I found though that using a live cd distro like damn small linux allows you to access bash as well, so you can format the cd and make the swap

keenerd
Posts: 176
Joined: Sat 20 Aug 2005, 19:24

#3 Post by keenerd »

I would recomendmaking an ultra low ram puppy thats only purpose is to load into bash and be able to reformat the disks and make a swap file
That already exists, but as a cheap hack. My above "console puppy" (option 5 followed by Ctrl+Z) boots into around 9Mb. It has fdisk, mkswap, mke2fs, and so on.
So it would use th type 82 drive as a swap partition, making it impossible to format.
Option 5, Ctrl+Z, swapoff /dev/hd??, fdisk /dev/hd??
should work for that situation.

Besides the swap integrity check, the boot menu should have a sixth option - a real console. It is nice to load usr_cram, but for memory saving it shouldn't be loaded to ramdisk. Just mounted from the cdrom drive, not in ramdisk at all.

One other thing. Even if you select Option 3 (no hard drive) it will still mount the swap partition on the hard drive. Why?

Post Reply