Joined: 19 Jun 2007
|Posted: Fri Aug 03, 2018 10:53 am Post subject: Gentoo on XFS, grub Unknown filesystem type 0x83
|There are many ways to install Gentoo system.
But if you want to setup grub from XFS partition, grub prints error message "filesystem type unknown partition type 0x83". That is mean that grub didn't recognize XFS partition (tryed on grub-0.97-r18).
Due Gentoo GRUB Errors in wiki this is Error 17
|Error 17 : Cannot mount selected partition |
If you try to search with multiple search systems, you didn't find the way. (linuxquestion,ubuntooforums,askubuntoo,LOR,stackexchange,archlinux and more...) they tell that there is no way to setup grub from XFS partition and even force you to use separate /boot partition or setup root not on XFS.
About 9 years i installing gentoo on XFS, and yes i has some problems.
There was lucky build of gentoo-2014(livedvd-amd64-multilib-20140826.iso) live DVD, those in a fact can format XFS partition and than grub can setup from.
But next live build of gentoo-2016 can't do that way. So on one already forgoten forum was writen that the defaults XFS format parameters was changed and grub cant reconize that filesystem and didn't see /boot
If you formating partition in XFS format use these parameters:
| livecd / # mkfs -t xfs -n ftype=0 -m crc=0 /dev/sda1 |
|grub> root (hd0,0)
Filesystem type is xfs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/xfs_stage1_5" exists... yes
Running "embed /boot/grub/xfs_stage1_5 (hd0)"... failed (this is not fatal)
Running "embed /boot/grub/xfs_stage1_5 (hd0,1)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
|livecd / # xfs_info /dev/sda1
meta-data=/dev/sda1 isize=256 agcount=4, agsize=1904960 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0 spinodes=0
data = bsize=4096 blocks=7619840, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=3720, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
PS from man:
This feature allows the inode type to be stored in the directory structure so that the readdir(3) and getdents(2) do not need to look up the inode to deter-
mine the inode type.
The value is either 0 or 1, with 1 signifiying that filetype information will be stored in the directory structure. The default value is 0.
When CRCs are enabled via -m crc=1, the ftype functionality is always enabled. This feature can not be turned off for such filesystem configurations.
This is used to create a filesystem which maintains and checks CRC information in all metadata objects on disk. The value is either 0 to disable the fea-
ture, or 1 to enable the use of CRCs.
CRCs enable enhanced error detection due to hardware issues, whilst the format changes also improves crash recovery algorithms and the ability of various
tools to validate and repair metadata corruptions when they are found. The CRC algorithm used is CRC32c, so the overhead is dependent on CPU architecture
as some CPUs have hardware acceleration of this algorithm. Typically the overhead of calculating and checking the CRCs is not noticeable in normal opera-
By default, mkfs.xfs will enable metadata CRCs.
Do not update portage without hotdog!