[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fsck error on boot: /dev/sda1: UNEXPECTED INCONSISTENCY and Partition 1 does not start on physical sector boundary



On Thu 18 Mar 2021 at 17:45:55 (+0300), IL Ka wrote:
> On Thu, Mar 18, 2021 at 5:28 PM Robbi Nespu <robbinespu@gmail.com> wrote:
> 
> > May I know why you want to check sdb instead of sda?
> >
> Oops, I made a typo:)

Oh, I thought you said that because (from the OP):

   "that so weird. I execute df -h and my drive are there. "ls /tmp"
    also work but writing anything not working, then I realize my
    system file become read only!"

   "Note : Linux installed on sdb (ext4) and sda is a NTFS file system […]"

   "sdb <-- linux installed , ext4 partition"

and because the Subject line said "fsck error on boot" which might
imply that the OP was having difficulty rebooting the machine
(hopefully that isn't so), rather than just the system reporting the
presence of a bad disk partition at startup time.

> > /dev/sdb1  *     2048 234440703 234438656 111.8G 83 Linux
> >
> Your sdb is aligned successfully
> 
> Device     Boot Start        End    Sectors   Size Id Type
> > /dev/sda1          63 1953520456 1953520394 931.5G  7 HPFS/NTFS/exFAT
> 
> This one is wrong.
> https://wiki.debian.org/DiskBlockAlignment
> 
> Old disk management tools did such alignment because they believed that any
> drive uses 512 byte sectors.
> But modern software (starting from Win7 I believe) uses 4KB alignment
> because it is compatible with advanced format and SSD.
> 
> I think you  need to fix alignment.
> 
> The easiest way to do so is to delete the partition and create a new one,
> but there are also tools to move the partition and preserve data (google
> for them)
> 
> > <https://keybase.io/robbinespu/pgp_keys.asc>

Steady on. There's likely to be a load of personal data on this drive.
That partition table looks perfectly normal for disks of a certain vintage;
here's one of mine as it appeared when it was bought in 2010:

  Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
  1 heads, 63 sectors/track, 46512336 cylinders, total 2930277168 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Disk identifier: 0x005aeb73

     Device Boot      Start         End      Blocks   Id  System
  /dev/sda1   *          63  2930272127  1465136032+   7  HPFS/NTFS

or, looked at differently:

                 First       Last
   # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag
  -- ------- ----------- ----------- ------ ----------- -------------------- ----
   1 Primary           0  2930272127     63  2930272128 HPFS/NTFS (07)       Boot
     Pri/Log  2930272128  2930277167      0        5040 Free Space           None

Of course, it's been reformatted since then, but not when it was
holding any data as yet unbacked-up.

The OP wrote "I don't want my SSD or HDD died suddenly".

Well, that's the nature of the beast, and what backups are for.
Was your fsck successful? Can you now read the files on the disk?
If so, I would work on getting them backed up, but not necessarily
trusting their contents. Older files may need checking against
previously backed-up versions. Newer one may need their contents
checking for corruption.

Then ask yourself why you're using NTFS on this disk, and whether
it might be better to adopt a different filesystem. For myself,
I only use NTFS readonly, for reading disks written on Windows.

Cheers,
David.


Reply to: