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.
I have a busted PIV that overheated some months ago an periodically freezes. I have an ATI Radeon 9500Pro which runs like crap on my machine with the stone-age drivers. I just got a job recently so I decided one of the first things I would do is replace my hardware. Here's a list:
CPU: PIV => Athlon 3200
MB: (obviously needs to be changed...)
Video card: Radeon 9500Pro => nVidia 6600
DVD-drive: crappy POS I got => DVD + CD-RW
So yeah, obviously I thought that it wouldn't be worth it to try and save my existing installation since it's practically a new beast it will be running on. So I thought I should just install my distro (Debian sarge/testing) over from scratch. But the problem is my 120GB drive is full with 100GB of useful data that I can not afford to lose. So what to do?
Then I thought "Why don't I buy a 40GB drive with my new hardware?". Yeah that would be good. Then I could use my 40GB drive for Linux and software apps, and I can use my 120GB drive solely as my home directory on my file system for saving pictures, music, etc. Sounds awesome!
But how easy/difficult would this be for me if I wanted to retain all of that 100GB of data? Obviously my 120GB hard drive would still have my old install on it, which I would need to safely remove, and then devote the drive entirely to my home directory. Does anyone have a suggestion on how to approach this problem? Backing up that much data is not an easy task, and I don't want to lose it. (I may be able to free myself of 60GB of it or so, but that's probably my limit...) Thanks for any tips!
It should be a virtual walk in the park. All you would need to do is disable the original install's boot ability. Two ways come to mind right off the bat:
1) open up fdisk, and remove the bootable flag from all partitions listed as bootable
2) run a dd command to remove your boot loader install. You need to verify this command before executing it; do a search to double check - You have been warned.
Code:
dd if=/dev/zero of=/dev/hdXX bs=512 count=1
You would replace hdXX with the appropriate place where you installed your bootloader.
After you disable the original system's ability to boot, you can simply mount the system once your new installation is finished.
Actually, I forgot to address the issue of consolidating the whole 120 gig into a single partition. I have to assume it's in multiple partitions, otherwise this wouldn't be a problem, right?
If the amount of data you want to save is bigger than the available space on the new hard drive, then you'll have to store some of it off-line or on another machine. Otherwise, your 120 gig drive will have to be split in at least two partitions. When talking gigs, that's a lot of CDs to burn, especially if the data is already compressed (mp3s for example).
To make your life easier, I would suggest buying a drive that can hold all the info you want to keep (drives are cheap), use Knoppix or some other livecd, copy the stuff from the 120 gig to the new drive, wipe the partition table on the 120 gig drive, create a single partition, format it, move the stuff back onto it, and then install the OS on the new drive.
Hmm, so in other words I will have to repartition my 120GB drive no matter what, correct? Buying another large drive like that just to transfer data is....unappealing to me. Of course I'd probably end up using it if I buy one, but then I'll have 3HDs for a total of 280GB, which is a lot. @_@
I can actually probably delete a lot of stuff, since it's easily re-downloadable. Most of the anime and foreign drama I have on my PC I've watched already, I don't have a huge music collection, I have a few scanslated manga I'd like to keep....and then there's all my code and development for my game and school work.
*sigh* this is going to be a pain in the ass no matter what I do. Oh well. For great justice!
I may be missing something here, but you can easily add another HDD, install a fresh distro on it, and mount each partition on the old HDD to your new filesystem - you wouldn't *have* to repartition the old HDD if you don't want to. this setup would require multiple mount points in the new distro, one for each old partition, but that would be easier than deleting and re-loading all of your data.
Yeah, that would be the simplest route, hands down.
What I'm assuming is, the 120 gig drive has a full system installed; meaning there are at least two partitions (/ and swap). In all likelihood, there are more than two partitions. If the goal is to recover 100% of the disk space for use as storage, then it could be done by reusing each of the partitions, but it becomes a nuisance later when you have 3 or more mount points for the same drive with each mount point having a different size. So, from a convenience standpoint, you want to shove everything into a single partition and be done with it. Again, that isn't 100% necessary if multiple mount points are no big deal.
One other option: delete all the partitions that do not have anything you want to keep, and use parted to resize the data partition. I don't use it, so I have no experience with it. Others are happy with it. You can give it a try. Worst case scenario: the resize fails, and you lose the data. Best case scenario: resize works perfectly, there's no need to swap data around, and the drive is consolidated into one partition.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.