Author Topic: How to increase partition size [Solved]  (Read 2501 times)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11037
  • MLUs Forever!
Re: How to increase partition size
« Reply #30 on: July 24, 2012, 06:51:50 AM »
Quote
The default /mnt folder was missing on my Test5 live CD.

Thanks BB .....  I was not aware of that.

I will edit my post to include the -p option in that case.

regards
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11037
  • MLUs Forever!
Re: How to increase partition size
« Reply #31 on: July 24, 2012, 07:08:24 AM »
I do not have time right now to digest all of this and to take action.  However, I did manage to download and burn a Mini KDE iso of PCLinuxOS, which is also untested as yet, but which may serve as the LiveCD to follow Just18's suggestion. 

By the way, that was why I had such a limited approach to the initial use of Gparted--I was running from a LiveCD of only Gparted and the minimal Debian that was on the Gparted disk.  I had no access to the good Gparted interface available in PCLinuxOS, or the other support from a good, complete distro.

Jan


There is no rush, thankfully, for you to do this, so do make sure you read through the procedure a few times to get an overall view of it and will feel comfortable applying it.

Overview:
Create mount points for the two partitions, and mount them at those mount points.
Copy the contents of the old to the new, and edit fstab to ensure the new is used as /home in place of the old.


I haven't tried this while using a Mini ISO, so it might be best to ensure that the commands I used above are all available to you before you start.
To do this check just use the command itself followed by the option for the help information ....  like this

mount --help
mkdir --help
blkid --help

etc.

A response with the various options for the command used will let you know the command is available to you.
I expect that all used commands are immediately available and there would be no requirement to install through Synaptic .....  but I also expected the  /mnt  directory to exist in all ISO  ;) So this is really only necessary to confirm the commands are all available before you start the procedure.

The Mini ISO should have no problems ......  and it is such a long time since I ran a Gparted LiveCD that I have no recollection of how it presents to the user.
Sorry about the crossed wires with that.

I have edited my detailed post to include the '-p' mkdir option to overcome an absence of the  /mnt  directory if that should be the case.
So please use the edited post for reference.

Let us know if there is anything else for which you need more detailed information.  ;)

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #32 on: July 24, 2012, 05:28:18 PM »
Just18,

I have another question about this procedure.  If I do much of the work on the hard drive while using a LiveCD, will the changes to mount points hold when I go back to the distribution on the hard drive itself?

Jan

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #33 on: July 24, 2012, 07:43:45 PM »
Bald Brick,

I printed your instructions as well.  Should these steps be done from a LiveCD rather than from the distro on the hard drive that I am modifying?

Jan

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: How to increase partition size
« Reply #34 on: July 24, 2012, 09:34:37 PM »
Just18,

I have another question about this procedure.  If I do much of the work on the hard drive while using a LiveCD, will the changes to mount points hold when I go back to the distribution on the hard drive itself?


No. The mount points you assign while in a live CD session are not stored anywhere but computer memory. They are lost once you reboot.

Bald Brick,

I printed your instructions as well.  Should these steps be done from a LiveCD rather than from the distro on the hard drive that I am modifying?


Yes. Bald Brick has indicated he tested the steps from a live CD. But, the same applies to the post he made here, too.


Most of your procedure should certainly work, but to be on the safe side I booted a live CD and ran through some of it, ...


« Last Edit: July 24, 2012, 09:37:53 PM by djohnston »
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11037
  • MLUs Forever!
Re: How to increase partition size
« Reply #35 on: July 25, 2012, 01:39:28 AM »
Bald Brick,

I printed your instructions as well.  Should these steps be done from a LiveCD rather than from the distro on the hard drive that I am modifying?

Jan



No .......  not using the exact instructions BB posted ........  

The two 'methods' vary ONLY in what changes are needed to operate from a LiveCD.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6470
  • I'm going South
Re: How to increase partition size
« Reply #36 on: July 25, 2012, 01:42:13 AM »
Just18,

I have another question about this procedure.  If I do much of the work on the hard drive while using a LiveCD, will the changes to mount points hold when I go back to the distribution on the hard drive itself?


No. The mount points you assign while in a live CD session are not stored anywhere but computer memory. They are lost once you reboot.

Bald Brick,

I printed your instructions as well.  Should these steps be done from a LiveCD rather than from the distro on the hard drive that I am modifying?


Yes. Bald Brick has indicated he tested the steps from a live CD. But, the same applies to the post he made here, too.


No. I tested Just18's instructions from a live CD, but before that I outlined how you could do the copying from your normal account. That's why my way of doing the copying is a bit easier but ever so slightly more risky than Just18's. My own instructions won't work as such if you boot from a live CD.

To work from a live CD they'd have to be modified, and after that they would look very much like Just18's instructions.

Quote

Most of your procedure should certainly work, but to be on the safe side I booted a live CD and ran through some of it, ...



« Last Edit: July 25, 2012, 01:48:46 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11037
  • MLUs Forever!
Re: How to increase partition size
« Reply #37 on: July 25, 2012, 01:43:54 AM »
Just18,

I have another question about this procedure.  If I do much of the work on the hard drive while using a LiveCD, will the changes to mount points hold when I go back to the distribution on the hard drive itself?

Jan


The only permanent change to the installed OS will be that it will use the newhome in place of the oldhome.

