1

I ran Ubuntu boot repair from a USB flash, and it results in the following log, I cant boot normally, or back up my data through live CD, as the primary hard disk is not booting correctly. I have not ever tried to install windows alongside Ubuntu at any point, I have no Idea why it's the problem with the live C.D. not detecting my existing Ubuntu

I'm trying to back up my primary hard disk which has Ubuntu on it, and I plugged into my windows laptop, and the system detected the drive, but couldn't initialize it.

Here is the my boot repair info. The screenshot is of the computer management tools in windows 7 prompting me to create a new partition table for my hard disk

enter image description here

Mitch
  • 107,631
Osama Salama
  • 155
  • 2
  • 10
  • Why do you have NTFS partitions if you don't use Windows? And on which disk should Ubuntu be? – luckyrumo Jun 29 '15 at 23:54
  • I have two hard disks, ext4 ssd named sdb above with ubuntu on it, and a NTFS hard disk named sda with no operating system, the problem is primarily on sdb, where ubuntu and grub are installed, it's failing to boot normally – Osama Salama Jun 29 '15 at 23:58
  • Maybe the partition table is damaged? I've never had that problem but afaik one can repair that. – luckyrumo Jun 30 '15 at 00:02
  • 1
    Hard boot is hard on systems, often fsck for ext4 or chkdsk for NTFS then required. Better to use safe reboot: http://en.wikipedia.org/wiki/Magic_SysRq_key Holding down Alt and SysRq (which is the Print Screen key) while slowly typing REISUB R-E-I-S-U-B to force shutdown – oldfred Jun 30 '15 at 15:10
  • @oldfred I have just tried Alt + SysRq + m which according to the wikipedia link you gave, should "output current memory information to the console". Nothing showed up in a terminal window I had open. Is there a way to determine if Alt + SysRq is the right key combo for my pc? – Organic Marble Jun 30 '15 at 16:26
  • On my system it is Ctrl+Alt+SysRq – oldfred Jun 30 '15 at 18:13
  • @oldfred Thanks very much for your comment above. On my ancient laptop running Xubuntu 22.04, the key sequence is the same as yours of holding down both Alt+SysRq and then, while still holding those two keys down, then slowly typing R E I S U B. I then saw the white-on-black shutdown show up on the screen and it rebooted the host. – bgoodr Jun 30 '23 at 15:02
  • 1
    More info on REISUB: https://askubuntu.com/questions/11002/alt-sysrq-reisub-doesnt-reboot-my-laptop & https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html Newer systems also have changed defaults. sudo nano /etc/sysctl.d/10-magic-sysrq.conf change the number in line 26 from 176 to 244 – oldfred Jun 30 '23 at 15:47

1 Answers1

2

From liveDVD/Flash so everything is un mounted,swap off if necessary, change example shown with partition sdb1 to your partition(s)

To see all the ext4 partitions

sudo parted -l

e2fsck is used to check the ext2/ext3/ext4 family of file systems. -p trys fixes where response not required Run both commands as different parameters used. New NVMe drives will be like /dev/nvme0n1pY where pY is partition.

sudo e2fsck -C0 -p -f -v /dev/sdb1
sudo e2fsck -C0 -p -f -v /dev/nvme0n1p2

if errors: -y auto answers yes for fixes needing response, also see man e2fsck

sudo e2fsck -f -y -v /dev/sdb1
oldfred
  • 12,100
  • Are you running gparted from live installer, and swap off to unmount swap? If partition corrupted best to run fsck from live installer, again with partition unmounted. Details: http://askubuntu.com/questions/642504/ubuntu-14-04-is-not-booting-normaly-after-a-manual-hard-boot/642789#642789 – oldfred Aug 04 '16 at 15:30