Bug 1401700

Summary: wrong partition type swap used for / (root)
Product: [Fedora] Fedora Reporter: Ilkka Tengvall <ikke>
Component: fedora-arm-installerAssignee: Paul Whalen <pwhalen>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: johannes, jonc_mailbox, kdudka, ovasik, pwhalen
Target Milestone: ---   
Target Release: ---   
Hardware: armv7hl   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-06 22:28:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ilkka Tengvall 2016-12-05 21:15:40 UTC
Description of problem:

Raspi3 install image has wrong fs type for root filesystem. It's swap instead of xfs/linux. This breaks the fedora-arm-image-installer from extending the filesystem. It errors out as it says can't extend swap fs type. 

Version-Release number of selected component (if applicable):

F25 download image for RasPi3: Fedora-Server-armhfp-25-1.3-sda.raw.xz
fedora-arm-installer-1.99.13-1.fc25.noarch


How reproducible:

I downloaded the image and wrote it to microsd using fedora-arm-installer

Steps to Reproduce:
1. download F25 image
2. insert microsd card
3. sudo arm-image-installer --image=Downloads/Fedora-Server-armhfp-25-1.3-sda.raw.xz --target rpi3 --media /dev/sdb --resizefs

Actual results:
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        431M     0  431M   0% /dev
tmpfs           485M     0  485M   0% /dev/shm
tmpfs           485M  572K  485M   1% /run
tmpfs           485M     0  485M   0% /sys/fs/cgroup
/dev/mmcblk0p4  2.8G  2.0G  871M  70% /
/dev/mmcblk0p2  457M  302M  141M  69% /boot
tmpfs            97M     0   97M   0% /run/user/0
tmpfs            97M     0   97M   0% /run/user/1017
$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 14.5 GiB, 15523119104 bytes, 30318592 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: 0x84794c07

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p1         2048    61439    59392   29M  c W95 FAT32 (LBA)
/dev/mmcblk0p2 *      61440  1060863   999424  488M 83 Linux
/dev/mmcblk0p3      1060864  2060287   999424  488M 82 Linux swap / Solaris
/dev/mmcblk0p4      2060288 30318591 28258304 13.5G 82 Linux swap / Solaris

$ cat /etc/fstab 
UUID=3127aee4-2e05-4198-9143-c2bfb41d56d2  / xfs    defaults,noatime 0 0
UUID=1eb05483-d206-424d-9061-d46613c74548  /boot ext4    defaults,noatime 0 0
UUID=fc66c869-6129-44fd-9209-5f8dcc0ce03c  swap swap    defaults,noatime 0 0


Expected results:

/dev/mmcblk0p4 to be not swap fs type

Additional info:

Comment 1 Kamil Dudka 2016-12-06 09:00:39 UTC
Sounds like a problem with the image, not with the filesystem RPM package.

Comment 2 Paul Whalen 2017-04-06 22:28:50 UTC
This is a known issue in appliance-tools, the partition type is set incorrectly. 

Resize for the server image will be fixed in the next build of the fedora-arm-installer. For now, once the system is booted you can use:

growpart /dev/mmcblk0 4
xfs_growfs /dev/mmcblk0p4