Results 1 to 6 of 6

Thread: create a permanent swap

  1. #1

    create a permanent swap

    I am running Knoppix 3.7 en with the 2.4 kernel. Two drives. hda is format with nothing. hdb1 has my network save settings. hdb2 is a place where I can save my settings when I am testing new stuff. hdb3 is my perm home dir and I am using the entire part. works perfectly.

    I would like to take hda1 and part some space dedicated for swap and use the rest for whatever comes up. My problem is that I have no idea how to tell knoppix that I have a perm swap dev during boot. I would like to dedicate like 1024 to swap at least, but if there is no way to have knoppix use this then it's pointless.

    Is this possible, and if so, then how?

  2. #2
    Member registered user
    Join Date
    Jan 2004
    Posts
    65
    Knoppix will automatically mount any swap partition it finds while booting.
    In fact, you have to tell it not to mount swap partitions
    if you are doing forensics or disk imaging with knoppix.

    Use your partioning software of choice to partition hda.
    As root
    "mkswap /dev/hda1"
    "swapon /dev/hda1"
    Knoppix will use your swap partition now. If you reboot,
    knoppix will automatically mount it as swap.

  3. #3
    Junior Member registered user
    Join Date
    Apr 2004
    Posts
    18
    Quote Originally Posted by ghaze
    Knoppix will automatically mount any swap partition it finds while booting.
    In fact, you have to tell it not to mount swap partitions
    if you are doing forensics or disk imaging with knoppix.
    Why do you not want to be running swap if you are doing "disk imaging"?

    (I.e., what exactly are you referring to when you say "disk imaging"?)

  4. #4
    Member registered user
    Join Date
    Jan 2004
    Posts
    65
    Why do you not want to be running swap if you are doing "disk imaging"?

    (I.e., what exactly are you referring to when you say "disk imaging"?)
    You might want to copy one hard drive to another.
    dd if=/dev/hda of=/dev/hdb
    or
    dd if=/dev/hda of=/dev/hdb1/hda.img

    You can restore the image by reversing the command.
    dd if=/dev/hdb1/hda.img of=/dev/hda

    It wouldn't work very well with the swap on hda mounted and active.
    If you are creating the image to preserve evidence of a crime, or for forensic
    work, you don't want knoppix to make any changes at all to the disk.

    Generally, when playing with partitions, it is better not to have any mounted on that disk.

    YMMV

  5. #5
    Junior Member registered user
    Join Date
    Apr 2004
    Posts
    18
    Quote Originally Posted by ghaze
    Why do you not want to be running swap if you are doing "disk imaging"?

    (I.e., what exactly are you referring to when you say "disk imaging"?)
    (A bunch of "Unix 101 stuff" - snipped)

    It wouldn't work very well with the swap on hda mounted and active.
    If you are creating the image to preserve evidence of a crime, or for forensic
    work, you don't want knoppix to make any changes at all to the disk.

    Generally, when playing with partitions, it is better not to have any mounted on that disk.

    YMMV
    Of course. But that doesn't have anything to do with swap partitions, per se. I.e., of course, you don't want anything active on the partition you are working on, but you could certainly have swap partitions active in other areas while you are working there.

  6. #6
    Member registered user
    Join Date
    Jan 2004
    Posts
    65
    Gazelle,

    You've certainly ot'd this thread. I mentioned the fact that you had to
    tell knoppix not to mount swap partitions if they were available so the
    other poster would understand that knoppix mounts swap automatically.

    To answer your point, if you are making a direct disk to disk copy, or
    creating a hard drive image, you don't want swap active and mounted,
    on that drive.
    If your box swaps out while running dd, the imaging will take awhile,
    to say the least.

    As far as forensics goes, type
    forensics noswap knoppix
    into a google search box to find out why mounting a swap partition on a drive
    you are trying to preserve might not be a good idea.

    If you are using qtparted on your disk, you might have a hard time resizing
    your partitions if a swap partition on that drive is mounted. Maybe not, depending
    on what you are trying do.

    unix 101, huh? Might not be a bad idea for some of us.

    Have a Nice Day

Similar Threads

  1. Unable to create swap file during boot from CD
    By Ham13 in forum Hardware & Booting
    Replies: 15
    Last Post: 01-20-2007, 07:31 PM
  2. Unable to create swap file.
    By Ham13 in forum MS Windows & New to Linux
    Replies: 0
    Last Post: 09-05-2006, 01:09 AM
  3. permanent alias
    By finferflu in forum General Support
    Replies: 5
    Last Post: 05-12-2006, 01:53 PM
  4. Replies: 2
    Last Post: 04-04-2005, 06:57 PM
  5. Permanent Swap File in Hard disk for Knoppix
    By bongski55 in forum General Support
    Replies: 3
    Last Post: 05-06-2003, 05:50 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 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



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 2025 Standard 64Bit 16 Core-50 CALs DVD With Key Sealed picture

Microsoft Windows Server 2025 Standard 64Bit 16 Core-50 CALs DVD With Key Sealed

$41.19



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD

$169.99



Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p picture

Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p

$499.88



Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO picture

Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO

$308.00



Dell PowerEdge R240 Intel Xeon E-2144G 3.6GHz 16GB DDR4 ECC NO HDD 250W  Unused picture

Dell PowerEdge R240 Intel Xeon E-2144G 3.6GHz 16GB DDR4 ECC NO HDD 250W Unused

$189.00



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD

$381.93



Windows Server 2025 Standard✔ 24-CORE✔ 10 CALs✔ 50 RDS✔ Remote Desktop EP2-25205 picture

Windows Server 2025 Standard✔ 24-CORE✔ 10 CALs✔ 50 RDS✔ Remote Desktop EP2-25205

$317.56



Dell Intel X710-DA2 5N7Y5 Dual-Port 10GbE SFP+ PCIe 3.0 x8 Network Adapter picture

Dell Intel X710-DA2 5N7Y5 Dual-Port 10GbE SFP+ PCIe 3.0 x8 Network Adapter

$27.50