Nothing else will have changed.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #38 on: July 25, 2012, 05:43:15 AM »
OK, now I see one reason why I was getting confused--one set of instructions for LiveCD and another for running from the hard drive.  I know that the LiveCD aproach is supposed to be safer, but I understand the hard drive approach better, since I am unclear on what is and is not retained after the LiveCD approach.  I think I am going to use the hard drive approach.  I won't get to it until this evening.

Thanks,

Jan

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11037
  • MLUs Forever!
Re: How to increase partition size
« Reply #39 on: July 25, 2012, 07:34:59 AM »
OK, now I see one reason why I was getting confused--one set of instructions for LiveCD and another for running from the hard drive.  I know that the LiveCD aproach is supposed to be safer, but I understand the hard drive approach better, since I am unclear on what is and is not retained after the LiveCD approach.  I think I am going to use the hard drive approach.  I won't get to it until this evening.

Thanks,

Jan


That is of course your choice .....  but I advise against it.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6470
  • I'm going South
Re: How to increase partition size
« Reply #40 on: July 25, 2012, 09:01:23 AM »
Ditzian,

The differences between Just18th approach and mine are really miniscule.

In both cases you'd have to mount /dev/sda10 on a temporary mountpoint in order to be able to write to the partition. In both cases we recommended that the mountpoint be created under /mnt. (If you've booted from a live CD, that /mnt would exist in memory as part of the CD's normal file hierarchy; if you've booted from the hard drive it would be your normal /mnt directory on your disk. But you wouldn't notice any difference: the temporary mountpoint would work in a same way in both cases.)

Then, if you do your copying Just18's way you also have to create a mountpoint for /dev/sda6. If you do it my way, you don't have to. When you boot into your normal system the partition will already be mounted on /home; when you boot a live CD it won't. On the live CD /home will be a normal directory that you can't use as a mountpoint for /dev/sda6. So you have to mount it somewhere else to be able to read it.

Even if you do everything from a live CD, the data will simply be copied to the sda10 partition on your hard drive. The mountpoint are just there so that you can tell rsync where to send your copied data.

The mountpoints themselves will disappear at shutdown if you've created them on the live CD, but the data on the partitions that used to be mounted on them won't. The data will remain on /dev/sda10 even if it's unmounted. (If you've run the whole thing from the hard drive you may have to remove the temporary mountpoints later.)

And later on, when you edit /etc/fstab, the difference is the same: if you've booted from a live CD you have to create a mountpoint for /dev/sda5 and mount it there. You want to change the /etc/fstab on your normal root partition, and when you boot your normal setup /dev/sda5 is your normal root partition and mounted on /, but seen from a live CD it isn't. The CD has its own root partition.


And note that even if you follow my riskier approach the worst thing that could happen is that the copy of /home on /dev/sda10 somehow gets corrupted, in which case you still have the original on /dev/sda6, and can start again from the beginning. And then, of course, if you get the new UUID number in /etc/fstab even slightly wrong, you won't be able to log in as your normal user. But that too is fixable.
« Last Edit: July 26, 2012, 09:59:51 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Ditzian

  • Sr. Member
  • ****
  • Posts: 451
Re: How to increase partition size
« Reply #41 on: July 26, 2012, 08:14:37 AM »
All the helpers,

I used Bald Brick's step-by-step approach, but only after reading Just18's approach and getting overall guidance from there.  Everything went well except for one slight glitch: I was so intent on getting the UUID right (I did a copy/paste and then reread it) that I forgot to copy the rest of the line.  Sure enough, reboot failed, saying PCLinuxOS could not open home in /.  I logged in as root, and while writing a complaint post to this forum, I decided to show my new fstab.  Sure enough, the changed line was short.  I patched it up and all booted well. 

According to PCC, there is an unmounted partition where the old /home was located, and home is /dev/sda10, 244 GiB.  Moreover, now that the swamp is drained, My_Book opens in read/write mode and can be modified (this was the topic of an earlier post which led to my need for a larger /home).

For subsequent readers: I followed Bald-Brick's steps directly from my user account.  The operation was carried out as user jan, with Root Terminal; with Dolphin, Edit as root, to bring up Kwrite with root privileges to change fstab; and final check with PCC (which requires root access).

I have not yet deleted the old home.  I will wait until I have made enough changes to home files so that I can clearly see that they are changing in sda10 and not in sda6, whereupon I will empty the latter.

My thanks to all for their contributions to the solution, and to my education,

Jan



Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11037
  • MLUs Forever!
Re: How to increase partition size [Solved]
« Reply #42 on: July 26, 2012, 08:18:01 AM »
If /dev/sda6 is unmounted then nothing can be written to it, so your worries about it still being used as /home are not valid  ;)

Nevertheless make no changes to that oldhome until you are quite sure everything is running OK from the newhome.

Glad things have worked out oK  ;)
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6470
  • I'm going South
Re: How to increase partition size
« Reply #43 on: July 26, 2012, 08:49:31 AM »
Everything went well except for one slight glitch: I was so intent on getting the UUID right (I did a copy/paste and then reread it) that I forgot to copy the rest of the line.  Sure enough, reboot failed, saying PCLinuxOS could not open home in /. 

That's actually quite funny, particularly as similar things have happened to most of us.

I'm glad all seems to have worked out well.
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D