You are not logged in.

#1 2022-02-24 10:00:50

coxe87b
Member
From: Canberra
Registered: 2019-12-08
Posts: 92

[SOLVED] ext4 label on Microsoft filesystem

I have multiple SSDs in my computer. My Arch installation is installed on device "/dev/nvme1n1" for reference.

I was previously using my device "/dev/sda" for general data storage (games1) with a single ext4 partition, which I had labelled with the e2label utility.

I since changed my configuration and installed Windows on to sda for testing purposes and it has the following partitions;

Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 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: gpt
Disk identifier: 0C6C12D0-AE67-4DEC-AD50-A52EF4D0425A

Device     Start       End   Sectors   Size Type
/dev/sda1   2048     34815     32768    16M Microsoft reserved
/dev/sda2  34816 488396799 488361984 232.9G Microsoft basic data

As you can see, /dev/sda1 is now a Microsoft reserved partition, but the issue I have is that the ext4 label is still attached to it somehow, and the filesystem type is still being reported as ext4 by "lsblk". See below;

 ~ ∮ lsblk -f
NAME        FSTYPE FSVER LABEL     UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1      ext4   1.0   games1    b60a7035-8943-4de2-88ac-8ad28faeaf8a
└─sda2      ntfs                   5C2618A926188664
sdb
├─sdb1      ext4   1.0   Downloads 948bbe41-09bb-4aaa-93d9-24f78689403b  116.7G    35% /home/ewan/Downloads
└─sdb2      ext4   1.0   WDBlue    dd595916-2420-44cf-8aca-dfbb8eaf7997  406.1G    70% /var/cache/pacman
                                                                                       /mnt/wdblue-2tb
nvme0n1
└─nvme0n1p1 btrfs        nvme250   f265cc29-80fc-4f18-bad8-edd8fcf59852    198G     0% /mnt/nvme250
nvme2n1
└─nvme2n1p1 ext4   1.0   nvme500   1f4eb6e7-e31c-413c-bbd0-bf21cb67db5c  216.7G    43% /mnt/nvme500
nvme1n1
├─nvme1n1p1 vfat   FAT32           E91A-EFFB                             481.6M     6% /efi
├─nvme1n1p2 ext4   1.0   arch      8fc075c0-d93c-4904-bb3d-ef53c167ab55   26.6G    27% /
└─nvme1n1p3 ext4   1.0   home      59cdfadb-82fd-4638-9299-118fac82fa55  200.2G    69% /home

I have tried

 sudo e2label /dev/sda1 Win11 

with and without quotes, with just spaces instead and nothing seems to work. I can't seem to change the label and I don't know how to fix the partition being incorrectly reported as ext4 when it is actually MS reserved.
Any help would be appreciated. Thanks.

Last edited by coxe87b (2022-02-25 06:47:25)


Desktop: Dual boot {Arch & Windows 11}  |  Hyprland  |  AMD Ryzen 5700X  |  32GB DDR4  |  AMD Radeon RX 6700XT  |  Dual display DP-1 & DP-2=2560x1440
Laptop: Triple boot {Arch & Mint & Windows 11}  |  Dell Latitude 5420  |  Intel Core i5-1145G7  |  16GB DDR4  |  Iris Xe GPU | eDP-1=1920x1080

~ Do or do not, there is no try ~

Offline

#2 2022-02-24 10:14:38

SweepingBishops
Member
Registered: 2022-02-14
Posts: 30

Re: [SOLVED] ext4 label on Microsoft filesystem

If I read your post right, this is a new installation of Windows and a newly formatted drive.
In that case you'll have to create a filesystem on the partition.
Something like this:

# mkfs.ntfs /dev/sda1

Add any labels you want with the -L flag.

Offline

#3 2022-02-24 10:53:23

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 338

Re: [SOLVED] ext4 label on Microsoft filesystem

What @SweepingBishops said; the "problem" seems to be that MS Windows doesn't really do anything with that reserved area; it's not a formatted area of the disk - if I get it right - it's a partition all right, but it hasn't otherwise been touched by MS Windows (ref. this Wikipedia article). So I guess the remains of the previous Ext4 partition will still be intact, and because the  superblock is in the beginning of the partition and contains the volume label, and the first 16MB of the old Ext4 partition is still there, the partition will look like Ext4 to lsblk.

So to change it, you'll have to do what @SweepingBishops said - because you can't change the label of unformatted disk space.

I'm no expert at this, so if anybody can add more insight that'd be great smile

Offline

#4 2022-02-24 12:20:31

coxe87b
Member
From: Canberra
Registered: 2019-12-08
Posts: 92

Re: [SOLVED] ext4 label on Microsoft filesystem

SweepingBishops wrote:

If I read your post right, this is a new installation of Windows and a newly formatted drive.
In that case you'll have to create a filesystem on the partition.
Something like this:

# mkfs.ntfs /dev/sda1

Add any labels you want with the -L flag.

I'm more familiar with the workings of Linux than Windows, but formatting the reserved partition will render Windows unbootable because as far as I can tell, the Windows boot files are installed on that partition from what I've read.

