Cant do fresh install, it fails to create /dev/sda1

Hi all,

Unfortunetely, yesterdey my system crushed.

I was not able to recover it (luckely I was able to save my data). So decided to do a fresh install. But its turned out that it is not possible either. Here is how the calamares exits with error.

I tried also Ubuntu, OpenSuse, older versions of Manjaro all ended with the same error.
Mxlinux said that there is an error in the drive, if I continue I will lose all data. I didn't mind that, so I pressed yes and visually I was able to install mxlinux on my system (by doing full format). But after reboot, I was again seeing manjaro grub, and all my files and were there. so basically it was not formatted.

I must also say, that recently I installed manj-grub package from repositories, that adds an image in the grub menu and modifies the look. and now when I say I see manjaro grub, that is what I mean (not the usuall one that comes out of box).

In the mxlinux there was a tool for configuring grub, and there I was seeing manjaro-grub files, I tried to delet them. and it was saying that they are deleted, but after reboot they again appear.

follwing manjaro wiki I chrooted my system, and here is how my partitions look like
from chroot

[root@manjaro /]# lsblk -f
NAME   FSTYPE   LABEL    UUID                                 MOUNTPOINT
sda                                                           
├─sda1 ext4              aa7f85c2-6817-416c-af1c-1edb962b873e /
└─sda2 swap              14ff4d95-33ea-4fa2-9abe-85e162857b7c [SWAP]
sdb    iso9660  MJRO1610 2016-11-27-10-38-18-00               
├─sdb1 iso9660  MJRO1610 2016-11-27-10-38-18-00               
└─sdb2 vfat     MISO_EFI 16A4-48A8                            
loop0  squashfs                                               
loop1  squashfs                                               
loop2  squashfs                                               
loop3  squashfs     

I have one boot partition and swap. the default what calamares creats when one choses erase full disk option.

I also tried to manually modify partitions, no luck.
now I am on live usb, with manjaro kde 16.10.3. my system is not mounted. if I try to use Kpartition manager to modify my drive here what it says.

Initially it looks like this

than I am deleting both partitions and pressing apply.

Delete partition ‘/dev/sda1’ (229.67 GiB, unknown) 
Job: Delete file system on ‘/dev/sda1’ 
Delete file system on ‘/dev/sda1’: Success

Job: Delete the partition ‘/dev/sda1’ 
Delete the partition ‘/dev/sda1’: Success
Delete partition ‘/dev/sda1’ (229.67 GiB, unknown): Success

Delete partition ‘/dev/sda2’ (8.80 GiB, linuxswap) 
Job: Delete file system on ‘/dev/sda2’ 
Delete file system on ‘/dev/sda2’: Success

Job: Delete the partition ‘/dev/sda2’ 
Delete the partition ‘/dev/sda2’: Success
Delete partition ‘/dev/sda2’ (8.80 GiB, linuxswap): Success

it reports they both susscesfully deleted.

and after pressing ok, here they are

and if I also try to create new partition, it again ends in error

Job: Create new partition on device ‘/dev/sda’ 
Failed to add partition ‘New Partition’ to device ‘/dev/sda’. 

Can't have overlapping partitions. 

Failed to add partition ‘New Partition’ to device ‘/dev/sda’. 
Create new partition on device ‘/dev/sda’: Error
Create a new partition (238.47 GiB, btrfs) on ‘/dev/sda’: Error

it says overlapping partion, and I guess it is new one that I am trying to create and the existing one that I want to delete. it seems it cant delete, although it sees it as deleted, and when it tries to create new partition, it discovers that there is already one there, and gives overrlaping error.

As for the initial problem, here are some outputs that could be usefull.

sudo fdisk -l
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 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: 0x487b4eeb

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2049 481648511 481646463 229.7G 83 Linux
/dev/sda2       481648512 500103449  18454938   8.8G 82 Linux swap / Solaris


Disk /dev/loop0: 10 MiB, 10469376 bytes, 20448 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


Disk /dev/loop1: 224.8 MiB, 235671552 bytes, 460296 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


Disk /dev/loop2: 1.4 GiB, 1511280640 bytes, 2951720 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


Disk /dev/loop3: 372.1 MiB, 390168576 bytes, 762048 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


Disk /dev/sdb: 3.8 GiB, 4037017600 bytes, 7884800 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: 0x459c6e4a

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *        0 4332607 4332608  2.1G  0 Empty
/dev/sdb2         224   63711   63488   31M ef EFI (FAT-12/16/32)

checking the partition

sudo fsck.ext4 -v /dev/sda1
e2fsck 1.43.3 (04-Sep-2016)
/dev/sda1: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? yes
fsck.ext4: unable to set superblock flags on /dev/sda1


