0

Somehow I have got boot failure message while the ubuntu is loading. I want to format the OS keeping the data I have undisturbed. The datas are kept in root partition. Will formatting the boot partition erase root's data ?

avishekdr
  • 101
  • 1
    If you format/mkfs you'll erase any data that exists on that partition and create a new partition instead (which will be empty). I suspect its something different to format that you are wanting as if your data is on that same partition; it will be lost. You can re-install Ubuntu without erasing data, as can some other OSes - but note many cannot; as a formatted (clean) install has less issues, they often opt for that (which as consequence erases all data because they format partition). rm is probably what you want, but it's unclear sorry. – guiverc Feb 05 '20 at 02:16
  • yes I want to just reinstall Ubuntu because I've huge amount of important files in my root partition which if gets deleted will be a much loss – avishekdr Feb 05 '20 at 02:23
  • You have provided very little details (I don't know what release; if you intend re-installing the same release etc) so I'll keep it generic. You can re-install using 'something else' (or "Manual", "Manual Partitioning" or the term appropriate for your release/installer) selecting your existing partitions & ensuring the 'format' box is unchecked. It will note your software, erase (rm) system directories, install, re-add back your additional software installed on last system if available, then ask to reboot. – guiverc Feb 05 '20 at 02:29
  • It won't erase user data unless 'format' is ticked; however because system directories are erased, some server configs maybe lost (you didn't give specifics of install; this isn't an issue with desktop), so you restore them from your backups. This is continuation of last comment; you should of course ensure backups are all made first; it's easy to overlook the 'format' checkbox – guiverc Feb 05 '20 at 02:29
  • 1
    If your data is truly valuable to you, then you should have a backup. – user535733 Feb 05 '20 at 02:55

1 Answers1

1

In order to do this, you would need to have your data on a different partition. ie:

[drive]
   |   
   +--- [volume1]
   |        +---[LVM (All linux partitions)]
   |
   +--- [volume2]
            +---[Data Partition]

edit: Because you have all your data on the root directory, yes you will loose it if you format the drive. You can create a new data partition on the drive, move your data to it and then go from there. But you will probably need to manually edit the partitions, not let it auto partition during the install...

Roxana
  • 76
  • is there any way to move data using live usb drive because my os is not loading up – avishekdr Feb 05 '20 at 04:36
  • 1
    You should be able to access the drive's data from a live USB... if you have access to an external USB drive, I would SERIOUSLY copy it off the drive, partition and format... Then just keep your data backed up so you never have to worry about this again. – Roxana Feb 05 '20 at 04:47