Author Topic: [solved] Installed minime-2009.1 without swap or home partitions  (Read 1646 times)

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Well, this was a very dumb oversight. I checked the install to use all existing space & didn't ensure that swap & home had their own partitions!  (a newly formatted HD) :-[  :-[
I upgraded to kde4 & after several days I noticed the error! (runs great anyway)!
I always have /, /home & swap as separate partitions & would like to revert to that without reinstalling--can I do that?
I have plenty of room to shrink root, create swap & home & move home to the new location, but i suspect that there could be more involved than that.
Would appreciate any advice.
Thanks
John
« Last Edit: January 23, 2010, 05:16:08 AM by johnmart »
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Online Rudge

  • Hero Member
  • *****
  • Posts: 9691
  • I'm Just A Dog.
Re: Installed minime-2009.1 without swap or home
« Reply #1 on: January 19, 2010, 09:46:08 PM »
I always thought that /home and /swap were by default their own partitions.  ???
« Last Edit: January 19, 2010, 10:39:45 PM by rudge »


-If you wish to make an apple pie from scratch, you must first invent the universe-  Carl Sagan

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: Installed minime-2009.1 without swap or home
« Reply #2 on: January 19, 2010, 10:18:14 PM »
I think it is standard procedure, but not automatic. I have read of many different setups, but / swap & /home has been my default.
I checked it with PCCC & that was when I saw a single partition.
Maybe with new fstab entries I can avoid reinstall.

Actually I have no swap & home is located in /root.  :'(
« Last Edit: January 19, 2010, 10:21:17 PM by johnmart »
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Online Rudge

  • Hero Member
  • *****
  • Posts: 9691
  • I'm Just A Dog.
Re: Installed minime-2009.1 without swap or home
« Reply #3 on: January 19, 2010, 10:44:26 PM »
/home should be located in /root and I don't think you can get by without a /swap.
 Maybe someone else can help but that all sounds like you might be confused.


-If you wish to make an apple pie from scratch, you must first invent the universe-  Carl Sagan

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: Installed minime-2009.1 without swap or home
« Reply #4 on: January 20, 2010, 03:00:15 AM »
Well this is the place to solve confusion!  :)
As I understand, home should be a separate partition, mounted at /.
I read another post where a guy who had 4gb ram did without a swap, that ram could be used as swap. But he did it intentionally, & seemed to know what he was doing! (unlike me)  It was a surprise to me, & according to pccc I don't have swap. 2gb ram.
Thanks for your comments rudge.
John
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Installed minime-2009.1 without swap or home partitions
« Reply #5 on: January 20, 2010, 03:54:08 AM »
It is possible to add the two partitions at this stage.
Make space for the new partitions.

Create the swap partition in PCC - Local Disks format it etc and it will be written into the fstab file and thus will be available on subsequent boots.

I would then use a live CD to create/format/etc what will become your /home partition.
While running live I would copy the contents of the existing home on the installed OS to the new partition ...... using rsync for security as it checks each file as it is copied so there is no corruption.

Next, edit the fstab file of the installed OS, to create or replace an entry for  /home  to point to the new partition.

When you reboot into the installed OS you should be using your new /home partition and have swap available.

[Hopefully I did not miss anything but sharp eyes will no doubt spot it if I did  ;) ]

Comment
                     Personally I see no real reason to do this, but others of course will have different opinions.
Without changing any partitions you could create a swap file on the existing partition and have your OS use that when it is needed.
Backup your    /home     on a regular basis, using something like rysnc or one of its GUI front ends. That can be stored on a spare disk somewhere in case it is needed.

regards.

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: Installed minime-2009.1 without swap or home partitions
« Reply #6 on: January 20, 2010, 09:35:23 PM »
Thanks for the clear advice. I think I have come to the same conclusion--since the system runs fine. I think I will wait for the 2010 final, maybe reinstall & refit my home & swap then.

You said: you could create a swap file on the existing partition and have your OS use that when it is needed.
That is an interesting suggestion--I'll do Rule#1 & see where it leads.  ;D

