Page 1 of 1

SOLVED Help, my drive is full.

Posted: 14. Jun 2014, 07:34
by paul
When I installed Salix on my old 800 Mhz Notebook which has a 10 GB hard drive, I finished up with one GB left over which I guessed to be enough for housekeeping activity and updates.
I was wrong, I have just finished up with 8 MB of hard drive space, which obviously has its problems.
After deleting and uninstalling what I could, I now have 120 MB free, which is still not brilliant.
I presume that stuff left over from some previous updates, especially that of Firefox is the culprit, but I am not knowledgeable enough to know what I can and cannot delete in order to free up some space.
So any help here would be appreciated.
I could try to source a larger hard drive, but would like to avoid reinstalling Salix and all the stuff I use on the machine.
So is there a way to "clone" Salix as a full operating system from one drive to a new drive?
Thanks, Paul.

Re: Help, my drive is full.

Posted: 14. Jun 2014, 08:04
by gapan
You're not mentioning your partitioning scheme, but I'm guessing a single partition for everything. You're also not mentioning the Salix version/DE you're using.

Try these with superuser rights:

Code: Select all

slapt-get --clean
slapt-src --clean
and also clean up your /tmp.

Re: Help, my drive is full.

Posted: 14. Jun 2014, 08:34
by mimosa
is there a way to clone Salix from one drive to another
You can, but it may be easier to back up your data, put in the new drive, and reinstall. As an alternative, if you have USB ports, you could leave a USB stick plugged in and use that to keep your user data on (with a backup).

To clone your drive, using Live (i.e. without booting your Salix installation or mounting any partition on the drive) copy an image of it to an external medium (which obviously needs to be larger than 10GB). Then replace it with your new one and reverse the procedure. This will leave all but 10GB of the new drive unused, but you can then expand that partition and / or create new ones to fill the space, using Gparted - all within Live, without booting or mounting the Salix on hard disk. Then reinstall the bootloader and you should be good to go.

As ever, it is wise to back up your data somewhere else first.

The most straightforward tool to create and copy the image is dd - AKA "disk destroyer", so be careful. Be very sure which disk is which. If you are booting Live from USB, there will be three in play: the internal hard disk, the Live USB, and some other external medium. Assuming the hard disk is sda and the external medium is sdb:
First, make your copy:

Code: Select all

dd if=/dev/sda of=/path/to/external/medium/some_directory/sda.img bs=1024
You could use compression here, but for 10GB it probably isn't worthwhile.

Now, replace the hard disk, boot Live again, double check which drive has which letter, and put it back (assuming the same as before, sda = internal):

Code: Select all

sudo dd if=/path/to/image/file/sda.img of=/dev/sda bs=1024
Note that both ways, the external medium needs to be mounted, because the image is a file; but the internal disk should not.

Since you are going to be opening the case, if you have a second socket on your IDE or SATA cable, you could actually hook up both disks at once (with the power off) and do the transfer direct, again, using Live:

Code: Select all

sudo dd if=/dev/sda of=/dev/sdb bs=1024
Do be careful those are the right way round though, or you'll just overwrite your old HDD with zeroes. Then power down, remove the old disk, and boot Live again to expand the partition(s) to make use of the new extra space, and finally reinstall the bootloader.

EDIT

Note that for this second method, neither source nor target drive should be mounted, since you are copying directly, with no intermediate image file.

Also NB only plug or unplug hard disks with the power *off*, or they will probably be fatally damaged - unlike a USB medium.

Re: Help, my drive is full.

Posted: 16. Jun 2014, 12:28
by paul
Thanks to both gapan and mimosa.
My xfce is version 4.10; not sure how to get the Salix version.
Anyhow, did the slapt-get and slapt-src clean, gained 1.5 GB
Crises over.
Really appreciate the rundown on cloning the hard drive.
I have done a few things like compiling a DosBox (with considerable help) that actually allows Dos programs to print.
This enables me to run all my legacy Dos programs (including dBase 5 stuff) for my home business on the Salix machine.
In addition I have done considerable tweaking of Wine so it will run stuff you can no longer run on Windows 7.
That old Notebook is a good little workhorse.
So a larger drive may be worthwhile in the long run.
And the information you gave on how to clone the drive will then be really useful.
Unless of course there is a way to "transplant" my "home" directory with all its data onto a new install.
paul.

Re: Help, my drive is full.

Posted: 16. Jun 2014, 14:18
by mimosa
Unless of course there is a way to "transplant" my "home" directory with all its data onto a new install
... definitely much easier and less risky.

Just back up your data and copy it over.

Re: Help, my drive is full.

Posted: 18. Jun 2014, 13:16
by paul
Hello mimosa,
Thanks for that, will follow the advice.
Anyhow I guess we can call this one solved.
Paul.