Announcement

Collapse
No announcement yet.

Boot problem

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Boot problem

    Suppose one deletes his boot partition that was not backed up. Yep, I did it. If I recreate the partition, is there any way to restore the info needed to boot the computer?

    #2
    As I recall, TestDisk can restore that partition along with your boot info--assuming you mean the boot info was written to the partition (and not, for example, to a MBR preceding that partition). You might check on this.

    https://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      ... and then, sometimes, although some boot info gets restored, pointers are messed up, so boot info points at the wrong place but at least your boot info/statements are still there. Then maybe BootRepair comes into play ... ?
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        Originally posted by wtb32141 View Post
        Suppose one deletes his boot partition that was not backed up.
        What kind of "boot partition" was that?

        If it is/was an EFI system partition, then it didn't contain much and should be able to be recreated. I suggest creating a USB with "Super grub2 disk" on it, it's only a 20 MB iso, and if you boot that in UEFI mode, it should be able to boot Kubuntu and you can recreate the ESP with KDE partition manager or GParted, then run grub-install.

        If by "boot partition" you mean the partition with the Kubuntu root on it, then other than reinstalling, then recovery with something like TestDisk as Qqmike suggests might work.

        If you mean the MBR, but the Kubuntu root and /home are still there... it might be easiest to boot from USB, back up your data, and reinstall.
        Regards, John Little

        Comment


          #5
          Originally posted by wtb32141 View Post
          Suppose one deletes his boot partition that was not backed up. Yep, I did it. If I recreate the partition, is there any way to restore the info needed to boot the computer?
          To Qqmike and jlittle:

          Thanks for the prompt and informative replies.

          I have a desktop PC running Kubuntu 18.04 and a laptop running Ubuntu 16.04. I installed the desktop's operating system (OS) myself, but the laptop (bought from Dell in April 2017) came with the (OS) already installed. I wanted a laptop with no OS installed, but Dell would not sell me one; so I chose Ubuntu (then Dell's only alternative to Windows). Back in 2018, I wanted to install Kubuntu 18.04 on both computers, but, much to my chagrin, the laptop will not boot from a flash drive, and it never has had a DVD drive. I've looked once, and I'll look again, on Dell's support page for a file that will update my laptop's BIOS so that the laptop will boot from a flash drive.

          If I cannot get the laptop to boot from a flash drive, then I'll buy an external DVD drive for it. Then I'll download an ISO of Kubuntu 20.04 to my desktop PC and I'll burn a DVD (using the desktop PC's internal DVD drive) and install Kubuntu 20.04 on both of my computers.

          We live and we learn. I have learned the hard way that I should have backed up those 2 partitions soon after receiving my laptop. If I had, then my recent blunder would not be a big deal. Foolish me!

          Thanks again for your help.

          Comment


            #6
            2017, that might be an NVMe SSD soldered on to the motherboard. But, it might be a SATA SSD you can get to, and take out. You can get (in normal times) a little USB to SATA cable and plug it into the other laptop to work on it.

            If it won't boot from USB, maybe it won't boot from DVD.
            Regards, John Little

            Comment


              #7
              The spec sheet I got from Dell when I bought my laptop describes the hard drive as a “128GB M.2 SATA Solid State drive Class 20”.


              An online article titled “How to boot to an external device using USB TYPE-C connection” leads me to believe that my laptop will boot from a flash drive. To get the external USB device into BIOS’s menu of boot devices, I must go thru several preliminary selections within the BIOS.


              I used Ubuntu’s Disks program to create a partition where those 2 partitions were that I deleted; they were sda1 and sda2. I got this error message: “Error wiping newly created partition /dev/sda1: Command-line ‘wipefs a “/dev/sda1” ’ exited with nonzero exit status 1:wipefs: error: /dev/sda1: probing initialization failed: Device or resource busy (udisks-error-quark, 0)”. So I ran Gparted; it tells me following:


              the partition was created (as sda1; size = 3.9 GiB); its file system is FAT 32; the Mount Point column shows “/boot/efi”; and Gparted’s Partition menu (the Information option) gives me this Warning: “3.00 GiB of unallocated space within the partition. To grow the file system to fill the partition, select the partition and choose the menu item: Partition Check.”


              When I try to grow the file system, Check is grayed out, and I did select the sda1 partition! Moreover, from where did that unallocated space come? I told it to create a partition where the former sda1 and sda2 were. How can one get unallocated space within a partition? To me, the term “unallocated space” denotes space that has not been allocated to a partition. Once space is allocated to a partition, it’s no longer “unallocated space”.


              As things stand now, the laptop’s hard drive has 3 partitions: (1) sda1 (the new one which seems to contain some “unallocated space), (2) sda3 (file system ext4), which contains 108.2 GiB, and its mount point is / (root), and (3) sda4, which contains 7.73 GiB of swap space.


              The folks at Dell originally formatted that drive.

              I do not know what the 2 partitions (sda1 and sda2) that I deleted contained. It appears to me that the current sda3 contains the operating system and the home directory.



              Here’s my plan: (1) Delete the current sda1 partition, which should return all of its space to free space. (2) delete the sda3 partition (I have it backed up), which should return all of its space to free space. The drive’s total space then should consist of a big chunk of free space plus the current swap-space partition. Then create 2 partitions from the free space, one for the operating system and one for my home directory.


              What do you think of that plan?

              Comment


                #8
                A piecemeal reply.
                Originally posted by wtb32141 View Post
                ...leads me to believe that my laptop will boot from a flash drive.
                So, did you succeed in booting from a USB stick? (Your first paragraph seems to imply that that was in doubt, but then you continue as if it had, so that you could run "Ubuntu’s Disks".)

                Originally posted by wtb32141 View Post
                Warning: “3.00 GiB of unallocated space within the partition.
                I've never seen or heard about that. I guess it means the file system in the partition is smaller than the partition; because in principle that's quite possible.

                Originally posted by wtb32141 View Post
                I do not know what the 2 partitions (sda1 and sda2) that I deleted contained.
                Well, clearly sda1 was the EFI system partition, or ESP, which would have been FAT32 (or something like that) and fairly small, 0.5 or 1 GB. Normally, sda2 would be the linux root partition, and sda3 /home, but that's a guess.

                Originally posted by wtb32141 View Post
                [SIZE=2]Here’s my plan: ...
                What do you think of that plan?
                I think the integrity of the GPT (GUID partition table I presume) has to be doubted. If you can I suggest using GParted (Device->create partition table) to write a new GPT to the drive, and start from scratch. Then create
                1. an ESP of 500 MB (my Kubuntu system's is 512 MiB, and is 3% used)
                2. a swap partition, the size of your RAM, if you want one; unless there's not much RAM, you want to "hibernate" the system, or run very large programmes like video editors, this isn't necessary and probably will never be used
                3. a root partition of at least 25 GiB
                4. the rest a partition for /home

                You might consider combining 3 and 4 into a btrfs, for its many advantages (instant taking of and reverting to snapshots, multiple installs within one fs without juggling partitions or space, incremental backups with send/receive...) But maybe keeping it simple is a good idea.
                Regards, John Little

                Comment


                  #9
                  This thread began on a sour note (with me unintentionally deleting the sda1 and sda2 partitions of my solid state drive), but it’s ending on a sweet note. I created 1 partition where those 2 small partitions were, and the laptop seems to be working perfectly even though the new sda1 has a tad of unallocated space within the partition. Why Dell created that small sda2 partition is beyond me. And I now can boot my laptop from a flash drive.
                  Thanks again to all who responded to my plea for help, and especially to jlittle who responded several times with good advice.

                  Comment

                  Working...
                  X