Thanks & have a good day.
John
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Installed minime-2009.1 without swap or home partitions
« Reply #7 on: January 21, 2010, 01:36:07 AM »
Have fun!   :D   Maybe check out the  dd  command for creating such a file.

The swap file suggestion is not something I use by choice, but if your system does not normally use swap and it is only for "security" then it should fulfil the need. I prefer a swap partition for my installs.

regards.

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Installed minime-2009.1 without swap or home partitions
« Reply #8 on: January 21, 2010, 12:26:58 PM »
Thanks for the clear advice. I think I have come to the same conclusion--since the system runs fine. I think I will wait for the 2010 final, maybe reinstall & refit my home & swap then.

You said: you could create a swap file on the existing partition and have your OS use that when it is needed.
That is an interesting suggestion--I'll do Rule#1 & see where it leads.  ;D

Thanks & have a good day.
John

2010 may be here soon, so that's probably a reasonable approach.

However, in the interest of exploring multiple options, you could also create a remaster of your current system (you don't say how big it is...if it could all fit on a DVD, you should be golden), boot from that and re-install, re-partitioning to accomplish your goal.

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: Installed minime-2009.1 without swap or home partitions
« Reply #9 on: January 21, 2010, 11:39:21 PM »
I found a good post on a similar topic with some helpful info from JohnBoy, O-P & blackbird.
http://www.pclinuxos.com/forum/index.php/topic,60272.30.html

I haven't sorted through the whole 9 page post, but Tex chimed in there with a comment that convinced me that even if I am running OK sans swap, it is risky. I understand now that swap is a safety net for when ram gets full.

In the post there was instruction for relocating partitions so that swap was located before all the linux partitions. In my previous installs, it often was between / and /home -- just by default or I didn't understand it should be at a certain place.

My concern about moving partitions is that the placement could affect / id# or other settings. But I don't think swap has an id# that would change my root partition if it were inserted before /. rt?

I think partedmagick has options what point you shrink a partition from, so if I take 1gb from the beginning of / there wouldn't be any effect on /, rt?

And JohnBoy you mentioned that the swap would be automatically detected & added to fstab if I understood correctly.?

Pabs-thanks for the remaster idea. A very simple solution if it will remaster. Should fit on a dvd. Think I'll give it a try while I'm deciding which approach to take tx.
John
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Installed minime-2009.1 without swap or home partitions
« Reply #10 on: January 22, 2010, 03:11:02 AM »
Quote
And JohnBoy you mentioned that the swap would be automatically detected & added to fstab if I understood correctly.?

Not quite ..... I said that if the Swap partition is created from within the PCC - Local Disks      that it should be added to the fstab file by that process and thus would be mounted at next boot. IIRC you will be told, after selecting "Done", that the fstab will be written to. You can of course select to mount a partition from within that page also.

Using other partitioners would likely not do this .....  but I rarely use others so would not be sure.

regards.

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Installed minime-2009.1 without swap or home partitions
« Reply #11 on: January 22, 2010, 07:19:06 AM »
No problem.  Remastering and re-installing should address any partition ordering issues, and reconstruct the /etc/fstab accordingly.

If you're inclined to to recreate a swap partition or file "on the fly" (as it were), you can use
Code: [Select]
swapon /dev/[hdx|sdx], or
Code: [Select]
swapon -a if the fstab file has been properly updated.

(Note: use hdx where x=partition# for IDE, and sdx where x=partition# for SCSI or SATA, etc, so the actual command is more akin to:
Code: [Select]
swapon /dev/sdxor
Code: [Select]
swapon /dev/hdx)

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: Installed minime-2009.1 without swap or home partitions
« Reply #12 on: January 23, 2010, 05:14:15 AM »
I don"t have any existing swap or free space to make it from, so I gotta free space from / first. Swapon is a pretty cool command tho.
Since / has to be dismounted to edit it, I'll use partedmagick live cd to shave 1gb off the begining of /, then use pcc to create & format it as swap.
I'll try a mklivecd after that.
Thanks for your attention & suggestions all.
John

<edit> Success!
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho