LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-17-2019, 10:42 AM   #1
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Rep: Reputation: Disabled
Error in Ubuntu partitions in linux


As far as I can remember, just before the problem arrived I was casually using Ubuntu when suddenly applications weren't opening, there were a lot of errors during shutdown as well (So, I took out the battery of my laptop)
Afterwards when I turned my pc on, GRUB RESCUE mode was displayed. I ran "boot repair" application in Ubuntu live but now the pc directly boots into Windows.
In "disk management" of Windows, all partitions are shown correctly whereas in Ubuntu live, File manager didn't show the partitions and even "gparted" doesn't run. Gparted shows "Libparted error" "Input/Output error read in sda"(I haven't written the error message correctly but it was similar to this.)
Any help will be highly appreciated. Thanks
 
Old 02-17-2019, 01:58 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,396

Rep: Reputation: 1700Reputation: 1700Reputation: 1700Reputation: 1700Reputation: 1700Reputation: 1700Reputation: 1700Reputation: 1700Reputation: 1700Reputation: 1700Reputation: 1700
Run boot repair using the Create BootInfo Script option and post the link you get when it finishes which should show enough information for someone to help. Do you get correct output with fdisk or parted commands?
 
Old 02-17-2019, 02:10 PM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,903

Rep: Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075
That looks bad. Either a disk problem or you've been hacked, at a quick guess.

If you get any more error messages, write them down!

If you have nothing of importance saved in Ubuntu, you can FORMAT, check and reinstall Ubuntu. If you want stuff saved in /home, go in with the install cd. You can open a terminal or select expert mode (even if you're not). I hope you remember your linux partitions. you can run e2fsck on them; don't select the 'do it automatically' options. you want to get the files you want on to backup medium, and check the disk. Fixing a few errors is ok; fixing mad numbers of errors is a waste of time.
 
Old 02-17-2019, 07:26 PM   #4
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Run boot repair using the Create BootInfo Script option and post the link you get when it finishes which should show enough information for someone to help. Do you get correct output with fdisk or parted commands?
I've ran the bootinfoscript directly instead. The result is attached here
Attached Files
File Type: txt RESULTS.txt (10.9 KB, 8 views)
 
Old 02-17-2019, 07:32 PM   #5
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
I thought running the SMART test for HDD was a good choice so, I did it for my windows partitions, results showed no problem. I tried SMART test for my ubuntu partitions as well from "gnome disk utility" but the utility showed some interesting stuffs.
First off all the partition type of sda6 is unknown.
Second, there are free spaces.
Thought this info might help y'all.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2019-02-18 01-27-08.png
Views:	13
Size:	130.8 KB
ID:	29845  
 
Old 02-17-2019, 09:50 PM   #6
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 948

Rep: Reputation: 239Reputation: 239Reputation: 239
Well....Obviously the file system is corrupt, maybe too many visits to porn sites
Since...there is a lot of corruption at those sites.
I think your only hope is to take the advice from a previous post, from the running live CD.
Quote:
You can run e2fsck on them; don't select the 'do it automatically' options. you want to get the files you want on to backup medium, and check the disk. Fixing a few errors is ok; fixing mad numbers of errors is a waste of time.
 
Old 02-18-2019, 01:18 AM   #7
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
That looks bad. Either a disk problem or you've been hacked, at a quick guess.

If you get any more error messages, write them down!

If you have nothing of importance saved in Ubuntu, you can FORMAT, check and reinstall Ubuntu. If you want stuff saved in /home, go in with the install cd. You can open a terminal or select expert mode (even if you're not). I hope you remember your linux partitions. you can run e2fsck on them; don't select the 'do it automatically' options. you want to get the files you want on to backup medium, and check the disk. Fixing a few errors is ok; fixing mad numbers of errors is a waste of time.
Can you guide me through the process? I went through a couple of them but couldn't understand stuffs clearly.
Thanks.
 
Old 02-18-2019, 02:04 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 11,025
Blog Entries: 7

Rep: Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777
Quote:
Originally Posted by bikal View Post
Can you guide me through the process?
http://dt.iki.fi/hard-drive-and-fs-health-checks
 
Old 02-18-2019, 05:55 AM   #9
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
If you have nothing of importance saved in Ubuntu, you can FORMAT, check and reinstall Ubuntu. If you want stuff saved in /home, go in with the install cd. You can open a terminal or select expert mode (even if you're not). I hope you remember your linux partitions. you can run e2fsck on them; don't select the 'do it automatically' options. you want to get the files you want on to backup medium, and check the disk. Fixing a few errors is ok; fixing mad numbers of errors is a waste of time.
So, I tried
Code:
sudo fdisk -l
and got the output
Code:
Device     Boot      Start        End   Sectors   Size Id Type
/dev/sda1             2048    1026047   1024000   500M  7 HPFS/NTFS/exFAT
/dev/sda2  *       1026048  496246783 495220736 236.1G  7 HPFS/NTFS/exFAT
/dev/sda3        496246784 1319542783 823296000 392.6G  7 HPFS/NTFS/exFAT
/dev/sda4       1319548865 1953523711 633974847 302.3G  f W95 Ext'd (LBA)
/dev/sda5       1319548928 1638948863 319399936 152.3G  7 HPFS/NTFS/exFAT
/dev/sda6       1638952960 1937360895 298407936 142.3G 83 Linux
/dev/sda7       1937362944 1953523711  16160768   7.7G 82 Linux swap / Solaris
So, i tried e2fsck on sda6 but the output was
Code:
e2fsck 1.44.1 (24-Mar-2018)
e2fsck: Input/output error while trying to open /dev/sda6

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>
I don't think much can be done to the partition except formatting it but, I wanted to know if I can at least recover the data before doing so.
 
Old 02-18-2019, 10:17 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,903

Rep: Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075
If you decide to pursue the e2fsck route, try with a '-b' option. Your disk is 142G; I have a 135G partition here, and presuming they're similar, your spare superblocks are at 32768;98304, and every 64k after that (add 65536 in a calculator). 32768+65536=98304; Next is 98304+65536, etc. I personally have had zero success that way. Smartctl might be a better way.

If you created a disk with special options, you're strictly on your own. That's as much as I can do for you, but there is a major outstanding issue: What caused this?

If you've been hacked, it's a big deal - you are wide open if the same attacker feels like passing through again. If your disk is dying, that's a big deal also. It's a good idea to get an external caddy & usb drive and keep backups there. With a dodgy disk, before you know it, windows will keel over, as windows is much harder on disks than linux as a rule.

In your shoes, I would grab any disk I could borrow for a week, install some distro on it or use a live dvd. You may find this good How to Save Your A** through windoze
With a linux live dvd, you can run smartctl and check the drive's health. Do deep checks; the details of what you find matters less than "No errors" or "Loads of errors"

If it's "no errors", mark this solved, and post again on the security forum. It would look like a hack if your filesystem collapsed but the disk is fine. Don't rewrite, just investigate. It's possible they can figure things from the damage. If it's "Loads of errors" look at disk replacement, or a separate disk for linux.

Either way, I'd get the piggy bank out and get a spare drive (usually offline) for backups.
 
Old 02-18-2019, 07:42 PM   #11
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
I tried checking the HDD with smartctl, no errors were found. I think of formatting the partition and re-installing ubuntu but before I find the cause of it, I might leave it all as it is. I'll be posting a new thread in the security forum as well.
Thanks for the help.
 
Old 02-18-2019, 08:39 PM   #12
1nuxg33k
Member
 
Registered: Feb 2019
Location: PNW
Distribution: Debian, CentOS, OpenSuse, Mint, LXDE
Posts: 66

Rep: Reputation: 18
Quote:
Originally Posted by bikal View Post
I tried checking the HDD with smartctl, no errors were found. I think of formatting the partition and re-installing ubuntu but before I find the cause of it, I might leave it all as it is. I'll be posting a new thread in the security forum as well.
Thanks for the help.
Just out of curiosity, What kind of hdd is it? I would also err on the side of caution with formatting and reinstalling on the same hdd with "input/output error" as many have said its corrupt and could possibly a failing drive. I'm Curious as to what dumpe2fs and fsck have to say about /dev/sda6
Code:
fsck -fV /dev/sda6

Last edited by 1nuxg33k; 02-18-2019 at 08:44 PM.
 
  


Reply

Tags
dual-boot, gparted, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
windows killed my partitions! no linux partitions found on this computer. The MJ Linux - Software 10 01-05-2007 08:31 AM
/proc/partitions showing wrong partitions netstv Linux - General 1 07-10-2006 01:11 PM
Partitions Gone, Partitions Gone PhuckFonix Linux - Newbie 8 05-22-2004 05:35 PM
Create software RAID partitions first, then create filesystem partitions on top of th stefanlasiewski Linux - Software 1 04-28-2004 04:12 PM
Partitions, partitions, partitions..... Clueless in VA Linux - Newbie 7 08-08-2001 03:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration