Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Desktops and exotic laptops aside, with 1 drive in a laptop is there a preferred position for the swap partition?
Looking at some install notes and faqs suggests head left->right:
/boot /swap /home /
what about as last: /boot /home / /swap
some backup imaging tools won't do the swap and this makes a same layout restore onto a fresh or wiped hdd tricky at best. Having swap at end precludes that hassle.
Desktops and exotic laptops aside, with 1 drive in a laptop is there a preferred position for the swap partition?
Looking at some install notes and faqs suggests head left->right:
/boot /swap /home /
this position makes repartitioning easier, but do we repartition our dist "ever day"? not really and you can safely delete swap and make it again.
maybe it would bring some performance benefites. but linux does not uses much swap.
Quote:
what about as last: /boot /home / /swap
some backup imaging tools won't do the swap and this makes a same layout restore onto a fresh or wiped hdd tricky at best. Having swap at end precludes that hassle.
whadya think?
i don't even use boot partition, but it may be needed in some places. use it if you want to.
dd + bzip2 is nice way to do back-up whole disk with partition level. but lilo may not like it. grup would like it.
i use this / swap on same disk /home on different disk.
laptop swap, best placement?
Desktops and exotic laptops aside, with 1 drive in a laptop is there a preferred position for the swap partition?
Swap can be positioned anywhere, be it primary or logical partition it can do the job. However, to my personal preference, considering hardisk head works I always place Swap drive immediately or near the root drive where most disk read/write traffic occur.
Quote:
Looking at some install notes and faqs suggests head left->right:
/boot /swap /home /
what about as last: /boot /home / /swap
Positioning Swap in-between / and /home partitions is wise. (By this you have three successive partitions: Partition1 (Root) + Partition2 (Swap) + Partition3 (/home).
Quote:
some backup imaging tools won't do the swap and this makes a same layout restore onto a fresh or wiped hdd tricky at best. Having swap at end precludes that hassle.
whadya think?
You don't need backup your Swap partition, only your system and user data. Having swap at the end of hardisk still works; this is a matter of taste.
Sure with enough ram swap isn't accessed much. I'm aware of using 'dd' for pure sector copy and in fact a few tools use that under the surface. Playing with some practice installs I recollect one didn't like a slightly resized layout on a restore where the UUID changed.
Actually, thought of another point and maybe stay in this thread.
Have you had 1 or more extra distros sharing a /swap and would that cause trouble if there had been any suspend and then a normal boot trying to 'resume' ?
Sure with enough ram swap isn't accessed much. I'm aware of using 'dd' for pure sector copy and in fact a few tools use that under the surface. Playing with some practice installs I recollect one didn't like a slightly resized layout on a restore where the UUID changed.
Actually, thought of another point and maybe stay in this thread.
Have you had 1 or more extra distros sharing a /swap and would that cause trouble if there had been any suspend and then a normal boot trying to 'resume' ?
sounds like just have a 2nd /swap eh?
Apart from considerations about re-organising/sizing partitions the "best" placement depends on how much I/O is being done to each partition and that depends on how you use your system so best measure it. If you have enough memory, swap is a seldom-used insurance, so not performance critical.
For suspend to work you must have enough free space in swap to accept the contents of memory plus a little. The only way to guarantee this is to have a separate swap for suspend; presumably it must have enough space to accept the contents of memory plus any used swap space. If resume is to work the contents of swap-for-suspend must be untouched after suspend until resume. For a multi-boot system that implies a swap-for-suspend partition for each bootable OS.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.