Control: tags -1 + patch
Control: forwarded -1 https://github.com/grml/grml2usb/pull/24

On 2019-10-30 17:09 +0100, Sven Joachim wrote:

> Package: grml2usb
> Version: 0.16.7
> Severity: grave
>
> The check_for_fat() function always fails, no matter what:
>
> ,----
> | # file -s /dev/sdc2
> | /dev/sdc2: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID
> | "mkfs.fat", sectors/cluster 64, reserved sectors 64, root entries
> | 1024, Media descriptor 0xf8, sectors/FAT 256, sectors/track 32,
> | heads 64, hidden sectors 27265024, sectors 3512319 (volumes > 32
> | MB), serial number 0x6666adbb, unlabeled, FAT (16 bit)
> | # sudo grml2usb grml96-full_2018.12.iso /dev/sdc2
> | Executing grml2usb version 0.16.7
> | Execution failed: Partition /dev/sdc2 does not contain a FAT16 filesystem. 
> (Use --fat16 or run mkfs.vfat /dev/sdc2)
> | # grml2usb --fat16 grml96-full_2018.12.iso /dev/sdc2
> | Executing grml2usb version 0.16.7
> | Are you sure you want to format the specified partition with fat16? y/N y
> | Note: you can skip this question using the option --force
> | Formating partition with fat16 filesystem
> | mkfs.fat 4.1 (2017-01-24)
> | Execution failed: Partition /dev/sdc2 does not contain a FAT16 filesystem. 
> (Use --fat16 or run mkfs.vfat /dev/sdc2)
> `----
>
> I am not really a Python expert, but AFAICS the problem is that by
> default Subprocess.open() opens file objects in binary mode, so the
> "filesystem" variable is an array of bytes, and comparing it to a string
> always yields false.

So that was indeed the case, but after fixing it I immediately ran into
another "strings vs bytes" problem in check_boot_flag().  Fortunately
that was the last issue, and now I have a USB stick with GRML on it. :-)
Have not tested whether it actually boots yet, though.

I have sent a pull request on GitHub.

Cheers,
       Sven

Reply via email to