Therefore formatting it may solve the label issue, but will break my Windows installation, which isn't a massive issue as there is nothing important on it, I just don't want to have to reinstall it is all.


Desktop: Dual boot {Arch & Windows 11}  |  Hyprland  |  AMD Ryzen 5700X  |  32GB DDR4  |  AMD Radeon RX 6700XT  |  Dual display DP-1 & DP-2=2560x1440
Laptop: Triple boot {Arch & Mint & Windows 11}  |  Dell Latitude 5420  |  Intel Core i5-1145G7  |  16GB DDR4  |  Iris Xe GPU | eDP-1=1920x1080

~ Do or do not, there is no try ~

Offline

#5 2022-02-24 12:25:58

SweepingBishops
Member
Registered: 2022-02-14
Posts: 30

Re: [SOLVED] ext4 label on Microsoft filesystem

coxe87b wrote:

formatting the reserved partition will render Windows unbootable because as far as I can tell, the Windows boot files are installed on that partition from what I've read.

So you mean to say that Windows actually boots from a ext4 partition?

Offline

#6 2022-02-24 12:28:32

coxe87b
Member
From: Canberra
Registered: 2019-12-08
Posts: 92

Re: [SOLVED] ext4 label on Microsoft filesystem

Ferdinand wrote:

What @SweepingBishops said; the "problem" seems to be that MS Windows doesn't really do anything with that reserved area; it's not a formatted area of the disk - if I get it right - it's a partition all right, but it hasn't otherwise been touched by MS Windows (ref. this Wikipedia article). So I guess the remains of
the previous Ext4 partition will still be intact, and because the  superblock is in the beginning of the partition and contains the volume label, and the first 16MB of the old Ext4 partition is still there, the partition will look like Ext4 to lsblk.

So to change it, you'll have to do what @SweepingBishops said - because you can't change the label of unformatted disk space.

I'm no expert at this, so if anybody can add more insight that'd be great smile

Thank you and what you said makes sense. I was just hesitant to format it as I have read that it may contain boot files for Windows. Then again, maybe I don't need those because I use GRUB? I know this is predominantly a Windows question rather than an Arch question, so I appreciate the responses from you both.

I read this: https://www.howtogeek.com/192772/what-i … delete-it/ and this: https://www.diskpart.com/articles/gpt-r … 128mb.html, so that is what I'm basing my information on.


Desktop: Dual boot {Arch & Windows 11}  |  Hyprland  |  AMD Ryzen 5700X  |  32GB DDR4  |  AMD Radeon RX 6700XT  |  Dual display DP-1 & DP-2=2560x1440
Laptop: Triple boot {Arch & Mint & Windows 11}  |  Dell Latitude 5420  |  Intel Core i5-1145G7  |  16GB DDR4  |  Iris Xe GPU | eDP-1=1920x1080

~ Do or do not, there is no try ~

Offline

#7 2022-02-24 12:30:08

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] ext4 label on Microsoft filesystem

SweepingBishops wrote:
coxe87b wrote:

formatting the reserved partition will render Windows unbootable because as far as I can tell, the Windows boot files are installed on that partition from what I've read.

So you mean to say that Windows actually boots from a ext4 partition?

Your missing the point of the thread. It's not an ext4 partition, it's a Microsoft reserved partition.
It's just that Windows hasn't changed the fstype in the partition table to reflect the change.

It should be possible to just edit the fstype without having to reformat the partition.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#8 2022-02-24 12:32:15

SweepingBishops
Member
Registered: 2022-02-14
Posts: 30

Re: [SOLVED] ext4 label on Microsoft filesystem

Slithery wrote:

Your missing the point of the thread. It's not an ext4 partition, it's a Microsoft reserved partition.
It's just that Windows hasn't changed the fstype in the partition table to reflect the change.

Oh.

Offline

#9 2022-02-24 12:39:20

coxe87b
Member
From: Canberra
Registered: 2019-12-08
Posts: 92

Re: [SOLVED] ext4 label on Microsoft filesystem

SweepingBishops wrote:
coxe87b wrote:

formatting the reserved partition will render Windows unbootable because as far as I can tell, the Windows boot files are installed on that partition from what I've read.

So you mean to say that Windows actually boots from a ext4 partition?

No, I don't think that is the case. I don't think there is a valid partition on there, according to Linux's definition of a valid partition that is. The fact is that the superblock is invalid anyway as the partition is only 16MB, and the original ext4 partition filled the entire disk.

 ~ ∮ sudo e2fsck -f /dev/sda1
e2fsck 1.46.5 (30-Dec-2021)
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
e2fsck: Group descriptors look bad... trying backup blocks...
e2fsck: Invalid argument while using the backup blockse2fsck: going back to original superblock
Error reading block 30441471 (Invalid argument).  Ignore error<y>? yes
Force rewrite<y>? yes
Superblock has an invalid journal (inode 8).
Clear<y>? yes
*** journal has been deleted ***

