Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Can't mount partition

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Ignition
Posts: 11
Joined: 2018-12-07 12:42

[SOLVED] Can't mount partition

#1 Post by Ignition »

Hello everybody!! I'm having problems mounting a partition I've created, when running the mount command I get the following message:

Code: Select all

root@Zion:~# mount /dev/sda2 /lfs
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
           missing codepage or helper program, or other error

           In some cases useful info is found in syslog - try 
           dmesg | tail or so.
root@Zion:~#
So when I looked in blkid I noticed the partition I was trying to mount didn't has the proper filesystem:

Code: Select all

root@Zion:~# blkid
/dev/sda1: UUID="700c8c81-31f5-4ec3-83d3-26815647ad5a" TYPE="ext4" 
PARTUUID="2048ccfc-01"
/dev/sda3: UUID="9ad911a8-7d28-4777-ac62-18f3795896ef" TYPE="swap" 
PARTUUID="2048ccfc-03"
/dev/sda2: PTTYPE="dos" PARTUUID="2048ccfc-02"
I tried to change the filesystem with mkfs -t ext4 and with mkfs.ext4, and both seems to work properly at first, but the filetype of the partition doesn't show any change. I hope you could help me with this problem.

Thx a lot!! :D
Last edited by Ignition on 2018-12-08 20:40, edited 1 time in total.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Can't mount partition

#2 Post by bw123 »

Change the type code to 83 with a partition editor, and then run partprobe. You may need to reboot if you rearranged partitions. I usually reboot after editing the partition table the os is on, just to be sure. After reboot, then use mkfs and try to mount it.
http://www.tldp.org/HOWTO/Partition-Mas ... /x190.html
resigned by AI ChatGPT

milomak
Posts: 2160
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: Can't mount partition

#3 Post by milomak »

what s the output of the mkfs operation?
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

Ignition
Posts: 11
Joined: 2018-12-07 12:42

Re: Can't mount partition

#4 Post by Ignition »

The Id of the partition is 83. As shown by fdisk. I changed it several times, deleted the partition and created it again. But all with same results.


Mkfs output:

Code: Select all

root@Zion:~# mkfs -t ext4 /dev/sda2
mke2fs 1.43.4 (31-Jan-2017)
Se ha encontrado una tabla de particiones dos en /dev/sda2
Proceed anyway? (y,N) y

root@Zion:~#
As you can see it just warns me about the other partition table, and asks me if I want to proceed. And when tell it to proceed, it looks like it had worked.

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Can't mount partition

#5 Post by Segfault »

You are confusing partition type with filesystem type. To see what filesystem is on given partition use file command. Example:

Code: Select all

file -s /dev/sda2
/dev/sda2: F2FS filesystem, UUID=76b90303-9103-476d-94d4-42fb1c19399f, volume name ""

Ignition
Posts: 11
Joined: 2018-12-07 12:42

Re: Can't mount partition

#6 Post by Ignition »

No, I knew the problem was the filesystem, that's why I was trying to change it. My partition now has a filesystem "DOS/MBR", and I am trying to change it to ext4 so I can mount it.

This is the output of the file command:

Code: Select all

root@Zion:~# file -s /dev/sda2
/dev/sda2: DOS/MBR boot sector; partition 1: ID= 0X83, start-CHS (0x176,57,4), end-CHS (0x29, 45, 4), startsector 2048, 11100160 sectors; partition 2: ID=0x5, start-CHS (0x29,45,5), end-CHS (0x232, 212, 34), startsector 11102208, 8380416 sectors, extended partition table  
Thanks for all your help

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Can't mount partition

#7 Post by Head_on_a_Stick »

Ignition wrote:My partition now has a filesystem "DOS/MBR", and I am trying to change it to ext4 so I can mount it
:?

To mount FAT filesystems, install the dosfstools package.
Last edited by Head_on_a_Stick on 2018-12-08 12:26, edited 1 time in total.
deadbang

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Can't mount partition

#8 Post by Segfault »

According to file -s output your sda2 is extended partition, it cannot be used for a filesystem, you need to create another partition on it or delete it and create a primary partition instead.

Ignition
Posts: 11
Joined: 2018-12-07 12:42

Re: Can't mount partition

#9 Post by Ignition »

Head_on_a_Stick wrote:
Ignition wrote:My partition now has a filesystem "DOS/MBR", and I am trying to change it to ext4 so I can mount it
:?

To mount FAT filesystems, install the dosfstools package.
The thing is that I want to change the filesystem of the partition, so I can mount it with that specific FS.
Segfault wrote:According to file -s output your sda2 is extended partition, it cannot be used for a filesystem, you need to create another partition on it or delete it and create a primary partition instead.
Yeah!, thanks to that I realize that there are two partitions in the sameone. There is one as primary partition and a second one as an extended partition.

Ignition
Posts: 11
Joined: 2018-12-07 12:42

Re: Can't mount partition

#10 Post by Ignition »

Ok.. this is embarrassing, but it was a matter of language. After several tryings with mkfs swapping from one fs to another (but not reaching the ext2, ext3, ext4), I wondered what would happen if, when it ask me the question:

Code: Select all

root@Zion:~# mkfs -t ext4 /dev/sda2
mke2fs 1.43.4 (31-Jan-2017)
Se ha encontrado una tabla de particiones dos en /dev/sda2
Proceed anyway? (y,N) 

root@Zion:~#


Instead of' 'y' for yes, I pressed 's' for si (yes in spanish).

So as my SO is in spanish, and has that little language bug, it didn't accepted 'y' as a correct answer.

Thanks a lot for your time.

Post Reply