Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: Corrupted ext4 HDD during Ubuntu installation

  1. #1
    Join Date
    Apr 2018
    Beans
    15

    Post Corrupted ext4 HDD during Ubuntu installation

    Hello,

    I have installed Lubuntu 16.04 on a new Windows 10 machine. I did some mistakes during the install.. I wanted to keep Ubuntu as primary while win10 as secondary - But did some mistakes with the UEFI and ended up messing up with the Win10 partition. After few attempts, I managed to only have Lubuntu 16.04 working from a USB stick on this machine now.. The 1Tb hdd is all ext4 now but has some 17Gb used..

    I am now trying to install Win 10 as Secondary while keeping Lubuntu 16.04 primary from the USB stick. But I want to recover the 17Gb on the installed 1Tb HDD if possible. But the problem is that 17Gb seems unreadable.. And also getting some e2fsck errors when trying to resize the 1Tb partition...

    Here are some outputs..

    Code:
    700-15ISK:~$ sudo fdisk -l
    
    
    Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 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: 635C934E-A96C-4266-BD7B-7CFA12506907
    
    
    Device       Start        End    Sectors  Size Type
    /dev/sda1     2048    1050623    1048576  512M EFI System
    /dev/sda2  1050624 1953523711 1952473088  931G Linux filesystem
    
    
    
    
    Disk /dev/sdb: 57.9 GiB, 62109253632 bytes, 121307136 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: 0xa764d48d
    
    
    Device     Boot   Start       End   Sectors  Size Id Type
    
    
    /dev/sdb1          2048   3999743   3997696  1.9G 82 Linux swap / Solaris
    /dev/sdb2       3999744 121305087 117305344   56G 83 Linux
    
    
    700-15ISK:~$ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sdc2 during installation UUID=6a6ab507-34c2-47a1-9ae3-8bb9a6814c27 / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/sda1 during installation UUID=12BE-EF3C /boot/efi vfat umask=0077 0 1 # swap was on /dev/sdc1 during installation UUID=b41e6898-55ce-4efc-a683-0141ca5806aa none swap sw 0 0
    700-15ISK:~$ sudo mkfs -n /dev/sda2 mke2fs 1.42.13 (17-May-2015) /dev/sda2 contains a ext4 file system last mounted on /media/humanoid/3dfca893-fa27-4094-98b0-086695db9500 on Tue Apr 24 02:50:14 2018 Proceed anyway? (y,n) y Creating filesystem with 244059136 4k blocks and 61022208 inodes Filesystem UUID: 2487d1f0-dd16-4444-bf55-ce89b6b6d277 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Corrupted ext4 HDD during Ubuntu installation

    You show sdc & sda as drives, do you have 3 drives or is one your flash drive installer?

    Post this:

    lsblk -f

    Often with multiple drives, better to disconnect other drives and install just to the one drive, unless you really want both installs on same drive and other drives as data only. Even my data only larger drives have a small install of Ubuntu, possibly test or emergency boot.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Apr 2018
    Beans
    15

    Re: Corrupted ext4 HDD during Ubuntu installation

    sdc could be the live usb which I used to setup initially. But I never used it afterwards and have no plans to do so.


    Code:
    700-15ISK:~$ lsblk -f
    NAME   FSTYPE LABEL UUID                                 MOUNTPOINT
    sdb                                                      
    ├─sdb2 ext4         6a6ab507-34c2-47a1-9ae3-8bb9a6814c27 /
    └─sdb1 swap         b41e6898-55ce-4efc-a683-0141ca5806aa [SWAP]
    sda                                                      
    ├─sda2 ext4         3dfca893-fa27-4094-98b0-086695db9500 /media/userxx/3dfca893-fa27-4094-98b0-086695db9500
    └─sda1 vfat         12BE-EF3C                            /boot/efi
    Last edited by webber42; April 26th, 2018 at 06:07 PM.

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Corrupted ext4 HDD during Ubuntu installation

    Is your 17GB of data in / or sdb2 or your data partition sda2 which you have reformatted?

    Did you run the full fsck like these 2 commands?

    To see all the ext4 partitions
    sudo parted -l
    #From liveDVD/Flash so everything is unmounted,swap off if necessary, change example shown with partition sdb2 to your partition(s)
    #e2fsck is used to check the ext2/ext3/ext4 family of file systems. -p tries fixes where response not required
    sudo e2fsck -C0 -p -f -v /dev/sdb2
    # -y auto answers yes for fixes needing response, also see man e2fsck
    sudo e2fsck -f -y -v /dev/sdb2
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Apr 2018
    Beans
    15

    Re: Corrupted ext4 HDD during Ubuntu installation

    The 17Gb is in sda2.

    Code:
    700-15ISK:~$ sudo parted -l
    
    
    Model: ATA TOSHIBA MQ02ABF1 (scsi)
    Disk /dev/sda: 1000GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    Disk Flags: 
    
    
    Number  Start   End     Size    File system  Name                  Flags
     1      1049kB  538MB   537MB   fat32        EFI System Partition  boot, esp
     2      538MB   1000GB  1000GB  ext4
    
    
    
    
    Model: SanDisk Ultra Fit (scsi)
    Disk /dev/sdb: 62.1GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags: 
    
    
    Number  Start   End     Size    Type     File system     Flags
     1      1049kB  2048MB  2047MB  primary  linux-swap(v1)
     2      2048MB  62.1GB  60.1GB  primary  ext4
    No i have not run any fsck so far
    So as per your advise, should I be running
    sudo e2fsck -C0 -p -f -v /dev/sda2 ?
    Also what is the consequence of running this command ? Would I be able view the contents then ?

  6. #6
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Corrupted ext4 HDD during Ubuntu installation

    If you reformatted partition, I am not sure there will be anything to recover.

    Normally you run the e2fsck commands first.
    Then testdisk and/or photorec to see if you can recover data.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #7
    Join Date
    Apr 2018
    Beans
    15

    Re: Corrupted ext4 HDD during Ubuntu installation

    I am having trouble with e2fsck

    Code:
    700-15ISK:~$ sudo e2fsck -C0 -p -f -v /dev/sda2
    /dev/sda2 has unsupported feature(s): metadata_csum
    e2fsck: Get a newer version of e2fsck!
    
    
    700-15ISK:~$ apt-cache policy e2fsprogs
    e2fsprogs:
      Installed: 1.42.13-1ubuntu1
      Candidate: 1.42.13-1ubuntu1
      Version table:
     *** 1.42.13-1ubuntu1 500
            500 http://uk-mirrors.evowise.com/ubuntu xenial/main amd64 Packages
            100 /var/lib/dpkg/status

  8. #8
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Corrupted ext4 HDD during Ubuntu installation

    I have had that same error.

    I formatted a partition with gparted from 18.04, but then tried to run fsck from 16.04.
    Or as it says you need a newer version. Something in ext4 or e2fsck has changed enough that is now is not backwards compatible.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  9. #9
    Join Date
    Apr 2018
    Beans
    15

    Re: Corrupted ext4 HDD during Ubuntu installation

    I have e2fsck version 1.42.13 installed right now. I originally formatted the HDD using a live USB, which I no longer have. So not sure which exact version of e2fsck is needed now for Gparted to work. Can anyone please suggest the correct version or a possible solution?

    Thanks in advance.
    Last edited by webber42; April 26th, 2018 at 10:28 AM.

  10. #10
    Join Date
    Apr 2018
    Beans
    15

    Re: Corrupted ext4 HDD during Ubuntu installation

    Quote Originally Posted by oldfred View Post
    I have had that same error.

    I formatted a partition with gparted from 18.04, but then tried to run fsck from 16.04.
    Or as it says you need a newer version. Something in ext4 or e2fsck has changed enough that is now is not backwards compatible.
    I have uninstalled Gparted which I installed from the software center. I have installed Gparted 0.31.0 manually to /usr/local, in hopes that e2fsck would update accordingly. But when I try to use Gparted 0.31.0, it still gives me the same e2fsck upgrade error... Still not sure what version e2fsck is needed..
    Last edited by webber42; April 26th, 2018 at 03:02 PM.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •