Skip to contentSkip to conversation

wic: squashfs does support partition uuid

PATCH Superseded Emmanuel Roullit 2 participants 3 messages Sep 5, 2018 – Sep 6, 2018

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wic: squashfs does support partition uuid

wic allows the user to create disk image and reference each created partitions via its partition UUID.

squashfs does not support filesystem UUID but it does offer support for partition UUID.

$ lsblk -o NAME,FSTYPE,UUID,PARTUUID
NAME   FSTYPE   UUID                                 PARTUUID
sda
|-sda1 vfat     6078-ACD0                            95aa4ffb-741d-4d99-adf6-0358bc890046
|-sda2 squashfs                                      7d46da2d-29cc-4d5a-9e39-d0381c4abb0c
|-sda3 squashfs                                      d4a3e24e-410a-4f2c-8ad5-8f8321de177b
|-sda4 ext4     d72ec529-78e4-4cd3-b39b-781b6b1cb47c f3edc990-f4f6-4536-9587-44dae4ceb99f
`-sda5 ext4     a0b265aa-e935-40b8-9c6b-e9e58ad3890f 6e72ebaa-29ed-41cd-844c-3f76976cf41d

Removing this constrain allows a user to create squashfs-based rootfs and boot from it with such kernel argument 'root=PARTUUID=7d46da2d-29cc-4d5a-9e39-d0381c4abb0c'

---
 scripts/lib/wic/ksparser.py | 5 -----
 1 file changed, 5 deletions(-)
scripts/lib/wic/ksparser.py +0 -5
index e590b2f..92f0b6d 100644
@@ -196,11 +196,6 @@ class KickStart():
                         raise KickStartError('%s:%d: %s' % \
                                              (confpath, lineno, err))
                     if line.startswith('part'):
-                        # SquashFS does not support UUID
-                        if parsed.fstype == 'squashfs' and parsed.use_uuid:
-                            err = "%s:%d: SquashFS does not support UUID" \
-                                  % (confpath, lineno)
-                            raise KickStartError(err)
                         # using ArgumentParser one cannot easily tell if option
                         # was passed as argument, if said option has a default
                         # value; --overhead-factor/--extra-space cannot be used
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · Emmanuel Roullit

wic allows the user to create disk image and reference each created partitions via its partition UUID.

squashfs does not support filesystem UUID but it does offer support for partition UUID.

$ lsblk -o NAME,FSTYPE,UUID,PARTUUID
NAME   FSTYPE   UUID                                 PARTUUID
sda
|-sda1 vfat     6078-ACD0                            95aa4ffb-741d-4d99-adf6-0358bc890046
|-sda2 squashfs                                      7d46da2d-29cc-4d5a-9e39-d0381c4abb0c
|-sda3 squashfs                                      d4a3e24e-410a-4f2c-8ad5-8f8321de177b
|-sda4 ext4     d72ec529-78e4-4cd3-b39b-781b6b1cb47c f3edc990-f4f6-4536-9587-44dae4ceb99f
`-sda5 ext4     a0b265aa-e935-40b8-9c6b-e9e58ad3890f 6e72ebaa-29ed-41cd-844c-3f76976cf41d
Quoted 4 lines

Removing this constrain allows a user to create squashfs-based rootfs and boot from it with such kernel argument 'root=PARTUUID=7d46da2d-29cc-4d5a-9e39-d0381c4abb0c'

Please add in:

Fixes 2fbdcf4e59c8 ("wic: kparser.py: Check for SquashFS and use-uuid")
Quoted 10 lines
---
 scripts/lib/wic/ksparser.py | 5 -----
 1 file changed, 5 deletions(-)
scripts/lib/wic/ksparser.py +0 -0
index e590b2f..92f0b6d 100644
@@ -196,11 +196,6 @@ class KickStart():
                         raise KickStartError('%s:%d: %s' % \

scripts/lib/wic/ksparser.py class KickStart(): · line 201

Quoted 10 lines
scripts/lib/wic/ksparser.py +0 -5
                                              (confpath, lineno, err))
                     if line.startswith('part'):
