3

Before 2 months I ran into the same problem but was able to fix it with this post but now the problem is that I have changed the partitions a lot of times and this time I don't know which partition to chose in order to run

umount /dev/sdb1
fsck -y /dev/sdb1
reboot

My has Live USB has Debian on it not Ubuntu(mate).

This shows up when I run fdisk -l :

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 458B59B1-67D7-477A-AB1D-9A0162E18E97

Device         Start       End   Sectors   Size Type
/dev/sda1       2048   1050623   1048576   512M EFI System
/dev/sda2    1050624 969574399 968523776 461.8G Linux filesystem
/dev/sda3  969574400 976771071   7196672   3.4G Linux swap

Disk /dev/sdb: 3.7 GiB, 4004511744 bytes, 7821312 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
Disklabel type: dos
Disk identifier: 0x0a9a1b1a

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1  *         64 6324223 6324160    3G 17 Hidden HPFS/NTFS
/dev/sdb2       6324224 6485375  161152 78.7M  1 FAT12

Disk /dev/loop0: 2.8 GiB, 2969686016 bytes, 5800168 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

Which should I chose? Thanks

2 Answers 2

1

To run a fsck (file system check) on your Linux/Ubuntu partition:

  1. boot to the GRUB menu
  2. choose Advanced Options
  3. choose Recovery mode
  4. choose root access
  5. type fsck -fy /dev/sda2
  6. do step 5 more than once if there were errors

If you've changed partitions "a lot of times", did you remember to edit /etc/fstab and make sure that the UUID's correctly match the output of sudo blkid?

Lastly, you could have problems with your two "Windows" partitions on /dev/sdb1 and /dev/sdb2.

0

In my case, I have a duel boot with Windows 10 and Ubuntu 20.04 on a SSD, and my Ubuntu "Home Directory" on a large hard drive, partitioned half for the Windows OS storage. After reading some info and a bit of fumbling about, I found an error showed in the sdb1 drive.

I was able to run fsck -y /dev/sdb1. I don't know why, (I am just a average user), but that command moved my entire "Home Directory" to a hidden "lost and found" folder. I was able to boot up Ubuntu but the OS was as if I was booting for the fist time. My desktop was gone and nothing worked. I couldn't open the home directory, or anything else for that matter. I couldn't even shutdown or reboot. Next I booted with a live Ubuntu 20.04 thumb drive and found the home directory not showing in the storage drive. I hit control+h to see the hidden lost and found folder. Inside that I found my entire home directory, yeah so that was a relief. I reinstalled Ubuntu 20.04. I used the same username and password as the first time I installed. After the install restart, the machine booted with the fresh Ubuntu OS. Then I updated the system and rebooted. So far so good. Then I recreated the home user folder and copied the data back as it was before.

Fortunately for me I had the "Time Shift" directory on a separate partition, and three most recent image snapshots were in tact. So I installed "Time Shift" and it was able to restore my OS from the most recent image snapshot. The machine automatically restarted after the Time Shift completed it's thing. Unfortunately the machine didn't boot up to the Ubuntu OS. I just got the "Dell" logo.

Next I booted from a USB Linux Mint live OS. I thought I would need to use "grsync" to copy the user file in the home directory. First, I repeated the same steps I used to move the "Home Directory" to the storage drive (found here) the first time I did that. Then I checked the fstab file. I found the UUID number was not where the new root operating system was, so I replaced the UUID number with the UUID number where the new root OS folder (and saved the file). Then I restarted the machine. The machine booted and my old desktop was there. WOO! HOO!

I ran an apt update && apt upgrade -y command, no problem. I restarted and booted into Windows, no problems. Restarted and booted up Ubuntu, there were a few errors that flashed on the screen for about two seconds (see attached photo)photo of errors before the boot into Ubuntu 20.04 then the machine booted normally into the Ubuntu OS.

Now a couple of programs need to be reinstalled (notepaddQQ and TradingView don't open). Also, the "settings menu" would not open. I was able to reinstall the notepaddQQ, tradingview, and restore the settings menu. Other than that, I am quite pleased I got my machine back!

I hope this helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.