1

I lost access to my ubuntu operating system because of a sudden "kernel panic", which I described in this question (Kernel panic 0x00007f00). I spent the entire day trying to boot to the system and get the data, since all my external hard drives failed recently. I am considering reinstalling ubuntu without the "format" checkbox. Will it delete the user files? I found completely opposite answers to this same question on previous stack overflow entries this year.

  • If you install with the something else option it will format and erase the partitions it is told to format. Use a Live or Persistent Ubuntu USB to recover your files. – C.S.Cameron Oct 13 '20 at 02:47
  • If I don't click the format checkbox, will the data remain safe? – David Moseler Oct 13 '20 at 02:48
  • If you format, all data on the formatted partition will be erased. You ensure 'format' is un-checked to not have data erased; regardless you've provided few details. Ubuntu installs will erase system directories (server configs are often found in system directories), however with desktop installs the configs are in user directories, which aren't erased unless 'format' is selected. – guiverc Oct 13 '20 at 02:50
  • Please provide specifics, the options vary on OS & release details (Ubuntu has ISOs that use di, ubiquity, subiquity and calamares installers, and options can vary on the installer used; ie. ISO selected). You've provided no details on which you're talking about. – guiverc Oct 13 '20 at 02:52
  • So, if in installation type I check "Something else", and then I choose my partition where ubuntu is currently installed, and if I don't check "Format?" checkbox, I can be sure files in /home will be preserved? – David Moseler Oct 13 '20 at 02:52
  • How can I find out which one is the installer? – David Moseler Oct 13 '20 at 02:53
  • 5
    Boot the Live system. Choose "Try Ubuntu" (NOT install). Retrieve your files. Save them online - a Google Drive, for example. Then take the time to go back and figure out what the problem really is. Maybe installing won't delete your data...but if you're already having a very bad day then maybe it will. – user535733 Oct 13 '20 at 02:56
  • I'm accessing this site without being directly logged into SE (ie. via Ubuntu SSO), chat is on SE itself which I cannot access. – guiverc Oct 13 '20 at 02:56
  • I'm trying to find somewhere to backup my files online. I'm trying aws but I have no idea how to do it. Trying to research it. – David Moseler Oct 13 '20 at 02:58
  • guiverc, the lsb_release -a says

    No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal

    – David Moseler Oct 13 '20 at 02:58
  • The default Ubuntu Desktop 20.04 LTS uses ubiquity which yes will be something-else and ensure 'format' is unchecked, however backup first, and I'd find your issue first (hardware related unless you made a change in the prior session before the kernel panic). If the change/panic was caused by a user config, it'll likely occur again on new install; if a system config yes it will be fixed.. If a package added by user, it may still re-occur (details maybe more obscured by unclean re-install); result will depend on currently unknown cause – guiverc Oct 13 '20 at 03:04
  • I didn't change anything in the system, it was slow, then I rebooted, and it entered in kernel panic and won't boot anymore. – David Moseler Oct 13 '20 at 03:05
  • 1
  • I can't backup the data from the hard drive to google drive or anything like that. They don't accept files coming from the mounted hard drive, only from the actual filesystem, which in the moment is the in memory fs from the live usb. – David Moseler Oct 13 '20 at 03:17
  • 1
    I've backed up files perfectly from a live media; not to google drive, but network storage via rsync. I'd suggest using whatever tools you normally use (rsync for me, cp or scp to just copy etc). You mount the internal drive on the live system, then backup/copy/rsync from the mounted directory. – guiverc Oct 13 '20 at 03:23
  • guiverc, thanks for all the help. The last thing I'm unsure about is what to choose as the "device for boot loader installation". My ubuntu partition is /dev/sda5. Would the device for boot loader installation be /dev/sda? – David Moseler Oct 13 '20 at 03:29
  • Yep, sda. The bootloader goes on the first sector of the drive so it's sda. It won't work on the first sector of a partition (ie. sda5 is a partition). – guiverc Oct 13 '20 at 03:32
  • Thank you guys. Nightmare is over. I was able to reinstall ubuntu without erasing data, and it is working fine. Just gotta reinstall everything, but that's the lesser evil. – David Moseler Oct 13 '20 at 04:55
  • 2
    @DavidMoseler Since it worked for you, you can write these steps into an answer. That will help future users who have the same question – Archisman Panigrahi Oct 13 '20 at 05:17
  • @ArchismanPanigrahi done! :) – David Moseler Oct 13 '20 at 17:35
  • @DavidMoseler Write it as a separate "answer", in the field at the bottom, instead of posting the answer in the question itself. – Archisman Panigrahi Oct 13 '20 at 19:13

2 Answers2

2

So, to help future users with the same issue:

-Boot into the Live USB

-Click install ubuntu

-When there is a list of options such as "Erase Partition and Reinstall Ubuntu", choose "Something else" instead

-There will be a list of partitions. If you, like me, have only one partition for ubuntu, and don't have any other separate partition for /home, then, one and only one of the partitions will be listed as having ubuntu. Choose that partition, choose Ext4 and mount point /, and make sure the "Format?" checkbox is not checked.

-If, for example, the ubuntu partition is /dev/sda2, choose /dev/sda as the device to mount the bootloader.

-If you do things right, the installation will warn you that you DIDN'T choose any partition to be formated. That's good. It will also warn you to backup any critical system files, and will list some system file directories as examples, which do not include /home. That's good too.

I had a kernel panic 0x0007f00, and could solve it after doing this procedure for reinstallation.

Always backup your personal data. But, if you, like me yesterday, wasn't able to do it in time, this procedure might help you reinstalling ubuntu while preserving the data.

0

You can reinstall Ubuntu without erase your personal data (the one in the /home). I assume that you create different partitions in your system for:

  • /home
  • swap (optional)
  • root/

If you did that, then when you ask to select partitions in your install settings window, you check "format" only in root partition. Doing that, you keep your old files in /home partition (You still have to select the partition as mount point for /home, but without format it).

Example of partitions with different mount points

Ppica88
  • 13