/dev/sda1: ********** WARNING: Filesystem still has errors **********

looking for backups

sudo mke2fs -n /dev/sda1
mke2fs 1.43.3 (04-Sep-2016)
/dev/sda1 contains a ext4 file system
        last mounted on / on Thu Dec 15 09:45:34 2016
Proceed anyway? (y,n) y
Creating filesystem with 60205807 4k blocks and 15056896 inodes
Filesystem UUID: 3d4dd612-81d6-4c98-994b-65713502a519
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872

Seems, there are a lot of backups, but non of them is working

sudo e2fsck -b 2654208 /dev/sda1
e2fsck 1.43.3 (04-Sep-2016)
Superblock needs_recovery flag is clear, but journal has data.
Recovery flag not set in backup superblock, so running journal anyway.
/dev/sda1: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Recovery flag not set in backup superblock, so running journal anyway.
Superblock needs_recovery flag is clear, but journal has data.
Recovery flag not set in backup superblock, so running journal anyway.
e2fsck: unable to set superblock flags on /dev/sda1


/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****

/dev/sda1: ********** WARNING: Filesystem still has errors **********

so I dont know how proceed next? Can you please, suggest me how can I fix this?

Here is my system info from live enviroment. the installed is the same after 12.12 update.

System:    Host: manjaro Kernel: 4.4.33-1-MANJARO x86_64 (64 bit gcc: 6.2.1)
           Desktop: KDE Plasma 5.8.4 (Qt 5.7.0) Distro: Manjaro Linux
Machine:   Device: laptop System: Acer product: Aspire V3-372 v: V1.01
           Mobo: Acer model: Aspire V3-372 v: V1.01 UEFI [Legacy]: Insyde v: V1.01 date: 09/17/2015
