Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readable unicode kernel cmdline arguments #195

Open
avidseeker opened this issue Oct 27, 2023 · 1 comment
Open

Readable unicode kernel cmdline arguments #195

avidseeker opened this issue Oct 27, 2023 · 1 comment

Comments

@avidseeker
Copy link

This command to create a Linux boot entry:

# efibootmgr --create --disk /dev/sda --part 1 -L LINUX --loader /vmlinuz-linux --unicode 'root=/dev/sda2 rw initrd=\initramfs-linux.img'

will output:

Boot0001* LINUX HD(1,GPT,<UUID>)/File(\vmlinuz-linux)root=/dev/sda2 rw initrd=\initramfs-linux.img

However, issuing efibootmgr again shows:

Boot0001* LINUX HD(1,GPT,<UUID>)/File(\vmlinuz-linux)72006f006f0074003d002f006400650076002f007300640061003200200072007700200069006e0069007400720064003d005c0069006e0069007400720061006d00660073002d006c0069006e00750078002e0069006d006700

which is an unreadable decoded format for the kernel cmdline.

@nabijaczleweli
Copy link

Mirroring downstream bug: https://bugs.debian.org/1055526

I want to say that previous versions of efibootmgr did something like

BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0005,0004,0001,0002,0003
Boot0001* UEFI:CD/DVD Drive     BBS(129,,0x0)
Boot0002* UEFI:Removable Device BBS(130,,0x0)
Boot0003* UEFI:Network Device   BBS(131,,0x0)
Boot0004* Debian GNU/Linux trixie/sid with Linux 6.1.0-7-amd64  HD(1,GPT,48520351-6c2c-4617-a8d1-f353b750ef98,0x800,0x76800)/File(\KLAPKI\731B69F0DAC147EFADFED92F12712736\6.1.0-7-AMD64\VMLINUZ-6.1.0-7-AMD64)i.n.i.t.r.d.=.\.k.l.a.p.k.i.\.7.3.1.b.6.9.f.0.d.a.c.1.4.7.e.f.a.d.f.e.d.9.2.f.1.2.7.1.2.7.3.6.\.6...1...0.-.7.-.a.m.d.6.4.\.i.n.i.t.r.d...i.m.g.-.6...1...0.-.7.-.a.m.d.6.4. .r.o.o.t.=.z.f.s.:.A.U.T.O. .f.b.c.o.n.=.r.o.t.a.t.e.:.3. .i.n.t.e.l._.i.o.m.m.u.=.o.n. .z.f.s...z.f.s._.a.r.c._.m.a.x.=.1.2.8.8.4.9.0.1.8.8.8. .q.u.i.e.t. .m.o.d.u.l.e...s.i.g._.e.n.f.o.r.c.e.=.1.
Boot0005* Debian GNU/Linux trixie/sid with Linux 6.1.0-9-amd64  HD(1,GPT,48520351-6c2c-4617-a8d1-f353b750ef98,0x800,0x76800)/File(\KLAPKI\731B69F0DAC147EFADFED92F12712736\6.1.0-9-AMD64\VMLINUZ-6.1.0-9-AMD64).i.n.i.t.r.d.=.\.k.l.a.p.k.i.\.7.3.1.b.6.9.f.0.d.a.c.1.4.7.e.f.a.d.f.e.d.9.2.f.1.2.7.1.2.7.3.6.\.6...1...0.-.9.-.a.m.d.6.4.\.i.n.i.t.r.d...i.m.g.-.6...1...0.-.9.-.a.m.d.6.4. .r.o.o.t.=.z.f.s.:.A.U.T.O. .f.b.c.o.n.=.r.o.t.a.t.e.:.3. .i.n.t.e.l._.i.o.m.m.u.=.o.n. .z.f.s...z.f.s._.a.r.c._.m.a.x.=.1.2.8.8.4.9.0.1.8.8.8. .q.u.i.e.t. .m.o.d.u.l.e...s.i.g._.e.n.f.o.r.c.e.=.1.

But 18-1 does

BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0005,0004,0001,0002,0003
Boot0001* UEFI:CD/DVD Drive     BBS(129,,0x0)
Boot0002* UEFI:Removable Device BBS(130,,0x0)
Boot0003* UEFI:Network Device   BBS(131,,0x0)
Boot0004* Debian GNU/Linux trixie/sid with Linux 6.1.0-7-amd64  HD(1,GPT,48520351-6c2c-4617-a8d1-f353b750ef98,0x800,0x76800)/File(\KLAPKI\731B69F0DAC147EFADFED92F12712736\6.1.0-7-AMD64\VMLINUZ-6.1.0-7-AMD64)69006e0069007400720064003d005c006b006c00610070006b0069005c00370033003100620036003900660030006400610063003100340037006500660061006400660065006400390032006600310032003700310032003700330036005c0036002e0031002e0030002d0037002d0061006d006400360034005c0069006e0069007400720064002e0069006d0067002d0036002e0031002e0030002d0037002d0061006d00640036003400200072006f006f0074003d007a00660073003a004100550054004f0020006600620063006f006e003d0072006f0074006100740065003a003300200069006e00740065006c005f0069006f006d006d0075003d006f006e0020007a00660073002e007a00660073005f006100720063005f006d00610078003d003100320038003800340039003000310038003800380020007100750069006500740020006d006f00640075006c0065002e007300690067005f0065006e0066006f007200630065003d003100
Boot0005* Debian GNU/Linux trixie/sid with Linux 6.1.0-9-amd64  HD(1,GPT,48520351-6c2c-4617-a8d1-f353b750ef98,0x800,0x76800)/File(\KLAPKI\731B69F0DAC147EFADFED92F12712736\6.1.0-9-AMD64\VMLINUZ-6.1.0-9-AMD64)69006e0069007400720064003d005c006b006c00610070006b0069005c00370033003100620036003900660030006400610063003100340037006500660061006400660065006400390032006600310032003700310032003700330036005c0036002e0031002e0030002d0039002d0061006d006400360034005c0069006e0069007400720064002e0069006d0067002d0036002e0031002e0030002d0039002d0061006d00640036003400200072006f006f0074003d007a00660073003a004100550054004f0020006600620063006f006e003d0072006f0074006100740065003a003300200069006e00740065006c005f0069006f006d006d0075003d006f006e0020007a00660073002e007a00660073005f006100720063005f006d00610078003d003100320038003800340039003000310038003800380020007100750069006500740020006d006f00640075006c0065002e007300690067005f0065006e0066006f007200630065003d003100

No flags are relevant, but -u, defined as

       -u | --unicode | --UCS-2
              Handle extra command line arguments as UCS-2 (default is ASCII).

somehow yields

BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0005,0004,0001,0002,0003
Boot0001* UEFI:CD/DVD Drive     BBS(129,,0x0)
Boot0002* UEFI:Removable Device BBS(130,,0x0)
Boot0003* UEFI:Network Device   BBS(131,,0x0)
Boot0004* Debian GNU/Linux trixie/sid with Linux 6.1.0-7-amd64  HD(1,GPT,48520351-6c2c-4617-a8d1-f353b750ef98,0x800,0x76800)/File(\KLAPKI\731B69F0DAC147EFADFED92F12712736\6.1.0-7-AMD64\VMLINUZ-6.1.0-7-AMD64)initrd=\klapki\731b69f0dac147efadfed92f12712736\6.1.0-7-amd64\initrd.img-6.1.0-7-amd64 root=zfs:AUTO fbcon=rotate:3 intel_iommu=on zfs.zfs_arc_max=12884901888 quiet module.sig_enforce=1
Boot0005* Debian GNU/Linux trixie/sid with Linux 6.1.0-9-amd64  HD(1,GPT,48520351-6c2c-4617-a8d1-f353b750ef98,0x800,0x76800)/File(\KLAPKI\731B69F0DAC147EFADFED92F12712736\6.1.0-9-AMD64\VMLINUZ-6.1.0-9-AMD64)initrd=\klapki\731b69f0dac147efadfed92f12712736\6.1.0-9-amd64\initrd.img-6.1.0-9-amd64 root=zfs:AUTO fbcon=rotate:3 intel_iommu=on zfs.zfs_arc_max=12884901888 quiet module.sig_enforce=1

so..?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants