LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reinstall Debian without reformat (https://www.linuxquestions.org/questions/linux-newbie-8/reinstall-debian-without-reformat-804122/)

Peterken 04-25-2010 01:41 PM

Reinstall Debian without reformat
 
Hi guys,

I would like to reinstall debian on my server.
It runs a self-compiled 4.0 because of the SATA controller that was not recognized at that time and the only solution was to recompile with the driver.

Now, I did a test with an empty drive with V5.04 and the controller is recognized out of the box.
I tried to install again, text-based and graphical, but in both modes I have to repartition.

Is there a way to reinstall without losing data/reformat/repartition, and if yes, can you point me in the right direction because google or searching the forum did not deliver any solution.

TIA!
P.

AlucardZero 04-25-2010 02:05 PM

just dist-upgrade to 5.0? read the 5.0 release notes. If you want a fresh install.. back up your data, install, and restore data piecemeal.

j1alu 04-25-2010 02:50 PM

I would upgrade too, just like AlucardZero says.
You may try to choose "manual partitioning". Might be you may avoid reformatting the partition (well: the home-partition).

Peterken 04-25-2010 03:30 PM

So a fresh install seems to be impossible without backup or losing data... I thought there was a way to accomplish this like in windows.

Maybe I should have mentioned it right away, that disk only has 1 partition and maybe this is the opportunity to change this because since it's 1TB and I have those very long file system checks after booting about 30 times.
I guess by using partitions, this checking doesn't take that long. Right?

I checked the 5.0 release notes and documentation and didn't find any information about dist-upgrade but this link seems to explain it all.

1) Is there a big difference in upgrading or reinstalling regarding junk that stays behind?
2) In case of an upgrade: do all my configuration files remain intact and will for example the latest version of samba be installed?

It's just a file server, I have configured NTP for the network and a few cronjobs for backup.

tredegar 04-25-2010 03:49 PM

If your disk is 1TB and has just the one partition I strongly suggest you split it up into several partitions.

gparted will help you here. Or you can do it from the CLI. It is your choice.


Quote:

1) Is there a big difference in upgrading or reinstalling regarding junk that stays behind?
If you "upgrade" you may be left with "junk", but with 1TB to play with, you will not notice.

Quote:

2) In case of an upgrade: do all my configuration files remain intact and will for example the latest version of samba be installed?
Maybe, maybe not. It depends....

It is best to "play safe":

My personal choice would to be to:

1] Make a backup of all my personal files (that is all of /home/me basically) preferably to an external HDD.
Check that you can access all the files on this backup.

2] Repartition, and resize with gparted, the 1TB disk

3] Do a clean, fresh, install to a new, empty, partition on your repartitioned disk.

4] Restore your personal data from the backup you made at [1]

Peterken 04-25-2010 04:02 PM

Hi tredegar, I was just reading up on partitioning and I guess this is the way to go for me. Back then, I had chosen to put everything in 1 partition because of being a complete newbie.
I was just looking if I should only use a separate /home partition or as well /usr, /var and /tmp. Any suggestions for my situation?

You're right on playing safe, but somehow I am more confident to trust my data to a linux system which was 1 of the reasons to install debian as well to get a little bit familiarized with it. That's why at first I was thinking to upgrade without a backup but let's not play with fire. ;)


Why would I repartition before installing whereas I can do this during installation or am I missing something?

tredegar 04-25-2010 04:28 PM

Quote:

I was just looking if I should only use a separate /home partition or as well /usr, /var and /tmp. Any suggestions for my situation?
Well, you can set up different partitions for /home and /boot and /var and all that, but that doesn't mean that you should.

Me? Well when I am playing about with linux, I just install the whole lot to one new, clean, partition. Everything goes there /home /var, the lot (except swap). Then if I need to, I can later split off /home and anything else, to its own partition. But I have very rarely needed to do this. It is easy enough to do though, if it is needed.

Quote:

Why would I repartition before installing whereas I can do this during installation or am I missing something?
I just like to know where I am starting from (I have several disks, with many partitions).
You can (probably) let the installer offer you the choice: Choose "Manual Partitioning" NOT "Automatic Partitioning". Otherwise you will not know what the developers have decided might be "the best solution for you".

If you have had a good look at your partitioning with gparted, you'll be confident that you are giving the distro's installer (and they are all different) the right choice of where to install just what.

I prefer to be in control. That's why I am happy running linux.

j1alu 04-25-2010 04:37 PM

If you do it before the installation, with gparted, you may copy your /home to one of the new partitions and point the installer to it.
I usually do the partitioning during installation.

I prefer either a seperated / and /home or only a single root-partition which includes /home with the configs (and i store the data elsewhere), but not a different /usr, /var and that. But it seems like everyone has got his own opinion on that.

Peterken 04-25-2010 04:52 PM

Ok, I get your point about gparted and of course I know that I don't HAVE to use partitions but since I'm not familiar with it, I better ask advice from someone who does.

Right now I'm syncing my data to another disk and in the meanwhile, I did a test on vmware to see how it comes out if I put everything in separate partitions - suggested by the guided manual partitioning.

Long time ago, I was using partitioned disks but then I stopped doing this. Recently, with the disks becoming bigger and as well system as data files are increasing, I'm reconsidering going back to partitioning.
On linux, I don't have that much experience with and just now I'm really confronted with the first time by not having seperate partitions. It's even not clear to me if I my problem would be easier if I had seperate partitions.

As I wrote earlier and still wonder: does it make any difference in time when a file system check is triggered. Is it the whole disk that is checked anyway or just the root partition?

