Page 1 of 1

[Solved] Corrrrupted {mucked up} fstab file

PostPosted: Jan 30th, '21, 06:00
by nigelc
Hello,
I was trying to move the fstab file. This is what is was:
Code: Select all

# Entry for /dev/sda1 :
UUID=2bb07894-5cbe-4359-8db8-8adb82b7673f / ext4 defaults 1 1
# Entry for /dev/sdb1 :
UUID=1db2ed92-3662-4a0b-b50c-5a2f4de6a797 /home ext4 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=ea7969f3-1364-4e4c-a799-0b0073ef1b43 swap swap defaults 0 0



And this what it is now:
Code: Select all
# Entry for /dev/sda1 :
UUID=2bb07894-5cbe-4359-8db8-8adb82b7673f / ext4 defaults 1 1
# Entry for /dev/sdb1 :
UUID=1db2ed92-3662-4a0b-b50c-5a2f4de6a797 /home ext4 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=ea7969f3-1364-4e4c-a799-0b0073ef1b43 swap swap defaults 0 0


Here is copy of fdisk

Code: Select all

root@localhost ~]# fdisk -l
Disk /dev/ram0: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram1: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram2: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram3: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram4: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram5: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram6: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram7: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram8: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram9: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram10: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram11: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram12: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram13: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram14: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram15: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Disk model: Samsung SSD 840
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: 0x0009091e

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1  *     2048 16370234 16368187  7.8G 83 Linux


Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1ER1
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: dos
Disk identifier: 0x0008a67f

Device     Boot Start End Sectors Size Id Type
/dev/sdb1  *        0   0       0   0B  0 Empty




Disk /dev/sdc: 3.7 GiB, 4004511744 bytes, 7821312 sectors
Disk model: Cruzer         
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: 0x00000000

Device     Boot Start     End Sectors  Size Id Type
/dev/sdc1          32 7821311 7821280  3.7G  b W95 FAT32
[root@localhost ~]#
Div


root@localhost ~]# fdisk -l
Disk /dev/ram0: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram1: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram2: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram3: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram4: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram5: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram6: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram7: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram8: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram9: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram10: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram11: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram12: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram13: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram14: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/ram15: 31.3 MiB, 32768000 bytes, 64000 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


Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Disk model: Samsung SSD 840
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: 0x0009091e

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1  *     2048 16370234 16368187  7.8G 83 Linux


Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1ER1
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: dos
Disk identifier: 0x0008a67f

Device     Boot Start End Sectors Size Id Type
/dev/sdb1  *        0   0       0   0B  0 Empty




Disk /dev/sdc: 3.7 GiB, 4004511744 bytes, 7821312 sectors
Disk model: Cruzer         
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: 0x00000000

Device     Boot Start     End Sectors  Size Id Type
/dev/sdc1          32 7821311 7821280  3.7G  b W95 FAT32
[root@localhost ~]#

It says:
drive /dev/sdb1 is empty

Can I just copy the old partition over the new one?
Thanks in advanced.
Nigelc

Do the partitions need to be re-formated?
thanks in advance.

Re: Corrrrupted {mucked up} fstab file

PostPosted: Jan 30th, '21, 16:42
by doktor5000
You should add an explanation what you actually want to do. What do you mean by moving the fstab file, move it where ? The two fstab contents you posted are the same.

Do you want to copy over the contents of those partitions ? If so, from where to where ?

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 1st, '21, 02:53
by nigelc

Hello,
Here is a copy the bad fstab file that the system is using.
Entry for /dev/sda1 :
UUID=a78c6364-6bb2-4270-92b5-675d4d68fcc2 / ext4 relatime,acl 1 1
none /proc proc defaults 0 0
[nigel@localhost ~]$


cheers.

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 1st, '21, 18:20
by doktor5000
Ok, and what's the relation from this / partition with UUID a78c6364-6bb2-4270-92b5-675d4d68fcc2 to the 2 fstab contents that you posted previously?
You're missing some important pieces here ...
doktor5000 wrote:You should add an explanation what you actually want to do.
[...]
Do you want to copy over the contents of those partitions ? If so, from where to where ?

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 2nd, '21, 02:54
by nigelc
I just wanted restore it back to what it was. I was trying to move the swap partition to a drive which is a lot bigger, or get rid the swap swap partition all together;
[code]
I've just notice the drive is filling up. /dev/sda1"
I've posted both versions of the fstab
cheers.

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 2nd, '21, 10:16
by tis
Hi,

