Question: Is there a possibility to reinstall the OS without formatting all the partitions ? #109

Open
opened 2025-01-05 11:52:42 +01:00 by doc75 · 1 comment
doc75 commented 2025-01-05 11:52:42 +01:00 (Migrated from github.com)

I have an Hetzner server initially installed with this script with a configuration like this:

DRIVE1 /dev/sda
DRIVE2 /dev/sdb
    
SWRAID 1
SWRADLEVEL 1
    
BOOTLOADER grub
HOSTNAME machine.domain.com
    
PART /boot ext3  512M
PART lvm   vg0   all
    
LV vg0 root / ext4 25G
LV vg0 swap swap 8G
LV vg0 tmp /tmp ext4 8G
LV vg0 home /home ext4 10G
LV vg0 docker /var/lib/docker ext4  25G
LV vg0 server /srv ext4 1024G
LV vg0 backup  /srv/backup ext4 1024G

I would like to change the OS only and therefore I am willing to format only / (and possibly /home).
Is it possible to achieve this with this script ?
Thanks in advance for your help.

I have an Hetzner server initially installed with this script with a configuration like this: ```bash DRIVE1 /dev/sda DRIVE2 /dev/sdb SWRAID 1 SWRADLEVEL 1 BOOTLOADER grub HOSTNAME machine.domain.com PART /boot ext3 512M PART lvm vg0 all LV vg0 root / ext4 25G LV vg0 swap swap 8G LV vg0 tmp /tmp ext4 8G LV vg0 home /home ext4 10G LV vg0 docker /var/lib/docker ext4 25G LV vg0 server /srv ext4 1024G LV vg0 backup /srv/backup ext4 1024G ``` I would like to change the OS only and therefore I am willing to format only / (and possibly /home). Is it possible to achieve this with this script ? Thanks in advance for your help.
asciiprod commented 2025-01-17 14:45:41 +01:00 (Migrated from github.com)

Installimage is targeted for fresh installations. However there are some UNSUPPORTED options for doing a re-install and preserving data.
Take a look at
https://github.com/hetzneronline/installimage/blob/master/functions.sh#L747

PRESERVE_FS and REUSE_FSTAB allows to skip partitioning and preserve certain mountpoints.

Installimage is targeted for fresh installations. However there are some UNSUPPORTED options for doing a re-install and preserving data. Take a look at https://github.com/hetzneronline/installimage/blob/master/functions.sh#L747 `PRESERVE_FS` and `REUSE_FSTAB` allows to skip partitioning and preserve certain mountpoints.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DiamantTh/installimage#109
No description provided.