Peterken 04-25-2010 05:12 PM

Quote:

Originally Posted by j1alu (Post 3947419)
If you do it before the installation, with gparted, you may copy your /home to one of the new partitions and point the installer to it.

So I would need a bootdisk with gparted I guess?
Uhm, would that /home directory not be overwritten if I point the installer to it? :confused:

Quote:

Originally Posted by j1alu (Post 3947419)
I prefer either a seperated / and /home or only a single root-partition which includes /home with the configs (and i store the data elsewhere), but not a different /usr, /var and that. But it seems like everyone has got his own opinion on that.

I know that there is not just 1 way of doing it, it's like you say that everyone has it's own preferences.

Do you keep your data on a separate disk then?

When I started using linux as a server (immediately went for debian, just text based), I had a smaller IDE disk and as my request for storage grew, I bought this SATA PCI controller since the mobo doesn't have SATA. In the meantime I have this 1TB disk and I'm thinking about switching to a RAID configuration or not. Because of energy/environmental reasons, I kept this combined data/system disk by imaging it every time until now.

j1alu 04-25-2010 05:33 PM

Quote:

So I would need a bootdisk with gparted I guess?
Any Linux-Live-CD. If gparted ain't installed just install it. I would
a) resize the partition Debian is installed
b) create the other partitions
c) copy the content of /home to one of the new partitions
(Well: i wouldn't do that. I would save my stuff and do all from the installer and restore my backup once the installation is finished. Or, like said, just upgrade)

Quote:

Uhm, would that /home directory not be overwritten if I point the installer to it?
As far i now that should work.

Quote:

Do you keep your data on a separate disk then?
Yes. It has got some advantages too.

Any way you choose: Good luck.

Peterken 04-25-2010 06:34 PM

I really appreciate you guys answering me and please be patient with me because I'm puzzled here.

I'm going for a clean install so the upgrade is out of the picture anyway.
Is it normal that rsync takes more then 1 hour for 30GB over the same controller - I have about 350GB to go.
EDIT: it's now almost 2 hours for 38GB

Quote:

Any Linux-Live-CD. If gparted ain't installed just install it.
I guess these are 2 different options:
1) run gparted from a live cd
2) run it from disk from my existing installation by installing if necessary. If so, could I do this with an active/loaded OS? (This is just to know/learn something)

Quote:

I would
a) resize the partition Debian is installed
b) create the other partitions
c) copy the content of /home to one of the new partitions
(Well: i wouldn't do that. I would save my stuff and do all from the installer and restore my backup once the installation is finished. Or, like said, just upgrade)
Here as well, it seems as if 2 options (even 3) are given and by writing "i wouldn't do that" I'm even more in the dark what would be advisable to do... :confused:


Quote:

Quote:

Uhm, would that /home directory not be overwritten if I point the installer to it?
As far i now that should work.
To me, it seems that the installer overwrites a disk, partitioned or not, so by having a separate /home partition it gets overwritten, no?


Quote:

Quote:

Do you keep your data on a separate disk then?
Yes. It has got some advantages too.
Of course, in my scenario this would be an advantage too but it seems crazy to have an extra disk just for these occasions.

Can anyone enlighten me on this one: does it make any difference in time when a file system check is triggered if a disk is partitioned or not. Is it the whole disk that is checked anyway or just the root partition?

In my case, it would be a reason to partition if those file system checks are done in a shorter time frame.

j1alu 04-25-2010 06:46 PM

My fault. Its all one option for doing the partitioning with gparted before using the Debian-installation-CD.
You do it from a Live-CD. In case the Live-CD you have got doesn't contain gparted you install it on the Live-CD. Most CD's already to have got it.
You can't use gparted from a running OS for the partition the OS is installed on.
The second part is from the running Live-CD: Run gparted and resize the partition. After that you got free space and create further partitions. After that you close gparted and copy the stuff from /home to one of the new partitions. Then you reboot and use the Debian-installer.

"I wouldn't do it" should not say that its bad (in general), but just that for me its too complicated
(it ain't complicated, but for me the other options are more easy than that one). Thats all.

I wouldn't bet on it, but i think you may leave the /home-partition during installation just the way that it is. It will stay intact.

j1alu 04-25-2010 06:49 PM

It's much easier to do it than to explain it.
Sorry for the confusion.

Peterken 04-27-2010 02:52 PM

Hi j1alu, thank you very much for your patience and sorry for breaking your balls but I was quite confused and because of my lack of knowledge I didn't know which path to choose. The good thing about a linux box is that it keeps running and running so you don't get to do the same things many times on the same system unless you find other occasions to practice.

In the meantime, I've succeeded by reinstalling completely with a separate /home partition.
The reason for the slow rsync process was because of using -raz --progress which I had in a script for syncing my music collection and just took over from a website which explained on how to set up such a script. Now I now that the -z --progress options delayed the process quite a bit. :)

I also understand now why you advised to use gparted to work the partitions but I was a bit reluctant because of not knowing how to do this manually, especially the type/size of partitions.
By running a few tests on vmware, I realized that the graphical setup lets you choose exactly what you want - had not noticed that even in a manual configuration you have that much options. :redface:

The system is running even smoother then before and I wonder if the delay in response/interruptions of datastream I had before when accessing a share is gone.
Right now I have a problem with Samba which was running fine yesterday - I have created this thread about it.

So thanks, I've learned some new things.
Peter


All times are GMT -5. The time now is 04:40 AM.