Skip to content

OXT-1372: installer: Amend disk/partition for efibootmgr#92

Merged
jean-edouard merged 1 commit intoOpenXT:masterfrom
eric-ch:oxt-1372
Jul 9, 2018
Merged

OXT-1372: installer: Amend disk/partition for efibootmgr#92
jean-edouard merged 1 commit intoOpenXT:masterfrom
eric-ch:oxt-1372

Conversation

@eric-ch
Copy link
Copy Markdown
Contributor

@eric-ch eric-ch commented Jul 2, 2018

Add two functions to the common script library to parse devnodes disk
and partition and use them with efibootmgr when writting efi boot
entries for a new OpenXT installation.

@jean-edouard
Copy link
Copy Markdown
Member

This is definitely an improvement over the existing code, so I wouldn't mind merging it.
However... :p
You're only handling disks up to /dev/sdz, whereas Linux (reliably) handles up to /dev/sdzzz. That's definitely an edge case though.
Also, and this is even more picky, I think the /dev/sd* case could be generalized to /dev/*, since that's the most common scheme (letter for the disk followed by partition number), just in case we ever have to deal with stuff like nested virt or embedded drives.

Anyway, just a couple thoughts, feel free to ignore this :)

@eric-ch
Copy link
Copy Markdown
Contributor Author

eric-ch commented Jul 6, 2018

Anyway, just a couple thoughts, feel free to ignore this :)

Why would I!? ;) And it is not hard to fix really.

Also, and this is even more picky, I think the /dev/sd* case could be generalized to /dev/*, since that's the most common scheme (letter for the disk followed by partition number), just in case we ever have to deal with stuff like nested virt or embedded drives.

That part I do not understand... Could you elaborate?

EDIT:
Hang on... Linux admin-guide defines SCSI disks ranging from /dev/sda to /dev/sdiv with 16 partitions each. /dev/sdzzz should not be possible?
You still have a point though ;). In theory, the naming can go on and on... (SCSI disk name)

@eric-ch
Copy link
Copy Markdown
Contributor Author

eric-ch commented Jul 6, 2018

V2:

  • Handle SCSI disk devnodes beyond /dev/sdz;
  • Handle partitions on SCSI disk devnodes beyond 9.

Add two functions to the common script library to parse devnodes disk
and partition and use them with efibootmgr when writting efi boot
entries for a new OpenXT installation.

Signed-off-by: Eric Chanudet <chanudete@ainfosec.com>

OXT-1372
@eric-ch
Copy link
Copy Markdown
Contributor Author

eric-ch commented Jul 6, 2018

V3:

  • get_devnodes_partition should echo the partition number or nothing (do not match /dev/nvmeXnX).

@jean-edouard
Copy link
Copy Markdown
Member

LGTM, merging soon.

@jean-edouard jean-edouard merged commit c98a7d2 into OpenXT:master Jul 9, 2018
@eric-ch eric-ch deleted the oxt-1372 branch April 8, 2019 22:51
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

Successfully merging this pull request may close these issues.

2 participants