0

EDIT 4:

Ok, i just checked the partition manager on lubuntu, and I see that my root device nvme0n1p4 is completely empty, with only 400mb used :( So to conclude, it appears that I effectively have somehow erased my whole / partition. Thank you all for your help.

EDIT 3:

To be clear on what has happened:

Originally i was using my machine normally. I was getting messages saying filesystem root was low on space, so i removed some things. I went to / and then to the /boot/ folder and i deleted some things including the kernel i believe. When i tried to re-boot, i was stuck in grub-rescue and I had to boot from a live USB using another distro and now I am stuck here. I can't remember what I removed exactly.

EDIT 2:

Could this be because i am not using the same distro on the live USB? I am trying to download linux mint iso now and see if the problem persists

EDIT:

I have booted into a live system trying a different distro. Before i deleted files from /boot/ i always used Linux Mint. Since i broke it, i am using a live USB with Lubuntu.

I tried mounting root, but it doesn't seem to work. Everytime i mount the root drive the mnt folder remains empty. If i mount /home/ then i can see all my old files, but if i mount root the folder appears empty.

enter image description here

Original:

As title says, i stupidly deleted files from /boot/ and re-booted. When I started the computer, i would get stuck at GRUB screen and wouldn't let me do anything. I did a live USB boot with another distro (lubuntu now) and I followed the steps in this thread but i am a bit stuck:

mistakenly deleted /boot folder and rebooted

I am stuck in step 3. As far as I remember my old root was nvme0n1p4. So i first did:

sudo mount /dev/nvme0n1p4 mnt/

And then when I try this step here it fails:

sudo mount --bind /dev /mnt/dev

i get the error "mount: mnt/dev: mount point does not exist."

I am not sure which one my root device is or what i have to do to get my old system back up and running.

fdisk output:

Disk /dev/loop0: 1.63 GiB, 1730584576 bytes, 3380048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme0n1: 238.49 GiB, 256060514304 bytes, 500118192 sectors
Disk model: KBG30ZMV256G TOSHIBA                    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 41165ADD-1EAB-4B01-AA1B-C1133C8814A4

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048    534527    532480   260M EFI System
/dev/nvme0n1p2    534528    567295     32768    16M Microsoft reserved
/dev/nvme0n1p3    567296 302792703 302225408 144.1G Microsoft basic data
/dev/nvme0n1p4 463687680 500117503  36429824  17.4G Linux filesystem
/dev/nvme0n1p6 364685312 372117503   7432192   3.6G Linux swap
/dev/nvme0n1p7 372117504 461680639  89563136  42.7G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/sda: 28.84 GiB, 30943995904 bytes, 60437492 sectors
Disk model: DataTraveler 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0019b164

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *         128 60437413 60437286 28.8G  7 HPFS/NTFS/exFAT
/dev/sda2       60437414 60437476       63 31.5K ea Rufus alignment

Thank you!

  • Please [edit] your question and tell us _exactly_ what you have done so far so we know where you're at. There's no reason any of your software will have been affected apart from the kernel itself if you really just deleted a separate `/boot` partition. – terdon Feb 19 '22 at 17:24
  • thank you, i just edited with the steps i have tried so far – tribeca2002 Feb 19 '22 at 17:34
  • Also I am not sure if this is important, but i had to enable legacy boot in BIOS for the live USB to work. – tribeca2002 Feb 19 '22 at 17:53
  • So I am guessing you have booted into a live system, right? That's the kind of detail we need to see _here_. If that is the case, what were the contents of `/mnt` after you mounted `/dev/nvme0n1p4 mnt/` there? Did it contain directories like `/mnt/etc` or `/mnt/dev`? Does it look like your root system? – terdon Feb 19 '22 at 18:07
  • I booted into a live system yeah. I am on live lubuntu now, where as my old machine i used linux mint. – tribeca2002 Feb 19 '22 at 18:12
  • When I do`sudo mount /dev/nvme0n1p4 mnt/` it appears to work, but then when i do `ls mnt/` there are no files, everything is empty. How can that be? – tribeca2002 Feb 19 '22 at 18:14
  • Please add all of this to your question. Try mounting the other partitions to different locations. One of them should have your old `/` partition. – terdon Feb 19 '22 at 18:18
  • This is really weird. I tried mounting and unmounting every single partition to mnt. They all work. nvme0n1p7 is my home folder, and i have luckily all my files there still. But when i mount root, it is completely empty. Does this mean I deleted root by accident ? – tribeca2002 Feb 19 '22 at 18:48
  • Maybe. We don't know cause you haven't told us what you did. Was your `/boot` in a separate partition or not? Do you remember what you ran? – terdon Feb 19 '22 at 19:02
  • Originally i was using my machine normally. I was getting messages saying filesystem root was low on space, so i removed some things. I went to / and then to the /boot/ folder and i deleted some things including the kernel i believe. When i tried to re-boot, this whole thing happened and I had to boot from a live USB using another distro and now I am stuck here. I can't remember what I removed exactly. – tribeca2002 Feb 19 '22 at 19:13
  • OK, please add all of this to your question and make sure you are giving the right paths. You mention `sudo mount /dev/nvme0n1p4 mnt/` but then show a screenshot of `ls la /mntx` instead of `/mnt`. – terdon Feb 19 '22 at 19:16
  • the /mntx is because i created a new folder just in case – tribeca2002 Feb 19 '22 at 19:25
  • I just added all this to EDIT 3 in my post. I guess it really is deleted. In case it is, i do not mind as my files in /home are still there, but it means i have lost all my programs. Can I re-install another distro on that partition (nvme01p4) ? – tribeca2002 Feb 19 '22 at 19:29
  • Make sure you copy your remaining files in /home elsewhere (on some usb stick or SD card): in case there's a mistake done when reinstalling, you'll still have your data. – A.B Feb 20 '22 at 00:55

0 Answers0