how to (un)swap partition to create new one to use for filing
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Oh, sorry, you're using ubuntu. I'm not too familiar with that. I think that by default there actually isn't a root account, and you have to do all the root stuff with sudo, but I'm not sure. No worries. All those commands we suggested you try, just type sudo in front of them. If they "aren't found". Then you'll have to type the complete path for them. Usually it'll be in /sbin, so for example: "sudo /sbin/hdparm -z /dev/hdb" or whatever the drive was.
Quakeboy02: Er, on Ubuntu there is a root account. They (who, I have no idea.) just don't really like you using it. You normally have to set a password for it after you have your account set up and are logged in.
Quakeboy02: Er, on Ubuntu there is a root account. They (who, I have no idea.) just don't really like you using it. You normally have to set a password for it after you have your account set up and are logged in.
Thanks for the correction. I should have said that it's not configured for use by default, rather than that there is none. There's always a root account.
Last edited by Quakeboy02; 04-28-2007 at 06:57 PM.
so de second hdd is split in two but the part of linux swap i want to change, make two other partitions on it 1 for swap 533mb and the rest 20G for filing my stuff
hopefully there is a code for this checked ubuntu forum but no answer yet
but i downloaded Gparted(iso) as live cd in case i can't get through like this , thnx anyway
so de second hdd is split in two but the part of linux swap i want to change, make two other partitions on it 1 for swap 533mb and the rest 20G for filing my stuff
Let me restate things as I understand them so that there is little chance of a misunderstanding that will cause you harm.
You have a 20GB partition that is currently setup as swap. You want to reduce that to 512MB and use the rest for an ext3 filesystem.
If this is incorrect, then please let me know and pay no attention to the rest of this post.
If this is correct, then turn off swap like we previously showed you and put a hash ("#") as the first character of the swap line in your /etc/fstab.
After reboot, then run fdisk (or parted or gparted or whatever you know how to use) on the disk and remove the 20GB swap partition completely. It will probably be both a logical partition and an extended partition. Now, make an extended partition of 512MB in size. Then, put a logical partition on it. Then change the type of that logical partition to swap. Then reboot.
Yes, you could use gparted to resize the 20GB partition, but why bother? It will probably take all day and who has time for that? I would do as above, but I know how to do it. Do what you feel is best for your level of expertise.
Next, create a Linux partition with the rest of the space on the disk and save the partition.
If you have done things this way, you should be able to re-enable swap on the same partition name (/dev/hdb2 or whatever) that it used to be on. You should also be able to remove the hash in the fstab so that swap is enabled when you boot.
Finally, you will need to create a filesystem on the rest of the disk (perhaps /dev/hdb3) using "mkfs.ext3 /dev/hdb3". Then create a mountpoint and add the appropriate entry to your fstab.
Last edited by Quakeboy02; 04-28-2007 at 11:38 PM.
i didn't really finished need to check the swap if it set alrite (logical)
but these two days/nights without sleep getting to know my linux system
i suddenly cant listen to rm ram files anymore, it says application handler not available , an something lie check in prefences to choose application , something like this, is there a code to fix this , pls
one question if i run fdisk , should i see where and how much swap is , this is what i get
Disk /dev/sda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/sda2 1913 4865 23719972+ 83 Linux
Disk /dev/sdb: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1912 15358108+ 7 HPFS/NTFS
/dev/sdb2 1913 2039 1020127+ 82 Linux swap / Solaris
/dev/sdb3 * 2040 4865 22699845 83 Linux
please let me know what is wrong with this picture ? is swap on sdb2 now , i guess
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.