The filesystem size (according to the superblock) is 61049385 blocks
The physical size of the device is 4096 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no
One or more block group descriptor checksums are invalid.  Fix<y>? no
Group descriptor 448 checksum is 0x0000, should be 0xb0a6.  IGNORED.
Group descriptor 449 checksum is 0x0000, should be 0x949d.  IGNORED.
Group descriptor 450 checksum is 0x0000, should be 0xf8d0.  IGNORED.
Group descriptor 451 checksum is 0x0000, should be 0xdceb.  IGNORED.
Group descriptor 452 checksum is 0x0000, should be 0x204a.  IGNORED.
Group descriptor 453 checksum is 0x0000, should be 0x0471.  IGNORED.
Group descriptor 454 checksum is 0x0000, should be 0x683c.  IGNORED.
Group descriptor 455 checksum is 0x0000, should be 0x4c07.  IGNORED.
Error reading block 9284 (Invalid argument).  Ignore error<y>? no
Resize inode not valid.  Recreate<y>? no
Pass 1: Checking inodes, blocks, and sizes
Error reading block 9279 (Invalid argument).  Ignore error<y>? no
Error reading block 9284 (Invalid argument).  Ignore error<y>? yes
Force rewrite<y>? no
Inode 7, i_blocks is 122888, should be 8.  Fix<y>? no
Journal inode is not in use, but contains data.  Clear<y>? no
Inode 8 has an invalid extent node (blk 30441471, lblk 0)
Clear<y>? no
Inode 8 extent tree (at level 1) could be shorter.  Optimize<y>? no
Inode 8, i_blocks is 2097160, should be 0.  Fix<y>? no
Error writing block 30441471 (Invalid argument) while getting next inode from scan.  Ignore error<y>? no
Error while scanning inodes (12): Can't read next inode
Error writing block 30441471 (Invalid argument).  Ignore error<y>? no

games1: ***** FILE SYSTEM WAS MODIFIED *****

games1: ********** WARNING: Filesystem still has errors **********

e2fsck: aborted
Error writing block 30441471 (Invalid argument).  Ignore error<y>? no

games1: ***** FILE SYSTEM WAS MODIFIED *****

games1: ********** WARNING: Filesystem still has errors **********

If no one is able to advise, I might just take a chance and try your suggestion and format it, then see if Windows still boots. I'm just interested to find out the fix more than anything now. The Windows partition is not important.


Desktop: Dual boot {Arch & Windows 11}  |  Hyprland  |  AMD Ryzen 5700X  |  32GB DDR4  |  AMD Radeon RX 6700XT  |  Dual display DP-1 & DP-2=2560x1440
Laptop: Triple boot {Arch & Mint & Windows 11}  |  Dell Latitude 5420  |  Intel Core i5-1145G7  |  16GB DDR4  |  Iris Xe GPU | eDP-1=1920x1080

~ Do or do not, there is no try ~

Offline

#10 2022-02-24 13:01:46

GeorgeJP
Member
From: Czech Republic
Registered: 2020-01-28
Posts: 190

Re: [SOLVED] ext4 label on Microsoft filesystem

You can try to wipe it with (please double check before hiting Enter)

sudo dd if=/dev/urandom of=/dev/sda1

Offline

#11 2022-02-24 14:12:41

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] ext4 label on Microsoft filesystem

Or use wipefs to clear ext4 signatures.

@Slithery: you seem to be one contradicting everything else in this thread? fdisk output shows partition table was changed?

Last edited by Raynman (2022-02-24 14:14:47)

Offline

#12 2022-02-24 14:37:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,044

Re: [SOLVED] ext4 label on Microsoft filesystem

Slithery wrote:

It's just that Windows hasn't changed the fstype [in the partition table to reflect the change]

There's probably confusing wording in this thread and statement.
The partition type (was changed but) isn't the same as the fstype - https://en.wikipedia.org/wiki/Microsoft … _Partition is just uninitialized data garbage for padding and lsblk picks up remnants from the FS that previously existed at this location.

Offline

#13 2022-02-25 06:46:44

coxe87b
Member
From: Canberra
Registered: 2019-12-08
Posts: 92

Re: [SOLVED] ext4 label on Microsoft filesystem

Thank you for all your suggestions everyone. I have resolved the issue by using Raynman's suggestion of wipefs. I wiped the ext4 signature and rebooted in to Windows just fine.

Raynman wrote:

Or use wipefs to clear ext4 signatures.

^ Worked for me - cheers guys.


Desktop: Dual boot {Arch & Windows 11}  |  Hyprland  |  AMD Ryzen 5700X  |  32GB DDR4  |  AMD Radeon RX 6700XT  |  Dual display DP-1 & DP-2=2560x1440
Laptop: Triple boot {Arch & Mint & Windows 11}  |  Dell Latitude 5420  |  Intel Core i5-1145G7  |  16GB DDR4  |  Iris Xe GPU | eDP-1=1920x1080

~ Do or do not, there is no try ~

Offline

Board footer

Powered by FluxBB