Battery    BAT0: charge: 29.7 Wh 100.0% condition: 29.7/33.1 Wh (90%) model: SANYO AC14B3K status: Full
CPU:       Dual core Intel Core i5-6200U (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9604
           clock speeds: max: 2800 MHz 1: 499 MHz 2: 499 MHz 3: 499 MHz 4: 499 MHz
Graphics:  Card: Intel HD Graphics 520 bus-ID: 00:02.0
           Display Server: X.Org 1.18.4 driver: intel Resolution: 1920x1080@60.02hz
           GLX Renderer: Mesa DRI Intel HD Graphics 520 (Skylake GT2)
           GLX Version: 3.0 Mesa 13.0.1 Direct Rendering: Yes
Audio:     Card Intel Sunrise Point-LP HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.4.33-1-MANJARO
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: 3000 bus-ID: 02:00.0
           IF: enp2s0 state: down mac: <filter>
           Card-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter driver: ath10k_pci bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: NA (-)
           ID-1: /dev/sda model: KINGSTON_RBU size: 256.1GB
           ID-2: USB /dev/sdb model: Flash_Disk size: 4.0GB
Partition: ID-1: / size: 5.8G used: 116M (2%) fs: overlay dev: N/A
Sensors:   System Temperatures: cpu: 56.0C mobo: 50.0C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 179 Uptime: 38 min Memory: 1657.7/7902.6MB Init: systemd Gcc sys: 6.2.1
           Client: Shell (bash 4.4.51) inxi: 2.3.4

People have recommended to me not to use KDE partition manager and instead to use GParted for partition management. Allegedly it can cause errors. Maybe try booting into a Live environment and using GParted to blow away what is currently there, create a new single partition and format it with a new file system.

Are you sure the disk is not failing?

I tried with gparted as well, the same result..[quote="sueridgepipe, post:2, topic:14207"]
Are you sure the disk is not failing?
[/quote]

what you mean? the data on the disk is there, I can accses it copy nescessery files, etc etc.. but somehow I am not able to format it. :confused:

Physical errors on the disk.

It is certainly a weird one.

Is your machine Windows dual boot? Just thinking out loud, but you could try and repartition and reformat it there. Just spit balling.

no it is only manjaro there,
what about errors, I dont know, it was functioning properly, and I have never had that kind of issue. So it seems ther are not physical errors on it. at least I run the memtest from grub menu and it says there are no errors

Maybe try something like this...

http://www.dedoimedo.com/computers/low-level-formatting.html

This will basically zero out the entire physical contents, which may leave it in a state that will be receptive to GParted working again.

Read this carefully though and heed the warnings contained within.

EDIT:

Also found this, but I accidently closed the search tabs after pasting so don't know where I got it.

2 Likes

Thanks a lot, I will look to this.

Memtest will not reveal any potential problems with HDD. Memtest loads into memory and tests the memory. As you started describing your problem, with my very limited knowledge I started to wonder if there is some kind of physical problem with HDD or cable (if it is not M2) or controller (which would mean motherboard). Usually physical problems are related to HDD device.

Good you tried with gparted. Partitions may now be so messed up that you may need to redo everything. It is not hard, but I may have hard time explaining it.

Use Gparted and under Device, choose: "New Partition Table" then based on your hardware and BIOS you need to choose older (msdos mbr) - per memory, or newer can't recall the name. Beware, you will lose ALL data and ALL partitions. All installations, everything will be gone! Even some partitions mistakes me be gone :wink:

Everything will be wiped out and you will then be able to set new partitions and format them. I suggest always using Gparted for partitioning, like others suggested before.

See if your bios have some option to track, collect S.M.A.R.T. health data about your HDD. If so make sure it is enabled. Then you can within OS like Manjaro access this data which could point out to some possible physical problems with your HDD. Sorry my response is vague, I'm going by memory that is not serving me that well any more.

"low level formatting" - in old days this was popular tool to try to get HDD in better shape but it could be two sided edge as low level formatting would mask bad sectors as OK, which were not and you could later have some headache because of this. Especially if some very important piece of information was going to be written onto one of these marked as OK bad sectors. :wink: :anguished:

But later, with technology changes I though that low level formatting was not suppose to be done any more on modern hard disk drives? And I would guess, it is not even possible to do on SSD's? Well i'm guessing this last part.

Cool, thank for sharing, witting this down into my cheet sheet file :slight_smile:

Yeah, maybe runsudo badblocks then before attempting any sort of low level formatting to mitigate. You are completely right with the SSD point, I would personally never low level format an SSD, I should have mentioned that. A failing SSD is generally very difficult to diagnose anyway, at least when compared with a mechanical HDD.

Might as well try in Gparted > Device > create partition Table > msdos since we're nuking it anyway.

1 Like

I tried this, when it was checking the first test, it found a lot of errors, but the last 3 tests were ok. afterwards I tried gparted. and no sucsess again.
I tried to delete partitions. it was saying operation is sucsessfull, and again showing me the old partitions. :confused:
and it didn't deleta any data,my all data is still there

didn't wotk :frowning: when I chose to create new partition table, it says operation is sucsessfull but I dont see any difference. and data is still there.

I only have 2 partitoins, the first one, /dev/sda1 is where root partition, where is also my boot and home and there is /dev/sda2 which is swap.
Kpartition manager shows only these too, but Gparted also shows that there are 2 allocated valumes, one of them 1Mb the other 7 Mb.

I couldn't find something like this in my bios. actually Acer has very strange bios, many settings are hidden. (for example I cant turn on virtualization tools, as they are in hidden advanced options, which of course I can turn on, unless I do some changes in bios configurations :confused: (the only waz I found is to enter system with live usb and change some stuff in bios, but I decieded do not risk))

I have SSD and seems it is M.2, whatever that means. so I dont know what to do the next.
when I am booting live usb, I can see the filesystem of /dev/sda1. I can enter there, copy files and add new files. so I guess SSD works, or at least I can read&write there. but doesn't allow to modify partitions.

I tried to boot with mxlinux live usb as well, if I try to install it it does SMART check, and it reports that my drive fails basic check.

wow. Maybe some other option besides msdos then ? Because after this step your hard drive should have absolutely nothing. Nada. Zilch.

With my limited knowledge I would guess, your HDD is not working properly. Because of this you can't set new partition table.

M.2 just means that is it different type of SSD, it is similar shape as memory chip, not like regular SSD. On some systems M.2's can't be removed but on most they can. My guess is, your SSD is malfunctioning and you will need a new one.

tried all of them, and non of them is working.
actually it says operation is ok, when I press ok, it shows old partitions again. :confused:

seems, you are right. as a last resource, I am again running the install of mxlinux, there is an option for checking badblocks, hope this will have some effect.(but should be the same commands as @sueridgepipe was suggesting)

That S.M.A.R.T. feature that HDD's have is early warning that something is wrong. You don't always get a warning, but when you do, you know that your data is at higher risk than usually. So even if you do get it to work, be careful and have backups done often. I know if I would be getting warning from SMART I would be replacing HDD right away before it dies on me at the worst possible time.

actually, now it is one of the worst possible moments for me, but at least I have my data and can use it on the other laptop. anyway I guess I need to buy a new ssd, and surely not kingsoft. :slight_smile:
on the other hand my laptop is still under warranty, I hope they can replace it.

Just another strange thing to report.
today I chrooted my system again, and using terminal called some apps, and they were working :confused:
maybe there is something very simple, that we are missing?

Forum kindly sponsored by