-                        # SquashFS does not support UUID
-                        if parsed.fstype == 'squashfs' and parsed.use_uuid:
-                            err = "%s:%d: SquashFS does not support UUID" \
-                                  % (confpath, lineno)
-                            raise KickStartError(err)
                         # using ArgumentParser one cannot easily tell if option
                         # was passed as argument, if said option has a default
                         # value; --overhead-factor/--extra-space cannot be used

So I got this logic slightly wrong then. We should correct the check that we don't have parsed.fsuuid rather than use_uuid. Thanks!

Signature · 1 line
Tom
#2 lore raw

Got it.
I will tweak it and resubmit a PATCHv2 once I got it right.

Quoted 64 lines · Tom Rini
Quoted 10 lines · Emmanuel Roullit

wic allows the user to create disk image and reference each created partitions via its partition UUID.

squashfs does not support filesystem UUID but it does offer support for partition UUID.

$ lsblk -o NAME,FSTYPE,UUID,PARTUUID
NAME   FSTYPE   UUID                                 PARTUUID
sda
|-sda1 vfat     6078-ACD0

95aa4ffb-741d-4d99-adf6-0358bc890046

Quoted 1 line

|-sda2 squashfs

7d46da2d-29cc-4d5a-9e39-d0381c4abb0c

Quoted 1 line

|-sda3 squashfs

d4a3e24e-410a-4f2c-8ad5-8f8321de177b

Quoted 1 line

|-sda4 ext4 d72ec529-78e4-4cd3-b39b-781b6b1cb47c

f3edc990-f4f6-4536-9587-44dae4ceb99f

Quoted 1 line

`-sda5 ext4 a0b265aa-e935-40b8-9c6b-e9e58ad3890f

6e72ebaa-29ed-41cd-844c-3f76976cf41d

Quoted 2 lines

Removing this constrain allows a user to create squashfs-based rootfs

and boot

Quoted 1 line

from it with such kernel argument

'root=PARTUUID=7d46da2d-29cc-4d5a-9e39-d0381c4abb0c'

Quoted 2 lines

Please add in:

Fixes 2fbdcf4e59c8 ("wic: kparser.py: Check for SquashFS and use-uuid")
Quoted 9 lines
---
 scripts/lib/wic/ksparser.py | 5 -----
 1 file changed, 5 deletions(-)
scripts/lib/wic/ksparser.py +0 -0
index e590b2f..92f0b6d 100644

scripts/lib/wic/ksparser.py class KickStart(): · line 200

Quoted 5 lines
scripts/lib/wic/ksparser.py +0 -2
@@ -196,11 +196,6 @@ class KickStart():
                         raise KickStartError('%s:%d: %s' % \
                                              (confpath, lineno, err))
                     if line.startswith('part'):
-                        # SquashFS does not support UUID
-                        if parsed.fstype == 'squashfs' and

parsed.use_uuid:

scripts/lib/wic/ksparser.py class KickStart(): · line 201

Quoted 1 line
scripts/lib/wic/ksparser.py +0 -1
-                            err = "%s:%d: SquashFS does not support

UUID" \

scripts/lib/wic/ksparser.py class KickStart():

Quoted 3 lines
scripts/lib/wic/ksparser.py +0 -2
-                                  % (confpath, lineno)
-                            raise KickStartError(err)
                         # using ArgumentParser one cannot easily tell

if option

scripts/lib/wic/ksparser.py class KickStart(): · line 200

Quoted 1 line
scripts/lib/wic/ksparser.py +0 -0
                         # was passed as argument, if said option has a

default

scripts/lib/wic/ksparser.py class KickStart(): · line 201

Quoted 1 line
scripts/lib/wic/ksparser.py +0 -0
                         # value; --overhead-factor/--extra-space cannot

be used

So I got this logic slightly wrong then. We should correct the check that we don't have parsed.fsuuid rather than use_uuid. Thanks!

--
Tom