Please excuse me, but I don't really understand what have you done and what would you like to do. Where and how did sda5 miss?

If you would like to create/copy/move/resize partitions you should try a graphical user friendly util e.g. gparted.

But the best way to create mounted partitions on non-removable disks is Mageia Control Center->Local Disks->Manage Partitions! (it can modify fstab as it needed)

Please keep saving your data in your mind, manipulating partitions can cause data loss!

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 2nd, '21, 15:30
by tis
Another good questions are:
- Is your computer (mainboard's bios) compatible with 2TB Disks?
- Is your system (kernel) compatible with 2TB disks and GPT?
I should suppose that you have good or new enough computer, but if it is an old computer you should check it.

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 3rd, '21, 17:02
by tis
And I couldn't leave it, always trying to guess what has happened. :-)

Fist of all, the fstab is only a default config for how to mount partitions, - containing device, mountpoint, fs, options, - and as I can see it could be good, but maybe the system cannot pair with physical partitions. That's my problem too.

Can you get uuid's and pair with devices like mine?
Code: Select all
blkid
/dev/nvme0n1: PTUUID="9cc61f7b-dbed-437a-a5c6-666b6e??????" PTTYPE="gpt"
/dev/nvme0n1p1: PARTUUID="e56a3f76-6960-4883-8ce2-a5551a??????"
...
/dev/md126: PTUUID="9b9197??" PTTYPE="dos"
/dev/md126p1: UUID="8266c7db-714d-4e3f-87d9-fb97??????" TYPE="ext4" PARTUUID="9b9197??-01"


As you can see my ssd has a gpt partition table and the partitions below, and my raid has dos mode MBR to store partitions and them below. It could help to solve which partitions are missing.
You could ask for hdd2:
Code: Select all
blkid /dev/sdb


Second, the 2TB hdd listed as it in dos mode partition table with a 0 size partition, I'm not sure but it's because it is recognized wrongly and the gpt is containing the correct partition table?
- did you move the partition on different machine, could it be that the other computer converted/moved pt to gpt?
- did you change anything in bios before it gone? (efi boot, classic compatible boot)
- have you booted from the same hardisk?

I hope I could help to find how to solve...

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 4th, '21, 02:24
by nigelc
The system has been working like it was for years.
There were some gaps in in between the sectors.
Lots of of people wipe their partition table accidentally.

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 4th, '21, 09:18
by tis
Yeah, the accident. I hope you could repair it.

If the problem still remains, I can say that overwriting pt is big problem, you can search "hdd/partition recovery linux" in search engine for utility which may recover something or you find somewhere a guru/professional in hdd raw editing.
(it may depends on what really happened, what utility used, what problem happened. Some pt mod util make backup before start, gpt has a secondary pt and ...)

If you could accept loosing your data on hdd2 you can delete and recreate partition on it with MCC->partition manager.
TY

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 5th, '21, 05:22
by nigelc
Well i think that the data is now all gone. The config as it now
has been like that like for years.
There seems to be some difference between the partitioning utilities.
I can't really get into the system because of that bug " locking up at the login prompt"

cheers
.

Re: Corrrrupted {mucked up} fstab file

PostPosted: Feb 5th, '21, 09:36
by tis
Hi,

I don't know what bug do you have, If you hint to "loginctl unlock-session c2", you have to login only at another terminal screen e.g. tty2, switching with ALT+F2 or maybe CTRL+ALT+F2 and then you have to unlock session as I've written at your Chrome story (viewtopic.php?f=7&t=13854).
Code: Select all
(sudo) loginctl unlock-session c2
(sudo) loginctl unlock-sessions

I don't know where is a problem at you, why can't you type this. In this case please answer at original topic...
TY

PS. In this week I get out my very old computer from cupboard (32bit from ~2004, just a standby) and tried the upgrade 6->7 and got that message and it solved...